I feel like with every editor, it involves repeatedly hitting J, Ctrl+N or down arrow, which is inefficient. Do you have a way to get to a particular line that does not force you to think too much about how to get there ?
I feel like with every editor, it involves repeatedly hitting J, Ctrl+N or down arrow, which is inefficient. Do you have a way to get to a particular line that does not force you to think too much about how to get there ?
If you want to jump to a specific line number, you can use M-g M-g <number>, or (because C-u also provides numerical arguments) C-u <number> M-g M-g.
Finally, many motion commands set the mark, so you can use C-x C-x to return to where you were and select all text between your previous and current locations.
Oh, and if you want something even better, you can use C-` to jump to the location of compiler error if you use M-x compile, you can use ag.el or helm-ag for ag integration, Ace-Jump, which is similar to EasyMotion, built-in exuberant ctags integration (and a built-in ctags clone, etags), packages for cscope integration (if you're using C), and fiinally semantic, which provides a variety of parser-based tooling if it's supported by your language.
But you can also just use C-n, etc. and we won't judge you for it.
This is probably the biggest selling point of the Emacs community. They're not going to try to guilt or shame you into using more efficient or more advanced commands. If C-n works for you, use it!
What, inefficiency? Inefficiency wasn't the problem. The problem was having to focus too much of my mind on how to use the editor. Muscle memory is invaluable, and Vim just doesn't let my muscle memory take over if I keep having to think about what's the most "efficient" way to move around or change text. Emacs lets my muscle memory take over easily. I just hit C-n or M-S-] a lot. It's inefficient, sure. But who cares? I never realize I'm doing it, and I never feel blocked having to wait until I get to the line I want to.
I happily switched to Sublime for two years and then VS Code. I still use emacs with Clojure though.
I'm only playing, but found a good set-up with vim-fireplace; vim-clojure-highlight; vim-sexp; Vim-sexp-mappings-for-regular-people; vim-surround and luochen1990/rainbow
IME, you do develop muscle memory in terms of using more "efficient" ways of navigation and text manipulation after using vim for a while. I guess it's sort of like learning how to drive a vehicle equipped with a manual transmission. At first, you're thinking more about how to shift through the gears and use the clutch. After a while, you don't really think about it too much while you're still doing it. After driving a bit longer, you start to get a feel about which gear to choose for a given traffic situation.
So, similarly, you get a feel about which keybinding to use to change certain types of text or do certain movements without having to think too much about it.
2. move mouse cursor to desired position
3. click mouse
If you're just looking to put the cursor somewhere you can see, this is actually quite quick.