Technical Briefs
ROHAN help Files
vi
vi is the visual editor for UNIX machines. It differs from the VAX/VMS editor in that vi is a moded editor: you are either in command mode or you are in input mode. In command mode, each keystroke is assumed to be a command; in input mode, each keystroke is put into the file unless it is backspace (the funny X key inside the diamond on vt220s) or ESCAPE. ESCAPE terminates the input mode, and puts you back to command mode. If you don't know what mode you're in, press ESCAPE until your terminal beeps. Then you are in command mode.
In command mode, the most useful commands are:
- i[string]ESCAPE
- goes into input mode until you press ESCAPE
- a[string]ESCAPE
- like "i", but appends (after instead of before)
- x
- deletes (x's out) one character
- dw
- delete word (up to next blank)
- dd
- delete whole line
- o
- open a line up after the current line and go to input mode
- r
- replace the char under the cursor with one next character
- A
- append to end of line (good for putting in forgotten semicolons)
- 0
- NOTE: zero, not "oh" -- go to beginning of this line
- $
- go to end of this line
- G
- go to last line in file
- :1
- go to first line in file
For further help, try vi summary
|
|