Home Index

1. Vim

2. Search

Vim / Search /

Search and replaceEdit

The substitute command can be used to insert (or replace) text. Some examples:
:s/^/space /  Insert "space " at the beginning of the line.
:s/$/ space/  Append " space" to the end of the line.
:s/blue/bright &/g      Replace each "blue" with "bright blue" in the line.

Make Letters in Lower or Upper Case

Shift-^ ... Got to begginig of the line
Shift-V ... Select the line
U       ... Convert line to Upper case
u       ... Convert line to Lower case

Edit Vertical Columns

CTRL-V  ... Visual column select 
c       ... Change
        ... type what you need ...
Esc     ... Escape to make the changes on all columns

Add at the end of lines between 116-293 ');