Hi Gary, Raul, Thanks for all the help.
> > autocmd FileType * set comments=<put here your settings> This works :) Regards, Abhishek 2009/3/27 Gary Johnson <[email protected]> > > On 2009-03-26, Raúl Núñez de Arenas Coronado wrote: > > Saluton Gary :) > > > > On Thu 26 Mar 2009 22:19 +0100, Gary Johnson <[email protected]> dixit: > > >> autocmd BufRead,BufNewFile,FileReadPost * set comments=<put here your > > >> settings> > > > > > > If you decide to use the above autocommand in your .vimrc, be sure to > > > put it _after_ your "filetype plugin on" command so that your > > > autocommand is executed last. > > > > Yes, I forgot to tell O:) > > > > > Also, I think it would be better to use the FileType event rather > > > than BufRead and BufNewFile, and I don't see the reason for using > > > the FileReadPost event at all. The result would be > > > > > > autocmd FileType * set comments=<put here your settings> > > > > >From the autocmd help I deduced that the "FileType" event is launched at > > the time "set filetype" is called, but *before* the appropriate filetype > > script is called, so I didn't suggest that event because I thought that > > any "set comments" will be overriden when the ftplugin/whatever.vim > > script is called... From the docs I still think that is the case, but > > I'll take your word that it works. > > Hello Raúl, > > Take a look at $VIMRUNTIME/ftplugin.vim. You'll see that vim uses > the FileType event itself to load filetype plugins. So as long as > the user's FileType autocommand is put into the list of autocommands > after the ftplugin.vim script adds its FileType autocommand to the > list, the user's command will be executed after the filetype plugin > is sourced. At least that's how it looks to me. > > Regards, > Gary > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
