I used to move cursor up and down with "UP" and "DOWN" keys. but it can only move 1 line at the time. sometimes I would love to move 2 or 3 lines at the time. i'm wondering if thers's such feature in sublime text editor ?
You can record a macro (CTRL+Q or Tools -> Record/Stop Macro) and save it (just use cursor up/down as often as you like.
Then assign a key or key-combination to the macro file. The key assignement has to look like this. I called the macros "multiple_lines_down" and "multiple_lines_up". Then assign the macros to your keymap:
{ "keys": ["alt+down"], "command": "run_macro_file", "args": {"file": "Packages/User/multiple_lines_down.sublime-macro"}},
{ "keys": ["alt+up"], "command": "run_macro_file", "args": {"file": "Packages/User/multiple_lines_up.sublime-macro"}},
Macro-File (5 times up) looks like this. Replace false with true to move downwards or just record another macro.
[
{
"args":
{
"by": "lines",
"forward": false
},
"command": "move"
},
{
"args":
{
"by": "lines",
"forward": false
},
"command": "move"
},
{
"args":
{
"by": "lines",
"forward": false
},
"command": "move"
},
{
"args":
{
"by": "lines",
"forward": false
},
"command": "move"
},
{
"args":
{
"by": "lines",
"forward": false
},
"command": "move"
}
]
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