Loading mail setup at editor (vim) start
Hi, how can I let read some special mail configs (e.g. set tw=72) when edit a email/news messages? Kai. -- + mailto:[EMAIL PROTECTED] + http://www.tu-ilmenau.de/~bond/
Re: Loading mail setup at editor (vim) start
On Fri, Jul 28, 2000 at 04:41:48PM +0200, Kai Weber wrote: Hi, how can I let read some special mail configs (e.g. set tw=72) when edit a email/news messages? in your ~/.vimrc put something like autocmd FileType mail set tw=72 nocin ai expandtab (this is what I have) you must have vim = 5.4 for using the FileType autocmd For more info type (in vim) :help autocmd :help FileType -- Johannes
Re: Loading mail setup at editor (vim) start
Using a large mallet, Kai Weber whacked out: how can I let read some special mail configs (e.g. set tw=72) when edit a email/news messages? Call vim sourcing a special vimrc for your mutt editing. -- Suresh Ramasubramanian + Lumber Cartel India - tinlcI mallet @ cluestick.org + Wallopus Malletus Indigenensis I'll defend to the death your right to say that, but I never said I'd listen to it! -- Tom Galloway with apologies to Voltaire
Re: Loading mail setup at editor (vim) start
On Mon, Jul 31, 2000 at 11:34:00AM +0200, Johannes Zellner wrote: On Fri, Jul 28, 2000 at 04:41:48PM +0200, Kai Weber wrote: Hi, how can I let read some special mail configs (e.g. set tw=72) when edit a email/news messages? in your ~/.vimrc put something like autocmd FileType mail set tw=72 nocin ai expandtab (this is what I have) you must have vim = 5.4 for using the FileType autocmd For more info type (in vim) :help autocmd :help FileType I forgot to tell you that you have to have :filetype on (:syntax on) somewhere in your ~/.vimrc for the FileType autocmd to work. (syntax on is not necessary but nice) -- Johannes
Re: Loading mail setup at editor (vim) start
* Johannes Zellner [EMAIL PROTECTED] [000731 11:50]: how can I let read some special mail configs (e.g. set tw=72) when edit a email/news messages? autocmd FileType mail set tw=72 nocin ai expandtab (this is what I have) au BufNewFile,BufRead /tmp/mutt* source ~/.vim/mutt_vimrc (this is what I have) The advantage of this solution is that it also works on messages which have been postponed and are recalled (via the "R" command). My vim 5.4 fails to properly detect the syntax in those cases, and Johannes' autocmd would not be executed. Which leads to the question: why does syntax detection work on all mails except that have been postponed and are recalled? -- christian molls student of laws univ of cologne
Re: Loading mail setup at editor (vim) start
Using a large mallet, Christian R Molls whacked out: Which leads to the question: why does syntax detection work on all mails except that have been postponed and are recalled? Mutt uses a totally different naming syntax (apparently a random string - not mutt-hostname-foo) for postponed or recalled messages. So that does not match the regexp being checked for. -suresh
Re: Loading mail setup at editor (vim) start
* Johannes Zellner [EMAIL PROTECTED] [000731 11:50]: how can I let read some special mail configs (e.g. set tw=72) when edit a email/news messages? autocmd FileType mail set tw=72 nocin ai expandtab (this is what I have) au BufNewFile,BufRead /tmp/mutt* source ~/.vim/mutt_vimrc (this is what I have) The advantage of this solution is that it also works on messages which have been postponed and are recalled (via the "R" command). My vim 5.4 fails to properly detect the syntax in those cases, and Johannes' autocmd would not be executed. Which leads to the question: why does syntax detection work on all mails except that have been postponed and are recalled? -- christian molls student of laws univ of cologne
Re: Loading mail setup at editor (vim) start
* Suresh Ramasubramanian [EMAIL PROTECTED] [000731 13:20]: Which leads to the question: why does syntax detection work on all mails except that have been postponed and are recalled? Mutt uses a totally different naming syntax (apparently a random string - not mutt-hostname-foo) for postponed or recalled messages. So that does not match the regexp being checked for. Citing the vim manual: The type of highlighting will be selected using the file name extension, and sometimes using the first line of the file. So it should make no difference if recalled postponed messages are named "mutt-hostname-foo" or "mutt837rsd7348". Still, apparently it does. To work around the problem I put au BufNewFile,BufRead /tmp/mutt* set syntax=mail in my .vimrc. -- christian molls student of laws univ of cologne
Re: Loading mail setup at editor (vim) start
On Fri, Jul 28, 2000 at 04:41:48PM +0200, Kai Weber wrote: how can I let read some special mail configs (e.g. set tw=72) when edit a email/news messages? I use the below given line in my .muttrc, so that a "set ft=mail" is executed at vim startup. set editor="vim \"+set ft=mail\" " HTH. -- Manoj Victor Mathew (GPG#: 3D96A9B9) Cochin, India.