begin  quoting James G. Sack (jim) as of Wed, Jan 31, 2007 at 02:56:56PM -0800:
> Stewart Stremler wrote:
> >..
> > Pick your keystroke to use. I often use ^P, as I never use it otherwise.
> > 
> > :map ^V^P 0a ^V^[/^[0-9][A-Z]^V^M
> > /^[0-9][A-Z]
> > 
> > Then ^P until done.
> 
> Could you interpret the above keystrokes in the wonderfully-nice way you
> did for the re? Pleeze?

Oh, sorry, I wasn't sure anyone really cared.

Read the above like so:

:   -> go to command mode
map -> define a keystroke mapping
^V  -> (control+V) escape the next character (i.e., don't interpret yet)
^P  -> (control+P) the keystroke were binding
0   -> go to the start of the current line (column 0)
a   -> append (insert) mode
    -> append a space
^V  -> escape the next character
^[  -> the escape keycode (just hit escape) to go to edit mode
/   -> start a search
^[0-9][A-Z] -> pattern we're looking for (digit + uppercase at start of line)
^V  -> escape the next character
^M  -> (control+M) CR, or "return" keystroke, which ends the search
       pattern and performs the search

-- 
It's easier than it looks.
Stewart Stremler


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to