Skip to content

Instantly share code, notes, and snippets.

@Ivanca
Last active December 13, 2015 21:39
Show Gist options
  • Save Ivanca/4979118 to your computer and use it in GitHub Desktop.
Save Ivanca/4979118 to your computer and use it in GitHub Desktop.
The keys are need to be added to your `.sublime-keymap` file (Preferences > Key Bindings - User) [in the array]. Remember to remove the start & end brackets if needed. All the other files (the macros) need to go in the Packages\User directory. The files that have an "_e" at the end are the macros used to expand (eg. when selection is *not* empty)
[
{
"args":
{
"extend": false,
"to": "bol"
},
"command": "move_to"
},
{
"args":
{
"extend": false,
"to": "bol"
},
"command": "move_to"
},
{
"args":
{
"extend": true,
"to": "eol"
},
"command": "move_to"
},
{
"args":
{
"by": "lines",
"extend": true,
"forward": true
},
"command": "move"
}
]
[
{
"args":
{
"by": "lines",
"extend": true,
"forward": true
},
"command": "move"
}
]
[
{ "keys": ["alt+shift+up"], "command": "run_macro_file", "args": {"file": "Packages/User/ups_e.sublime-macro"} },
{ "keys": ["alt+shift+up"], "command": "run_macro_file", "args": {"file": "Packages/User/ups.sublime-macro"}, "context":
[
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }
]
},
{ "keys": ["alt+shift+down"], "command": "run_macro_file", "args": {"file": "Packages/User/downs_e.sublime-macro"} },
{ "keys": ["alt+shift+down"], "command": "run_macro_file", "args": {"file": "Packages/User/downs.sublime-macro"}, "context":
[
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }
]
}
]
[
{
"args":
{
"extend": false,
"to": "eol"
},
"command": "move_to"
},
{
"args":
{
"extend": true,
"to": "bol"
},
"command": "move_to"
},
{
"args":
{
"by": "lines",
"extend": true,
"forward": false
},
"command": "move"
},
{
"args":
{
"extend": true,
"to": "bol"
},
"command": "move_to"
}
]
[
{
"args":
{
"by": "lines",
"extend": true,
"forward": false
},
"command": "move"
},
{
"args":
{
"extend": true,
"to": "bol"
},
"command": "move_to"
},
{
"args":
{
"extend": true,
"to": "bol"
},
"command": "move_to"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment