參考鏈接:vscode+sftp開發(fā)模式環(huán)境的同步,https://segmentfault.com/a/1190000011844958
- 安裝sftp插件
- 打開一個(gè)目錄, ctrl + p, >sftp -> config 進(jìn)行配置
- 配置遠(yuǎn)程服務(wù)器的ip和port之后,修改文件并測試是否同步到遠(yuǎn)程文件
{
"host": "127.0.0.1",
"port": 22,
"username": "root",
"password": "password",
"protocol": "sftp",
"agent": null,
"privateKeyPath": null,
"passphrase": null,
"passive": false,
"interactiveAuth": true,
"remotePath": "/home/xxx/dir",
"uploadOnSave": true,
"syncMode": "update",
"ignore": [
"**/.vscode/**",
"**/.git/**",
"**/.DS_Store"
],
"watcher": {
"files": "glob",
"autoUpload": true,
"autoDelete": true
}
}