How to replace four spaces with a tab in Sublime Text 2?

Mohsen picture Mohsen · Mar 6, 2012 · Viewed 128.2k times · Source

enter image description here

I want to replace all the "four spaces" that is written by another text editor with tabs. How can I do it?

Answer

ncremins picture ncremins · Mar 6, 2012

Bottom right hand corner on the status bar, click Spaces: N (or Tab Width: N, where N is an integer), ensure it says Tab Width: 4 for converting from four spaces, and then select Convert Indentation to Tabs from the contextual menu that will appear from the initial click.

Similarly, if you want to do the opposite, click the Spaces or Tab Width text on the status bar and select from the same menu.

enter image description hereenter image description here