简体   繁体   English

在 VSCode 中循环浏览某些选项卡时跳过它们

[英]Skip certain tabs when cycling through them in VSCode

In VSCode, pressing ctrl + pgup and ctrl + pgdn cycles backwards and forwards between tabs, respectively.在 VSCode 中,按ctrl + pgupctrl + pgdn分别在选项卡之间来回循环。

However I often have multiple editors opened side-by-side.但是,我经常同时打开多个编辑器。 For example one on the left, which I don't want to change;例如左边的一个,我不想改变; and one on the right with multiple tabs.右侧的一个带有多个选项卡。 I want to cycle through the tabs on the right, without affecting the tab(s) on the left.我想循环浏览右侧的选项卡,而不影响左侧的选项卡。

Is it possible to change the key bindings above, or introduce new ones, to "skip" certain tabs?是否可以更改上面的键绑定或引入新的键绑定以“跳过”某些选项卡? For example, to cycle tabs in the current editor only, or skip tabs which are somehow marked.例如,仅在当前编辑器中循环选项卡,或跳过以某种方式标记的选项卡。

I found a way: ctrl+k ctrl+pageup and ctrl+k ctrl+pagedown , which correspond to commands workbench.action.nextEditorInGroup and workbench.action.previousEditorInGroup .我找到了一种方法: ctrl+k ctrl+pageupctrl+k ctrl+pagedown ,它们对应于命令workbench.action.nextEditorInGroupworkbench.action.previousEditorInGroup

I find those combos to be unusable though, so I remapped them in keybindings.json :我发现这些组合无法使用,所以我在keybindings.json中重新映射了它们:

{ "key": "ctrl+k ctrl+pagedown", "command": "-workbench.action.nextEditorInGroup" },
{ "key": "ctrl+alt+pagedown",    "command": "workbench.action.nextEditorInGroup" },

{ "key": "ctrl+k ctrl+pageup",   "command": "-workbench.action.previousEditorInGroup" },
{ "key": "ctrl+alt+pageup",      "command": "workbench.action.previousEditorInGroup" },

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM