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

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

问题描述

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

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

注意:自定义命令需要能够调用其他命令.简单地使用批处理文件并将其作为任务运行是行不通的.

解决方案

可能对一些市场扩展感兴趣:

但一般来说,您需要编写扩展程序 来做任何复杂的事情.p>

还有 一个 VS Code 问题对内置宏的跟踪支持p>

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.

解决方案

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

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

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