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
  • 5,219
  • 5
  • 31
  • 54

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.
  • 40,509
  • 10
  • 68
  • 97
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
  • 167,457
  • 16
  • 250
  • 324