On Thu, 21 Feb 2008 10:36:40 +0100, "Markus Heidelberg"
<[EMAIL PROTECTED]> said:
> Am Wednesday, 13. February 2008 schrieb Nick Gravgaard:
> > 
> > Hi everyone,
> > 
> > I have an idea which I think will make Vim much faster and easier to
> > use. I find that over 4 lines or so, it becomes difficult to quickly
> > count the number of lines I want to delete/yank/shift or whatever, and
> > so I usually revert to using linewise Visual mode to select the lines I
> > want to perform the operation on. Obviously it's much faster to (for
> > example) press 23d than to press V followed by down 23 times and finally
> > d to delete, but the problem is knowing how many lines I want to perform
> > the operation on. I believe this could be easily rectified 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). Then the user could just
> > look down to the last line they want to operate on, see how many lines
> > it is from the cursor, and type the command.
> 
> I also thought it could be useful in some cases, so I've just tried it
> the last
> days. Here's the patch (based on svn revision 908, latest patch 258).
> 
> To use it set the new option 'relativenumber' or 'rnu'.

Cool. I've just had a play (thanks for the Windows exe Erik!), and I
like this a lot.

I know it seems a bit strange, but in order that that both 2d- and 2dd
work, shouldn't it look like this instead?

 -3  aaaa
 -2  bbbb <-- 2d- deletes from the current line to here
 -1  cccc
  1  dddd <-- current line
  2  eeee <-- 2dd deletes from the current line to here
  3  ffff
  4  gggg

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui