Tuesday, March 5, 2013

Re: Something is overriding my comments= commands

On 2013-03-05, Jason wrote:
> I have a .vimrc where I run:
> set comments=
>
> I added the command to my ~/.vim/cpp.vim file and ~/.gvimrc file
> as well. Yet somehow, I have comments set to a non-blank value
> that puts garbage all over my files when I run my comment creation
> macros. I can unset it by hand in every session, but the point of
> the .vimrc file is to avoid doing that every time.
>
> Is there a way to see where this is getting set? Or to somehow
> turn it off system-wide (short of a custom compilation)?

To see where it is getting set, execute

:verbose set comments?

To override a filetype plugin's setting of this, put your setting
in, for example,

~/.vim/after/ftplugin/cpp.vim

Putting your setting in ~/.vim/ftplugin/cpp.vim will not work
because the default $VIMRUNTIME/ftplugin/cpp.vim file is loaded
after ~/.vim/ftplugin/cpp.vim. (See ":help 'rtp'".)

Putting your setting in ~/.vim/cpp.vim will not work because Vim
does not read that file unless you source it explicitly.

You may want to read

:help ftplugin-overrule
:help startup

Regards,
Gary

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment