0

On most of IDE's ctrl + tab shortcut jumps to last tab opened before current one. I want to setup any C# IDE shortcuts somehow to work similar to Google Chrome tab system: jumping to the right-next tab instead of last opened (or left-previous tab on ctrl + shift + tab shortcut). Is it possible on any of these IDEs: Visual Studio 2017, Visual Studio Code, JetBrains Rider ?

salveiro
  • 419
  • 1
  • 5
  • 13

3 Answers3

1

VSCode:: Try this in your keybindings.json:

  {
    "key": "ctrl+tab",
    "command": "workbench.action.nextEditor",
    "when": "editorTextFocus && !editorReadonly && editorLangId == 'csharp'"
  },

  //  if you want to retain the old keystroke for all files, do not include this:
  //  {
  //  "key": "ctrl+pagedown",
  //  "command": "-workbench.action.nextEditor"
  // },
  {
    "key": "ctrl+tab",
    "command": "-workbench.action.openNextRecentlyUsedEditorInGroup"
  },
Mark
  • 143,421
  • 24
  • 428
  • 436
  • Thanks for that solution, it gave me a clue and I found little bit different bindings that I needed. My keybindings.json now works and looks like that: // Place your key bindings in this file to override the defaults [ { "key": "ctrl+tab", "command": "workbench.action.nextEditorInGroup" }, { "key": "ctrl+shift+tab", "command": "workbench.action.previousEditorInGroup" } ] – salveiro Jan 23 '19 at 14:35
  • Glad you got it working. Would you mind accepting the answer then if you found it helpful and accurate. – Mark Jan 23 '19 at 14:42
0

I found it difficult to make a shortcut, for example Ctrl + Tab I want to click the example character Q Shortcut Ctrl + Tab

ali
  • 1
0

To disable the Most Recently Used (MRU) behaviour of tabs and use simple left to right order, I used the following key bindings:

[
{
    "key": "ctrl+tab",
    "command": "workbench.action.nextEditor"
},
{
    "key": "ctrl+shift+tab",
    "command": "workbench.action.previousEditor"
},
{
    "key": "ctrl+f4",
    "command": "workbench.action.closeActiveEditor"
}
]

You also need to change the preferences to disable the MRU order when closing tabs (ctrl-W, or ctrl-f4 as defined above if you are used to Windows keybindings):

{
    "workbench.editor.enablePreview": false,
    "workbench.editor.focusRecentEditorAfterClose": false
}

I also disable enablePreview above so that ctrl-P always opens files in a new tab (the preview tab functionality is a weird option where files keep opening within a single tab: the preview tab which is indicated by the tab caption being in italics! yuck!)

robocat
  • 5,293
  • 48
  • 65