Tuesday, March 29, 2011

Button-Button Vim command (linux)

Button-Button Vim command (linux)
Button-Button Vim command (linux) for linux users who still cloud may be confused how to use a text editor imaginable in linux terminal commands which are grouped category following:

categories: transfer mode
i move to insert mode (insert) a move to insert mode (add)
o moving to INSERT mode, and add a blank line below cursor
O moved to INSERT mode, and add a blank line above cursor

categories: navigation cursor
h, j, k, l left, down, up, right
w forward one word
W developed a next word (including whitespace)
b back one word
B backward one word (including whitespace)
e forward to the end of next word
E advanced to the end of next word (including whitespace)
ge back to the end of the previous word
GE retreated to the end of the previous word (including whitespace)
$ Moved to end of line
^ Move to the beginning of the line (without the blanks)
0 (zero) move to the beginning of the line (including null character) moved to the beginning of the file gg
G moved to end of file
G move to line
% Move to a specific position files, for example 50%, will move into the middle of the file
H moved to the top of the screen
M moved to the center of the screen
L moved to the bottom of the screen
CTRL-G show cursor position in the file
CTRL-U scroll up half a page
CTRL-D scroll down half page
CTRL-E scroll one row up
CTRL-Y scroll one line down
CTRL-B scroll one page up
CTRL-F scroll one page down
zz scroll so that the cursor is in the middle
Zt scroll so that the cursor is above the
ZB scroll so that the cursor is under


categories: search
f forward to the first encountered on a particular line
F back to the first encountered on a particular line
t advance to one character before the first encountered on a particular line
T back to one character one character before the first encountered on a particular line
% Moved to a pair of characters from the cursor position, eg position the cursor in the '(', will move the cursor to ')' partners / looking to the future? looking back n look again in the same direction
N search again in opposite directions * looking forward the same word at the cursor position
# Find the same words back at the cursor position

Category: delete
x delete the character at the cursor dd delete a line
A delete LINE BREAK, to join the line at the cursor with the next line

categories: undo and redo
u undo
CTRL-R redo

categories: save
ZZ save and exit
: W save
: Write save
: W filename save as
: Write save as filename

categories: exit
: Q quit without save if there is no change to the file
: Q! exit without save even when there are changes to the file

category: help
: Help see help
: Help subject see help on the subject

No comments:

Post a Comment

 
THANK YOU FOR VISITING