Vi Vim Less

show hidden characters

:set list
:set nolist

show line number

:set number

Basic search and replaceEdit
The :substitute command searches for a text pattern, and replaces it with a text string.


Find each occurrence of ’foo’, and replace it with ’bar’.


Change each ’foo’ to ’bar’, but ask for confirmation first.


Change only whole words exactly matching ’foo’ to ’bar’; ask for confirmation.


Remove all empty lines