[comp.unix.questions] question about vi

myron@nvuxl.UUCP (Myron Seto) (05/08/88)

When I do the sendmail command,
I am placed in the "editor mode"
to write my message, but the 
editor is ed and not vi.
Is there anyway to change this?
Please send me e-mail if you know,
Thanks!
Myron at

...!bellcore!nvuxl!myron

lls@hpfelg.HP.COM (Lauri Schaaf) (05/10/88)

When using mailx and writing a memo...
you can use " ~v " -- this will put
you into vi mode for your memo....
When your done just :wq! or ZZ and 
memo is ready to be sent -- this is
better documented in your manual.

Hope this helps,

Laurie Schaaf     Ft. Collins, CO
lls@hpfela

pjh@mccc.UUCP (Pete Holsberg) (05/13/88)

In article <730001@hpfelg.HP.COM> lls@hpfelg.HP.COM (Lauri Schaaf) writes:
...
...
...
...When using mailx and writing a memo...
...you can use " ~v " -- this will put
...you into vi mode for your memo....

Actually, it invokes whatever is defined for the environmental variable
VISUAL.  I happen to use emacs.

strong@tc.fluke.COM (Norm Strong) (05/16/88)

In article <647@mccc.UUCP> pjh@mccc.UUCP (Pete Holsberg) writes:
}In article <730001@hpfelg.HP.COM> lls@hpfelg.HP.COM (Lauri Schaaf) writes:
}...
}...
}...
}...When using mailx and writing a memo...
}...you can use " ~v " -- this will put
}...you into vi mode for your memo....
}
}Actually, it invokes whatever is defined for the environmental variable
}VISUAL.  I happen to use emacs.
Is there a way of invoking vi whenever you call the mail program, so you don't
have to type ~v each and every time?


-- 

Norm   (strong@tc.fluke.com)

pjh@mccc.UUCP (Pete Holsberg) (05/18/88)

In article <3772@fluke.COM> strong@tc.fluke.COM (Norm Strong) writes:
...Is there a way of invoking vi whenever you call the mail program, so you don't
...have to type ~v each and every time?

Well, you type ~v only when you want to send a reply.  My normal use is
to R to the mail message, then type ~f to get the message into the mail
editor buffer, and then type ~v to get my visual editor (emacs). 
Doesn't seem like a lot of keystrokes.  When I have a really short
reply, I don't bother with either ~f or ~v.

wnp@dcs.UUCP (Wolf N. Paul) (05/18/88)

In article <3772@fluke.COM> strong@tc.fluke.COM (Norm Strong) writes:
>Is there a way of invoking vi whenever you call the mail program, so you don't
>have to type ~v each and every time?

Not really. The easiest solution would probably be to write a shell
script which invokes vi on a temp file if invoked with arguments,
and then feeds the temp file to mailx when you exit vi. Drawback is that
this would not work when replying from reading mail.

There are other mail systems, such as elm, which do what you want.
-- 
Wolf N. Paul * 3387 Sam Rayburn Run * Carrollton TX 75007 * (214) 306-9101
UUCP:     ihnp4!killer!dcs!wnp                 ESL: 62832882
INTERNET: wnp@DESEES.DAS.NET or wnp@dcs.UUCP   TLX: 910-280-0585 EES PLANO UD