Home > Article > Development Tools > Sublime Text 2 syntax-based configuration files
The following column of sublime usage tutorial will introduce to you the issues regarding the syntax-based configuration file of sublime text 2.
I have been learning the Python programming language recently, but I encountered a small problem. It turns out that Ruby’s coding specification is indented with 2 spaces, so I used to use Sublime "tab_size": 2 is set in the global user configuration, so when editing a Python file, the tab_size size must be set to 4 from the menu every time.
After searching, I found that Sublime Text 2 actually supports syntax-specific configuration. The specific steps are:
1. First open a Python code file, or set the current file The syntax is "Python";
2. Click "Sublime Text 2 -> Preferences -> Settings - More -> Syntax Specific - User" in the menu bar;
3. You can see that a file named "Python.sublime-setting" is opened. If the name of the opened file is not Python, please go back and check the first step.
4. In the opened language-specific configuration file, directly set:
{ "tab_size": 4, "translate_tabs_to_spaces": true }
The above settings will override the global configuration by default.
The above is the detailed content of Sublime Text 2 syntax-based configuration files. For more information, please follow other related articles on the PHP Chinese website!