Wikia

Vim Tips Wiki

Watchlist Recent changes

Repeat last change

Redirected from VimTip44

Tip 44 Printable Monobook Previous Next

created 2001 · complexity basic · version 6.0


The "." command repeats the last change made in normal mode. For example, if you press dw to delete a word, you can then press . to delete another word (. is dot, aka period or full stop).

The "@:" command repeats the last command-line change (a command invoked with ":", for example :s/old/new/).

You can move the cursor before using either of the repeat commands.

Suppose you press dd to delete a line. Next, you might move the cursor, then press 5. (5 then dot). That will delete 5 lines.

In normal mode, press J to join the next line onto the current line. Press . to join more lines.

Or, you might use insert mode to type "hello ". Press Esc for normal mode, then move the cursor, and press . to insert "hello " again.

See alsoEdit

ReferencesEdit

CommentsEdit

  • plugin repeat.vim to repeat your own complex mappings and functions; see comments in script header for use
  • @@ to repeat last played macro
  • n, N, ;, , to repeat searches
  • & to repeat subsititution
  • i_CTRL-A also known as i_CTRL-R_.
  • Undo and Redo

Pages on Vim Tips Wiki

Add a Page
1,586pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
71photos on this wiki
See more >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki