如何在VSCode中创建自定义命令? [英] How to create custom commands in VSCode?

查看:967
本文介绍了如何在VSCode中创建自定义命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Emacs中,我可以用Lisp语言创建函数并将其放在 .emacs 文件中。这些功能将变成可以从编辑器调用或绑定到键的命令,就像其他任何内置命令一样。

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.

在VSCode中有没有办法做到这一点?

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.

推荐答案

一些市场扩展可能很有趣:

A few marketplace extensions may be of interest:

  • Script Commands by Marcel J. Kloubert
  • multi-command by ryuta46

但是,一般来说,您需要编写扩展名做复杂的事情。

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

还有一个VS代码对内置宏的跟踪支持

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

这篇关于如何在VSCode中创建自定义命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆