How can I make VS Code editor tabs close button go on left side?
Asked Answered
L

4

28

How do I move the 'x' button to close an editor tab to the left side of the tab?

Logarithmic answered 4/5, 2018 at 13:36 Comment(0)
L
51

After searching endlessly for a solution to this, I found one, and decided it might be appreciated by others to know how to get their tab 'x' button on the left side.

Simply add the following to your USER SETTINGS json file.

"workbench.editor.tabCloseButton": "left",

Mac users rejoice!

Logarithmic answered 4/5, 2018 at 13:43 Comment(3)
I was in pain, and I didn't know it. Thanks.Afterguard
Life saver! This comes with the added benefit of being able to close multiple tabs faster when they have different widths.Bothnia
this setting will be gone in VS Code 1.85. see my answer for more up to date info.Ordnance
S
5

Based on reka18's answer:

Click on Preferences > Settings and type workbench editor tab

Observe the option Tab Close Button, there is a drop down, click and select left.

vs-code-tab-configuration

Suprasegmental answered 25/1, 2023 at 19:39 Comment(0)
C
2

If you are here in 2023, there is a better option (not sure if that was the case earlier) -

  1. Cmd + Shift + P => Opens a search bar with a command > enter image description here
  2. Type in Open Settings and select Preferences: Open Settings (UI)
  3. You will get an interface where you again get a search bar on top -
  4. Type in Close button and you will see the following - enter image description here
  5. Update how you want it and that's it! Not even saving is required
Caw answered 18/7, 2023 at 11:40 Comment(0)
O
2

(in settings.json)

For VS Code 1.85+

"workbench.editor.tabActionLocation": "left",

Setting description:

Controls the position of the editor's tabs action buttons (close, unpin). This value is ignored when #workbench.editor.showTabs# is not set to multiple

For the change history, see https://github.com/microsoft/vscode/issues/196972.

For VS Code pre-1.85

"workbench.editor.tabCloseButton": "left",

Setting description:

Controls the position of the editor's tabs close buttons, or disables them when set to 'off'. This value is ignored when workbench.editor.showTabs is not set to multiple.

Ordnance answered 3/11, 2023 at 7:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.