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?

【備忘録】zsh コマンドラインエディタ

Posted at

いつも迷うので備忘録

  • カーソル移動系
キー 動作
Ctrl + A カーソルを行頭へ
Ctrl + E カーソルを行末へ
Ctrl + B カーソルを1文字戻る
Ctrl + F カーソルを1文字進める
ESC + F カーソルを1単語先に進める
ESC + B カーソルを1単語戻す
Ctrl + L 現在の行以外をクリアする
  • カーソル位置から所定の文字列を削除
キー 動作
Ctrl + K カーソル位置から行末までを削除
Ctrl + U 行全体を削除
Ctrl + H カーソル位置の直前の1文字を削除
Ctrl + D カーソル位置の1文字を削除
Ctrl + W 直前の1単語を削除(単語境界は空白類)
  • テキスト処理系
キー 動作
Ctrl + T カーソル前後の文字を入れ替える
ESC + U 単語を大文字にする
ESC + L 単語を小文字にする
Ctrl + O viで編集する(:wq) (下記設定)
export EDITOR=/usr/bin/vi
autoload -Uz edit-command-line
zle -N edit-command-line
bindkey '^o' edit-command-line

myMac

執筆時点
% zsh --version
zsh 5.9 (x86_64-apple-darwin23.0)

% sw_vers
ProductName:		macOS
ProductVersion:		14.7.5
BuildVersion:		23H527
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?