Difference between revisions of "Vi Short Command Reference"

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search
m
m
Line 44: Line 44:
 
|}
 
|}
  
 +
=== Navigation and movement ===
  
 +
{| width="525" border="01" cellpadding="2"
 +
| width="150" | -
 +
| go to beginning of previous line
 +
|-
 +
| 0 (zero) or ^
 +
| go to beginning of this line
 +
|-
 +
| $
 +
| go to end of this line
 +
|-
 +
| ret or +
 +
| = go to beginning of next line (NOT THE SAME AS INPUT RETURN)
 +
|-
 +
| w
 +
| go to beginning of next word
 +
|-
 +
| b
 +
| go to beginning of this word
 +
|-
 +
| e
 +
| go to end of this word
 +
|-
 +
| sft-h
 +
| go to first line onscreen
 +
|-
 +
| sft-l
 +
| go to last line onscreen
 +
|-
 +
| ctrl-f
 +
| forward (down) one screen
 +
|-
 +
| ctrl-b
 +
| backward (up) one screen
 +
|-
 +
| 1,sft-g
 +
| top of the buffer
 +
|-
 +
| sft-g
 +
| bottom of the buffer (i.e. EOF)
 +
|-
 +
| line,sft-g
 +
| go to line (e.g. 3,5,sft-g = line 35)
 +
|-
 +
| column,|
 +
| go to column (e.g. 4,| = column 4)
 +
|-
 +
| sft-J
 +
| Join / bring next line up (append next line to end)
 +
|}
  
 
<br />
 
<br />

Revision as of 20:36, 27 June 2007

Vi short command reference

(Learn or review your Vi commands with this concise reference)
by: Krissy J. krissyj@robotz.com

Operation

i input mode
esc command mode
:se number display line numbers
:se nonumber don't display line numbers
:e open file
:w save (write) file to disk
:wq save and quit
:q! quit but don't save
number,command apply command number times (e.g. 4,x = delete 4 characters)
. repeat last effective cmd
esc,u undo it
ctrl-r redo it

Navigation and movement

- go to beginning of previous line
0 (zero) or ^ go to beginning of this line
$ go to end of this line
ret or + = go to beginning of next line (NOT THE SAME AS INPUT RETURN)
w go to beginning of next word
b go to beginning of this word
e go to end of this word
sft-h go to first line onscreen
sft-l go to last line onscreen
ctrl-f forward (down) one screen
ctrl-b backward (up) one screen
1,sft-g top of the buffer
sft-g bottom of the buffer (i.e. EOF)
line,sft-g go to line (e.g. 3,5,sft-g = line 35)
= column 4)
sft-J Join / bring next line up (append next line to end)


Trans American Software
Robotz.com Developer's Project
developer@robotz.com