Skip to content

Instantly share code, notes, and snippets.

@adamwathan
Created August 20, 2015 16:28
Show Gist options
  • Save adamwathan/90f34fc61bc6593a61d2 to your computer and use it in GitHub Desktop.
Save adamwathan/90f34fc61bc6593a61d2 to your computer and use it in GitHub Desktop.
Move vertically quickly in Sublime Test

Option + left/right is awesome for jumping around quickly horizontally, but if you're like me, you've probably tried to use that same muscle memory to jump vertically by using option + up/down.

Here's a few macros you can use to accomplish that, as well as creating selections while jumping vertically as well.

Add these shortcuts and you'll be in bizniz:

    //...
    { "keys": ["alt+up"], "command": "run_macro_file", "args": {"file": "Packages/User/move_3_lines_up.sublime-macro"} },
    { "keys": ["alt+down"], "command": "run_macro_file", "args": {"file": "Packages/User/move_3_lines_down.sublime-macro"} },
    { "keys": ["alt+shift+up"], "command": "run_macro_file", "args": {"file": "Packages/User/extend_3_lines_up.sublime-macro"} },
    { "keys": ["alt+shift+down"], "command": "run_macro_file", "args": {"file": "Packages/User/extend_3_lines_down.sublime-macro"} },
    // ...
[
{
"args":
{
"by": "lines",
"forward": true,
"extend": true
},
"command": "move"
},
{
"args":
{
"by": "lines",
"forward": true,
"extend": true
},
"command": "move"
},
{
"args":
{
"by": "lines",
"forward": true,
"extend": true
},
"command": "move"
}
]
[
{
"args":
{
"by": "lines",
"forward": false,
"extend": true
},
"command": "move"
},
{
"args":
{
"by": "lines",
"forward": false,
"extend": true
},
"command": "move"
},
{
"args":
{
"by": "lines",
"forward": false,
"extend": true
},
"command": "move"
}
]
[
{
"args":
{
"by": "lines",
"forward": true
},
"command": "move"
},
{
"args":
{
"by": "lines",
"forward": true
},
"command": "move"
},
{
"args":
{
"by": "lines",
"forward": true
},
"command": "move"
}
]
[
{
"args":
{
"by": "lines",
"forward": false
},
"command": "move"
},
{
"args":
{
"by": "lines",
"forward": false
},
"command": "move"
},
{
"args":
{
"by": "lines",
"forward": false
},
"command": "move"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment