10

Lets say, hypothetically, that I always forget the command :vsplit, and always think it’s :vdivide.

Is there a way to map (I’m not sure if that’d be the right thing to call it, since it’s a command) one to the other?

user137369
  • 4,751
  • 5
  • 28
  • 52

2 Answers2

12

User defined command can only start with an uppercase letter, so you can only add :Vdivide but not :vdivide.

Add in your .vimrc

 command Vdivide vsplit
Xavier T.
  • 39,000
  • 8
  • 66
  • 95
8

To get around the limitation that user-defined commands must start with an uppercase letter, I recommend the cmdalias.vim - Create aliases for Vim commands plugin. With it, you can do:

:Alias vdivide vsplit
Ingo Karkat
  • 161,022
  • 15
  • 231
  • 302