Closed staskjs closed 2 years ago
Your keybindings appear to be using the deprecated NerdComment()
function. This has been replaced by nerdcommenter#Comment()
. We put a shim in place to catch many common usages, but we were not able to cover the visual mode with more than one line selected.
In any case the fix should be to update your vimrc file with the correct nerdcommenter#Comment()
function, or (NERDCommenterComment
as a command).
Apparently you are right, I do have my own keybindings, I completely forgot about them... I don't really understand how I should fix them. I have lines like this:
nxmap <leader>c<space> :call Comment('Toggle', 'x')<cr>
How it should be changed?
I'm not sure where your nxmap
is coming from because neither my VIM nor NeoVIM ham that, but here are a couple starting points for you:
nmap <leader>c<space> NERDCommenterToggle
" or
nmap <leader>c<space> :call nerdcommenter#Comment('Toggle', 'x')<cr>
That was a typo, sorry. There is nmap
.
It worked, but I had to change the order of arguments, so nmap <leader>c<space> :call nerdcommenter#Comment('n', 'Toggle')<cr>
is apparently a way to go.
Thank you!
Recently I reinstalled vim, then Vundle automatically installed newest nerdcommenter version 2.6.0 I instantly ran into a problem trying to use
leader + c + space
in visual mode, I get this error:Everything is fine on previous version.
Tried all vim versions from 7.4 to 8.2