Skip to main content

Repeat Last Change in Vim (Linux)

Press Period to repeat the last change.

What it does

The last command that changed the text is done again at the cursor: a deletion, a paste, or a whole insert with the text that was typed. Moving the cursor and searching do not count as changes and are not repeated. Making one change, moving to the next place and repeating it there is a common way to work through a file.

The same shortcut on other platforms

PlatformShortcut
Linuxthis pagePeriod
macOS

More Vim shortcuts: Editing

  • Delete Character
  • Delete Line
  • Yank (Copy) Line
  • Paste After
  • Paste Before

All 30 Vim shortcuts for LinuxThe full list has a search and a printable PDF.

Questions

What is the Vim shortcut for Repeat Last Change on Linux?

. (Period). Press it to repeat the last change.

What is the shortcut for Repeat Last Change in Vim on macOS?

On macOS it is ..