visual studio代码按编号转到选项卡

问题描述 投票:4回答:5

在chrome和大多数其他浏览器/编辑器中,我们可以通过按Command键和数字转到特定选项卡。例如:如果按Command + 1,我们将转到第一个选项卡,Command + 2转到第二个选项卡,等等。

是否有可能获得Visual Studio代码的这种键映射?

visual-studio-code
5个回答
4
投票

现在可以使用最新版本的Visual Studio Code。见:https://github.com/Microsoft/vscode/issues/24753#issuecomment-294518439


2
投票

在macOS上,快捷方式默认为ctrl + n,而不是cmd + n。您可以在代码 - >首选项 - >键盘快捷键中修复它。另一个注意事项:大多数其他应用程序使用cmd + 9激活最后一个选项卡。我不确定VSCode是否可以轻松地做到这一点。


2
投票

由于VSCode默认使用ctrl+number(它会更改macOS中的桌面),因此您可以将cmd+number与自定义键绑定一起使用:

粘贴在你的keybindings.user

  {
    "key": "cmd+1",
    "command": "workbench.action.openEditorAtIndex1"
  },
  {
    "key": "cmd+2",
    "command": "workbench.action.openEditorAtIndex2"
  },
  {
    "key": "cmd+3",
    "command": "workbench.action.openEditorAtIndex3"
  },
  {
    "key": "cmd+4",
    "command": "workbench.action.openEditorAtIndex4"
  },
  {
    "key": "cmd+5",
    "command": "workbench.action.openEditorAtIndex5"
  },
  {
    "key": "cmd+6",
    "command": "workbench.action.openEditorAtIndex6"
  },
  {
    "key": "cmd+7",
    "command": "workbench.action.openEditorAtIndex7"
  },
  {
    "key": "cmd+8",
    "command": "workbench.action.openEditorAtIndex8"
  },
  {
    "key": "cmd+9",
    "command": "workbench.action.openEditorAtIndex9"
  },

0
投票

很不幸的是,不行。但您可以配置快捷方式以在选项卡之间移动,例如转到上一个,下一个,先前修改过的选项卡等。您可以在“键盘”下的“选项”菜单中进行更改。


0
投票

这标配了“Emacs Keymap”扩展以及众多其他“永不触摸鼠标”的键绑定,我个人认为这些键绑定在导航代码时保持压力水平。

现在我需要找到的是一种方法将标签的编号放在标签本身上(这是我在找到这个问题时正在搜索的内容)。

© www.soinside.com 2019 - 2024. All rights reserved.