Thursday, February 3, 2011

Re: What approaches do you think are the best ways to GET TO KNOW Vim?

On 02/03/2011 02:38 AM, ConcreteVitamin wrote:
> I am capable of very basic manipulations of vim, and benefit from
> editting my .vimrc file according to various tutorials. However, I'd
> like to get to know Vim, specifically about its scripts and advanced
> manipulations.
>
> Recently I just read several help texts. I find them informative, yet
> I think it would be best to learn if there are practice tasks to which
> I can apply the new-learned knowledge. What do you suggest?

Presuming you've already tried vimtutor...

:help vimtutor

Well, if you have a twitter account and Ruby installed, you can
try your hand at http://vimgolf.com (I'm still clawing my way
towards the top :)

While I can't speak much to exercising scripts (as I tend to run
with almost none installed), when learning a new feature, I'll
often create a dummy document to test what I expect it to do and
then tweak it for some edge-cases to see how it behaves in those.
For example, the "}" and "{" motions, the following questions
occur(ed) to me:

-do they land me in the space between paragraphs, or at the
beginning/end of the paragraph?

-do they work when the spaces between paragraphs include
whitespace? ("^\s\+$")

-how do they behave at the beginning/end of file where there's no
blank line? Compared to when there is a blank line at the
beginning/end of the file?

-when performing a deletion/selection/change followed by the
motion, are they inclusive or exclusive?

So I then work up a dummy document (I often start with an extract
of "A Connecticut Yankee in King Arthur's Court" by Mark Twain
courtesy of Project Gutenberg, but you might choose generic
greeking text or your favorite public-domain text from PG) and
then probe these sorts of edge cases (artificially inducing them
if needed). Basically working up my own custom "advanced
vimtutor" targeting the skill I want to learn.

Lastly, I don't often go learning things just for the purpose of
learning them -- rather I make a mental note "there's an easier
way to do this if I ever need it", then only come back and
revisit it if I encounter a real-world situation in which I need it.

Hope this helps,

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

Post a Comment