Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to create simple macros #15091

Closed
slowmove opened this issue Nov 7, 2016 · 6 comments
Closed

Ability to create simple macros #15091

slowmove opened this issue Nov 7, 2016 · 6 comments
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@slowmove
Copy link

slowmove commented Nov 7, 2016

It would be nice to be able to create some kind of simple "macros" which initially could be only a set of commands running together on a specified keyboard shortcut.

Example: F5 - Start Debug

  • View -> Debug
  • View -> Debug Console
  • Start Debugging
@rebornix
Copy link
Member

rebornix commented Nov 7, 2016

Thanks @slowmove . It's dup of #4490

@rebornix rebornix closed this as completed Nov 7, 2016
@rebornix rebornix added the *duplicate Issue identified as a duplicate of another issue(s) label Nov 7, 2016
@geddski
Copy link

geddski commented Nov 23, 2016

@slowmove here you go https://marketplace.visualstudio.com/items?itemName=geddski.macros

@slowmove
Copy link
Author

Saw that one. Thank you @geddski, will test it out.

@geddski
Copy link

geddski commented Nov 23, 2016

cool. Feedback welcome

@alexcoroza
Copy link

@geddski I installed your extension for vs code. What I want is when I pressed "alt+1", "console.log();" will be typed in editor. I have that custom macro in sublime and I dont know how to recreate that using this extension.

@geddski
Copy link

geddski commented Oct 10, 2017

@alexcoroza first create a JS snippet, I have one for console.log:

{
  "Print object to console": {
		"prefix": "con",
		"body": [
			"console.log('$1', $1);$0"
		],
		"description": "console.log an object"
	}
}

And then in your macro execute that snippet:

"macros": {
  "log": [
    {"command": "type", "args": {"text": "con"}},
    "insertSnippet"
  ]
}

And finally add a keybinding to run your macro:

{
       "key": "alt+f1",
       "command": "macros.log"
 },

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

4 participants