【发布时间】:2019-07-22 21:58:49
【问题描述】:
我正在尝试在 IdeaVim 中重新创建一些 https://github.com/tpope/vim-commentary 函数。
我在.ideavimrc 中尝试了各种映射,例如:
nnoremap gcc :action CommentByLineComment<CR>
这很好,但我不能用2gcc 注释掉两行。或ngcc 注释掉n 行。
我也试过像这样映射它们:
nnoremap 2gcc Vj:action CommentByLineComment<CR><Esc>
nnoremap 3gcc V2j:action CommentByLineComment<CR><Esc>
" etc...
像这样:
nnoremap gc2j V2j:action CommentByLineComment<CR><Esc>
nnoremap gc3c V3j:action CommentByLineComment<CR><Esc>
" etc...
但它们不起作用。
关于如何实现这一点的任何帮助?
【问题讨论】:
标签: ideavim