vim-motions
Vimのキーバインドや操作、テキストオブジェクトに関する質問に対し、効率的なテキスト編集方法を解説するSkill。
📜 元の英語説明(参考)
Vim keybindings, motions, text objects, and operators for efficient text editing. Use when user asks about "vim commands", "vim motions", "text objects", "vim keybindings", "vim cheat sheet", "learn vim", "vim in VS Code", or any Vim editing tasks.
🇯🇵 日本人クリエイター向け解説
Vimのキーバインドや操作、テキストオブジェクトに関する質問に対し、効率的なテキスト編集方法を解説するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[Skill 名] vim-motions
Vim モーション
効率的な編集のためのモーション、オペレーター、テキストオブジェクトです。
モード
Normal ESC または Ctrl-[ 移動と操作
Insert i, a, o など テキストの入力
Visual v, V, Ctrl-v テキストの選択
Command : コマンドの実行
基本的なモーション
文字/行
h j k l 左、下、上、右
0 行頭
^ 行の最初の非空白文字
$ 行末
g_ 行の最後の非空白文字
単語
w 次の単語の先頭
W 次の WORD の先頭 (スペース区切り)
b 前の単語の先頭
B 前の WORD の先頭
e 次の単語の末尾
E 次の WORD の末尾
ge 前の単語の末尾
行の移動
gg 最初の行
G 最後の行
5G 5行目に移動
:42 42行目に移動
H 画面の一番上
M 画面の中央
L 画面の一番下
検索
f{char} 文字を前方に検索 (行内)
F{char} 文字を後方に検索
t{char} 文字まで前方に移動 (文字の手前)
T{char} 文字まで後方に移動
; 前回の f/F/t/T を繰り返す
, 前回の f/F/t/T を繰り返す (逆方向)
/{pattern} 前方に検索
?{pattern} 後方に検索
n 次のマッチ
N 前のマッチ
* カーソル下の単語を検索
# カーソル下の単語を検索 (後方)
スクロール
Ctrl-d 半ページ下にスクロール
Ctrl-u 半ページ上にスクロール
Ctrl-f 1ページ下にスクロール
Ctrl-b 1ページ上にスクロール
zz 現在の行を中央に配置
zt 現在の行を上部に配置
zb 現在の行を下部に配置
オペレーター
d 削除
c 変更 (削除 + 挿入モード)
y ヤンク (コピー)
> 右にインデント
< 左にインデント
= 自動インデント
gu 小文字にする
gU 大文字にする
g~ 大文字/小文字を切り替える
オペレーター + モーション = アクション
dw 単語を削除
d$ 行末まで削除
d0 行頭まで削除
dG ファイル末尾まで削除
dgg ファイル先頭まで削除
d3j 3行下に削除
cw 単語を変更
ci" 引用符内を変更
ca) 括弧の周りを変更
yy 行をヤンク (コピー)
yw 単語をヤンク
y$ 行末までヤンク
>> 行をインデント
3>> 3行をインデント
テキストオブジェクト
i = inner (内側)
a = around (区切り文字を含む)
iw / aw 単語
iW / aW WORD
is / as 文
ip / ap 段落
i" / a" 二重引用符
i' / a' 単一引用符
i` / a` バッククォート
i( / a( 括弧
i[ / a[ 角括弧
i{ / a{ 波括弧
i< / a< 山括弧
it / at HTML/XML タグ
一般的なテキストオブジェクトのアクション
diw 単語の内側を削除
ciw 単語の内側を変更
yi" 引用符の内側をヤンク
da" 引用符の周りを削除 (引用符を含む)
ci( 括弧の内側を変更
dit HTMLタグの内側を削除
vit HTMLタグの内側を選択
yap 段落の周りをヤンク
>ip 段落をインデント
挿入モードへの移行
i カーソルの前に挿入
I 行の先頭に挿入
a カーソルの後に追記
A 行の末尾に追記
o 下の行を開く
O 上の行を開く
s 文字を削除して挿入
S 行を削除して挿入
C 行末まで削除して挿入
ビジュアルモード
v 文字単位のビジュアル
V 行単位のビジュアル
Ctrl-v ブロック (列) ビジュアル
# ビジュアルモードで:
o 選択範囲のもう一方の端にジャンプ
gv 前回の選択範囲を再選択
# ビジュアルブロック操作
Ctrl-v → 選択 → I → 入力 → ESC すべての行に挿入
Ctrl-v → 選択 → A → 入力 → ESC すべての行に追記
Ctrl-v → 選択 → c → 入力 → ESC すべての行を変更
Ctrl-v → 選択 → d 列を削除
編集コマンド
x 文字を削除
X 前の文字を削除
dd 行を削除
D 行末まで削除
cc 行を変更
C 行末まで変更
J 行を結合
u 元に戻す
Ctrl-r やり直し
. 前回のコマンドを繰り返す
~ 文字の大文字/小文字を切り替える
レジスター
"ay レジスター 'a' にヤンク
"ap レジスター 'a' から貼り付け
"+y システムクリップボードにヤンク
"+p システムクリップボードから貼り付け
"0p 前回のヤンク (削除ではない) を貼り付け
:registers すべてのレジスターを表示
マクロ
qa マクロ 'a' の記録を開始
q 記録を停止
@a マクロ 'a' を再生
@@ 前回のマクロを再再生
5@a マクロ 'a' を5回再生
マーク
ma マーク 'a' を設定
'a マーク 'a' にジャンプ (行)
`a マーク 'a' にジャンプ (正確な位置)
'' 前回の位置にジャンプ
`. 前回の編集箇所にジャンプ
必須コマンド
:w 保存
:q 終了
:wq 保存して終了
:q! 保存せずに終了
:e file ファイルを開く
:%s/old/new/g ファイル内のすべてを置換
:s/old/new/g 行内のすべてを置換
:noh 検索ハイライトをクリア
参考
クイックリファレンスカードについては、references/cheatsheet.md を参照してください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Vim Motions
Motions, operators, text objects for efficient editing.
Modes
Normal ESC or Ctrl-[ Navigate and manipulate
Insert i, a, o, etc. Type text
Visual v, V, Ctrl-v Select text
Command : Execute commands
Basic Motions
Character/Line
h j k l Left, Down, Up, Right
0 Start of line
^ First non-blank character
$ End of line
g_ Last non-blank character
Word
w Next word start
W Next WORD start (space-delimited)
b Previous word start
B Previous WORD start
e Next word end
E Next WORD end
ge Previous word end
Line Navigation
gg First line
G Last line
5G Go to line 5
:42 Go to line 42
H Top of screen
M Middle of screen
L Bottom of screen
Search
f{char} Find char forward (on line)
F{char} Find char backward
t{char} Till char forward (before char)
T{char} Till char backward
; Repeat last f/F/t/T
, Repeat last f/F/t/T (reverse)
/{pattern} Search forward
?{pattern} Search backward
n Next match
N Previous match
* Search word under cursor
# Search word under cursor (backward)
Scrolling
Ctrl-d Scroll half page down
Ctrl-u Scroll half page up
Ctrl-f Scroll full page down
Ctrl-b Scroll full page up
zz Center current line
zt Current line to top
zb Current line to bottom
Operators
d Delete
c Change (delete + insert mode)
y Yank (copy)
> Indent right
< Indent left
= Auto-indent
gu Lowercase
gU Uppercase
g~ Toggle case
Operator + Motion = Action
dw Delete word
d$ Delete to end of line
d0 Delete to start of line
dG Delete to end of file
dgg Delete to start of file
d3j Delete 3 lines down
cw Change word
ci" Change inside quotes
ca) Change around parentheses
yy Yank (copy) line
yw Yank word
y$ Yank to end of line
>> Indent line
3>> Indent 3 lines
Text Objects
i = inner (inside)
a = around (including delimiters)
iw / aw Word
iW / aW WORD
is / as Sentence
ip / ap Paragraph
i" / a" Double quotes
i' / a' Single quotes
i` / a` Backticks
i( / a( Parentheses
i[ / a[ Brackets
i{ / a{ Braces
i< / a< Angle brackets
it / at HTML/XML tag
Common Text Object Actions
diw Delete inner word
ciw Change inner word
yi" Yank inside quotes
da" Delete around quotes (including quotes)
ci( Change inside parentheses
dit Delete inside HTML tag
vit Select inside HTML tag
yap Yank around paragraph
>ip Indent paragraph
Insert Mode Entry
i Insert before cursor
I Insert at line start
a Append after cursor
A Append at line end
o Open line below
O Open line above
s Delete char and insert
S Delete line and insert
C Delete to end of line and insert
Visual Mode
v Character-wise visual
V Line-wise visual
Ctrl-v Block (column) visual
# In visual mode:
o Jump to other end of selection
gv Reselect last selection
# Visual block operations
Ctrl-v → select → I → type → ESC Insert in all lines
Ctrl-v → select → A → type → ESC Append to all lines
Ctrl-v → select → c → type → ESC Change all lines
Ctrl-v → select → d Delete column
Editing Commands
x Delete character
X Delete character before
dd Delete line
D Delete to end of line
cc Change line
C Change to end of line
J Join lines
u Undo
Ctrl-r Redo
. Repeat last command
~ Toggle case of character
Registers
"ay Yank into register 'a'
"ap Paste from register 'a'
"+y Yank to system clipboard
"+p Paste from system clipboard
"0p Paste last yank (not delete)
:registers Show all registers
Macros
qa Start recording macro 'a'
q Stop recording
@a Play macro 'a'
@@ Replay last macro
5@a Play macro 'a' 5 times
Marks
ma Set mark 'a'
'a Jump to mark 'a' (line)
`a Jump to mark 'a' (exact position)
'' Jump to last position
`. Jump to last edit
Essential Commands
:w Save
:q Quit
:wq Save and quit
:q! Quit without saving
:e file Open file
:%s/old/new/g Replace all in file
:s/old/new/g Replace all in line
:noh Clear search highlight
Reference
For quick reference card: references/cheatsheet.md