2

我尝试使用Nerd Commenter插件制作 vim 命令。基本上在这里得到一些帮助后,它看起来像:

command! -nargs=? -range=% Ct :normal <line1>ggv<line2>gg<Leader>c<space>

当我使用它时它可以工作:so .vimrc,但是当我重新启动 vim 时它只会在5ggv12gg没有,cspace. 我想这是因为该,cspace部分来自插件,但我想知道是否有某种方法可以解决这个问题。任何人都可以帮忙吗?

4

1 回答 1

1

也许您在.vimrc 中设置“mapleader”之前定义了命令?

来自:help mapleader

Note that the value of "mapleader" is used at the moment the mapping is
defined.  Changing "mapleader" after that has no effect for already defined
mappings.
于 2012-02-25T07:15:03.050 回答