Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Schlechtwetterfront/2d44419ab0cc5e2984fb56621c9da78b to your computer and use it in GitHub Desktop.
Save Schlechtwetterfront/2d44419ab0cc5e2984fb56621c9da78b to your computer and use it in GitHub Desktop.
Subword Delete Macros for Sublime Text. Similar to alt+delete/ alt+backspace in other software packages.
// Delete Backward.
// Put this into your user packages folder. Can be found by navigating to Preferences > Browse Packages... in Sublime Text.
// Then add something like this to your user Key Bindings.
// { "keys": ["alt+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/User/Delete Subword Backward.sublime-macro"} }
[
{
"args":
{
"by": "subwords",
"extend": true,
"forward": false
},
"command": "move"
},
{
"args": null,
"command": "left_delete"
}
]
// Delete Forward.
// Put this into your user packages folder. Can be found by navigating to Preferences > Browse Packages... in Sublime Text.
// Then add something like this to your user Key Bindings.
// { "keys": ["alt+delete"], "command": "run_macro_file", "args": {"file": "res://Packages/User/Delete Subword Forward.sublime-macro"} }
[
{
"args":
{
"by": "subword_ends",
"extend": true,
"forward": true
},
"command": "move"
},
{
"args": null,
"command": "left_delete"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment