vi – Used To Hate It
// July 26th, 2011 // No Comments » // General
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.
:%s/find/replacewith/g
Find and Replace a “\”(windows) with a “/”(*nix):
:%s/\\/\//g
Line Numbers:
:set number
Go To Line Number:
:lineNumber
Remove Line Numbers:
:set no number
Search For Text(Case Sensitive):
/text







