23

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

I searched all over the internet with no luck, but lots of other people asking the same question on various forums.

reka18
  • 7,440
  • 5
  • 16
  • 37

3 Answers3

49

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!

reka18
  • 7,440
  • 5
  • 16
  • 37
2

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

Franco Gil
  • 323
  • 3
  • 11
1

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
Raju Gangadhar
  • 113
  • 1
  • 6