Convert 4 spaces to 2 in Sublime Text
Assuming you have the following settings in Sublime:
"tab_size": 2,
"translate_tabs_to_spaces": true,
If you get a file indented with 4 fucking spaces:
- Select all
- View > Indentation > tab width: 4
- View > Indentation > convert indentation to tabs
- View > Indentation > tab width: 2
- View > Indentation > convert indentation to spaces
If you get a file indented with 2 fucking tabs, just skip step 2.
Written by Tessa Thornton
Related protips
15 Responses

I just ran into this problem minutes ago. Thanks!
I just used this, but to convert from 2 to 4 ;)

<3

Or if you get a file indented with 2 fucking spaces, just go through the steps backwards.
Thanks :)

Or, using the HTML/CSS/JS Prettify package, just press Cmd+Shift+H and poof! Fuck your fucking settings - the file is however I want it, now :)
That package is magic! Thanks for sharing.

Neat package @robcolbert

perfect! thanks.
+1 for 'four fucking spaces'

You are a fucking genius. A god!!!! Also, thank you.

I thought this was common knowledge

great solution!!!!!!!

Awesome, thanks! :)

Brilliant solution!

nice... lols on "indented with 2 fucking tabs" ;)
Nice ! :)