Vim Tips Wiki
No edit summary
(Change <tt> to <code>, perhaps also minor tweak.)
(2 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
|previous=989
 
|previous=989
 
|next=991
 
|next=991
|created=September 10, 2005
+
|created=2005
 
|complexity=basic
 
|complexity=basic
 
|author=klausenhausen
 
|author=klausenhausen
Line 12: Line 12:
 
|category2=
 
|category2=
 
}}
 
}}
The last command entered with ':' can be repeated with <tt>@:</tt> and further repeats can be done with <tt>@@</tt>
+
The last command entered with ':' can be repeated with <code>@:</code> and further repeats can be done with <code>@@</code>
   
This is useful for commands like <tt>:bnext</tt> or <tt>:cNext</tt>.
+
This is useful for commands like <code>:bnext</code> or <code>:cNext</code>.
   
 
==Comments==
 
==Comments==
Line 36: Line 36:
   
 
----
 
----
  +
Using
<div style="margin-left:-9999px;">[http://www.vipsexshop.com.br Sex Shop][http://www.requintesexshop.com.br Sex Shop][http://www.sexshop.com.vc Sex Shop][http://www.belasexshop.com.br Sex Shop][http://www.belasexshop.com Sex Shop][http://blog.vipsexshop.com.br Dicas de Sexo][http://www.viplingerie.com.br Lingerie][http://www.vipcalcinhas.com.br Calcinhas][http://www.uniformesbr.com Uniformes Profissionais][http://www.uniformesbr.com Uniformes]</div>
 
  +
<pre>
  +
q:k<CR>
  +
</pre>
  +
is somehow better than
  +
<pre>
  +
:<Up><CR>
  +
</pre>
  +
key since you don't have to move your fingers out of home rows in the keyboard.

Revision as of 06:02, 13 July 2012

Tip 990 Printable Monobook Previous Next

created 2005 · complexity basic · author klausenhausen · version 5.7


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.

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

Using

q:k<CR>

is somehow better than

:<Up><CR>

key since you don't have to move your fingers out of home rows in the keyboard.