Friday, January 28, 2011

Re: Typing numbers

On 01/28/2011 09:04 AM, Daryl Lee wrote:
>> I am fairly new in vim and also my touch typing is not that great.
>> Although I can deal very well with all the vim commands I found my self
>> always looking down when I need to write a number argument. I was
>> wondering wether there is a way in vim to input numbers without leaving
>> the home row. Or is it that with time I will be able to reach the numbers
>> row without looking?
>
> Hang in there. When I started touch typing, it took me a while to train my
> fingers to find the right numbers. It'll come.

While I agree with Daryl that, with time & practice, you'll
touch-type numbers well; I also recommend digging deeply into
vim's powerful operator+motion scheme. I rarely use numbers when
doing things, preferring to use motions that describe the intent
of the task. Things like

ci"

to change the contents of a string instead of "4hd5w" ("4
characters to the left, then delete 5 words") or

dip

to "delete the inner paragraph" or

>}

to indent one 'shiftwidth' from the current line until the next
blank line. Likewise, the f/F/t/T motions are great for jumping
horizontally in the line, so I almost never use h/l to move
left/right.

Some places to read up:

:help text-object
:h f

and in general, all of

:help motion.txt

will provide you with an abundance of motions that minimize the
need for counting things and typing numbers.

-tim


--
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: