Nix Geek

Tag: vi

Search and Replace in vi

Speaking of vi(m) tips, I’m quite fond of search and replace from within vi. The syntax is very similar to sed’s search and replace, and uses regex the same way. To do a simple replacement of all instances of “snoogins” with “snoochieboochies” you would want to type this while in command mode. :%s/snoogins/snoochieboochies/g Like sed, […]

Syntax Highlighting in Vi

You do not need to install vim in order to highlight syntax. You can do so with the vi command: :syntax on

Back to top