note for myself: vi tip 1 add tab
This is a note for myself: vi editor.
1. add an indent tab at the begining of lins:
The interesting thing is that although s is the substitute command, this inserts a tab at the begining of lines. In regular exp, ^ means the begining, and null (empty) string follows. This is useful to move a block of source codes to one tab right at once.
2. cut spaces at the ends of lines:
:%s/[ ]* $//
:set list and :set nolist