Support for block comments with '//-' (Pug's block comments)
Hi.
I want to use Pug's block comments (start with //-)
I use vim-commentary plugin for commenting stuff out. It relies on 'commentstring' option first.
And your plugin currently sets it as //\ %s .
I tried to overwrite it with " autocmd FileType pug setlocal commentstring=//-\ %s - no luck.
Could you please advise some solution? thanks.
@gyermolenko can you please url which vim-commentary plugin you use? i found several
@acidjazz tpope's
@gyermolenko have you tried
setlocal comments=://-,:// commentstring=//-\ %s
@acidjazz
setlocal comments=://-,:// commentstring=//-\ %s works by itself if i set it from pug file (comments then start with //-)
BUT
if i set it from 'vimrc' with autocmd like this autocmd FileType pug setlocal comments=://-,:// commentstring=//-\ %s :
- autocmd fires up when i load pug file
- vim-pug overwrites changes with its settings.
At least that is what it looks like. Because
:verbose set commentstringreturns
commentstring=// %s
Last set from ~/<my.vim-path>/vim-pug/ftplugin/pug.vim