I'm trying to set up the NERDComment plugin in vim, but I'm having some trouble with the keys. I'd like to set the basic toggle functionality (comment a line if it's uncommented, uncomment if it's commented) to be c. The problem is that I've remapped the Leader to be ,
, which is the same key that NERD wants for all of it's hotkeys. Anyone have any idea as to how to set this up?
views:
84answers:
1
A:
Just call NERDComment function in your mapping. For example, my mapping to comment the current line:
inoremap ,c <C-o>:call NERDComment(0,"toggle")<C-m>
ZyX
2010-04-13 14:57:13