You do realize there a vim script out for this already? Vim Script #2351
On Aug 10, 7:44 am, Markus Heidelberg <[EMAIL PROTECTED]> wrote: > Hello Vimmers, > > another update for the 'relativenumber' feature. > > Description: > > After setting this option, relative line numbers are shown on the left side of > the window. The line with the current cursor shows 0, lines further up or down > show the difference of the line to the line with the current cursor. That > leads to increasing numbers 0, 1, 2, 3, ... in both directions (up and down). > The appearance is similar to the 'number' option (absolute line numbers). > > Relative line numbers help you using the [count] you can precede some vertival > motion commands (e.g. j k + -) with, without having to calculate it by > yourself. Especially useful in combination with other commands (e.g. y d c < > > gq gw =). > > Apply the patch: > cd to/the/toplevel/of/src/vim72 > patch -p0 < vim-7.2-relativenumber.patch > > Use the feature: > :set relativenumber > or short > :set rnu > > Now enjoy the use and the power of the [count] mechanism. > > Initial discussion started on 13.02.2008 on the vim_dev mailing list with > the title "feature request: help users count lines - display relative line > numbers":http://groups.google.com/group/vim_dev/browse_thread/thread/119d46074... > > Discussion continued on 27.06.2008 with the title "updated 'relativenumber' > patch":http://groups.google.com/group/vim_dev/browse_thread/thread/b3e2b4e4e... > > There is a little scepticism but more sympathy for the feature, but it didn't > get into mainline Vim 7.2. > > I'd appreciate some feedback. I'd like to know who likes the feature and uses > or already used it, and who likes the idea of the feature without having > tested it, for example because of having to compile Vim on his own. > > Markus > > vim-7.2-relativenumber.patch > 61KViewDownload --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
