sublime连接Linux进行文档编辑
1.组件安装
1.用Package Control安装插件:按下Ctrl+Shift+P调出命令面板
2.输入:install ,调出 Install Package 选项并回车
3.然后输入sftp,下拉列表中会出现一些相关的插件,选中sftp进行安装就行。
插件安装过程可以查看Sublime左下角的状态栏的信息。
等待安装完成。
2.新建连接
选菜单栏中的File->SFTP/FTP->Set up Server,会出现一个配置文件,只需要在其中输入地址信息与用户和默认路径就行,点击保存。
保存地址问题:很多时候sublime默认路径在根目录,这样保存是没有作用的,必须要保存在sublime指定的目录下,一般是:C:\Users\Administrator\AppData\Roaming\Sublime Text 3\Packages\User\sftp_servers,如果你的用户不是管理员请找到自己的路径进行保存
{
// 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",
"sync_down_on_open": true,
"sync_same_age": true,
"host": "47.101.141.93", //服务器地址
"user": "root", //用户名
//"password": "password",
//"port": "22",
"remote_path": "/", //默认路径
//"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,
}
3.连接服务
配置完成以后连接服务器,在软件底部会输入密码,输入完成就能够连接成功,只需要选择相应的文件进行编辑即可,保存将会同步到服务上。