Vim Tips Wiki

Editing

Search and replace

1
  • The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit. If you are undoing an edit that is …
Latest revision Your text
Line 47: Line 47:
   
 
==Details==
 
==Details==
'''Search range''':
+
s'''Search range''':
 
{| class="cleartable" style="margin: 0 1em 1em 24px"
 
{| class="cleartable" style="margin: 0 1em 1em 24px"
 
|style="vertical-align:top" |<code>:s/foo/bar/g</code> || Change each 'foo' to 'bar' in the current line.
 
|style="vertical-align:top" |<code>:s/foo/bar/g</code> || Change each 'foo' to 'bar' in the current line.
  Loading editor
Below are some commonly used wiki markup codes. Simply click on what you want to use and it will appear in the edit box above.

View this template