Sublime Text: My User Settings

Published on , in Tooling with no comments .

It’s been a while since my last post so I thought it would be a good idea to write a quick update following on from my previous post about creating a custom sidebar theme for Sublime Text.

I’m still using Sublime these days but I’ve recently made the switch to version 3 which is (still!) in beta. It’s now been about 6 months since I started using Sublime Text and in that time I’ve picked up a couple of nice settings that make for a more beautiful coding experience. I thought I’d share them below because I know a lot of people just use it as is and don’t really look at the options they have to tweak Sublime to there liking.

I’m using the default colour scheme so there’s nothing special there. I’ve set the font to Consolas. I think the deault font on Windows is Courier New but that’s not very easy on the eye. Consolas is much more readable. I’ve also tried Ubuntu Mono and Adobe Source Code Pro and although I love both those fonts I still use Consolas - there’s just something about it for me that looks better than those two.

A really nice setting I came across recently is line padding which gives each line a bit of breathing space and makes everything that little bit more readable again. Think of it like line-height in CSS. I have it set to 3 for top and bottom. I also have Sublime set to highlight the current line and to automatically trim trailing spaces on save which satisfies my OCD needs.

Highlight modified tabs simply changes the text colour to orange on tabs which have unsaved changes. This makes them far easier to spot than the simple grey circle that appears in place of the close icon.

The folder and file exclude patterns tell sublime to hide matching files and folders from the sidebar and features such as GoTo Anything.

	"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
	"default_line_ending": "unix",
	"font_face": "Consolas",
	"font_size": 9,
	"trim_trailing_white_space_on_save": true,
	"highlight_line": true,
	"line_padding_bottom": 3,
	"line_padding_top": 3,
	"scroll_past_end": false,
	"highlight_modified_tabs": true,

Sublime Text also let’s you specify settings for specific file types. All you have to do is create a file called “[FILETYPE].sublime-settings” and save it in your “packages” -> “user” folder. You can get there easily by clicking “Preferences” -> “Browse Packages” inside Sublime. I have a simple file for PHP that sets tabs to spaces with a tab size of 4 to follow PSR-2 from the PHP FIG.

		"tab_size": 4,
		"translate_tabs_to_spaces": true

Leave a Comment