Helper commands for working with sublime package assets/preferences. ST3 only.
Python
Switch branches/tags
Nothing to show
Permalink
Failed to load latest commit information.
Default.sublime-keymap.template Using package_resources.py Feb 17, 2013
README.creole Fixed bug in list_commands where commands in unzipped packages would … Feb 10, 2013
__init__.py Fixed a few bugs related to line endings (Normalised line endings doe… Feb 23, 2013
commands_base.py Using package_resources.py Feb 17, 2013
edit-preferences.sublime-commands Updated keymap template and sublime-commands file to add list_menu_bi… Feb 9, 2013
edit-preferences.sublime-settings Using sublime-settings to store the extracted snippets Feb 13, 2013
edit_package_files.py Using package_resources.py Feb 17, 2013
extract_snippets.py Auto completion for list_commands quick panel. Fixes/tweaks for extra… Feb 15, 2013
extracted-snippets.sublime-settings Using sublime-settings to store the extracted snippets Feb 13, 2013
helper_commands.py Fixed a few bugs related to line endings (Normalised line endings doe… Feb 23, 2013
helpers.py Using package_resources.py Feb 17, 2013
insert_binding_repr.py Refactored list_settings/list_shortcut_keys to use a base class. Adde… Feb 10, 2013
jsonix.py Fixed a few bugs related to line endings (Normalised line endings doe… Feb 23, 2013
list_commands.py Fixed a few bugs related to line endings (Normalised line endings doe… Feb 23, 2013
list_menu_bindings.py More declarative refactorings. Added a theme selector command. Feb 11, 2013
list_settings.py Fixed a few bugs related to line endings (Normalised line endings doe… Feb 23, 2013
list_shortcut_keys.py More declarative refactorings. Added a theme selector command. Feb 11, 2013
list_theme_selectors.py Fixed some fuckupery Feb 11, 2013
package_resources.py Merge github.com:facelessuser/EditPreferences Feb 26, 2013
quick_panel_cols.py Initial import of EditPreferences for ST3 Jan 31, 2013
scheduler.py Added in extract snippet command using python 3.3 `yield from` scheduler Feb 13, 2013

README.creole

Description

Some commands for Sublime Text 3 (NOT 2!) to list shortcut keys / preferences etc in the QuickPanel and navigate to edit location on selection.

2000 Words

How to insert a binding repr in the Quick Panel

Copy from the Default.sublime-keymap.template the last line that contains a multitude of bindings with `insert_binding_repr` and place it in your User keymap.

So how would you insert alt+q? You can think of it like this:

  • PRESS `alt` and hold it down
  • PRESS `=` while thinking PLUS then lift all fingers
  • PRESS `q`

Note that on a standard US keyboard `=` is on the same key as `+` (plus) You can't bind to just a modifier like alt, so plus seems a resaonable key/mnemonic.

In sublime `{"keys": [...]}` terms previous exmaple would be:

  • PRESS `["alt+="]`
  • PRESS `["q"]`

The following bindings show how it works. Note the `expecting_binding_repr_mode` key.

    {"args": {"val": "alt"},
     "command": "insert_binding_repr",
     "context": [{"key": "overlay_visible", "operand": true, "operator": "equal"},
                 {"key": "setting.expecting_binding_repr_mode",
                  "operand": false,
                  "operator": "equal"}],
     "keys": ["alt+="]}
     {"args": {"val": "q"},
      "command": "insert_binding_repr",
      "context": [{"key": "overlay_visible", "operand": true, "operator": "equal"},
                  {"key": "setting.expecting_binding_repr_mode",
                   "operand": true,
                   "operator": "equal"}],
      "keys": ["q"]}

So how would you insert ctrl+alt+q? (In sublime terms)

  • PRESS `ctrl+alt+=`
  • PRESS `q`

Help? You can't insert_binding_repr for down|enter|up ?

Unfortunately, some bindings don't work as the second key due to the quickpanel swallowing them:

  • <enter>
  • <up>
  • <down>
  • and others ...

The workaround is to type the first letter of the key you desire, eg:

  • type `e` for <enter> to insert `alt+e` then type `nter`
  • type `u` for <up> to insert `alt+u` then type `p`
  • type `d` for <down> to insert `alt+d` then type `own`

Command Palette

[
    { "caption": "Edit Preference: List Settings",         "command": "list_settings"},
    { "caption": "Edit Preference: List Plugins Commands", "command": "list_commands" },
    { "caption": "Edit Preference: List Shortcut Keys",    "command": "list_shortcut_keys"},
    { "caption": "Edit Preference: List Menu Bindings",    "command": "list_menu_bindings"},

    { "caption": "Edit Preference: Theme",
      "command": "edit_package_files",
      "args": {"pref_type": "sublime-theme"}},

    { "caption": "Edit Preference: sublime-completions",
      "command": "edit_package_files",
      "args": {"pref_type": "sublime-completions"}},

    { "caption": "Edit Preference: sublime-build",
      "command": "edit_package_files",
      "args": {"pref_type": "sublime-build"}},

    { "caption": "Edit Preference: sublime-mousemap",
      "command": "edit_package_files",
      "args": {"pref_type": "sublime-mousemap"}},

    { "caption": "Edit Preference: sublime-menu",
      "command": "edit_package_files",
      "args": {"pref_type": "sublime-menu"}},

    { "caption": "Edit Preference: tmTheme|colorscheme",
      "command": "edit_package_files",
      "args": {"pref_type": ".*\\.(tmTheme|stTheme)$"}},

    { "caption": "Edit Preference: tmLanguage|syntax|grammar",
      "command": "edit_package_files",
      "args": {"pref_type": ".*\\.((tm|st)Language)$"}},

    { "caption": "Edit Preference: sublime-commands",
      "command": "edit_package_files",
      "args": {"pref_type": "sublime-commands"}}
]

TODO

Set cyclic tab key for auto complete