visual-studio-code - 如何通过命令界面运行 AAA 命令?
问题描述
例如,我将使用asciidoc 扩展名将文档导出到 htiml 的命令。
终端里可以写什么命令通过vscode来运行?
或者您可以为命令创建一个任务,我通常通过命令托盘 ( Ctrl+Shift+P
) 运行该任务?
ps 我对如何模拟命令不感兴趣。我想用 vscode 工具来执行它。
解决方案
此任务(在 tasks.json 中)将运行该命令:
"tasks": [
{
"label": "asciiDoc to html", // whatever name you wish
// find the command name from the extension or from Keyboard Shortcuts
"command": "${command:asciidoc.saveHTML}",
"type": "shell",
"problemMatcher": []
}
}
使用要转换为当前编辑器的 asciiDoc 文件运行任务。如果您愿意,可以将该任务分配给快捷方式(在 keybindings.json 中):
{
"key": "alt+r", // whatever keybinding you want
"command": "workbench.action.tasks.runTask",
"args": "asciiDoc to html" // same name here as in your task
}
推荐阅读
- python - Dash 中的连接树图
- javascript - 合并 2 个对象数组,但如果属性具有相同的值,则合并数组
- grails - 覆盖 DefaultGroovyMethods 方法
- angular - 模板未在数组的父可观察对象中更新
- javascript - Javascript confirm popup do nothing on cancel click
- python - api中不存在数据时处理Keyerror
- javascript - 如何使用本地 Json 文件中的密钥作为 JavaScript 函数中的变量?
- c# - 发布 SQLCLR 程序失败,因为它不受信任,即使它位于 sys.trusted_assemblies 中
- subroutine - 在 YottaDB 中实现 MUMPS 子例程的问题
- docusignapi - DocuSign 移动设备屏幕上的电子记录和签名披露协议