2

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"
5

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.