How to map to toggle comments in vim?

后端 未结 4 1985
天涯浪人
天涯浪人 2020-12-25 10:43

I use vim under iterm2. I\'m using the NERDCommenter plugin, and I\'d like to use Ctrl+/ to toggle comments (Trying to switch from Idea/Eclipse to vim). This is my mapping i

4条回答
  •  没有蜡笔的小新
    2020-12-25 11:14

    Here is how you can do it regaining the selection if you are in visual mode:

    nmap    NERDCommenterToggle
    vmap    NERDCommenterTogglegv
    

提交回复
热议问题