I also followed Josh Frankel's advice and created a Sublime Macro + added key binding. The difference is that this script ensures that spacing is first set to tabs and set to a tab size of 2. The macro won't work if that's not the starting point.
Here's a gist of the macro: https://gist.github.com/drivelous/aa8dc907de34efa3e462c65a96e05f09
In Mac, to use the macro + key binding:
spaces2to4.sublime-macro
and copy/paste the code from the gist. For me this is located at:
/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/spaces2to4.sublime-macro
Sublime Text
> Preferences
> Key Bindings
{
"keys": ["super+shift+o"],
"command": "run_macro_file",
"args": {
"file":"Packages/User/spaces2to4.sublime-macro"
}
}
Now ? + shift + o
now automatically converts each file from 2 space indentation to 4 (but will keep indenting if you run it further)