On Wed, 13 Feb 2008 22:02:30 +0100, "Andy Wokula" <[EMAIL PROTECTED]> said: > > Nick Gravgaard schrieb: > > > > On Wed, 13 Feb 2008 17:48:52 +0100, "Tony Mechelynck" > > <[EMAIL PROTECTED]> said: > >> 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 > > Is it ok for you to type > 23Vd > > Doesn't work out of the box, the builtin "V" handles the count > differently, but with a little work ... > > :nn <silent>V :<c-u>exec"norm!V".(v:count>1?v:count-1."j":"")<cr> > " or maybe better: > :nnoremap <silent> V :<c-u>execute "normal! V". v:count1. "_"<cr> > > Without your requested Visual hint, it's good to have Visual mode enabled > after 23V, for fine tuning the range.
This is better, but it still involves a bit of trial and error. Your solution is about guessing and then fine tuning, rather than getting the number correct instantly (which relative line numbers would allow)... --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
