-
Vs Code 扩展下载插件:Terminals Manager  -
生成配置文件
 输入:terminals 会在当前项目.vscode中创建terminals.json  3. 配置文件 打开配置文件,进行终端启动配置  配置参数:
{
"autorun": true,
"autokill": true,
"env": { "name": "value" },
"terminals": [
{
"name": "My Terminal",
"description": "A terminal that runs some commands",
"icon": "code",
"cwd": "/Users/fabio/Desktop",
"command": "whoami", ,
"commands": [
"cd to/my/chest",
"touch my_heart"
],
"target": "My Other Terminal",
"persistent": "unique_session_name",
"substitution": false,
"recycle": false,
"open": true,
"focus": true,
"execute": false,
"onlySingle": true,
"onlyMultiple": true,
"onlyAPI": true,
"shellPath": "/bin/bash",
"shellArgs": ["--foo"],
"env": { "name": "value" },
"envInherit": false
}
]
}
我的配置文件:
{
"autorun": false,
"terminals": [
{
"name": "Dev Web",
"description": "Web",
"icon": "terminal",
"cwd": "./frontend",
"command": "yarn start",
"focus": true
},
{
"name": "Dev Server",
"description": "Server",
"icon": "terminal",
"cwd": "./backend",
"command": "yarn start",
"focus": true
}
]
}
- 配置快捷键
打开命名面板   点击进入配置 
END
|