SFTP package is super useful if you want to have a development environment like Visual Studio Code. You can open the cloned remote folders on navigation pane, open, modify and sync-up with remote server easily.
You will need to follow below steps
STEP 1. Sublime Text Package Control Installation
- Go to the editor and press ctrl+shift+p on WIndows/Linux, press cmd+shift+p on Mac.
- Type Install Package Control, and press enter
- If everything goes fine, you will see the dialog like below
STEP 2. SFTP Package Installation
- Go to the editor and press ctrl+shift+p on Windows/Linux, press cmd+shift+p on Mac.
- Type Package Control → select Package Control: Install Package → wait for a while till package list populate
- Type SFTP and you will see the SFTP package → select SFTP box and hit enter.
STEP 3. Setup a connection
- Create a folder → Drag & Drop onto Sublime Text and you will see the folder navigation pane on left side.
- Move mouse cursor on top of the created folder (_default in this case) → click mouse right → click SFTP/FTP → click Map to Remote...
Edit your json file (host, user, port, and remote_path) → save the file (it will be saved as sftp-config.json)
- Move mouse cursor on top of the folder (_default in this case) → click mouse right → click SFTP/FTP → click Sync Remote→Local to get the update-to-date code from the server
- You are all set. You can simply select codes on navigation pane and modify it easily.
- Once modification is done, you can sync up with the SFTP server by moving mouse cursor on top of the folder (_default in this case) → click mouse right → click SFTP/FTP → click Sync Local→Remote or Sync Both Directions
Even though this is straightforward and easy, but it may not safer for the user mistake - it could erase all the source code on the server, so you'd better to use Version Control System like Git or SVN.