Vim
by Juan Manuel González Garzón
I. Configurations
/etc/vimrc
set nu " Show the line number
set nowrap " Avoid wrapping the text
II. Replace
Find each occurrence of ‘foo’ (in all lines), and replace it with ‘bar’.
:%s/foo/bar/g
Change each ‘foo’ to ‘bar’, but ask for confirmation first.
:%s/foo/bar/gc