VI question: how to initialize a named buffer from EXINIT?

Ed Gould ed at mtxinu.UUCP
Wed Sep 11 13:36:15 AEST 1985


Summary:
Expires:
Sender:
Followup-To:
Distribution:
Keywords:

In article <892 at turtlevax.UUCP> ken at turtlevax.UUCP (Ken Turkowski) writes:
>I'd like to initialize a named buffer (maybe more) with some well-used
>commands (like removing blanks at the end of a line), so that I only
>need to execute the @<bufname> command to execute them.

Did you consider defining maps?  With them, one can define any key - including
function keys if available - to be a command.  For example, to define
the "b" key to remove any trailing blanks, one might use

	:map b :1,$s/  *$//^[

Note that ^[ is the escape key, ant must be preceeded by control-V (^V)
to get it into the command.  Try it.

-- 
Ed Gould                    mt Xinu, 2910 Seventh St., Berkeley, CA  94710  USA
{ucbvax,decvax}!mtxinu!ed   +1 415 644 0146

"A man of quality is not threatened by a woman of equality."



More information about the Comp.unix.wizards mailing list