Is there any way to shorten a command in VIM?

后端 未结 2 813
甜味超标
甜味超标 2021-01-16 12:43

I use the plugin NERDTree, but every time I call it, I need to type

:NERDTree

I can\'t use the EscKey

2条回答
  •  不知归路
    2021-01-16 13:28

    Just remap it to something easier:

    " F12 toggles NERDTree
    map  :NERDTreeToggle
    
    " Or cmap it to :NT
    cmap NT NERDTree
    

    But anyway, you can just press to autocomplete it after the first few characters.

    :NER
    

    ... autocompletes :NERDTree

提交回复
热议问题