Example: If I have a document with 2 space indentation, and I want it to have 4 space indentation, how do I automatically convert it by using the Sublime Text editor?
While many of the suggestions work when converting 2 -> 4 space. I ran into some issues when converting 4 -> 2.
Here's what I ended up using:
Sublime Text 3/Packages/User/to-2.sublime-macro
[
{ "args": null, "command": "select_all" },
{ "args": { "set_translate_tabs": true }, "command": "unexpand_tabs" },
{ "args": { "setting": "tab_size", "value": 1 }, "command": "set_setting" },
{ "args": { "set_translate_tabs": true }, "command": "expand_tabs" },
{ "args": { "setting": "tab_size", "value": 2 }, "command": "set_setting" }
]