Reputation: 54022
What is the keyboard-shortcut in sublime text3 (on ubuntu) change css from inline to branched ( I don't know what it called exactly ) and back
body { background-color: #112D2A; font-size: 12px; margin: 0; padding: 0; font-family: Verdana, Geneva, sans-serif; }
I want to change above inline way css into branched way css
body {
background-color: #112D2A;
font-size: 12px;
margin: 0;
padding: 0;
font-family: Verdana, Geneva, sans-serif;
}
Ctrl+Shift+M select the content within {
Ctrl+Shift+Space select the content within {
block by block
Ctrl+Shift+J doesnt' work
and if it does'n exist then how do we add in key binding, what will be argument?
Upvotes: 0
Views: 371
Reputation: 7634
I used Sublime 3 only once to look for new features and as far as I know there'S no builtin one-click feature.
Beside writing your own plugin you might do this how I would do this by using the builtin multi-select/multi-caret feature:
Line:
body { background-color: #112D2A; font-size: 12px; margin: 0; padding: 0; font-family: Verdana, Geneva, sans-serif; }
body { background-color: #112D2A; font-size: 12px; margin: 0; padding: 0; font-family: Verdana, Geneva, sans-serif; }
;
:body { background-color: #112D2A; font-size: 12px; margin: 0; padding: 0; font-family: Verdana, Geneva, sans-serif; }
;
to get rid of the selections and to collapse the selection into multiple cursors after the semicolons (the |
indicates the cursor):body { background-color: #112D2A;| font-size: 12px;| margin: 0;| padding: 0;| font-family: Verdana, Geneva, sans-serif;| }
body { background-color: #112D2A;
| font-size: 12px;
| margin: 0;
| padding: 0;
| font-family: Verdana, Geneva, sans-serif;
| }
Et voila.
After step 3. you might add another caret after the first curly brace by holding Ctrl and clicking at that place to skip step 6.
Lines:
body {
background-color: #112D2A;
font-size: 12px;
margin: 0;
padding: 0;
font-family: Verdana, Geneva, sans-serif;
}
body {
background-color: #112D2A;
font-size: 12px;
margin: 0;
padding: 0;
font-family: Verdana, Geneva, sans-serif;
}
body {
| background-color: #112D2A;
| font-size: 12px;
| margin: 0;
| padding: 0;
| font-family: Verdana, Geneva, sans-serif;
|}
body { background-color: #112D2A;| font-size: 12px;| margin: 0;| padding: 0;| font-family: Verdana, Geneva, sans-serif;| }
Press DEL to delete the superflous space chars / tabs
Press ESC to cancle the selection
Et voila.
Upvotes: 1