I want to add a shortcut like I type :open_my_document, it become :e /var/book/document.txt.
how to?
I want to add a shortcut like I type :open_my_document, it become :e /var/book/document.txt.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to create a custom command, use
:command:Then you can use:
Normally you can just type
:Opeand then hit tab and vim will complete the full command name.Note that your command needs to start with a capital letter because only built-in vim commands can start with lower-case letters.