tpope / vim-commentary

commentary.vim: comment stuff out
http://www.vim.org/scripts/script.php?script_id=3695
5.9k stars 214 forks source link

gcc mapping stopped working #105

Open ScrumpyJack opened 5 years ago

ScrumpyJack commented 5 years ago

and i have idea why.

:verbose omap _ -> No mapping found

where can i start looking?

tpope commented 5 years ago

_ is a Vim built-in. Does the regular gc map work?

ScrumpyJack commented 5 years ago

nope :(

here is what :map says

n  gcu           <Plug>Commentary<Plug>Commentary
n  gcc           <Plug>CommentaryLine
o  gc            <Plug>Commentary
n  gc            <Plug>Commentary
x  gc            <Plug>Commentary
o  g%          * v:<C-U>call <SNR>56_Match_wrapper('',0,'o') <CR>
v  g%          * :<C-U>call <SNR>56_Match_wrapper('',0,'v') <CR>m'gv``
n  g%          * :<C-U>call <SNR>56_Match_wrapper('',0,'n') <CR>

conflict?

richtan commented 5 years ago

I also had this problem, and it turns out that for me, it was because I had set my timeoutlen setting too low. I turned it back up (to around 500), and now the gcc mapping works again. (If you don't know, timeoutlen is how long in milliseconds to wait for a mapping to complete.)

tpope commented 5 years ago

@ScrumpyJack there's no conflict there. timeoutlen would be my guess too.