sponsor Vim development Vim logo Vim Book Ad

advanced Tip #403: Request for tip - interleaving '.' and '@:'

 tip karma   Rating -12/22, Viewed by 765 

created:   January 15, 2003 22:13      complexity:   advanced
author:   Kartik Agaram      as of Vim:   5.7

I'm looking for a way to repeat the last command, whether it is an ex command or not. '.' repeats the last non-ex command, while '@:' repeats the last ex command. Can anyone think of a way to interleave the two? It may not seem very useful, but since you can map a keystroke to an ex command (or a sequence of them), isn't it reasonable to expect a uniform way to repeat the last keystroke, without having to remember how it's implemented?

As a random note, it occurs to me that the undo command probably maintains sufficient information to do this - if only we could get at it.

 rate this tip  Life Changing Helpful Unfulfilling 

<<Just using space-bar: jump between splitted windows and open them wide | Tags for Mixed Assembly and C >>

Additional Notes

zzapper at ntlworld.com, January 16, 2003 0:40
A better place for requests is


Kartik Agaram, January 16, 2003 12:34
Kartik Agaram, January 16, 2003 12:45
For the benefit of others like me who haven't seen it, vimtip #98 has some discussion on this.

Purely as an aside, it is interesting to observe Vim Online policy being spontaneously created by its (at least more outspoken) users, using Karma ratings to admonish non-conforming entries.
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to vim@vim.org after searching the archive. Help Bram help Uganda.
Sponsored by Web Concept Group Inc. SourceForge Logo