Hi Erik! On Fr, 18 Sep 2015, Erik Christiansen wrote:
> On 18.09.15 09:47, Christian Brabandt wrote: > > > > On Fr, 18 Sep 2015, Erik Christiansen wrote: > > > > > So, in .vimrc, something vaguely like: > > > > > > au BufNewFile,BufRead ~/Desktop/mutt-* call Set_for_mutt() > > [...] > > > > You don't need that autocommand. Simply create a file > > ~/.vim/ftplugin/mail.vim and put all mutt related stuff there and > > add an entry :filetype plugin to your .vimrc > > Thanks Christian, for the alternative implementation, but I don't need > ~/.vim/ftplugin/mail.vim when I can equally easily do it in .vimrc. I guess taste matters. I used to think the same, until my vimrc grew too long and complex. Then I started to use folding but even then it started to get confusing eventually. So I am now using the proposed Vim way. If I need to configure my mail configuration, I have everything in my folder ~/.vim/ftplugin/mail/ Python? ~/.vim/ftplugin/python.vim C? ~/.vim/ftplugin/c.vim (Okay additionally there is the after/ folder, which complicates things a bit again) > > Keeps your .vimrc cleaner. > > Keeping everything vim-related in one config file is _waaaay_ cleaner. > Cluttering the filesystem with a swarm of files seems untidy, and is a > good way to leave config behind when moving to a new installation/OS > upgrade, I figure. Is there much of a difference of backing up ~/.vim/ instead of ~/.vimrc? It is basically self contained and it contains every thing for setting up the new environment. plugins, configuration, undo-files, session files, custom scripts, spelling files, syntax files, Plus for larger configuration files, this will impact startup time. I used to have my .vimrc on a Windows share. Adding some plugins made my vim startup grow to up to several 10 of seconds. It got better, after I moved my configuration to a local hard disk and even better, once I removed unneeded configuration files, that have been read, although I did not need them (like those menu files, that got loaded, although I explicitly set :set go= Using :set go=M helped). > I have folding enabled in .vimrc, and the mutt stuff has its own section: > > " Alt-O & Alt-I between files, just as ^O & ^I retrace move history: Those things tend to break in the terminal. > While ftplugin doubtless has some use cases, somewhere, I suspect that > it's a bit like those tabs things in vim. I still find them a step > backwards from just using buffers and the :bu commands. (Admittedly > mapped, so <A-b> does :bu) I use tabs, if I need them, and buffers if I need buffers. I don't see how they are "backwards". regards, Christian -- * BenC wonders why he has upgraded to 3.3.5-1 before teh X maintainer