As you know, you can select line under cursor with hot key ctrl + L (linux ubuntu). But selected text include start spaces or tabs and \n at the end. How can I select line without spaces or tabs?
Save the following sublime-macro
to:Packages/MyMacroFolder/Select LineText.sublime-macro
[
{
"command": "move_to",
"args": { "extend": false, "to": "eol" }
},
{
"command": "move_to",
"args": { "extend": true, "to": "bol" }
}
]
Open your user sublime-keymap
file by running Preferences: Key Bindings - User
from the command palette
.
Add a key-binding
for Select LineText.sublime-macro
.
{
"keys": [ "ctrl+shift+alt+l" ],
"command": "run_macro_file",
"args": { "file": "res://Packages/MyMacroFolder/Select LineText.sublime-macro" },
},
You will now be able to select line text ( excluding leading & trailing whitespace ) with whatever key-binding you assigned in your sublime-keymap
.
The key-binding in the example is Ctrl + Shift + Alt + L
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With