Open nh2 opened 4 years ago
@nh2 , I manage to change the keybinding based on this reference
In my Default (Linux).sublime-keymap
[
...
// Reimplement default
{
"keys": ["ctrl+shift+["],
"command": "fold"
},
{
"keys": ["ctrl+shift+]"],
"command": "unfold"
},
...
...
// Rebind default typescript key binding
{
"keys": ["ctrl+shift+\\"],
"command": "typescript_format_brackets",
"context": [
{ "key": "selector", "operator": "equal", "operand": "source.ts, source.tsx, source.js, source.jsx" }
]
},
...
]
Sublime's default keybindings
fold and unfold code, like this:
In https://github.com/microsoft/TypeScript-Sublime-Plugin/blob/a0d393af5714af3ea417239efce22c4db647502b/Default.sublime-keymap#L173-L174
the TypeScript plugin overrides the
unfold
, so you can no longer unfold code after folding it.Does it make sense to override a default keybinding this way?