私の質問

私の質問

私の質問

tmuxキーバインディングを使用するには、コマンドを入力するには2つの別々のキーを押す必要があります。最初のものはprefixと呼ばれ、control+に設定されますa。 2番目のキーは実際のコマンドを実行します。例えば:

  • c ウィンドウの作成
  • w リストウィンドウ
  • n 次のウィンドウ
  • w 前のウィンドウ
  • f 窓を探しています。
  • , 名前ウィンドウ
  • & ウィンドウを殺す

問題は、連続した2つのキーの組み合わせが面倒で遅いことです。他のほとんどのタブUI(ChromeからVimまで)では、単一の組み合わせでタブを切り替えることができます。

私は何を試しましたか?

  • ショートFW
  • bind-keyたとえば、send-keysbind-key C-c send-keys C-a n

私の質問

単一のキーの組み合わせを使用して、「次のウィンドウ」や「ウィンドウの作成」などの特定のtmuxコマンドをどのように実行できますか?

ベストアンサー1

解決策

私のファイルには次のものがあります~/.tmux.conf

bind -n C-h select-pane -L

<Ctrl>-h左側の選択ウィンドウにマップされます。

手動引用する-n議論のために

bind-key [-nr] [-T key-table] key command [arguments]
    (alias: bind)
Bind key key to command.  Keys are bound in a key table.  By default (without -T), the key is
bound in the prefix key table.  This table is used for keys pressed after the prefix key (for
example, by default `c' is bound to new-window in the prefix table, so `C-b c' creates a new
window).  The root table is used for keys pressed without the prefix key: binding `c' to
new-window in the root table (not recommended) means a plain `c' will create a new window.
-n is an alias for -T root.  Keys may also be bound in custom key tables and the
switch-client -T command used to switch to them from a key binding.  The -r flag indicates
this key may repeat, see the repeat-time option.

To view the default bindings and possible commands, see the list-keys command.

おすすめ記事