Monthly Archives: July 2011

You are browsing the site archives by month.

vi – Used To Hate It

Over the past few months editing configuration files and writing scripts, not programming, I’ve come to realize how awesome vi is and the plethora of operations you can perform on the text once you open it up in “vi”. Forget about nano/pico. Some common tasks you can do with vi…

Find and Replace: “g” indicates global or else vi only replaces once per instance per line.


Find and Replace a “\”(windows) with a “/”(*nix):


Line Numbers:

:set number

Go To Line Number:


Remove Line Numbers:

:set no number

Search For Text(Case Sensitive):


Delete All Lines Starting With a Particular Character(“;” in this case):


Delete All Empty Lines: