History Report a problem
Article Edit this page Discussion

Repeat last colon command

From Vim Tips Wiki

(Redirected from VimTip990)
Jump to: navigation, search
 

Tip 990Previous TipNext Tip

Created: September 10, 2005 Complexity: basic Author: klausenhausen Minimum version: 5.7 Karma: 182/61 Imported from: Tip#990


The last command entered with ':' can be repeated with @: and further repeats can be done with @@

This is useful for commands like :bnext or :cNext.

[edit] Comments

 

I scroll through the previous commands with cursor up/down after pressing ':'.

You still can edit the command or just press Enter.


This Tip becomes super useful with something like the following:

:%s/\<pig\>/cow/gie|:update|:next

This facilitates the modification of a series of files.

Note you need the 'e' of the gie

  • g=do as many times as occurs in line
  • i=ignore case
  • e=don't break command if no search string found

Rate this article:

Share this article:

Hubs Highlights International Sites Wikia messages
Entertainment
Gaming
Cartoons & Comics
Science Fiction
Hobbies
Sports
See all...
Grand Theft Auto
Doctor Who
Legend of Zelda Wiki
Terminator Wiki
Everquest II Wiki
Mystery Science Theater 3000
German
Spanish
Chinese
Japanese
More...
Wikia is hiring for several open positions
Send this article to a friend
"Repeat last colon command"
 
 
Hi!

I thought you'd like this page from Wikia!

http://vim.wikia.com

Come check it out!
Send confirmation