- 下载安装Sublime text3
-
Preferences -> Package Control
在弹出的界面里面输入 install pack,如下图
-
输入sftp
如下图,因为已经安装过了,所以没有该插件
- 创建文件夹
- 在新创建的文件夹上面右键,选择SFTP/FTP 选择 Map To Remote
- 修改如下文件
{
// The tab key will cycle through the settings when first created
// Visit http://wbond.net/sublime_packages/sftp/settings for help
// sftp, ftp or ftps
"type": "sftp",
"save_before_upload": true,
"upload_on_save": false,
"sync_down_on_open": false,
"sync_skip_deletes": false,
"sync_same_age": true,
"confirm_downloads": false,
"confirm_sync": true,
"confirm_overwrite_newer": false,
// 有的时候连不上 需要添加这句
"remote_time_offset_in_hours":100,
// 服务器地址
"host": "example.com",
// 用户名
"user": "username",
// 密码
"password": "password",
//"port": "22",
// 自定义打开时的路径
"remote_path": "/example/path/",
"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": "664",
//"dir_permissions": "775",
//"extra_list_connections": 0,
"connect_timeout": 30,
//"keepalive": 120,
//"ftp_passive_mode": true,
//"ftp_obey_passive_host": false,
//"ssh_key_file": "~/.ssh/id_rsa",
//"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,
}
- 保存,再次右键,选择SFTP/FTP,会多出很多选项
就可以浏览,修改保存服务器上的文件了