Skip to content

Instantly share code, notes, and snippets.

@112KA
Last active May 19, 2018 00:10
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 112KA/acfd03d6ac9edcd0154932fc055e6c0d to your computer and use it in GitHub Desktop.
Save 112KA/acfd03d6ac9edcd0154932fc055e6c0d to your computer and use it in GitHub Desktop.
output console.log() shortcut in Sublime Text
[
{ "args": {"to": "word"}, "command": "expand_selection" },
{ "args": null, "command": "copy" },
{ "args": { "to": "eol" }, "command": "move_to" },
{ "args": { "characters": "\n" }, "command": "insert" },
{ "args": { "characters": "console.log('" }, "command": "insert" },
{ "args": null, "command": "paste" },
{ "args": { "characters": ": ', " }, "command": "insert" },
{ "args": null, "command": "paste" },
{ "args": { "characters": ");" }, "command": "insert" }
]
@112KA
Copy link
Author

112KA commented Nov 23, 2017

Save this file 'C:\Users[username]\AppData\Roaming\Sublime Text 2\Packages\User'.
And add following to .sublime-keymap.

{ "keys": ["f5"], "command": "run_macro_file", "args": {"file": "Packages/User/console_log.sublime-macro"} }

@nicolas-t
Copy link

🔥

@crimsonsoccer55
Copy link

So sick man.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment