Skip to content

Instantly share code, notes, and snippets.

@daftspunk
Created October 30, 2014 00:00
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save daftspunk/36b546fb2c1058da99ca to your computer and use it in GitHub Desktop.
Save daftspunk/36b546fb2c1058da99ca to your computer and use it in GitHub Desktop.
Convert 2 spaces to 4 spaces, Sublime Text macro
//
// Converts code indentation from 2 spaces to 4 spaces
//
// For a hotkey, add to Preferences > Key Bindings - User:
//
// { "keys": ["ctrl+alt+i"], "command": "run_macro_file", "args": {"file": "res://Packages/User/ConvertTwoSpacesToFour.sublime-macro"} }
//
[
{
"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"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment