|
采用sublime SFTP插件,直接保存CentOS服务器的NodeJS文件,这样调试起来很方便,当然得配上
一直采用File -> SFTP/FTP -> Setup Server/Browse Server, 这样的话一直就把文件保存在c:\users\【用户名】\appdata\local\temp\sublime-sftp-browse-1465899934\【Centos服务上面的路径】!
把sublime-sftp-browse-1465899934文件夹拖放到sublime里面,一直采用这样的方式在操作,也一直相安无事,每次已修改文件,然后Ctrl + S 就自动上传的服务器,然后......,服务器就自动访问了!
突然的桌面管理软件自动清空了垃圾文件,突然发现我的本地代码文件都木有了!没办法只能重新整理一下了,所以在就在桌面创建了nodeserver文件夹,然后把此文件夹拖进sublime,然后进行设置SFTP/FTP,
整个的sftp-config.json的文件如下:
{
// 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": true,
"sync_skip_deletes": false,
"sync_same_age": true,
"confirm_downloads": false,
"confirm_sync": false,
"confirm_overwrite_newer": false,
"host": "www.xxxx.club",
"user": "root",
"password": "xxxxxxxxxx",
//"port": "22",
"remote_path": "/home/testen/nodeserver/",
//"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,
}
大部分内容,相信各位看官都情况,我就不多说了
"save_before_upload": true,
"upload_on_save": true,
这两个参数尤为重要,save_before_upload表示在上传之前进行保存,upload_on_save在保存时进行上传!
ok,这样就达到了目的,在sublime保存后,自动上传文件,这样就方便浏览了! |
|
|