Ameen
Ameen

Reputation: 1857

How to create custom commands in VSCode?

In Emacs, I can create functions in Lisp language and place them in .emacs file. Those function will become commands that can be called from the editor or bound to keys just like any other built-in command.

Is there a way to do that in VSCode?

Note: The custom commands need to be able to call other commands. Simply using a batch file and running it as a task will not work.

Upvotes: 10

Views: 16344

Answers (2)

Matt Bierner
Matt Bierner

Reputation: 65583

A few marketplace extensions may be of interest:

However in general, you'll need to write an extension to do anything complex.

There's also a VS Code issue tracking support for built-in macros

Upvotes: 10

Michael Pfaff
Michael Pfaff

Reputation: 1263

There's Power Tools by e.GO:digital. It has support for custom commands and event triggers (ie. on file changed), among other things.

Upvotes: 3

Related Questions