1

I'm using lots of vim plugins like nerdtree, fugitive etc.

recently I was adding some new mappings and some of the plugins broke

I traced it down to the following line

cmap E e

WTF? :) why would it break NerdTree?

UPDATE: forgot to mantion how it breaks ;). I get the following error:

E492: Not an editor command: :NeRDTreeToggle

UPDATE2: Duh! I now know what happens. mapping E to e turns NERDTreeToggle into NeRDTreeToggle so the new question is how to map E to e properly? i.e. so that ":E foo.txt" will do the same as ":e foo.txt"

Vitaly Kushner
  • 9,247
  • 8
  • 33
  • 41
  • I think [this answer](http://stackoverflow.com/questions/7513380/vim-change-x-function-to-delete-buffer-instead-of-save-quit/7515418#7515418) will help you. – romainl Mar 05 '12 at 16:08

2 Answers2

1

For I added below:

call pathogen#infect()
call pathogen#helptags()
filetype plugin indent on·
syntax on

in .vimrc file

Klang Wutcharin
  • 377
  • 3
  • 3
1

I found the solution myself:

command -nargs=* -complete=file E e <args>
Vitaly Kushner
  • 9,247
  • 8
  • 33
  • 41
  • Ah, I was aiming for something else completely. Anyhow, ... glad you solved it! :) +1 – Rook Mar 05 '12 at 17:30