3 ms·
In your vimrc add the following (version 7.3+): set number set relativenumber This turns your line numbers into a hybrid mode that show the numbers re
by jaredmcateer 12y ago
In your vimrc add the following (version 7.3+):
set number
set relativenumber
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.
- steveklabnik 12y agoThat is way cooler than my old 'focus' hack. Thank you!
- mediocrejoker 12y agoThis doesn't work for me in 7.3.429-2ubuntu2.1. It still shows 0 for the line you're currently on.
- e12e 12y agoYikes! 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: http://vim.wikia.com/wiki/Jump_to_a_line_number http://vim.wikia.com/wiki/Jump_to_a_line_number