This now doesn't leave the whole text selected :)
[
{
"args": null,
"command": "select_all"
},
{
"args": {
"setting": "tab_size",
"value": 2
},
"command": "set_setting"
},
{
"args":
{
"set_translate_tabs": true
},
"command": "unexpand_tabs"
},
{
"args": {
"setting": "tab_size",
"value": 4
},
"command": "set_setting"
},
{
"args":
{
"set_translate_tabs": true
},
"command": "expand_tabs"
},
{
"args":
{
"by": "lines",
"forward": false
},
"command": "move"
}
]