Configuring the defaults of Sublime Text

Updated on .

On macOS, The Sublime Text text editor keeps its preferences at ~/Library/Application Support/Sublime Text 4/Packages/User/Preferences.sublime-settings. It’s just a JSON file (that’s frustratingly reformatted by Sublime Text whenever it’s read).

These settings disable features that are on by default and feel a bit annoying, like showing definitions on mouse-over and highlighting text with an outline:

"drag_text": false,
"fade_fold_buttons": true,
"fold_buttons": true,
"highlight": "none",
"ignored_packages":
[
	"Vintage"
],
"mini_diff": "auto",
"show_definitions": false,

Sublime Text doesn’t use .gitignore to determine which files to search for Find in Files. There are some plugins that provide this functionality, but they work by amending the preferences file with the patterns they find in the file, which doesn’t interact well with using version control to manage preferences. So, I set them manually:

"file_exclude_patterns":
[
	"*.pyc",
	"*.pyo",
	"*.o",
	"*.a",
	"*.dylib",
	".DS_Store",
	"cscope.*",
	"tags",
	"TAGS",
	"compile_commands.json"
],
"folder_exclude_patterns":
[
	"BUILD",
	"build",
	".git"
],

These are my aesthetic preferences, using the Ayu theme (window dressing) and Alabaster color scheme (syntax highlighting):

"color_scheme": "Packages/Alabaster Color Scheme/Alabaster.sublime-color-scheme",
"font_face": "SF Mono",
"font_size": 13,
"rulers":
[
	80
],
"scroll_past_end": true,
"theme": "ayu-light.sublime-theme",
"ui_separator": true,
"ui_wide_scrollbars": true

I have these syntax-specific settings for Markdown to remove distractions:

"draw_centered": true,
"draw_indent_guides": false,
"extensions":
[
	"md"
],
"gutter": false,
"line_numbers": false,
"rulers":
[
],
"scroll_past_end": true,
"wrap_width": 80,
"word_wrap": true

Because I use BracketHighlighter, I don’t need the built-in bracket matching:

"match_brackets": false,
"match_brackets_angle": false,
"match_brackets_braces": false,
"match_brackets_content": false,
"match_brackets_square": false,
"match_only_adjacent": true,
"match_tags": false,