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?

Was it helpful?

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top