On Thu, 14 Feb 2008 15:31:46 +0100, "Milan Vancura" <[EMAIL PROTECTED]> said: > > > > Nick Gravgaard <[EMAIL PROTECTED]> escrit: > > > > > if Vim could display relative line numbers > > > in the left hand margin (with the current > > > line being 1, the next being 2, and so on) > > > > Yes, this is easy, vim can. > > > > This is easy implementable in vimscript > > using the *SIGNS* (:help signs). > > Plus, use the CursorMoved autocommand. > > > > Learn vim scripting yourself, or ask someone > > who has vimscript experience to write such script. > > Couple of hours if you already have experience with > > vimscript, or several days if it's your first nontrivial vim script. > > I've tried it. It's my first attempt to write vim script but it seems it > works. > I hope it helps you, Nick. Feel free to modify it etc. > > BTW: Does some experienced vim scripter know how to define a sign with > text=' 1' (starting with a space)? I wanted to align numbers to the right > but I > failed. None of "escaping" syntaxes worked.
Thanks Milan, that's great. It would be perfect if it updated itself every time the cursor moved up or down a line, and if it counted as if the current line's number was 1 (so that to delete the current and next lines using "2dd" the last line I wanted to delete would have "2" next to it). --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---