在vimrc中添加“cmap E e”会破坏插件

时间:2012-03-05 15:35:58

标签: vim mapping command remap

我正在使用许多像nerdtree,逃犯等的vim插件。

最近我添加了一些新的映射,其中一些插件坏了

我追溯到下一行

cmap E e

WTF? :)为什么会破坏NerdTree?

更新:忘了提及它是如何破坏的;)。我收到以下错误:

E492: Not an editor command: :NeRDTreeToggle

UPDATE2:呃!我现在知道会发生什么。将E映射到e将NERDTreeToggle转换为NeRDTreeToggle 那么新的问题是如何将E映射到e 正确?即:“E foo.txt”将与“:e foo.txt”相同

2 个答案:

答案 0 :(得分:1)

我自己找到了解决方案:

command -nargs=* -complete=file E e <args>

答案 1 :(得分:1)

我在下面添加了:

call pathogen#infect()
call pathogen#helptags()
filetype plugin indent on·
syntax on
<。vvrc文件中的

相关问题