有没有办法缩短 VIM 中的命令? [英] Is there any way to shorten a command in VIM?
本文介绍了有没有办法缩短 VIM 中的命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我用的是插件NERDTree
,但是每次调用都需要输入
I use the plugin NERDTree
, but every time I call it, I need to type
:NERDTree
我无法使用 Esc
键来帮助我自动输入命令,有什么方法可以减少我的输入吗?谢谢.
I can't use the Esc
Key to help me to auto type the command, is there any way to reduce my typing? Thanks.
推荐答案
只需将其重新映射到更简单的地方:
Just remap it to something easier:
" F12 toggles NERDTree
map <F12> :NERDTreeToggle<CR>
" Or cmap it to :NT
cmap NT NERDTree
但无论如何,您只需按
即可在前几个字符后自动补全.
But anyway, you can just press <Tab>
to autocomplete it after the first few characters.
:NER<Tab>
... 自动完成:NERDTree
这篇关于有没有办法缩短 VIM 中的命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文