The both methods are valids, but I think that you should know about the file Preferences.sublime-settings
, this are the default preferences for all enviroment.
You can acess Preferences.sublime-settings
going to:
Prefenrences > Setting - Default
on the main menu. Or accessing the path:
/home/<user_name>/.config/sublime-text-3/Packages/Default/Preferences.sublime-settings
for Linux Users, but at others operatings systems have arquitecture similar, except by the particularities of access to directories. Like Windowns C:\\Programs Files\Sublime Text 3\[...]
The file Preferences.sublime-settings already have many paramters pre-difined and you just need to assign values to your liking. The range of possible values, in general, are true, false or numeric.
For you case you should change the values of "tab_size"
, by default it receive 4 spaces as value - It's perfect for Python programmers), simply change to the desired value.
// Set to true to turn spell checking on by default
"spell_check": false,
// The number of spaces a tab is considered equal to
"tab_size": 4,
// Set to true to insert spaces when tab is pressed
"translate_tabs_to_spaces": true,
// If translate_tabs_to_spaces is true, use_tab_stops will make tab and
// backspace insert/delete up to the next tabstop
"use_tab_stops": true,
The settings that I always like of change the value are:
"translate_tabs_to_spaces": true, //prevents that to switch from editor the indentation be changed.
"highlight_line": true, //highlights the line where the course is.
"auto_complete_commit_on_tab": true, //allows complement of code structure with tab key.