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?

Mac ターミナル ショートカットキー

Posted at

カーソル移動系

基本的な移動

ショートカット 動作
Ctrl + F 1文字前進
Ctrl + B 1文字後退
Ctrl + A 行の先頭に移動
Ctrl + E 行の末尾に移動

編集系

削除

ショートカット 動作
Ctrl + D カーソル位置の文字を削除
Ctrl + H カーソル前の文字を削除(Backspace)
Ctrl + K カーソル位置から行末まで削除
Ctrl + U カーソル位置から行頭まで削除
Ctrl + W 前の単語を削除

ヒストリー系

コマンド履歴の操作

ショートカット 動作 実例
Ctrl + P 前のコマンド(↑キーと同じ) lsgit status(前回実行)
Ctrl + N 次のコマンド(↓キーと同じ) git statusls(次のコマンド)
Ctrl + R インクリメンタル検索 (reverse-i-search)'git': git status

ヒストリー検索の使い方

# Ctrl + R を押すと検索モードに
(reverse-i-search)`':

# 「git」と入力すると、gitを含む過去のコマンドが表示
(reverse-i-search)`git': git commit -m "initial commit"

# もう一度 Ctrl + R で更に前のgitコマンドを検索
(reverse-i-search)`git': git add .

# Enter で実行、Ctrl + C でキャンセル

全選択・全削除系

コマンドライン全体の操作

ショートカット 動作
Ctrl + U 現在行の先頭からカーソル位置まで全削除
Ctrl + K カーソル位置から行末まで全削除
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?