[英]how to load vim command based on plugin command in vimrc
I tried to make vim command using Nerd Commenter plugin. 我试图使用Nerd Commenter插件制作vim命令。 Basically after some help here , it looks like:
基本上在这里得到一些帮助后,它看起来像:
command! -nargs=? -range=% Ct :normal <line1>ggv<line2>gg<Leader>c<space>
It works when I use :so .vimrc
, but when I restart vim it only performs 5 g g v 1 2 g g without , c space . 它的工作原理,当我使用
:so .vimrc
,但是当我重新启动VIM它只是没有,C 空间进行5克 摹 V 12 克 克 I guess it is because the , c space part is from plugin, but I wonder if there is some way to fix this. 我猜这是因为, c 空间部分来自插件,但是我想知道是否有某种方法可以解决此问题。 Anyone could help?
有人可以帮忙吗?
Perhaps you are defining the command before setting "mapleader" in your .vimrc? 也许您是在.vimrc中设置“ mapleader”之前定义命令的?
From :help 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.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.