This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h2>VIM Search and replace syntax</h2> | |
| <p>The syntax is as follows:<br /> | |
| <code>:%s/Search/Replace/CommandFlag<br /> | |
| :%s/Search-Word/Replace-Word/g<br /> | |
| :%s/Search-Word/Replace-Word/g<br /> | |
| :%s/Search-Word/Replace-Word/gc<br /> | |
| <span style="color: #999999;">## Search and replace in<span style="color: #009900;"> the current line only</span> ##</span><br /> | |
| :s/Find-Word/Replace-Word/g<br /> | |
| <span style="color: #999999;">## Change each 'Unix' to 'Linux'<span style="color: #009900;"> for all lines from line 36 to line 42</span> ##</span><br /> | |
| :36,42s/Unix/Linux/g<br /> |