Skip to content

Instantly share code, notes, and snippets.

@brandondurham
Last active March 17, 2020 02:33
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brandondurham/760f48fe5998cfd38ad1 to your computer and use it in GitHub Desktop.
Save brandondurham/760f48fe5998cfd38ad1 to your computer and use it in GitHub Desktop.
Convert indentation from 2 spaces to tabs in Sublime Text
// Convert 2 spaces to tabs in Sublime Text
// To add a key binding, go to "Sublime Text » Preferences » Key Bindings - User" and add the following line:
// { "keys": ["super+;"], "command": "run_macro_file", "args": {"file": "Packages/User/convert_spaces_to_tabs.sublime-macro"} }
// Change the `super+;` shortcut accordingly.
[
{
"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"
}
]
@guymeyer
Copy link

Bless you sir.

@nicolasparada
Copy link

Thanks ;)

@streamtw
Copy link

Thanks! This is awsome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment