Expand and Edit
A set of 2-in-1 commands, e.g. expand cursor to subword and cut it.
Details
Installs
- Total 65
- Win 42
- Mac 19
- Linux 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 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 1 | 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 | 0 | 0 | 0 | 0 |
Mac | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 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 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Expand and Edit
A Sublime Text plugin that provides a set of 2-in-1 commands that combine
expand
andedit
commands.
^ (1) expand and cut (2) expand and copy (3) expand and paste (4) expand and swap.
All the actions listed below can be done with 1 command
- Expand to Word/Subword
- Expand to Word/Subword and Cut
- Expand to Word/Subword and Copy
- Expand to Word/Subword and Paste
- Expand to Word/Subword and Delete
- Expand to Word/Subword and Displace
- Expand to Word/Subword and Swap
That is, with just 1 command, you can expand the cursor or selection to the surrounding
- word
- subword
and
- cut
- copy
- paste
- delete
- displace
- swap
Install
How to Use
1. Key Bindings
No default key bindings. Define your own. For recommended key bindings, open
Preferences > Package Settings > Expand and Edit > Key Bindings
or enter in the command palette
Preferences: Expand and Edit Key Bindings
Recommended Key Bindings
Command | Windows / Linux | macOS |
---|---|---|
Expand Selection to Subword |
Alt + D | Opt + D |
Expand Cut Word |
Ctrl + ; | Cmd + ; |
Expand Cut Subword |
Ctrl + ' | Cmd + ' |
Expand Copy Word |
Ctrl + Shift + ; | Cmd + Shift + ; |
Expand Copy Subword |
Ctrl + Shift + ' | Cmd + Shift + ' |
Expand Paste Word |
Ctrl + K, Ctrl + Shift + ; | Cmd + K, Cmd + Shift + ; |
Expand Paste Subword |
Ctrl + K, Ctrl + Shift + ' | Cmd + K, Cmd + Shift + ' |
Expand Delete Word |
Alt + ; | Opt + ; |
Expand Delete Subword |
Alt + ' | Opt + ' |
Expand Displace Word |
Ctrl + Alt + ; | Cmd + Opt + ; |
Expand Displace Subword |
Ctrl + Alt + ' | Cmd + Opt + ' |
Expand Swap Word |
Ctrl + K, Ctrl + ; | Cmd + K, Cmd + ; |
Expand Swap Subword |
Ctrl + K, Ctrl + ' | Cmd + K, Cmd + ' |
Cancel Swap |
Ctrl + Esc | Cmd + Esc |
2. Main Menu
Edit > Expand and ... > Cut Word
Edit > Expand and ... > Cut Subword
Edit > Expand and ... > Copy Word
Edit > Expand and ... > Copy Subword
Edit > Expand and ... > Paste Word
Edit > Expand and ... > Paste Subword
Edit > Expand and ... > Delete Word
Edit > Expand and ... > Delete Subword
Edit > Expand and ... > Displace Word
Edit > Expand and ... > Displace Subword
Edit > Expand and ... > Swap Word
Edit > Expand and ... > Swap Subword
Edit > Cancel Swap
Selection > Expand Selection to Subword
3. Command Palette
Expand Selection to Subword
Expand Cut Word
Expand Cut Subword
Expand Copy Word
Expand Copy Subword
Expand Paste Word
Expand Paste Subword
Expand Delete Word
Expand Delete Subword
Expand Displace Word
Expand Displace Subword
Expand Swap Word
Expand Swap Subword
Cancel Swap
Understanding Displace
Displace
is like Paste
.
The difference is – instead of copying content from the clipboard, it exchanges content with the clipboard.
- Before
Displace
Clipboard | Target |
---|---|
"Bird" |
"Fish" |
- After
Displace
Clipboard | Target |
---|---|
"Fish" |
"Bird" |
As a comparison
- Before
Paste
Clipboard | Target |
---|---|
"Bird" |
"Fish" |
- After
Paste
Clipboard | Target |
---|---|
"Bird" |
"Bird" |
Author
Aaron Fu Lei
License
MIT