subime安装和连接sftp

来源:互联网 发布:网络舆论害死人的事例 编辑:程序博客网 时间:2024/06/06 02:25

介于在linux终端打开文件,比较负责,所以在网上搜索了一个比较好用的工具。

现将配置和安装说明如下,便于以后使用。

一、下载sublime  text 2

        运行安装文件,进行安装。

二、安装插件

      “ctrl  +", 将下面的代码copy进去后回车。

       importurllib2,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' +'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp=                sublime.installed_packages_path(); os.makedirs( ipp ) if notos.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener(urllib2.ProxyHandler()) ); by        = urllib2.urlopen( 'http://sublime.wbond.net/' + pf.replace('', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join(ipp, pf), 'wb' ).write(by) if dh          == h else None; print('Error validatingdownload (got %s instead of %s), please try manual install' % (dh, h) if dh !=h else 'Please restart Sublime Text to finish                  installation')

三、安装sftp

      "ctrl+shift  +  p”

      输入sftp。

四、配置sftpd

     "type":"sftp",

    "sync_down_on_open": true,

    "sync_same_age": true,

    "host":"172.182.172.167",

    "user": "root",

    "password": "de22bn",

    "port": "22",

    "remote_path":"/home/www"

就可以连接了ftpd,使用了。


说明:如果要同时连接多个ftp, 就同时配置多个文件来完成相应的功能就可以了。


配置的文件以文件夹的方式存储不是以文件的方式存储。


0 0