=====Vim=====
{{tag>Linux}}
=== Syntax Highlighting ===
To enable syntax highlighting for unique file names edit:\\
/home/USERNAME/.vimrc
au BufNewFile,BufRead FILE.NAME setf SYNTAX
Syntax files are in:\\
/usr/share/vim/vim74/syntax/
\\
=== Search and Replace===
Find each occurrence of 'foo' (in all lines), and replace it with 'bar'.
:%s/foo/bar/gc
* Remove "%" to search only a single line.
* Remove "g" to search only for first instance.
* Remove "c" to not ask for confirmation.
* Add "i" to make case insensitive.
* Add "I" to make case sensitive.
Change only whole words exactly matching 'foo' to 'bar'; ask for confirmation.
:%s/\/bar/gc
http://vim.wikia.com/wiki/Search_and_replace