Closed ssreekanth closed 8 years ago
Try to diagnose with :verbose set filetype? comments? commentstring?
. On my OS X machine this outputs the following and textobj-comment works fine.
filetype=vim
Last set from /Applications/MacVim.app/Contents/Resources/vim/runtime/filetype.vim
comments=sO:" -,mO:" ,eO:"",:"
Last set from /Applications/MacVim.app/Contents/Resources/vim/runtime/ftplugin/vim.vim
commentstring="%s
Last set from /Applications/MacVim.app/Contents/Resources/vim/runtime/ftplugin/vim.vim
I'd investigate why 'comments'
and 'commentstring'
are not set or reset in your setup. In any case this is not an issue in textobj-comment.
My bad. I should have read the documentation before creating this issue.
filetype plugin indent on
was missing in my .vimrc
Thanks @glts for pointing me in the right direction..
For example, in .vimrc, I have the following comment, and it is not treated as a comment text object.
filetype is detected correctly, however, comments seems to be wrong.