我是一个tmux用户,个人更喜欢使用
我尝试将其绑定到
alt
+方向键
来切换窗格。然而,在vscode中,这个组合键无法使用。我甚至尝试删除默认快捷键以避免重叠冲突,但问题依旧存在。我尝试将其绑定到
alt
+u/h/j/k
,并且它可以正常工作。我认为在vscode中存在alt
+arrow
键绑定的问题。我是否有所遗漏或这是一个bug呢?
keybinding.json - vscode
{
"key": "alt+up",
"command": "-workbench.action.terminal.focusPreviousPane",
"when": "terminalFocus"
},
{
"key": "alt+down",
"command": "-workbench.action.terminal.focusNextPane",
"when": "terminalFocus"
},
{
"key": "alt+left",
"command": "-workbench.action.terminal.focusPreviousPane",
"when": "terminalFocus"
},
{
"key": "alt+right",
"command": "-workbench.action.terminal.focusNextPane",
"when": "terminalFocus"
}
.tmux.conf
# switch panes with "(alt) + (↑ ↓ ← →)"
## This does not work in vscode integrated terminal
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
## This do work
bind -n M-u select-pane -U
bind -n M-j select-pane -D
bind -n M-h select-pane -L
bind -n M-k select-pane -R