Saturday 22 November 2014

Moving Around in file using in vi mode

You can use a digit (1-9) followed by an “arrow key” to jump that many lines or letters in the direction –in other words , arrow key commands can be enumerated.

Command
Description
h or <-
Cursor left
l or ->
Cursor right
j or

Cursor down
k or                 

Cursor Up
^F or Pagedown
Move down one page
^B or Page Up
Move up one page
^U
Move half a page
^D
Move Down half a page
^E
Move the screen down one line
^Y
Move the screen up one line
+
Go to the beginning of the next line
-
Go to the beginning of the previous line
0(zero)
Go to the beginning of the current line
$
Go to the end of the current line
}
Go to the next blank line
{
Go to the previous
[[
Go to the beginning of the file
]]
Go to the end of the file
‘ ‘
Switch between beginning of file and current line
b
Go back one word or punctuation mark
B
Go back one word ,including punctuation marks
e
Go to the end of the next word ,  or punctuation marks
E
Go to the end of the next word , including punctuation marks
gg
Go to the top of the line
G
Go to the end of the file
^H
Go back to the character, including new lines
H
Go to the top of the current page
^P
Go up one line
L
Go to the bottom of current page
w
Go to the beginning of the next word or punctuation mark
W
Go to the beginning of the next word including punctuation mark
^Z
Suspend vi;use the fg command to resume
ZZ
Save and exit


No comments:

Post a Comment