How to replace four spaces with a tab in Sublime Text 2?
I want to replace all the "four spaces" that is written by another text editor with tabs. How can I do it?
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.
Select all, then:
Windows / Linux:
Ctrl+Shift+p
then type "indent"
Mac:
Shift+Command+p
then type "indent"