Tuesday, May 25, 2010
Vi tricks
- Set Commands:
:set number- Add line-numbers to the display:set nonumber- turn off line-numbers.
- Command-line:
vi file +line- open file in vi at the specified line number.vi -O file1 file2- open file 1 and file 2 side by side.
- In editor commands:
:vs [file]- open vertical parallel window.CTRL-w {up,down,left,right}- used to move between virtual editor windows.K- Lookup up the man-page for the word indicated by the cursor