Re:Best of Vim Tips
by jaredmcateer on Wednesday June 25, 2014 @11:50AM
(#7944702)
In your vimrc add the following (version 7.3+):
This turns your line numbers into a hybrid mode that show the numbers relative to your cursor and the actual line number your cursor is currently on.
[ Parent
| on HN ]
Yikes! The continually changing numbers drives me crazy. Thanks for the tip, but I think I'll stick with just using ":13" to go to line #13... I guess there is some benefit if you do a lot of yanking/cutting based on lines, rather than some magic matching or such. But for now, relative line numbers is not for me.
For (a little) more, see:
Re:Best of Vim Tips
by mediocrejoker on Wednesday June 25, 2014 @06:51PM
(#7947211)
This doesn't work for me in 7.3.429-2ubuntu2.1. It still shows 0 for the line you're currently on.
Re:Best of Vim Tips
by steveklabnik on Wednesday June 25, 2014 @04:45PM
(#7946664)
That is way cooler than my old 'focus' hack. Thank you!