web editors

David A. Sinck plug-discuss@lists.PLUG.phoenix.az.us
Sun, 6 May 2001 14:12:15 -0700


\_ SMTP quoth Nathan Saper on 5/6/2001 09:24 as having spake thusly:
\_
\_ On Sun, May 06, 2001 at 01:58:40AM -0700, der.hans wrote:
\_ > Am 05. May, 2001 schw?zte Nathan Saper so:
\_ > 
\_ > > autocmd BufRead,BufNewFile
\_ > > mutt*[0-9],snd.*,.letter,.followup,.article,.article[0-9],pico* set
\_ > > textwidth=76
\_ > 
\_ > OK, what's this do? When a buffer or new file is opened that matches a
\_ > filename as listed by any of the patterns in that comma-delimited list it
\_ > will automagically set the textwidth to 76?
\_ 
\_ Exactly.  Autocommands are one of my favorite features of VIM.  I have
\_ autocommands for TeX files, emails, HTML pages, and most everything else.

From the opposing camp, emacs has several hooks where you can execute
full lisp code as you need to, in addition to the obligatory variable
setting tricks.  My most recent amusement was tweaking it so that the
built in version control mode would commit files to CVS/RCS (done as
part of a standard distribution) but would also log the CVS/RCS
message to an ongoing diary/journal I have.  

David