nerdcommenter
nerdcommenter copied to clipboard
Why is commentstring being ignored?
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.
only before filetype plugin activated, commentstring will work. use autocmd please. or use g:NERDCustomDelimiters (which is recommended in help docs)