dictionaryvim

How to map (alias?) a command in vim


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?


Solution

  • 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