문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top