I've seen on someone's Vim having dynamic line numbers. You can just switch to another line by looking at its line number and using that with either j or k.
So, after googling a bit, I came upon these settings-
" To show normal line numbers
set number
" To show relative line numbers
set relativenumber
Just add one of the above snippet to your .vimrc and you're good to go.
But, if you want to toggle between them,
So, after googling a bit, I came upon these settings-
" To show normal line numbers
set number
" To show relative line numbers
set relativenumber
Just add one of the above snippet to your .vimrc and you're good to go.
But, if you want to toggle between them,
See this post by Jeff Kreeftmeijer
Jeff Kreeftmeijer - Relative line numbers in Vim for super-fast movement |
No comments:
Post a Comment
Let's hear what you have to say!