You can use a hybrid of absolute and relative numbering by setting both the 'number' and 'relativenumber' options (in vim 7.4). It displays the absolute number of the current line (instead of 0) but relative numbers of the other lines.
Care to give any links to this? This is probably my biggest annoyance with Vim right now, how my current line is 0 and having to add 1 every time I do any operation gets old quick.
I think what he means is just put both
set relativenumber
set number
In your .vimrc
Have a look at http://myusuf3.github.io/numbers.vim/
Re:Vim Tips For Intermediate Users
by userbinator on Tuesday May 19, 2015 @11:46PM
(#9574537)
I use :<line-number><enter> to go to a specific line; it has the advantage of showing the digits of the line number as it's entered.
Re:Vim Tips For Intermediate Users
by palmer_eldritch on Wednesday May 20, 2015 @10:26AM
(#9576489)
If you set the 'showcmd' option, the command you're currently typing is displayed on the last line of the screen (same as command line) on the right.
Of course, saving one keypress on this isn't a big deal but it's nice sometimes to be able to see the command you're typing.
Re:Vim Tips For Intermediate Users
by kristiandupont on Wednesday May 20, 2015 @12:58AM
(#9574754)
At work I use VsVim and this plugin https://visualstudiogallery.msdn.microsoft.com/74d68e2b-ff64... allows both simultaneously, which suits me best. I have not been able to achieve that in vim yet though.
Fair enough. I kinda switch between those two. Like, when I need to yank 5 lines from the middle of a function, I find it quite comfortable to see the relative numbers.
Re:Vim Tips For Intermediate Users
by johnmaguire2013 on Friday May 22, 2015 @01:50AM
(#9586708)
Or just `:<number>`?
- `}` to go forward by paragraph.
- `zj` to go down to the next fold.
- `gg` and `G` both accept a count (with which they are identical), so that `50gg` means “go to line 50”, and so absolute line numbers suffice though the command will typically be a little longer; of course, unlike `6j`, this will go to the start of the line if 'startofline' is not unset, so it’s not always ideal, but I find myself rather good at knowing at sight how many lines down and up I need to go anyway.