1、安装sftp
crtl+shift+p打开package control。
输入搜索sftp,点击安装sftp
2、配置服务器信息
{
// The tab key will cycle through the settings when first created
// Visit https://codexns.io/products/sftp_for_subime/settings for help
// sftp, ftp or ftps
"type": "sftp",
"save_before_upload": false,
"upload_on_save": true,
"sync_down_on_open": false,
"sync_skip_deletes": false,
"sync_same_age": true,
"confirm_downloads": false,
"confirm_sync": true,
"confirm_overwrite_newer": false,
"host": "111.229.31.80",
"user": "root",
"password": "password",
"port": "22",
"remote_path": "/www/wwwroot",
"ignore_regexes": [
"\\.sublime-(project|workspace)", "sftp-config(-alt\\d?)?\\.json",
"sftp-settings\\.json", "/venv/", "\\.svn/", "\\.hg/", "\\.git/",
"\\.bzr", "_darcs", "CVS", "\\.DS_Store", "Thumbs\\.db", "desktop\\.ini"
],
"file_permissions": "755",
"dir_permissions": "755",
//"extra_list_connections": 0,
"connect_timeout": 30,
//"keepalive": 120,
//"ftp_passive_mode": true,
//"ftp_obey_passive_host": false,
"ssh_key_file": "C:\\Users\\zh10\\.ssh\\111.ppk",
//"sftp_sudo": false,
//"sftp_flags": ["-F", "/path/to/ssh_config"],
//"preserve_modification_times": false,
//"remote_time_offset_in_hours": 0,
//"remote_encoding": "utf-8",
//"remote_locale": "C",
//"allow_config_upload": false,
}
3.remote同步
打开一个文件一夹与配置的remote_path对应
在侧边栏中的文件夹的右键菜单中,可以选择上传或下载来手动同步,保存时会自动上传