// delete surrounding spaces if they exist
{
"keys": [ "shift+backspace" ],
"command": "chain",
"context": [
{ "key": "preceding_text", "operator": "regex_match", "operand": ".*\\S " },
{ "key": "following_text", "operator": "regex_match", "operand": " \\S.*" },
],
"args": { "commands": [
[ "left_delete" ],
[ "right_delete" ],
] } },
// otherwise do nothing
// ( this is optional. I personally sometimes hold shift while I'm typing & deleting,
// so I prefer `shift+backspace` to function the same as `backspace`. )
{
"keys": [ "shift+backspace" ],
"command": "_____NULL_____",
"context": [ { "key": "preceding_text", "operator": "not_regex_match", "operand": ".*\\S ", "match_all": true } ]
},
{
"keys": [ "shift+backspace" ],
"command": "_____NULL_____",
"context": [ { "key": "following_text", "operator": "not_regex_match", "operand": " \\S.*", "match_all": true } ]
},
Last active
April 22, 2016 19:53
-
-
Save Enteleform/22c5ba85ea7a44b391f4726b140a6050 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment