SLUG Mailing List Archives
Re: [SLUG] Advice on coding in VI ?
- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] Advice on coding in VI ?
- From: Jamie Wilkinson <jaq@xxxxxxxxxxxxxx>
- Date: Wed Nov 28 12:16:02 2001
- Reply-by: Sat Dec 1 11:41:48 EST 2001
- User-agent: Mutt/1.3.23i
This one time, at band camp, Grant Parnell wrote:
>Delete up until matching line.
>You've found the need to delete a chunk of stuff, mark the beginning with
>some unique code word (I use 'gloop' for instance) skim through till the
>end and do "d?gloop" to delete backwards until a line with gloop is found.
You can save yourself some effort (this works with vim, I don't know if it's
100% vi) by marking a position with "'a" (set mark 'a') in command mode,
then go to the end and just "d'a" (delete to mark 'a').
"d$" is also very handy for deleting to the end of a line, and I find "Go"
useful for editing conffiles over slow links (go to the end of the file,
then start inserting on a new line)
Weaseling out of things is important to learn. It's what seperates us
from the animals. Except the weasel.
-- Homer Simpson, Boy-Scoutz In The Hood