Patrick Forget
Patrick Forget

Reputation: 2223

Vim repeat macro recorded under a capital letter

Normally I record vim macros using q[some letter] and replay it using @[some letter]

I just saved a macro using qT and I'm tryin @T to replay it. But when I do @T it just runs @t (the lowercase one).

Any idea how I can store and replay macros stored in uppercase letters?

Upvotes: 2

Views: 465

Answers (1)

johnmastroberti
johnmastroberti

Reputation: 847

Per the vim reference manual, in the section on registers,

  1. Named registers "a to "z or "A to "Z
    Vim fills these registers only when you say so. Specify them as lowercase letters to replace their previous contents or as uppercase letters to append to their previous contents. When the '>' flag is present in 'cpoptions' then a line break is inserted before the appended text.

So recording into the T register actually just appends to the t register. The lower and upper case registers are not separate.

Upvotes: 7

Related Questions