On 07.04.19 13:51, meine wrote:
> hi,
>
> I found a site where a vim plugin was used for relative line numbering
> and I want to give it a try. relative line numbers make it easier to
> navigate in normal mode by just using `3j' instead of `256G'. the less
> keystrokes the better!
...
> does anybody have experience with both of them? I'd be curious on your
> opinions! maybe there is a third one that is niftier, I'd like to know.
No experience with plugins, but just this in .vimrc does it for me:
noremap <F1> :call Rnu_toggle()<CR> " Toggle relative line numbering.
"
" Toggle relative line numbering.
function! Rnu_toggle()
if &rnu == 1
set nornu
else
set rnu
endif
endfun
Someone on another list needed it for absolute line numbers - took out
the 'r' in each set, and he was good to go.
And, yes, using vim here in mutt, it's available too - after all vim
reads the same .vimrc when run here.
Relative line numbering really shines when you do "d3+" or "y3+" - just
read the relative line number of the line you want to reach - no
counting, and no need to subtract one. Ah, it's the same with "3j" -
works the same as "3+", I see.
Erik
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sunday, April 7, 2019
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment