I want to replace all the \"four spaces\" that is written by another text edit
create a keybinding for quickest way
{ "keys": ["super+alt+t"], "command": "unexpand_tabs", "args": { "set_translate_tabs": true } }
add this to Preferences > Key Bindings (user) when you press super+alt+t it will convert spaces to tabs
Select all, then:
Ctrl+Shift+p
then type "indent"
Shift+Command+p
then type "indent"
On main menu;
View -> Indentation -> Convert Indentation to Tabs / Spaces
You could add easy key binding:
Preference > Key binding - user :
[
{ "keys": ["super+l"], "command": "reindent"},
]
Now select the line or file and hit: command + l
To configure Sublime to always use tabs try the adding the following to preferences->settings-user:
{
"tab_size": 4,
"translate_tabs_to_spaces": false
}
More information here: http://www.sublimetext.com/docs/2/indentation.html
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.