Sublime Text 2–sftp/ftp Installation and use

Source: Internet
Author: User
Tags ssh sublime text


The default sublime text 2 is not sftp/ftp function, if the editor with FTP will improve development efficiency, although sublime Text 2 default is no FTP features, but install SFTP plug-in is easy. Here are my installation steps, hoping to help friends who like sublime Text 2.

1. Install the Package control plug-in (if the installed friend can ignore this step), the installation is through the sublime Text 2 console. This is done by pressing CTRL + ' shortcut access. Once open, paste the following command to the console.

import Urllib2,os; pf= ' Package control.sublime-package '; Ipp=sublime.installed_packages_path (); Os.makedirs (IPP If not os.path.exists (IPP) else None; Urllib2.install_opener (Urllib2.build_opener) (urllib2. Proxyhandler ())); Open (Os.path.join (IPP,PF), ' WB '). Write (Urllib2.urlopen (' http://sublime.wbond.net/' +pf.replace ('), '%20 '). Read () ); Print (' Please restart Sublime Text to finish installation ')

The following figure:

And then enter. The following illustration shows that the Package control installation was successful, and the editor is closed at this time.

2. If you press CTRL + SHIFT + p on Windows and Linux platforms, if OS X presses CMD + SHIFT + P command, input Install Install Package appears below:

Enter a car, wait a few seconds to appear in the following figure:

Then type SFTP, the following figure, and then press ENTER.

The following illustration shows that the installation was successful.

The SFTP/FTP option appears below the File menu, and the SETUP server option is selected to modify the following code:

{
    //the TAB key would cycle through the settings when created
    //Visit http://wbond.net/sublime_packages/sft P/settings for help
    
    //SFTP, FTP or FTPs
    "type": "Sftp",

    "Sync_down_on_open": True,
    
    "host": " Wangshangyou.com ","
    User ":" ",
    " password ":" Password ",
    //" Port ":" All ",
    
    " Remote_path ":"/",
    // "File_permissions": "664",
    //"dir_permissions": "775",
    
    //"extra_list_connections": 0,

    "connect_ Timeout ":",
    //"keepalive": A,/
    /"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 ",
}

Then save it so that you can connect it. The following is an introduction to upload a project:

In the toolbar, click Project-add folder to Project ..., select the folders for the project. This will show the project folder on the left, right-click Project, select Ftpsync-setup Ftpsync in this folder, and then come out with a configuration file Sftp-config.json and modify the configuration file as follows:

{//the TAB key would cycle through the settings when created//Visit http://wbond.net/sublime_packages/sft P/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 ":" Wangshangyou.com "," User ":", "Password": ", "Port": "All", "Remote_path": "/", "ignore_regexes": ["\\.sublime-(Project|workspace)", "Sftp-con Fig (-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"://"keepalive": A,//"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",}

In the project directory structure, select the file right-click Upload, or enter a command in the command entry box.

So it's done.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.