Skip to main content

Command Palette

Search for a command to run...

How to search and replace text in VIM

Published
•1 min read•View as Markdown
How to search and replace text in VIM

This post is short and sweet for now. I plan on adding more commands as I get more familiar with VIM.

Today I wanted to search and replace text in a JSON file using VIM.

Turns out it is rather easy.

:%s/"login"/"username"/g

In my situation I needed to include the quotes too and it handled it just fine. Go VIM.