Nick Gravgaard wrote:
> 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.
> 
> Cheers,
> Nick
> 
> PS. Similar visual hints could help users count words, but I can't see
> how it could be done without making the editor look cluttered.

I guess relative line numbers would have the current line be 0, the next one 
1, etc., the line before the current line -1, the one before that -2, etc. -- 
Vim cannot easily do that, but what it can do is almost as good: Vim can show 
absolute line numbers, the first line in the file being 1, the next one 2, 
etc. Then instead of visually selecting the lines upon which you want to 
operate, you can use an ex-command with a range, such as

        :2435,2457d


To quickly select a visual range, you can also use the mouse: start linewise 
visual mode using V then use either shift-mouse (if 'mousemodel' is "popup" or 
"popup_setpos") or right-click (if 'mousemodel' is "extend") at the other end 
of the range.

See
        :help 'number'
        :help 10.3
        :help [range]
        :help 'mousemodel'


Best regards,
Tony.
-- 
In case of atomic attack, the federal ruling against prayer in schools
will be temporarily canceled.


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

Raspunde prin e-mail lui