Skip to content

Instantly share code, notes, and snippets.

@utopianfool
Created October 9, 2020 10:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save utopianfool/f2bfd6b8c0e81f52f9047ddb229dda08 to your computer and use it in GitHub Desktop.
Save utopianfool/f2bfd6b8c0e81f52f9047ddb229dda08 to your computer and use it in GitHub Desktop.
Convert 2 space indentation tabs into 4 in Sublime Text 2 or 3

Here's a neat trick in Sublime Text 2 or 3 to convert your indentation spacing in a document.

TL;DR:

Converting from 2 spaces to 4 spaces:

Ensure tab width is set to 2. Convert your 2-space indentation to tabs, switch to tab width 4, and then convert the indentation back to spaces.

The detailed description:

Go to:

View -> Indentation

It should read:

Indent using spaces [x] Tab width: 2 Select:

Convert Indentation to Tabs Then Select:

Tab width: 4 Convert Indentation to Spaces Done.

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