検索・印刷できる Vim のリファレンス — モード、モーション、編集、検索と置換、ウィンドウ、バッファ、レジスタ。無料。

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

「:q」に一致する項目はありません。


Vim チートシートについて

このVimチートシートは、エディタを概念ごとにマッピングしています。モード、モーション、編集オペレータ、ビジュアルモード、検索と置換、ウィンドウとタブ、バッファとファイル、レジスタとマーク、マクロです。各行はキーストロークまたはコマンドと、それが何をするかの1行説明です。

Vimは体で覚えるほど力を発揮しますが、それを最速で身につけるコツは、必要な瞬間に正しいモーションやオペレータが目の前にあることです。このシートはオペレータ、モーション、カウントといった組み合わせ可能な部品をまとめて配置し、Vimの「文法」を一つずつ暗記するのではなく、目に見える形で保ちます。

無料で完全にクライアントサイドで動作します。検索ボックスで全キーストロークをリアルタイムに絞り込み、固定表示の目次でセクション間を移動し、クリックでExコマンドをコピーし、印刷もできます。Vimを覚える昔ながらの方法は、印刷物をキーボードの横に置くことです。

Vim チートシートの使い方

  1. 初めてなら「モード」セクションから始め、慣れているなら「モーション」と「編集オペレータ」へ直接ジャンプします。
  2. delete、replace、macroのようなアクションを検索し、シート全体を絞り込みます。
  3. 固定表示の目次を使って、レジスタ&マークやウィンドウ&タブなどのセクションへ移動します。
  4. コマンドまたはそのコピーアイコンをクリックして、検索置換パターンなどのExコマンドをコピーします。
  5. シートを印刷してキーボードの横に置き、モーションが体に染み込むまで練習します。

よくある質問

9つのセクションです。モード、モーション、編集オペレータ、ビジュアルモード、検索と置換、ウィンドウとタブ、バッファとファイル、レジスタとマーク、マクロという、エディタの実用語彙一式です。

はい。このシートはモード、モーション、オペレータ、レジスタ、マクロといったVimの中核動作を扱っており、これらはNeovimでも同一なので、どちらを使っていてもそのまま当てはまります。

まず「モード」セクションを読んでノーマル・インサート・ビジュアルモードを理解し、その後いくつかのモーションとオペレータを覚えましょう。Vimのコマンドは組み合わせ可能なので、少ない語彙ですでに大半の編集をカバーできます。

できます。印刷ボタンは検索バーとナビゲーションを取り除き、キーストロークと説明だけを出力します。印刷したVimチートシートは今でも定番の学習法です。

はい、完全に無料です。ブラウザ内で検索でき、アカウントなしで印刷もできます。

シェアする

人気の検索
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
お困りですか?
このツールで問題が見つかりましたか?チームにお知らせください。
問題を報告

この無料ツールをあなたのウェブサイトに追加 — 下のコードをコピーして貼り付けてください。