For example, in *.asm files I need a tab size that equals 20 spaces, and in *.cpp files - 2 spaces.
To configure the tab width in Sublime Text 3, click on “View” in the top bar, then click on “Indentation” in the drop-down list. Next, in the second level of the drop-down list select the width you want a tab to take up. Sublime Text 3 defaults to tabs being four spaces wide.
Use Cmd (Mac) or Alt (Windows) with the number keys 0–9 to switch between tabs in Sublime Text. For example hit Cmd–2 (Mac) or Alt–2 (Windows) to switch to the second tab. You can also use Ctrl–Tab (Mac and Windows) to cycle through your tabs.
"cmd+f" => " "(two spaces) => "alt+enter" => "arrow right" => " "(two more spaces) => set tab width to 4(this can be done before or after. On windows or other platforms change cmd+f and alt+enter with whatever your find and select all hotkeys are.
Changing default indentation settings The following File Type Preferences determine the indentation settings: translateTabsToSpaces: set to either 'true' or 'false'. If true, then when tab is pressed, an equivalent number of spaces will be inserted into the buffer instead. Defaults to false.
Open a .asm
file in Sublime Text.
Then edit syntax specific settings with menu Preferences -> Settings - More -> Syntax Specific - User
:
{ "tab_size": 20 }
You can do the same with any other file type.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With