My Sublime Text Configuration

Following James Brooks sharing his Sublime Text configuration, since he suggested that others similarly share their Sublime Text configurations, I figured I’ll go ahead and do the same. First off, though, anyone curious about what’s in my Packages directory can check out my packages repository for it over on GitHub. I’ll bet it’s fascinating.

The following configuration is for Sublime Text 3, though should cover a few bits of Sublime Text 2 as well. It may or may not have changed in minor ways since writing this. I regularly toggle options such as align_indent on and off as need be, so it’s worth keeping in mind.

  "align_indent": false,
  "always_show_minimap_viewport": true,
  "auto_complete_commit_on_tab": true,
  "auto_complete_triggers": [],
  "auto_complete_with_fields": false,
  "caret_style": "phase",
  "close_windows_when_empty": false,
    "Packages/Theme - Freesia/Shindo.tmTheme",
  "default_line_ending": "unix",
  "detect_slow_plugins": true,
  "draw_white_space": "selection",
  "enable_telemetry": "disable",
  "find_selected_text": false,
  "fold_buttons": false,
  "font_face": "PragmataPro",
  "font_size": 12,
  "freesia_borderless": true,
  "freesia_small_vscroll": true,
  "highlight_line": true,
  "highlight_modified_tabs": true,
  "indent_guide_options": ["draw_active", "draw_normal"],
  "line_padding_bottom": 1,
  "line_padding_top": 2,
  "manpage_sections": ["2", "3", "3G"],
  "manpage_use_apropos": true,
  "margin": 0,
  "overlay_scroll_bars": false,
  "rulers": [72, 80, 100, 120],
  "scroll_past_end": true,
  "scroll_speed": 0,
  "show_full_path": true,
  "show_panel_on_build": true,
  "show_tab_close_buttons": true,
  "tab_size": 2,
  "theme": "Shindo.sublime-theme",
  "translate_tabs_to_spaces": true,
  "trim_trailing_white_space_on_save": true,
  "use_simple_full_screen": false,
  "wide_caret": true,
  "word_wrap": true

And this is what my configuration currently looks like:

Screenshot of my Sublime Text 3 configuration

And a complete list of packages I currently have installed along with some notes for any that might need explanation. I won’t include packages that’re personal modifications of packages shipping with ST.

  • BBCode1
  • BlitzMax
  • Cowlips2
  • Emmet3
  • ExportHtml
  • GitCommitMsg
  • GitGutter
  • GoSublime
  • NilKit
  • Origami
  • Theme - Freesia4
  • Theme - Nil5
  • WordCount
  • hasher
  • sublime-jsdocs

Contrary to almost everyone else I know using Sublime Text, I don’t use Package Control. I don’t particularly like the way it works, I’m pretty sure I don’t like the idea of a plugin downloading things automatically, and so I don’t use it. Instead, I keep my ST packages directory in a git repository and each additional package that isn’t mine is made a submodule. Otherwise, it’s fairly useful, and I don’t fault anyone who chooses use it.

The only other thing of note is my keyboard bindings file.sublime-keymap). I have a lot of two-to-four stroke key bindings, mostly bound to ⌘K and ⌘, because they’re easy enough to reach. Preferences are re-bound from the Mac OS default of ⌘, to ⌘F5 (and ⌘⇧F5 for keybindings) just because it’s not that useful to have it bound to an accessible hotkey. I change my settings a lot, but I do so through key bindings to toggle things on and off. For a nice example of that, see my possibly-absurd list of indentation level keybindings.

My typical workflow at this point doesn’t make much use of autocompletion outside of the built-in word completion in ST. So, if instruction_argv shows up in my code, that’s the sort of thing I get completions for. I don’t find project-wide autocompletion all that useful in my C++ projects, and in Ruby I just operate under the assumption that any use of autocompletion would incur a severe performance hit.

I consider performance pretty important in Sublime Text. More than anything else, I dislike when an editor stutters while I’m typing something because it decided to attempt something intelligent, like autocompletion. In those cases, I have to wait to see if what I typed came out right, and even if the wait time is 500 milliseconds, that’s enough to disrupt my flow of thought. There’s a good reason I don’t use Eclipse for my Android work, and IntelliJ IDEA is barely scraping by at times. IntelliJ usually slows down in places where I’m least affected, though, since the mental overhead it takes to keep track of what’s going on in Java or Scala is far higher than in C++.6

My color schemes at this point are all heavily biased towards picking out significant chunks of source code rather than tiny things like variable names. Some people believe we should highlight variable names with individual colors, but this seems counter-productive since the problems I have are with navigating source code, not with identifying where a variable is used on screen. If I need that, I’ll just move my caret over the variable and hit ⌘D and ⌘⌃G (expand to word and find all instances of selection).

Rather than having a mess of colors all over the place, I prefer significant colors for structural elements. This can also make the minimap in Sublime much more useful if you take advantage of background colors for various selectors (such as having a specific background color for entity.name.function).

So, I’ve tried to optimize my setup for working on large-ish bodies of code spread out across various functions/types. It might not even be optimal for that work yet, but this is all a work in progress anyway. I’m sure I’ll find better ways to do all this over time.

Hopefully this isn’t too boring, though I expect it is. Like going through someone’s pants and finding only jeans. My [packages repository] might be more useful than simply looking over my list of packages and settings. In any case, have fun using your text editor of choice.

  1. A package I wrote just so I could have BBCode highlighting in ST. I don’t write a lot of forum posts, but I’ve never found a forum with a post text field that was pleasant, so it seemed better to just do this. [return]
  2. Highlighting for my Scheme-like language. Currently in flux since using ST for Lisp kind of sucks. Haven’t found a good way to fix that. [return]
  3. Disabled normally because it screws with my normal key bindings. Occasionally useful, but usually not. I miss Zen coding – it was better. [return]
  4. Anyone using Freesia might look at the screenshot above and think that’s a Freesia theme, and they would be right. They might also think “Shindo.sublime-theme” doesn’t appear anywhere in either the base package or my personal branch, and they would also be right. That’s because I made it today and it’s not official and probably not going in my personal branch right away. [return]
  5. Kept around mostly for maintenance purposes. I don’t actually use it anymore since Freesia replaced it. [return]
  6. Your mileage may vary. Some people, for example, find it very easy to read Python code and think a large project in Python’s easy to navigate. I’m not as fortunate, since Python’s project structure and lack of explicit scoping through markers (i.e., not whitespace) always has me doing a double-take to see if something’s where I thought it was or the indentation’s what I expected. In other words, this is subjective, so please don’t complain to me that you find C++ obviously harder to reason about than language X. [return]