3 ms·
You don’t need linum-mode to jump to a line number. Just use M-g g, or M-g M-g.
by 0db532a0 8y ago
You don’t need linum-mode to jump to a line number. Just use M-g g, or M-g M-g.
- craigsmansion 8y agoTo elaborate a little: "M-x goto-line which is bound to M-g g, or M-g M-g." Naming the function "goto-line" in full can make it easier to remember for a reader, providing a fallback for when the key-chord isn't part of muscle-memory yet, and provides an easy way to look up the binding in emacs itself: C-h f <ctrl-h(elp)-f(unction)> "Describe function:" goto-line "[..] It is bound to M-g g, M-g M-g [..]"
- 0db532a0 8y ago`C-h k M-g g` (k for key) will also describe what the key-chord `M-g g` is bound to. Also, `C-h k` is bound to the function `describe-key`.
- komali2 8y agoBut how would I know the line number of what I wanna jump to without display line number on? I.e I'm on line 100, want to pop down to a function on 202 (a line I haven't visited yet).
- zeveb 8y agoIt'd probably be more common to jump, e.g. using ace-jump or plain old interactive search.
- 0db532a0 8y agoAlong with interactive search (C-s forwards, C-r backwards), you can jump to the definition of a symbol (including a function) with ‘M-.’. These would be the idiomatic ways of moving around. There are multiple ways of maintaining up-to-date symbols depending on your context, which you can look up in the documentation for ‘M-.’.