Reputation: 103
I recently started using Conqueterm in gvim in fedora, it's lot of pain to type all that, so is there any way to map it to a shorter key i need to have this map to command mode(ESC -> :ctp) rather than in normal mode(ctp)
Upvotes: 3
Views: 409
Reputation: 59327
User defined commands must always begin with a capital letter. Lowercase commands are only the built-in ones. Anyway, you can create a shorter version of your command by adding something like this to your .vimrc:
:command! Ctp ConqueTerm
Or add arguments to create an even more handy command:
:command! Ctb ConqueTerm bash
Another option is to check your autocompletion settings, and type :Con
and
hit the tab key. It should autocomplete to the full command. A map is also
valid:
:cnoremap Ctp ConqueTerm
Or an abbreviation:
:cabbrev Ctp ConqueTerm
As you can see there are multiple ways of doing it. Each one has its unique aspect, though sometimes you'll not notice in simple commands like this one. Pick up the one that works better for you.
Upvotes: 3