h move one character left
j move one row down
k move one row up
l move one character right
w move to beginning of next word
b move to previous beginning of word
e move to end of word
W move to beginning of next word after a whitespace
B move to beginning of previous word before a whitespace
E move to end of word before a whitespace
0 move to beginning of line
$ move to end of line
_ move to first non-blank character of the line
g_ move to last non-blank character of the line
gg move to first line
G move to last line
nG move to n'th line of file (n is a number; 12G moves to line 12)
H move to top of screen
M move to middle of screen
L move to bottom of screen
z. scroll the line with the cursor to the center of the screen
zt scroll the line with the cursor to the top
zb scroll the line with the cursor to the bottom
Ctrl-D move half-page down
Ctrl-U move half-page up
Ctrl-B page up
Ctrl-F page down
Ctrl-O jump to last (older) cursor position
Ctrl-I jump to next cursor position (after Ctrl-O)
Ctrl-Y move view pane up
Ctrl-E move view pane down
n next matching search pattern
N previous matching search pattern
* next whole word under cursor
# previous whole word under cursor
g* next matching search (not whole word) pattern under cursor
g# previous matching search (not whole word) pattern under cursor
וככה יוצאים מVIM
- Press the ESC key.
- Now type :cq
- Then press Return or Enter.
:יציאה ושמירה
ctrl+[
ואחר כך
:wq
Common Vi / Vim File Savings Related Commands (ex mode)
You need to press [Esc] key followed by the colon (:) before typing the following commands:
Command | Description |
q | Quit |
q! | Quit without saving changes i.e. discard changes |
r fileName | Read data from file called fileName |
wq | Write and quit (save and exit) |
w fileName | Write to file called fileName (save as) |
w! fileName | Overwrite to file called fileName (save as forcefully)
|