17

Suppose you have 5 open tabs in order from 1-5. If you select tab 1, then select tab 5 and close it (ctrl+w), the editor goes back to tab 1.

I want it to go to tab 4, i.e. the previous neighboring tab of the tab that was closed. Not the previously selected tab.

Is there a setting in VS Code for this behavior?

2 Answers2

18

https://github.com/Microsoft/vscode/issues/43459

In settings.json:

"workbench.editor.focusRecentEditorAfterClose": false,

It opens the tab to the right.

thiagowfx
  • 1,808
1

This question is duplicate with: https://stackoverflow.com/questions/62230903/how-to-get-visual-studio-code-to-select-the-correct-tab-when-closing-the-current

Answer can be found there. In short: vscode doesn't offer this functionality. You need to use a macro extension like multi-command.

xialu
  • 111