本教程给出了这个例子:
<leader>c$ |NERDComEOLComment|
Comments the current line from the cursor to the end of line.
但是在vim中按\c$
或,c$
会复制当前行并切换到插入模式。
我已经通过病原体安装了该插件,:help nerdcommenter
确实有效,但:scripts
的输出中没有提到nerdcommenter,也不知道是否表示该插件尚未成功安装。
答案 0 :(得分:1)
看起来很好。以下是一些问题排查提示:
:scriptnames
的{{1}}输出;它需要在那里。.../plugin/NERD_commenter.vim
:echo loaded_nerd_comments
:echo g:NERDCreateDefaultMappings
:nmap <Leader>c
并按:nmap <Leader>x :echomsg "Works"<CR>
。\x
。使用:set paste
撤消。