Saluton Abhishek :) On Thu 26 Mar 2009 17:59 +0100, Abhishek Gupta <[email protected]> dixit: > I have some settings for comments in my vimrc (see attached vimrc.txt). [...] > However when I edit text files using vim (vim test.txt), the comments get > overridden with the following: [...] > And for C/C++ files, the comments get overridden with the following: [...] > How can I prevent this? > I.e. I would like to keep my comments setting for all file types. > Is this possible?
You can always do "filetype off" in your .vimrc, but if you want to have all the advantages that "filetype on" offers and at the same time use your own "comment" settings, I would do the following in my .vimrc: autocmd BufRead,BufNewFile,FileReadPost * set comments=<put here your settings> There are other methods, like adding a file to ".vim/after/ftplugin/" for each filetype whose "comments" setting you want to tweak, etc. See ":help filetypes" for even more ways of achieving what you want. -- Raúl "DervishD" Núñez de Arenas Coronado Linux Registered User 88736 | http://www.dervishd.net It's my PC and I'll cry if I want to... RAmen! --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
