Created
May 28, 2014 08:31
-
-
Save themasch/2e9d83850e6f375529c5 to your computer and use it in GitHub Desktop.
Sublime Macro to add a require() for the currently selected variable (pretty dirty)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"keys": ["ctrl+alt+r"], | |
"command": "run_macro_file", | |
"args": {"file": "Packages/User/require-selection.sublime-macro"} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
[ | |
{ | |
"args": null, | |
"command": "copy" | |
}, | |
{ | |
"args": null, | |
"command": "toggle_bookmark" | |
}, | |
{ | |
"args": | |
{ | |
"extend": false, | |
"to": "bof" | |
}, | |
"command": "move_to" | |
}, | |
{ | |
"args": | |
{ | |
"extend": false, | |
"to": "eol" | |
}, | |
"command": "move_to" | |
}, | |
{ | |
"args": | |
{ | |
"characters": "\n" | |
}, | |
"command": "insert" | |
}, | |
{ | |
"args": | |
{ | |
"characters": " ," | |
}, | |
"command": "insert" | |
}, | |
{ | |
"args": | |
{ | |
"characters": " " | |
}, | |
"command": "insert" | |
}, | |
{ | |
"args": null, | |
"command": "paste" | |
}, | |
{ | |
"args": | |
{ | |
"characters": " =" | |
}, | |
"command": "insert" | |
}, | |
{ | |
"args": | |
{ | |
"characters": " require" | |
}, | |
"command": "insert" | |
}, | |
{ | |
"args": | |
{ | |
"contents": "($0)" | |
}, | |
"command": "insert_snippet" | |
}, | |
{ | |
"args": | |
{ | |
"contents": "'$0'" | |
}, | |
"command": "insert_snippet" | |
}, | |
{ | |
"args": null, | |
"command": "paste" | |
}, | |
{ | |
"args": null, | |
"command": "next_bookmark" | |
}, | |
{ | |
"args": null, | |
"command": "toggle_bookmark" | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment