5

Often SublimeText 2 opens files and if it finds in some place some spaces instead of a tab.

I said to force everything to 4 tabs. Not to convert manually every file I open to tabs (like in How to replace four spaces with a tab in Sublime Text 2?)

Sometimes I have a document with tab indentation of 4 spaces and when I press tab it writes 4 spaces!

"detect_indentation": false,
"translate_tabs_to_spaces": false

(doing tab_completion=true it helps)

Community
  • 1
  • 1
Totty.js
  • 15,563
  • 31
  • 103
  • 175

1 Answers1

10

If you set detect_indentation to true then ST2 will scan what the file uses for indentation, and that (a tab or spaces) will be what is inserted when you hit the Tab key. If you look at the bottom of the ST2 window, on the right side just to the left of where it shows the language of the current document, it should say something like Tab Size: 4 or Spaces: 4. You can click on that to (un)set the Indent Using Spaces option, as well as setting the size at which the tab character is rendered.

MattDMo
  • 100,794
  • 21
  • 241
  • 231
  • I know that, it's the reply in the quesition I've linked to. I would like to ST2 to be smart enough to update all the spaced indentation to tabs if finds any with a key. I use autoindent but when I press tab again it appears spaces.. – Totty.js Mar 12 '13 at 09:14