How to create custom commands in VSCode?

和自甴很熟 提交于 2020-01-14 08:52:38

问题


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.


回答1:


A few marketplace extensions may be of interest:

  • https://marketplace.visualstudio.com/items?itemName=mkloubert.vs-script-commands
  • https://marketplace.visualstudio.com/items?itemName=ryuta46.multi-command

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




回答2:


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



来源:https://stackoverflow.com/questions/49178842/how-to-create-custom-commands-in-vscode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!