PracticalVim Tip31 - yszheda/wiki GitHub Wiki

Tip 31: Repeat the Last Ex Command

Return to the top: <>

  • `.`: repeat the most recent Normal mode command
  • `@:`: repeat the last Ex command

References:

  • `:` register always holds the most recently executed command line.
  • After running `@:` for the first time, we can subsequently repeat it with the `@@` command.

References:

Example: iterating through items in the buffer list with `:bn[ext]` or `:bp[revious]`.

  • use `@:` for repeating
  • use `` for revering (also works for `:next`/`:cnext`/`:tnext`)
⚠️ **GitHub.com Fallback** ⚠️