[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Documentation for total beginners



On Fri, Apr 20, 2001 at 09:45:00PM -0700, Joey Hess wrote:
> Matthew Dalton wrote:
> > If you use vim with mutt, but also use it for other things and you don't
> > want it to wrap to 72 characters for those other things, put something
> > like this in your .muttrc
> > 
> >   set editor = "vim -c 'set tw=72'"
> 
> A cleaner method is this, in your .vimrc:
> 
> autocmd FileType mail set textwidth=72

that usually works pretty well because mutt has some patterns it
looks for in the filenames... when starting a new message using
mutt, it goes into /tmp/mutt-<hostname>-<digits>

BUT when "RESUMING" an outgoing message that you postponed in mutt
(postpone via "q" and then "y" to save message for later; resume
via "R") the temp filename is /tmp/mutt<digits> which doesn't
match the same pattern. all i have to do is :set ft=mail to get
my highlighting and textwidth settings, but where's the pattern
specified for ft=mail?

aha!

in /usr/share/vim/vim56/filetype.vim i found the line
au BufNewFile,BufRead snd.\d\+,.letter,.letter.\d\+,.followup,.article,.article.\d\+,pico.\d\+,mutt-*-\d\+,ae\d\+.txt set ft=mail

the part that works for new mutt email is

	mutt-*-\d\+

but we need to add a pattern to match filenames like

	/tmp/muttlEoKra
	/tmp/muttDSveKd

what's the syntax for these vim patterns? (-*- looks like glob,
but then we have \d for digit (i presume) and \+ for... well, i
don't know.)

-- 
DEBIAN NEWBIE TIP #14 from Will Trillich <will@serensoft.com>:
What's a RUNLEVEL? It's simply a big-time setting group;
runlevel 2 might have a full-blown web server plus X running,
and runlevel 3 might be ssh-only, for secure logins. Check
/etc/inittab (and /etc/rc<RUNLEVEL>.d/*) for details on how
yours are set up. And try "man runlevel".

Also see http://newbieDoc.sourceForge.net/ ...



Reply to: