VScode SFTP插件配置
插件地址
https://marketplace.visualstudio.com/items?itemName=Natizyskunk.sftp
适用于单个工作区或文件夹内单个站点
json
[
{
"name": "name",
"host": "host or IP",
"protocol": "sftp",
"port": 22,
"username": "root",
"password": "xxxxxxxxx",
"remotePath": "/home/wwwroot/www.yourdomain.com",
"uploadOnSave": true,
"syncOption": {"delete": false,"update": true},
"ignore": [
"**/.vscode/**",
"**/.git/**",
"**/.DS_Store",
"**/.user.ini"
]
}
]
适用于单个工作区或文件夹内多个站点
json
[
{
"name": "name1",
"host": "host or IP",
"protocol": "sftp",
"port": 22,
"username": "root",
"password": "xxxxxxxxx",
"remotePath": "/home/wwwroot/www.yourdomain.com",
"context": "/Users/yourname/Documents/VSCODE/web1/", //本机路径,单个SFTP无需此行.
"uploadOnSave": true,
"syncOption": {"delete": false,"update": true},
"ignore": [
"**/.vscode/**",
"**/.git/**",
"**/.DS_Store",
"**/.user.ini"
]
},
{
"name": "name2",
"host": "host or IP",
"protocol": "sftp",
"port": 22,
"username": "root",
"password": "xxxxxxxxx",
"remotePath": "/home/wwwroot/www.yourdomain.com",
"context": "/Users/yourname/Documents/VSCODE/web2/", //本机路径,单个SFTP无需此行.
"uploadOnSave": true,
"syncOption": {"delete": false,"update": true},
"ignore": [
"**/.vscode/**",
"**/.git/**",
"**/.DS_Store",
"**/.user.ini"
]
}
]