There are a couple of ways for you to go, depending on how much effort you want to expend/how often you need to do this. The setting you want to modify is tab_size. This is a per view setting, so it’s automatically temporary to the view you do it in.
You can change the setting for a particular view by opening the console (default: Ctrl+` or View->Show Console) and execute something like this while your desired file has the input focus:
view.settings ().set ("tab_size", 20)
If you do this semi-regularly, then you can set up a key binding to do it for you. Such a binding would look like this, although you probably want to pick a combination that’s less of a contortion of the hands (and maybe one to put it back to what you normally use, if that matters):
{
"keys": ["ctrl+alt+shift+tab"],
"command": "set_setting",
"args":
{
"setting": "tab_size",
"value": 20
}
}
Alternatively, you could add the command to the menu system. For example, if you had something like this in a file named Context.sublime-menu in your User package (use Preferences->Browse Packages to get at the User package directory), then the command will appear in the context menu when you right click on a file, and will appear checked when the tab size is currently 20:
[
{
"caption": "Tab Width: 20",
"command": "set_setting",
"args": {
"setting": "tab_size",
"value": 20
},
"checkbox": true
}
]