How to map to toggle comments in vim?

后端 未结 4 1986
天涯浪人
天涯浪人 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 10:53

    Just to sum up the information from other answers. For me (there might be a difference due to the fact that I'm using neovim) works fine on Windows, but I need to use on Linux:

    if has('win32')
      nmap  c
      vmap  c
    else
      nmap  c
      vmap  c
    endif
    

提交回复
热议问题