A good Sublime Text setup
— Yash Agarwal2 minutesSo, after a hectic day, good news finally came. I have been selected as a Lab Administrator for the Software Systems Lab of my college. Cheers!!!
Let’s come to our today’s topic on configuring Sublime Text Settings.
There is just one rule you must follow while designing your own editor preference configuration.
Don’t put any lines in your configuration that you don’t understand.
You will find tons of online tutorials that contains all kinds of awesome hacks to make your sublime text experience better but the worst way to make your development environment better is just to borrow the configuration from someone else.
Spending your time in actually understand what is happening behind the scenes in the construction of your editor is immensely invaluable. It is similar to the increased information retention that you experience when you copy something from the board.
So first, take some background of what we are going to do today. I am using Sublime Text 3 – dev version, but most of the instructions are similar for Sublime Text 2 also.
Okay, first open the sublime text, then go to Preference → Settings → User
.
So this is your configuration file where you can put all your custom preferences. There are other configuration files also, which can be found in Preferences.
You can also find all settings for reference in Settings → Default
file.
Here is my Settings → User
file. Feel free to take insiparation from it, and make your sublime text experience unmatchable. I have commented every setting which is self-understandable.
{ | |
// Enable auto complete to be triggered automatically when typing. | |
"auto_complete": false, | |
// Show folders in the side bar in bold | |
"bold_folder_labels": true, | |
// Sets the colors used within the text area | |
"color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme", | |
// The theme controls the look of Sublime Text's UI | |
//(buttons, tabs, scroll bars, etc) | |
"theme": "Soda Dark.sublime-theme", | |
// Encoding used when saving new files, and files opened with an undefined | |
// encoding (e.g., plain ascii files). If a file is opened with a specific | |
// encoding (either detected or given explicitly), this setting will be | |
// ignored, and the file will be saved with the encoding it was opened | |
// with. | |
"default_encoding": "UTF-8", | |
// Determines what character(s) are used to terminate each line in new files. | |
// Valid values are 'system' (whatever the OS uses), 'windows' (CRLF) and | |
// 'unix' (LF only). | |
"default_line_ending": "system", | |
// Set to false to disable detection of tabs vs. spaces on load | |
"detect_indentation": false, | |
"detect_slow_plugins": false, | |
// When drag_text is enabled, clicking on selected text will begin a | |
// drag-drop operation. This is not currently implemented under Linux. | |
"drag_text": false, | |
// Set to "none" to turn off drawing white space, "selection" to draw only the | |
// white space within the selection, and "all" to draw all white space | |
"draw_white_space": "all", | |
// Set to true to ensure the last line of the file ends in a newline | |
// character when saving | |
"ensure_newline_at_eof_on_save": true, | |
// The encoding to use when the encoding can't be determined automatically. | |
// ASCII, UTF-8 and UTF-16 encodings will be automatically detected. | |
"fallback_encoding": "UTF-8", | |
// Valid values are "smooth", "phase", "blink" and "solid". | |
"caret_style": "phase", | |
// Automatically close HTML and XML tags when </ is entered. | |
"auto_close_tags": false, | |
// folder_exclude_patterns and file_exclude_patterns control which files | |
// are listed in folders on the side bar. These can also be set on a per- | |
// project basis. | |
"folder_exclude_patterns": | |
[ | |
".git", | |
".bundle", | |
".sass-cache" | |
], | |
"file_exclude_patterns": | |
[ | |
"*.pyc", | |
"*.pyo", | |
"*.exe", | |
"*.dll", | |
"*.obj", | |
"*.o", | |
"*.a", | |
"*.lib", | |
"*.so", | |
"*.dylib", | |
"*.ncb", | |
"*.sdf", | |
"*.suo", | |
"*.pdb", | |
"*.idb", | |
".DS_Store", | |
"*.class", | |
"*.psd", | |
"*.db", | |
"*.sublime-workspace" | |
], | |
// These files will still show up in the side bar, but won't be included in | |
// Goto Anything or Find in Files | |
"binary_file_patterns": | |
[ | |
"*.jpg", | |
"*.jpeg", | |
"*.png", | |
"*.gif", | |
"*.ttf", | |
"*.tga", | |
"*.dds", | |
"*.ico", | |
"*.eot", | |
"*.pdf", | |
"*.swf", | |
"*.jar", | |
"*.zip" | |
], | |
"font_face": "Consolas", | |
// Valid options are "no_bold", "no_italic", "no_antialias", "gray_antialias", | |
// "subpixel_antialias", "no_round" (OS X only), "gdi" (Windows only) and | |
// "directwrite" (Windows only) | |
"font_options": | |
[ | |
"subpixel_antialias" | |
], | |
"font_size": 12.8, | |
// If enabled, will highlight any line with a caret | |
"highlight_line": true, | |
// Makes tabs with modified files more visible | |
"highlight_modified_tabs": true, | |
// List any packages to ignore here. When removing entries from this list, | |
// a restart may be required if the package contains plugins. | |
"ignored_packages": | |
[ | |
"CSS" | |
], | |
// Additional spacing at the bottom of each line, in pixels | |
"line_padding_bottom": 1, | |
// Additional spacing at the top of each line, in pixels | |
"line_padding_top": 1, | |
// Columns in which to display vertical rulers | |
"rulers": | |
[ | |
80 | |
], | |
// Set to true to automatically save files when switching to a different file | |
// or application | |
"save_on_focus_lost": true, | |
// Set to false to disable scrolling past the end of the buffer. | |
// On OS X, this value is overridden in the platform specific settings, so | |
// you'll need to place this line in your user settings to override it. | |
"scroll_past_end": false, | |
// By default, shift+tab will only unindent if the selection spans | |
// multiple lines. When pressing shift+tab at other times, it'll insert a | |
// tab character - this allows tabs to be inserted when tab_completion is | |
// enabled. Set this to true to make shift+tab always unindent, instead of | |
// inserting tabs. | |
"shift_tab_unindent": true, | |
"soda_folder_icons": true, | |
// Set to true to turn spell checking on by default | |
"spell_check": false, | |
// When enabled, pressing tab will insert the best matching completion. | |
// When disabled, tab will only trigger snippets or insert a tab. | |
// Shift+tab can be used to insert an explicit tab when tab_completion is | |
// enabled. | |
"tab_completion": 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, | |
// Set to true to removing trailing white space on save | |
"trim_trailing_white_space_on_save": true, | |
"vintage_start_in_command_mode": true, | |
// Disables horizontal scrolling if enabled. | |
// May be set to true, false, or "auto", where it will be disabled for | |
// source code, and otherwise enabled. | |
"word_wrap": true | |
} |
Wrapping It Up #
I still stand by my platitude that
Don’t put anything in your configuration file you don’t understand!
That’s all for today. Thanks for reading.