2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

tig の キーバインド設定メモ

2
Posted at

bind {keymap} {key} {action} の形式

keymap はどの view に対する設定かを指定。 generic は全てに反映

main, diff, log, help, pager, status, stage, tree, blob, blame, branch, generic

key は割り当てるキー。特殊なキーは以下

Enter, Space, Backspace, Tab, Escape, Left, Right, Up, Down, Insert, Delete, Hash, Home, End, PageUp, PageDown, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12.

Control キーとの組み合わせはプレフィクスとして ^ を使用。

bind main ^f scroll-page-down

action は : で始まるものは tig の内部コマンド、 ! で始まるものは外部コマンドと解釈される。

内部コマンドは man tigrc を参照

外部コマンドはさらに以下のプレフィクスが使用できる

  • @ バックグラウンドで実行
  • ? プロンプトを表示
  • < コマンド実行完了とともに tig を終了

tigの例

~/.tigrc
bind main B !git rebase -i %(commit)^
bind diff B !git rebase -i %(commit)^
bind status D !?rm %(file)
2
3
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
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?