Thursday, April 8, 2010

Re: App to help with Deliberate Practice / Mavis Beacon Teaches Vim?

AK wrote:
> and do all the same tasks as you would normally do as you work.. with
> one tiny difference: instead of focusing on your task, focus on vim
> operations you're using, pause for a second and think which commands
> you could have used, what's the most efficient / easy way to do
> something, and so on.

In a similar twist, I got into the habit of scrutinizing every editing
action under the assumption "the authors of vim are too smart/lazy to
allow this to be so hard/annoying" -- then go to the help and see if
something better exists. If I can't dig something up, I'll ask on the
list with details of what I've already tried.

E.g. in other editors, I'd have to hold down left/right arrows or use
control+left/right to jump a word at a time. This always bugged me.
However vim lets me use f/F/t/T motions to more precisely land where I
want to be. Same with text-objects -- in other editors I had no easy
way to specify that I wanted to perform an action on a text-object
(whether a paragraph, a block of code, the contents of
parens/brackets/braces/quotes, etc), so I'd have to move the cursor to
the start, hold down shift and move the cursor to the end. In vim, I
can just do things like

>ip

to shift the current paragraph right by one indent-level or

ci"

to change the contents of the string I'm in, regardless of where my
cursor is inside that string. (the quotation-text-object is a personal
favorite, added at my request and I use it ALL THE TIME...thanks,
implementor!)

Once you start looking for the rough edges in your editing experience,
and take the time to look for a more "vim" way of doing things, you'll
find yourself implementing those changes in your editing habits pretty
quickly.

-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

To unsubscribe, reply using "remove me" as the subject.

No comments: