Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is commentstring being ignored? #114

Open
wting opened this issue Apr 29, 2013 · 1 comment
Open

Why is commentstring being ignored? #114

wting opened this issue Apr 29, 2013 · 1 comment
Labels

Comments

@wting
Copy link

wting commented Apr 29, 2013

From readme.md:

[..] the script makes use of |'commentstring'| where possible (which is usually set in a filetype plugin).

I have filetype plugin on in my .vimrc.

For example, in a C file running the following command:

:verbose set commentstring?
commentstring=//%s
    Last set from ~/.vim/ftplugin/c.vim

Or Haskell:

:verbose set commentstring?
commentstring=-- %s
    Last set from /usr/share/vim/vim73/ftplugin/haskell.vim

However, when using nerdcommenter (most commonly with <leader>c) it seems to prefer it's own hardcoded commentstrings.

@xiechao06
Copy link

only before filetype plugin activated, commentstring will work. use autocmd please. or use g:NERDCustomDelimiters (which is recommended in help docs)

@alerque alerque added the bug label May 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants