You can record those commands using q
and execute them using @
, so:
qajlq
saves in register a
the two movements, and:
80@a
execute 80 times the content of register a
.
Question
I want to execute a set of independent(by this I mean which don't take each other as arguments) commands n times in vi (vim to be more precise). How can I group the commands? An example would be (I know it's a stupid command but I just want to illustrate my point):
80jl
How can I make vim execute both j
and l
commands 80 times?
Is there a composition operator?
Solution
You can record those commands using q
and execute them using @
, so:
qajlq
saves in register a
the two movements, and:
80@a
execute 80 times the content of register a
.