5 ms·
Instead of counting, you can use :set relativenumber (vim/neovim builtin) to quickly see how far away lines are. (see https://jeffkreeftmeijer.com/vim-number/
by vulcan01 5y ago
Instead of counting, you can use :set relativenumber (vim/neovim builtin) to quickly see how far away lines are.
(see https://jeffkreeftmeijer.com/vim-number/ https://jeffkreeftmeijer.com/vim-number/)
- curriculum 5y agoIn my opinion the real downside of using <count>j and <count>k to move isn't the counting part, it's the fact that <count>k isn't a jump. That means it doesn't go into the jump list.
- tjdevries 5y agoYou can do something like this: ``` " Does: " For wrapped lines, does gj/gk " For large jumps, adds a spot on the jump list function! tj#jump_direction(letter) let jump_count = v:count if jump_count == 0 call execute(printf('normal! g%s', a:letter)) return endif if jump_count > 5 call execute("normal! m'") endif call execute(printf('normal! %d%s', jump_count, a:letter)) endfunction ``` and map j and k to this
- nobleach 5y agoI tried to get into that for awhile. I tend to look at the line number where I want to jump, and do <number>gg instead. It has the benefit of allowing me to look at a file and get an idea of what's on lines 400 through 425 (for example).