zur*_*4ik 5 ftp sftp sublimetext sublimetext2 sublimetext3
我使用Sublime SFTP插件与远程服务器一起使用。
我对某些项目的配置如下所示:
{
// 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": 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": "MY_HOST",
"user": "MY_USER",
"password": "MY_PASSWORD",
"port": "22",
"remote_path": "/MY_REMOTE_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,
//"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",
}
Run Code Online (Sandbox Code Playgroud)
保存文件时,SFTP将其上传,但是当我创建新文件夹或新文件并再次保存时,仅上传已编辑的文件(而非新文件夹或文件),并且我必须手动“告诉” SFTP来上传它们(从侧边栏上下文菜单)。
我"upload_on_save": true在配置文件中。怎么了?
还有其他配置或技巧可以在保存时上传新文件夹和文件吗?