【发布时间】:2020-05-25 15:22:26
【问题描述】:
我是 tmux 用户,个人更喜欢使用 alt+arrow 的切换窗格。但是,在 vscode 中,它不起作用。即使我尝试删除默认键绑定以防止重叠。
我尝试绑定到alt+u/h/j/k,它工作正常。我认为vscode中的alt+arrow键绑定有问题。是否有任何设置我没有找到或者它是一个错误?
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
【问题讨论】:
标签: debugging visual-studio-code tmux