a0mghg
Last Updated: August 03, 2017
·
18.25K
· tessa-lt
C45793df098df10d39c1996e7d4984f5

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:

  1. Select all
  2. View > Indentation > tab width: 4
  3. View > Indentation > convert indentation to tabs
  4. View > Indentation > tab width: 2
  5. View > Indentation > convert indentation to spaces

If you get a file indented with 2 fucking tabs, just skip step 2.

Say Thanks
Respond

14 Responses
Add your response

8989
B62097f0991a4de0e228e434dfd3cc48

I just ran into this problem minutes ago. Thanks!

over 1 year ago ·
13414

I just used this, but to convert from 2 to 4 ;)

over 1 year ago ·
15074
244c19d4c5884a6f5495b2b95c277c18

<3

over 1 year ago ·
16015
09aa1159e104607363b2ad0ee7b670b5

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

Thanks :)

over 1 year ago ·
16090
C19351390bd4ec8f49e7a44105f5549a

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 :)

over 1 year ago ·
16271

That package is magic! Thanks for sharing.

over 1 year ago ·
17117
None

Neat package @robcolbert

over 1 year ago ·
17287
None

perfect! thanks.

+1 for 'four fucking spaces'

over 1 year ago ·
18168
None

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

over 1 year ago ·
20126
None

I thought this was common knowledge

over 1 year ago ·
21264
None

great solution!!!!!!!

over 1 year ago ·
22648
None

Awesome, thanks! :)

over 1 year ago ·
28349
Megay

Brilliant solution!

12 months ago ·
29164
Pic

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

4 months ago ·