0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

iTerm2のコマンドライン上で単語ごとに左に移動したいけど出来ない時の対処法

Last updated at Posted at 2025-08-15

背景

iTerm2のコマンドライン上で単語ごとに左に移動したいけど出来ない…。
「Option + ← 」でいけるはずなのに。。

毎回キーボードの「←」でポチポチ移動している…。

っていうエンジニアとしてアホっぽい状況だったので出来るようにしました。

PCスペック

項目 情報
OS macOS Sqquoia 15.5
ハードウェア MacBook Pro 16inc 2023
プロセッサ Apple M3 pro
メモリ 36GB
iTermのversion Build 3.5.14

実行手順

iTermを起動

iTermでの設定

iTerm2 → Settings... をクリックして画面を開く

スクリーンショット 2025-08-15 14.35.34.png

Key Bindings → 左下の「+」をクリック。

スクリーンショット 2025-08-15 14.35.43.png

Keiboard ShortCut をクリックするとタイピングの記録が始まるので、「Option + ←」をタイプ。他は押さないように注意。

Action : Send Escape Sequence
ESC+ : b

を入力。

qiita002.png

qiita001.png

これで完了。

qiita003.png

こうなっていればOK。

同様に、Option + →を入力して

Action : Send Escape Sequence
ESC+ : f

とすれば単語ごとに左右に移動出来ます。

左右移動.gif

まとめ

楽だ。。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?