tomtom / tcomment_vim

An extensible & universal comment vim-plugin that also handles embedded filetypes

Home Page:http://www.vim.org/scripts/script.php?script_id=1173

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to make uncomment remove only 1 space?

huyz opened this issue · comments

commented

I have:

let g:tcomment#options = {
            \ 'col': 1,
            \ 'whitespace': 'no',
            \ 'strip_whitespace': '0'
            \ }

This works for adding no whitespace. But then when I reverse the commenting operation, a space gets eaten. How do I stop whitespace from being eaten?

Which filetype is this about? It seems to me this is a problem with filetypes whose comment definition uses commentstring_rx since the whitespace option deals only with commentstring.

commented

Oh this was for javascript and not languages like vimscript/python/shell.
But you obviously figured that out and I can confirm your commit fixed it.

Thanks!