Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
278 views
in Technique[技术] by (71.8m points)

Create a command shortcut for NERDTree in Vim editor

I'd like to create an abbreviation for NERDTree on the command-line. I find it annoying have to write :NERDTree every time I want to enable it. So I'd like to type :nr or something like that. Is that possible?

question from:https://stackoverflow.com/questions/6467634/create-a-command-shortcut-for-nerdtree-in-vim-editor

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In my .vimrc I have:

let mapleader = ","
nmap <leader>ne :NERDTree<cr>

So when I need NERDTree I just write ,ne in normal mode.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...