gpt4 book ai didi

bash - tmux C-i 键会杀死 bash 补码吗?

转载 作者:行者123 更新时间:2023-12-02 21:15:48 27 4
gpt4 key购买 nike

现在我是 vim-tmux-navigator 的新用户。但是,当我设置如下所示的键绑定(bind)时,tab 键不会补充由 tmux 打开的 bash 中的命令。当我注释掉 bind -n C-i.. 行时,补充命令再次起作用。

默认的 C-i 绑定(bind)是否与某些重要功能相关?

 unbind-key C-b  
set-option -g prefix C-q
#bint C-j send-prefix
# Vim Tmux Navigator
# https://github.com/christoomey/vim-tmux-navigator
bind -n C-y run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-y) || tmux select-pane -L"
bind -n C-u run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-u) || tmux select-pane -D"
bind -n C-i run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-i) || tmux select-pane -U"
bind -n C-o run "(tmux display-message -p '#{pane_title}' | grep -iq vim && tmux send-keys C-o) || tmux select-pane -R"

set-window-option -g utf8 on
set-window-option -g mode-keys vi
set-window-option -g automatic-rename off
#color
set-option -g status-bg blue
set-option -g status-fg yellow
set-option -g history-limit 100000

最佳答案

终端中的一些按键会被转换为 ctrl 等价键。以下是其中的几个:

  • TabCtrl-i
  • EnterCtrl-m
  • 退格键Ctrl-h

shell (bash) 永远不会真正获得 Tab 按键(对于 EnterBackspace 也是如此)。它总是获得相当于 ctrl 的值。

长话短说:Ctrl-iTab 是等效的。如果您绑定(bind) Ctrl-i,相同的绑定(bind)将应用于 Tab 键。

关于bash - tmux C-i 键会杀死 bash 补码吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30681261/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com