ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Edit Preferences

by sublimator ST3

Helper commands for working with sublime package assets/preferences. ST3 only.

Details

  • 2021.03.13.01.15.01
  • github.​com
  • github.​com
  • 4 years ago
  • 39 minutes ago
  • 11 years ago

Installs

  • Total 4K
  • Win 2K
  • Mac 1K
  • Linux 633
Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21
Windows 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1
Mac 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

Readme

Source
raw.​githubusercontent.​com

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