Getting Comfortable

Table Of Contents

Introduction

Hopefully you have worked your way through the preceding concepts section. Even if you are overloaded with details you can't recall you'll hopefully know where to find reminders.

If you've just jumped right to this section that's cool, we'll try and cater for you but there's nothing quite like doing surveillance before dropping the troops in.

Favorite Editing Font

Setting up your favorite font globally is as simple as opening the User File Preferences.

Per-font anti-aliasing can be specified, by appending option to the name:

If you'd like to set different fonts for different languages then look in the Per-type preferences

Favorite Theme

This is very easy to do and it's quite obvious how.

What's not so obvious is that Sublime can set up themes per filetype.

QuickPanel Monospace

This one isn't available from the preferences menu (yet).

Open up %APPDATA%\SublimeText\Packages\Theme - Default\Default.sublime-theme and make the edits as seen below adjusting to taste.

Key Bindings (in progress)

Sublime has very rich keybinding declarations. Almost all of the bindings are fully customizable ( the exception being some QuickPanel and FindPanel navigation commands which hard bind up/down/tab to move between fields ).

All paths mentioned below are relative to the Packages dir (typically %APPDATA%\Sublime Text\Packages)

Notes

  • Note that each folder in the Packages dir has a Default.sublime-keymap
  • The Default is actually a global option keymap set in Default\Options\Application.sublime-options
  • Open the Default\Default.sublime-keymap which contains some instructions for setting bindings
  • To lessen the frequency of manually merging bindings files on update you should copy/paste any bindings you change in the Default/Default.sublime-keymap into the User/Default.sublime-keymap
  • Bindings files are loaded in alphabetical order with those loaded afterwards taking precedence so by virtue of this simple fact User overrides Default
  • Likewise bindings set bottom most in an individual file override those set at the top

Contexts

Conflict Resolution

For <bindings> there is actually no conflict resolution whatsoever.

Loading Bindings

It loads each Package's Default.sublime-keymap in alphabetical order and from top to bottom within each file collecting all the <bindings> in one big list

  1. A/Default.sublime-keymap top of file
  2. A/Default.sublime-keymap bottom of file
  3. ..
  4. ..
  5. ..
  6. Z/Default.sublime-keymap bottom of file

Matching Bindings

When looking for a binding that matches it will start from the top of the big list mentioned above, (Z/Default.sublime-keymap) working from the last binding to the first. It takes the first one that matches and runs the bound command.

  1. Z bottom of last file loaded
  2. ..
  3. ..
  4. ..
  5. A top of first file loaded.

Interpackage Conflicts

This means that you should put your most specific keybindings at the end of your sublime-keymap files and where possible give it a scope specific to the Package to avoid inter package conflict. ie python snippets should use

<context name="selector" value="source.python"/>

Comments

blog comments powered by Disqus