Question

Possible Duplicate:
Is there any way to reduce the command in VIM?

In vim to open your NERDTree menu you type :NERDTree, but that actually really annoys me, because it's long and mixed case. Since you close it with q, I want to open it with a short key (maybe :n, you can also provide suggestions for that if you feel like it). How can I change that?

I am sorry if this is simple, but I am a newb, and I don't know form where to start aproaching such a problem -from the plugin files, or is there a special remapping technique in your .vimrc.

Was it helpful?

Solution

You can use

map <F2> :NERDTreeToggle<CR>

to map NERDTree to any key you like (F2 in this example)

it's also possible to map it to :n

map :n :NERDTreeToggle<CR>

but that's not very common, I like using one of the F-Keys because that's faster.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top