Ben Fritz wrote: > On Jul 2, 3:34 pm, risingjoker <[email protected]> wrote: > >> create a directory ~/.vim/after/ftdetect >> create a file in that directory named conf.vim >> put you set command inside >> > > A better place would be in the after/ftplugin directory. I'm pretty > certain the formatoptions are being modified in the ftplugin for conf > files, NOT the syntax file. > > The OP mentioned checking the syntax file. You want conf.vim in the > ftplugin directory, not the syntax directory. >
In fact, most/all of the ftplugin files in vim72/ftplugin change the formatoptions variable either to croql or add those options in (ie. set fo+=croql). Some subtract the "t" option. Several of the vim72/indent files do, too. So if you have the following in your .vimrc: filetype plugin indent on then it'll likely change your formatoptions on you. In particular, vim72/ftplugin/conf.vim has setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql The only syntax file I found (by a few searches, so there may be more) that changes the formatoptions setting is vim72/syntax/lpc.vim . Regards, Chip Campbell --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
