wrap text for both mail and programming differently - Mutt
This is a discussion on wrap text for both mail and programming differently - Mutt ; I'm using vim 6.3.71 for both mail (with Mutt) and programming. Now
because I've found that RFC1855 recommends lines no longer than 65
columns for mail, I would like to stick to that rule in my mails.
However, for programming, ...
-
wrap text for both mail and programming differently
I'm using vim 6.3.71 for both mail (with Mutt) and programming. Now
because I've found that RFC1855 recommends lines no longer than 65
columns for mail, I would like to stick to that rule in my mails.
However, for programming, I would like to allow my lines to be say 80
columns or so.
If I use :set textwidth=65 in vim, then this will also apply when I use
it for programming.
So therefore my question:
* Is it possible to set a mutt-specific option so that even when you use it
together with vim, you can set the maximum allowed number of columns
for the text of your mails? Or will I have to make my .vimrc
differentiate between it being used as `stand-alone vim' or `vim for mail'?
Regards,
Bart
--
"Share what you know. Learn what you don't."
-
Re: wrap text for both mail and programming differently
Hi Bart,
I tried to use autocmd
i.e.
augroup mails
autocmd!
autocmd BufNewFile,BufRead <mail> set noautoindent
augroup end
but for some reason it doesn't do the trick.
Bart Vandewoestyne <MyFirstName.MyLastName@telenet.be> wrote:
> I'm using vim 6.3.71 for both mail (with Mutt) and programming. Now
> because I've found that RFC1855 recommends lines no longer than 65
> columns for mail, I would like to stick to that rule in my mails.
>
> However, for programming, I would like to allow my lines to be say 80
> columns or so.
>
> If I use :set textwidth=65 in vim, then this will also apply when I use
> it for programming.
>
> So therefore my question:
>
> * Is it possible to set a mutt-specific option so that even when you use it
> together with vim, you can set the maximum allowed number of columns
> for the text of your mails? Or will I have to make my .vimrc
> differentiate between it being used as `stand-alone vim' or `vim for mail'?
>
> Regards,
> Bart
>
-
Re: wrap text for both mail and programming differently
Bart Vandewoestyne <MyFirstName.MyLastName@telenet.be>:
> I'm using vim 6.3.71 for both mail (with Mutt) and
> programming. Now because I've found that RFC1855 recommends
> lines no longer than 65 columns for mail, I would like to
> stick to that rule in my mails.
>
> However, for programming, I would like to allow my lines to be
> say 80 columns or so.
,----[ ~/.vimrc ]
| autocmd BufRead mutt-* source $HOME/etc/vim/modes/mail.vim
`----
,----[ $HOME/etc/vim/modes/mail.vim ]
| [...]
| set textwidth=64
`----
Hendrik
-
Re: wrap text for both mail and programming differently
* Bart Vandewoestyne <MyFirstName.MyLastName@telenet.be>:
> Is it possible to set a mutt-specific option so that even when
> you use it together with vim, you can set the maximum allowed
> number of columns for the text of your mails? Or will I have
> to make my .vimrc differentiate between it being used as
> `stand-alone vim' or `vim for mail'?
I see two choices here. You can tell vim to use a textwidth of
65 when it's called by Mutt to edit a message, or you can tell
Vim switch to textwidth 65 when it knows it's editing a mail
file.
For the former, you want something like this in your muttrc:
set editor="vim '+set tw=65'"
For the latter, add this to your vimrc:
au FileType mail set tw=65
Setting this in your vimrc is better, because it will work for
most mail / news programs - mutt, slrn, elm, pine...
--
Andrew Preater
-
Re: wrap text for both mail and programming differently
On 2005-08-17, Andrew Preater <andrew.preater@durham.ac.uk> wrote:
>
> For the latter, add this to your vimrc:
>
> au FileType mail set tw=65
>
> Setting this in your vimrc is better, because it will work for
> most mail / news programs - mutt, slrn, elm, pine...
Yes. Thanks. This is probably the best solution.
I've added
set textwidth=80
autocmd FileType mail set tw=65
and this appears to do exactly what I want, even for news with
slrn.
Regards,
Bart
--
"Share what you know. Learn what you don't."
Similar Threads
-
By Application Development in forum DOTNET
Replies: 1
Last Post: 08-11-2007, 07:08 PM
-
By Application Development in forum Adobe Indesign
Replies: 18
Last Post: 06-26-2007, 12:34 PM
-
By Application Development in forum Adobe illustrator
Replies: 0
Last Post: 05-24-2007, 01:21 PM
-
By Application Development in forum Adobe illustrator
Replies: 1
Last Post: 10-05-2006, 11:21 PM
-
By Application Development in forum Pine
Replies: 1
Last Post: 12-31-2005, 02:51 PM