Semua alat
Gratis

Referensi Vim yang dapat dicari dan dicetak — mode, motion, pengeditan, cari & ganti, jendela, buffer, dan register. Gratis.

Modes

9
Esc
Return to Normal mode
i / a
Insert before / after the cursor
I / A
Insert at start / end of the line
o / O
Open a new line below / above
v
Visual mode (character selection)
V
Visual line mode
Ctrl-v
Visual block mode (columns)
R
Replace mode (overtype)
:
Command-line (Ex) mode

Motions

10
h j k l
Left, down, up, right
w / b
Forward / back one word
e / ge
End of next / previous word
0 / ^ / $
Line start / first non-blank / line end
gg / G
First line / last line
42G / :42
Jump to line 42
{ / }
Previous / next paragraph
%
Jump to matching bracket
f x / t x
Move to / before next x on the line
Ctrl-d / Ctrl-u
Scroll half page down / up

Editing operators

11
x / X
Delete char under / before cursor
dd / D
Delete line / to end of line
dw / diw
Delete word / inner word
cc / C
Change line / to end of line
ciw / ci"
Change inner word / inside quotes
yy / yw
Yank (copy) line / word
p / P
Paste after / before the cursor
r x / ~
Replace one char / toggle case
u / Ctrl-r
Undo / redo
.
Repeat the last change
>> / <<
Indent / unindent the line

Visual mode

9
v / V
Start character / line selection
Ctrl-v
Start block (column) selection
o
Jump to the other end of the selection
d / y
Delete / yank the selection
c
Change the selection
> / <
Indent / unindent the selection
gu / gU
Lowercase / uppercase the selection
gv
Reselect the last visual selection
I / A
Block insert before / append after (Ctrl-v)

Search & replace

9
/pattern
Search forward for pattern
?pattern
Search backward for pattern
n / N
Next / previous match
* / #
Search word under cursor fwd / back
:%s/old/new/g
Replace all in the file
:%s/old/new/gc
Replace all with confirmation
:s/old/new/g
Replace all on the current line
:%s/\<word\>/x/g
Replace whole words only
:noh
Clear search highlighting

Windows & tabs

8
:sp / :split
Horizontal split
:vsp / :vsplit
Vertical split
Ctrl-w h/j/k/l
Move to the split in that direction
Ctrl-w w
Cycle to the next split
Ctrl-w q / c
Close the current split
Ctrl-w o
Close all other splits
Ctrl-w =
Equalize split sizes
:tabnew / gt / gT
New tab / next / previous tab

Buffers & files

9
:e file
Open / edit a file
:w / :w file
Save / save as
:wq / :x / ZZ
Save and quit
:q / :q!
Quit / quit discarding changes
:ls / :buffers
List open buffers
:b name / :bN
Switch to a buffer by name / number
:bn / :bp
Next / previous buffer
:bd
Delete (close) a buffer
:wa / :qa
Write all / quit all

Registers & marks

8
"ayy
Yank line into register a
"ap
Paste from register a
"+y / "+p
Yank to / paste from system clipboard
:reg
Show register contents
ma
Set mark a at the cursor
`a / 'a
Jump to mark a (exact / line)
``
Jump back to the previous position
:marks
List all marks

Macros

7
qa
Start recording into register a
q
Stop recording
@a
Play back macro a
@@
Repeat the last played macro
5@a
Play macro a five times
:%normal @a
Run macro a on every line
"ap → edit → "ay$
Paste, edit, then re-yank a macro to change it

Tidak ada entri yang cocok dengan “:q”.


Tentang Lembar Contekan Vim

Lembar contekan Vim ini memetakan editor berdasarkan konsep: mode, motion, operator editing, visual mode, cari dan ganti, window dan tab, buffer dan file, register serta mark, dan makro. Setiap baris adalah sebuah keystroke atau perintah dengan deskripsi satu baris tentang fungsinya.

Vim memberi imbalan bagi memori otot, dan cara tercepat membangunnya adalah memiliki motion atau operator yang tepat di depan mata saat Anda membutuhkannya. Lembar contekan ini menjaga bagian-bagian yang dapat digabungkan — operator, motion, count — tetap dikelompokkan sehingga tata bahasa Vim tetap terlihat, bukan sekadar dihafal satu per satu.

Ini gratis dan sepenuhnya berbasis client-side: saring setiap keystroke secara langsung dengan kotak pencarian, lompat antar bagian dari daftar isi yang sticky, klik untuk menyalin perintah Ex, dan cetak lembar contekan ini — cara klasik belajar Vim memang dengan cetakan di samping keyboard.

Cara menggunakan Lembar Contekan Vim

  1. Mulai dari bagian Mode jika Anda baru mengenal Vim, atau langsung lompat ke Motion dan Operator editing.
  2. Cari sebuah aksi seperti delete, replace, atau macro untuk menyaring seluruh lembar contekan.
  3. Gunakan daftar isi yang sticky untuk melompat ke bagian seperti Register & mark atau Window & tab.
  4. Klik sebuah perintah atau ikon salinnya untuk menyalin perintah Ex seperti pola search-and-replace.
  5. Cetak lembar contekan dan simpan di dekat keyboard Anda sementara motion-nya berubah menjadi memori otot.

Pertanyaan yang sering diajukan

Sembilan bagian: mode, motion, operator editing, visual mode, cari dan ganti, window dan tab, buffer dan file, register serta mark, dan makro — kosakata kerja lengkap dari editor ini.

Ya. Lembar contekan ini membahas perilaku inti Vim — mode, motion, operator, register, makro — yang identik di Neovim, sehingga semuanya berlaku terlepas dari mana yang Anda gunakan.

Baca dulu bagian Mode untuk memahami mode normal, insert, dan visual, lalu pelajari beberapa motion dan operator. Karena perintah Vim bisa digabungkan, kosakata kecil saja sudah mencakup sebagian besar penyuntingan.

Bisa. Tombol Cetak menghilangkan bilah pencarian dan navigasi lalu hanya menampilkan keystroke beserta deskripsinya — lembar contekan Vim yang dicetak tetap menjadi cara klasik untuk belajar.

Ya, sepenuhnya gratis, bisa dicari di browser Anda, dan bisa dicetak tanpa akun apa pun.


Pencarian populer
vim cheat sheet vim commands list vim shortcuts vim search and replace vim motions reference vim visual mode commands vim macros how to quit vim
Butuh bantuan?
Menemukan masalah dengan alat ini? Beri tahu tim kami.
Laporkan masalah

Tambahkan alat gratis ini ke situs web Anda sendiri — salin dan tempel kode di bawah ini.