JoinStatement
Joins and unjoins whole statements
Details
Installs
- Total 2K
- Win 1K
- Mac 345
- Linux 167
Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | Feb 20 | Feb 19 | Feb 18 | Feb 17 | Feb 16 | Feb 15 | Feb 14 | Feb 13 | Feb 12 | Feb 11 | Feb 10 | Feb 9 | Feb 8 | Feb 7 | Feb 6 | Feb 5 | Feb 4 | Feb 3 | Feb 2 | Feb 1 | Jan 31 | Jan 30 | Jan 29 | Jan 28 | Jan 27 | Jan 26 | Jan 25 | Jan 24 | Jan 23 | Jan 22 | Jan 21 | Jan 20 | Jan 19 | Jan 18 | Jan 17 | Jan 16 | Jan 15 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 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 |
Mac | 0 | 0 | 0 | 0 | 1 | 0 | 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 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Sublime JoinStatement plugin
Joins and unjoins whole statements.
Demo
Installation
This plugin is part of sublime-enhanced plugin set. You can install sublime-enhanced and this plugin will be installed automatically.
If you would like to install this package separately check “Installing packages separately” section of sublime-enhanced package.
Usage
- Unjoin statement
# before
hash_table = {'key1': 'val1', 'key2': 'val2'}
# after
hash_table = {
'key1': 'val1',
'key2': 'val2'
}
# before
condition = (a > b and b > c and c > d)
# after
condition = (
a > b and
b > c and
c > d
)
- Join statement
# before
hash_table = {
'key1': 'val1',
'key2': 'val2'
}
# after
hash_table = {'key1': 'val1', 'key2': 'val2'}
# before
condition = (
a > b and
b > c and
c > d
)
# after
condition = (a > b and b > c and c > d)
You can execute command by hitting keyboard shortcut or by placing cursor and the after opening bracket and hitting “enter” or “alt+/” (right delete). In some cases command will not work (not a source code); if it happened you can put space after bracket and hit enter or “right delete” to do stuff manually.
Not that it'll works only with first-level brackets. Any other nesting will be ignored. E.g.:
# before
hash_table = {
'key1': 'val1',
'key2': {
'subkey1': 'subval1'
}
}
# after
hash_table = {'key1': 'val1', 'key2': {
'subkey1': 'subval1'
}}
Commands
Description | Keyboard shortcut | Command palette |
---|---|---|
Join statement | ctrl+alt+t | JoinStatement: Join |
Join statement (as arguments) | [detects automatically] | JoinStatement: Join (as arguments) |
Unjoin statement | ctrl+alt+shift+t | JoinStatement: Unjoin |
Unjoin statement (as arguments) | [detects automatically] | JoinStatement: Unjoin (as arguments) |
Join statement (after bracket) | enter | |
Unjoin statement (after bracket) | alt+/ |