我正在尝试在Visual Studio Code中编写一个简单的扩展程序,这个扩展程序将会把当前文件打开到外部应用程序中。我们该如何实现这个功能呢?
我正在尝试在Visual Studio Code中编写一个简单的扩展程序,这个扩展程序将会把当前文件打开到外部应用程序中。我们该如何实现这个功能呢?
使用VS Code任务找到了一个答案。如果有人能提供使用扩展解决的方法,将不胜感激。
{
"version": "0.1.0",
// we want to run vs
"command": "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\devenv.exe",
// the command is a shell script
"isShellCommand": true,
"showOutput": "silent",
"args": ["/edit", "${file}"]
}
spawn
https://nodejs.org/api/child_process.html。open
,我个人非常喜欢它的前台进程启动功能: https://www.npmjs.com/package/open。spawn
吗?我特别关注的是在生成子进程后如何调用子进程的 stdin.write
函数。 - kindohm