>> It you should give one (or more) tips to a person who was
>> going to start creating scripts for vim, then what would
>> it be?  (besides "know your :help" :-) )

I'll add my detritus to the pearls handed out by Tony, et
al.

It's not only important to "know your :help", but to know
how to make the most of it.  Using ":helpgrep"; using
tab-completion at the command-line to show possible
expansions of your search option; navigation with the
tag-stack as you pop around the help; etc.

Ask the best questions you can here on the list.  There are
a lot of smart folks that will help you out, get you pointed
in the right direction, or at least help you with the magic
keywords you might need for rummaging around in the help.

On the flip-side of Tony's advice, I recommend getting to
know your way around limited (in build-options, not in
count) versions of vi/vim.  Occasionally I find myself
working on a host that has nvi, stevie, elvis, or what have
you instead of vim.  Or sometimes it's a stripped-down build
of vim, missing things like 'eval', text-objects,
command-line completion, folding, or windows/tabs that I use
on a regular basis.  Knowing how to tap the dark corners of
vi/ex can make editing a less painful experience that still
beats the pants off of whatever other editors that are on
said box.

Learn to wield ex commands like a ninja.  Particularly how
they can be used/abused with the :g command to selectively
operate on huge chunks of text, automating hours of rote
work.

Learning "ed" doesn't hurt either. :-)  It helps mold the
brain.

Additionally, learn by studying well-accepted scripts such
as Dr. Chip's ample collection of tools.  Sit at the feet of
these masters until you can snatch the pebble from their
hands. ;)

Okay...enough with the martial-arts-movie references.  My
lips are starting to move out of synch with my words.  Or
maybe those are my fingers typing out of synch with my
words...

-tim





Reply via email to