Шпаргалка Vim
Выход | |
---|---|
:qa
|
Закрыть все файлы Close all files |
:qa!
|
Закрыть все файлы, отказаться от изменений Close all files, abandon changes |
:w
|
Сохранить Save |
:wq
/
:x
|
Сохранить и закрыть файл Save and close file |
:q
|
Закрыть файл Close file |
:q!
|
Закрыть файл, отказаться от изменений Close file, abandon changes |
ZZ
|
Сохранить и выйти Save and quit |
ZQ
|
Выйти без проверки изменений Quit without checking changes |
Навигация | |
---|---|
h
j
k
l
|
Arrow keys |
<C-U>
/
<C-D>
|
Half-page up/down |
<C-B>
/
<C-F>
|
Page up/down |
Слова | |
---|---|
b
/
w
|
Previous/next word |
ge
/
e
|
Previous/next end of word |
Строки | |
---|---|
0
(zero)
|
Start of line |
^
|
Start of line (after whitespace) |
$
|
End of line |
Символы | |
---|---|
fc
|
Go forward to character c
|
Fc
|
Go backward to character c
|
Документ | |
---|---|
gg
|
First line |
G
|
Last line |
:n
|
Go to line n
|
nG
|
Go to line n
|
Окно | |
---|---|
zz
|
Center this line |
zt
|
Top this line |
zb
|
Bottom this line |
H
|
Move to top of screen |
M
|
Move to middle of screen |
L
|
Move to bottom of screen |
Поиск | |
---|---|
n
|
Next matching search pattern |
N
|
Previous match |
*
|
Next whole word under cursor |
#
|
Previous whole word under cursor |
Вкладки | |
---|---|
:tabedit [file]
|
Edit file in a new tab |
:tabfind [file]
|
Open file if exists in new tab |
:tabclose
|
Close current tab |
:tabs
|
List all tabs |
:tabfirst
|
Go to first tab |
:tablast
|
Go to last tab |
:tabn
|
Go to next tab |
:tabp
|
Go to previous tab |
Редактирование | |
---|---|
a
|
Append |
A
|
Append from end of line |
i
|
Insert |
o
|
Next line |
O
|
Previous line |
s
|
Delete char and insert |
S
|
Delete line and insert |
C
|
Delete until end of line and insert |
r
|
Replace one character |
R
|
Enter Replace mode |
u
|
Undo changes |
<C-R>
|
Redo changes |
Выход из режима ввода | |
---|---|
Esc
/
<C-[>
|
Exit insert mode |
<C-C>
|
Exit insert mode, and abort current command |
Буфер обмена | |
---|---|
x
|
Delete character |
dd
|
Delete line (Cut) |
yy
|
Yank line (Copy) |
p
|
Paste |
P
|
Paste before |
"*p
/
"+p
|
Paste from system clipboard |
"*y
/
"+y
|
Paste to system clipboard |
Режим просмотра | |
---|---|
v
|
Enter visual mode |
V
|
Enter visual line mode |
<C-V>
|
Enter visual block mode |
В режиме просмотра | |
---|---|
d
/
x
|
Delete selection |
s
|
Replace selection |
y
|
Yank selection (Copy) |