Thursday, May 6, 2010

Re: how can I determine where vimrc comments setting being is overwritten on file load

On Thu, 6 May 2010, Reid Thompson wrote:

> I have in my *vimrc files
> set comments=s0:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-
> which does what I need with regard to company formatting rules.
>
> On loading a .c file, the comments setting is getting set to
> comments=sO:* -,mO:* ,exO:*/,s1:/*,mb:*,ex:*/,://
> which doesn't follow our rules.
>
> Is there an easy way to trace/find out exactly which plugin/script is
> overwriting/re-setting my format?

:verbose set comments?

But, regardless of what sets it, you might place your preferred setting
in an autocmd (Here also in an augroup, which is generally useful.):

aug CompanyRules
au!
au FileType c set comments=s0:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-
aug END

--
Best,
Ben

--
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

No comments: