1.安装 SFTP 插件,作者Natizyskunk
2.ctrl + shift + P 输入 ftp-sync ,找到插件
3.sftp.json 内容如下
[
{
"name": "alan",// 自定义名称
"host": "126.0.0.1",// 服务器ip
"protocol": "ftp",
"uploadOnSave": true,
"useTempFile": true,
"port": 21,
"username": "alan",// ftp名称
"ignore": [
".vscode",
".git",
".DS_Store",
".github/**",
".ci"
],
"context": "./",
"remotePath": "/",
"watcher": {
"files": "statics/**/*",
"autoUpload": true,
"autoDelete": false
},
"remoteExplorer": {
"filesExclude": [
".git",
".vscode",
".github"
]
},
"password": "123456",// ftp 密码
"charset": "binary",
"showHidden": false,
"profiles": {}
}
]