Sublime Text 2 also supports syntax highlighted YAML files that are indented right out of the box. If you have tabs as the default use for padding in Sublime Text, John Thomas on Coder Wall explains how to fix this. I copied what he wrote below for your convenience:
Languages ββsuch as YAML require indented text using spaces. Tabs are not allowed. So, if you usually use Sublime Text 2 with tabs as the default indentation, here's how you can force a particular language to always use spaces. I will use the .yml file as an example, but you can follow the same steps for any type of file.
- When editing a .yml file in Sublime Text 2, go to the Sublime Text 2 menu. Go to Settings -> Settings - Advanced -> Specifc Syntax - User
- Sublime Text 2 will open the language-specific settings file in which you select the settings to edit. In this case, I will edit the YAML.sublime-settings File, which will only apply the settings for the YAML Syntax Language.
Use the following code to adjust the indentation options:
"tab_size": 2, "translate_tabs_to_spaces": true
NRowlett Jun 14 '13 at 20:07 2013-06-14 20:07
source share