Sublime Forum

Different tab_size for projects

#1

Hey there,

I have two projects (with HTML and CSS) and I need to set different tab_size for each of them. The first, I need tab_size: 4, and for the second set tab_size: 2.

Do you know, how to do it?

Thanks :slight_smile:

2 Likes

#2

If you’re using a persistent project (i.e. you have a sublime-project file) you can set the relevant option or options as a project specific setting.

To do that, while you have a project open, select Project > Edit Project from the menu to open up the project file, and add a "settings" key. Inside that you can put the settings you want to set only for this project.

An example might look like this (your folders would look different, etc):

{
    "folders":
    [
        {
            "path": "DevSrc"
        }
    ],
    "settings":
    {
        "tab_size": 4,
    }
}

Most (but not all) settings can be made project specific in this manner.

If the above menu command is disabled, you’re not currently using a saved project. In that case, while you’re working (and you have your relevant files open), choose Project > Save Project As first, to save the current project to disk.

5 Likes

#3

It works nicely, big thanks :slightly_smiling:

0 Likes