Question: 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?

Answer: 
<https://github.com/Microsoft/vscode/issues/43459>

In settings.json:

```
"workbench.editor.focusRecentEditorAfterClose": False,

```

It opens the tab to the right. Couldn't figure out left.
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](https://marketplace.visualstudio.com/items?itemName=ryuta46.multi-command).