Skip to content


substitue in vim

April 18, 2012

“To substitute a regular expression with some other text, type :%s/old/new/gc this command takes the whole file %, and substitutes s the word “old@ with “new” and looks for more than one occurrence within one line g and asks if it really should replace the shown one c.”

“To replace some text only in a selected area, select the area, and type :s/old/new/g. This should look like :'<,'>s/old/new/g in the command line. You’ll understand '<and '> after the “Marks” section.”


From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: