Hacker News new | ask | show | jobs
by aldanor 1097 days ago
{ and } pollute your location list! So your C-o will also jump through points where you pressed them. Also, for terse (whitespace-wise) codebases, they become useless. I used to use them a lot but now I use C-u/C-d for most vertical movement (and {} in those super rare cases where whitespace is just right).

To move horizontally, simple 'f' might be faster quite often (some prefer combining it with leap-like plugins like flit if using nvim).

1 comments

Interesting. I almost never use ctrl-o except if I navigate to another file and want to go back, happens intentionally and by accident but in any case rarely.
I never used it either before I started seriously using neovim for Rust development with a near-perfect LSP. You quite often 'gr' (go to reference), to check what some function does or how something is defined, then gr again and again.. and at some point you need to go back (yes, there's gi and c-t etc but C-o is less specific and works in many other cases; you can also set marks and harpoons and the like but most of the time you don't).
Interesting. I thought neovim is the reason I don't use ctrl-o, because it has floats. With my config I can gd to go to definition (and then sometimes ctrl-o back) but often do gpd to peek it in a tiny mini window.

By the way even without { and } which I never used really my ctrl-o history seems to be too verbose, I wonder what I am doing wrong.