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.