Search code examples
visual-studio-codetab-size

Different tab sizes depending on the language/file I'm programming in VS Code


I want to work with programming languages ​​with a tab size of 4 but when I want to open a .txt file I want the tab size to be 8, it is possible to specify for different file types or for different languages ​​different tab sizes in VS Code? I only know the option in Preferences that changes in any file to the value that is there.


Solution

  • I believe language specific settings are what you're looking for. Try adding

    "[plaintext]": {
         "editor.tabSize": 8
    }
    

    to your settings.json file.