іноді читаю мануали по Віму і виписую найбільш потрібні (мені) команди. Тут пропоную останній едішн )
Читати кожен день перед сном
-- HELP MODE
CTRL-] - jump to the tag
CTRL-O - jump to older position
CTRL-T - pop tag (== CTRL-O ?)
-- NORMAL MODE
h - left
j - down
k - up
l - right
x - delete a character
dd - delete a line
J - delete a line break
u - undo
CTRL-R - redo
o - create new empty line bellow and go to INSERT mode
O - create new empty line abouve
ZZ - save and exit
---- MOVING
CTRL-G - Telling where you are
w(W) - move forward one word(WORD - see keyword for details)
b(B) - move backward one word(WORD)
e(E) - move to next end of word(WORD)
ge(gE) - move to previous end of word(WORD)
$ - go to the last character in line
0 - go to the first character in line
^ - go to the first non-blank character in line
fx - search right in the line for x character
Fi - search left in the line for i character
tx - search right in the line for x character (but stop before it)
Ti - search left in the line for i character (but stop before it)
; - repeat search to the left
, - repeat search to the right
% - move to the matching paren. (),{},[] - can be defined with 'matchpairs' option.
G - go to the end of file
1G - go to the first line
45G - go to the line 45
gg - go to the begin of file
30% - go to the 30% line
H - go to the first line on the screen
M - go to the middle line on the sceen
L - go to the last line on the screen
-- COMMAND-LINE mode
:q - quit
:q! - ovveriden quit
:e! - reload the file (overriden)
:set [no]showmode - display current mode
:set [no]number - show line numbers
:set [no]ruler - show cursor position
:h[elp] {subject} - show help (subject can contain wildcards like * and ?)
:help deleting - find how to delete text
:help x - help on the x command
:help index - complete index of Vim commands
:help CTRL-A - help on CTRL-A in NORMAL mode
:help i_CTRL-H - help on CTRL-H in INSERT mode
:help -t - help on what does as a command line argument
:help 'number' - help on 'number' option
:help i_<Up> - help on UP key in INSERT mode
:help E37 - help on Error code 37