3

All I want to do is to change :vertical resize + arguments into :vr + arguments.

for example change:

:vertical resize +60 <CR>

into:

:vr +60 <CR>

From other answers Aliasing a command in vim, I can see that i can use :command, but there doesn't seem to be a simple way to pass arguments in the process of aliasing.



also as a sidenote, I have tried the following and it doesn't seem to pass in the argument:

command! -nargs=1 Vres "vertical resize"
Chan Youn
  • 283
  • 3
  • 8

1 Answers1

8

it doesn't seem to pass in the argument

Because you haven't passed it. The right syntax is:

command! -nargs=1 Vres vertical resize <args>

Simply read :help :command until the very end to know all the options.

Matt
  • 20,685
  • 1
  • 11
  • 24