目前是否有可能在VSCode中设置特定文件在启动时打开?我安装了'To Do Tasks'扩展程序,并希望每次加载VSCode时默认打开我的TODO文件。
使用版本1.12.1
目前是否有可能在VSCode中设置特定文件在启动时打开?我安装了'To Do Tasks'扩展程序,并希望每次加载VSCode时默认打开我的TODO文件。
使用版本1.12.1
在文件夹中管理自动任务
.{
"version": "2.0.0",
"tasks": [
{
"label": "Auto-open my-todo file.",
"type": "shell",
"command": "code my-todo.md",
"runOptions": {
"runOn": "folderOpen",
},
"presentation": {
"echo": true,
"reveal": "silent",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": false,
}
}
]
}
关键是将runOptions / runOn
设置为"folderOpen"。
更多细节请参见:在打开项目时自动在VS Code中运行命令的方法