ftp-sync
-
安装好ftp-sync插件之后,在 Ctrl+Shift+P (或 F1) 输入 * Ftp-sync: Init *,配置服务器账号路径等信息。
-
{ "remotePath": "/var/data/", "host": "192.168.0.78", "username": "shoukii", "password": "shouadmin", "port": 22, "protocol": "sftp", "uploadOnSave": true, "passive": false, "debug": false, "privateKeyPath": null, "ignore": [ "\\.vscode", "\\.git", "\\.idea" ] }
-
通过命令 Ftp-sync: Sync Local to Remote 和 Ftp-sync: Sync Remote to Local 同步服务器端和客户端的文件。
-
通过命令 commit 提交修改。
sftp插件
-
将配置改为"uploadOnSave": true,就可以实现保存自动提交了;不需要设置快捷键
-
{ "host": "ip地址", "port": 22, "username": "登录名", "password": "登录密码", "protocol": "sftp", "agent": null, "privateKeyPath": null, "passphrase": null, "passive": false, "interactiveAuth": true, "remotePath": "需要打到的远程的文件夹地址", "uploadOnSave": true, "syncMode": "update", "ignore": [ "**/.vscode/**", "**/.git/**", "**/.DS_Store" ], "watcher": { "files": "glob", "autoUpload": true, "autoDelete": true } }
https://blog.csdn.net/weixin_39172380/article/details/89875846