sublime 插件sftp,连接自己的小米手机

公司有无线网络,小米手机文件管理有远程管理(创建ftp,电脑可以直接访问文件,省去了数据线的麻烦!),sublime有sftp插件,具备这几个条件就可以实现sumlime连接小米手机的ftp了,可以把每天工作中做的笔记上传到小米手机上。

 


1.按下Ctrl+Shift+P调出命令面板

 

  输入install 调出 Install Package 选项并回车,然后输入ftp,下拉列表中会出现一些相关的插件,选中sftp进行安装就行了,装好后还需配置如下:

 

  选菜单栏中的File->SFTP/FTP->Set up Server,然后出现一个配置窗口文件内容如下,

View Code
{
    // 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,
    
    "host": "example.com",
    "user": "username",
    //"password": "password",
    //"port": "22",
    
    "remote_path": "/example/path/",
    //"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",
}

我的配置

View Code
{
    // 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": "ftp",

    "sync_down_on_open": true,
    
    "host": "192.168.2.73",
    "user": "anonymous",
    //"password": "password",
    "port": "2121",
    
    "remote_path": "/ayt/",
    //"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",
}

2.配置了这里还不能实现文件的上传。要为上传的文件创建一个 ftp配置(Map to remote)

 

 

 配置如下

View Code
{
    // 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": "ftp",

    "save_before_upload": true,
    "upload_on_save": false,
    "sync_down_on_open": false,
    "sync_skip_deletes": false,
    "confirm_downloads": false,
    "confirm_sync": true,
    "confirm_overwrite_newer": false,
    
    "host": "192.168.2.73",
    "user": "anonymous",
    "password": "",
    "port": "2121",
    
    "remote_path": "/ayt/",
    "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",
}

3.下面就可以把你编写的文档上传到小米手机上了。。。。。(打开你小米的远程管理,启动服务)

 

posted @ 2013-05-08 16:59  xyun  阅读(1054)  评论(0)    收藏  举报