I switched to Emacs from Vim and because of Vims functionality of giving keys a prefix, (for example to jump up several lines etc.) i installed relative-linum-mode
right away.
Now i found out about Emacs native functionality of jumping to a specific line with M-g M-g
(and passing the line number in the minibuffer; the function is called goto-line
) and find that much more useful than giving a prefix to C-n
or C-p
, which is of course not a functionality exclusive to Vim, but i found that to be too tedious in Emacs after all... Maybe i just didn't get used to it.
Now my idea is to have line numbers deactivated most of the time because i find that to look a lot cleaner, but when i press M-g M-g
to activate linum-mode
, passing the desired line number and after pressing enter and jumping to that line to deactivate linum-mode
Can i bind that to M-g M-g
somehow? I know how to rebind keys but i can't figure out how (and if) my desired behavior is possible!