Friday, January 28, 2011

Re: Typing numbers

On 01/28/2011 10:53 PM, Chris Jones wrote:
> On Fri, Jan 28, 2011 at 05:35:02PM EST, Tim Chase wrote:
>>> I concur that prefixing Vim normal mode commands with a count, such as
>>> '7dw' to delete the next seven words is ineffective.. Something like
>>> 'dw....' where you delete the next word (dw) and repeat the last command
>>> (.) a number of times is the way I normally do it because I don't have
>>> to count the words before I even start deleting. While I hit the dot (.)
>>> repeatedly, I can see what I'm deleting and I know when to stop.. And
>>> I can always hit 'u' for undo to bring back the words I deleted one at
>>> a time in the event I got carried away.
>>
>> This breaks when using t/T with ";" to repeat the motion as it just finds
>> the same one you just found. I have to break down and count for those :)
>
> Another reason why I don't use t/T (and don't care much for f/F either).
>
> There's only so much can fit under my skull.. and I prefer to stick with
> a limited subset of keyboard actions that may not be the quickest and
> most efficient for all occasions.. but that I can use without hesitation
> or incurring any overhead rememberiing. Namely that if the cursor is at
> the beginning of the line above and I want to get to the '..ii..' typo
> in 'rememberiing.', I find it considerably more effective when all is
> told to just hit 'w' till I get to the beginning of the word
> 'rememberiing'.. and either hit llll.. or hit 'e' to get to the end of
> the word and then 'hh' followed by 'x' to delete the last of the two

I used to do this and really hated it. I'm using ',' as leader for
mappings but if you don't, it's much easier, imho, to hit 'fi', then
hit ';' as many times as needed and then use ',' if you overshoot it.
Much fewer keystrokes than using 'w' in most cases.

But I mostly prefer to use a small function I wrote that jumps to 25%,
50% and 75% of current line (not including leading/trailing spaces) in
combination with motpat plugin mappings that make 'w' and 'b' commands
go to the next word ignoring punctuation. I use my function to jump
to closest spot to where I want to go and then it's either 'w', 'b', 'f'
or 't'. In 99% of cases I only need 2 keystrokes.

-ak

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment