Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Excerpt

Reading/Writing directly on the server via FTP/SFTP is super useful on Windows, but it seems not easy to find such kind of convenient solution on Mac yet. 


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
    Image Added


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
    Image Added
  • Type SFTP and you will see the SFTP package → select SFTP box and hit enter.
    Image Added


STEP 3. Setup a connection

  • Create a folder → Drag & Drop onto Sublime Text and you will see the folder navigation pane on left side.
    Image Added
  • Move mouse cursor on top of the created folder (_default in this case) → click mouse right → click SFTP/FTP → click Map to Remote...
    Image Added
  • Edit your json file (host, user, port, and remote_path) → save the file (it will be saved as sftp-config.json)

    Code Block
    {
        // 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",
    
        "save_before_upload": true,
        "upload_on_save": false,
        "sync_down_on_open": false,
        "sync_skip_deletes": false,
        "sync_same_age": true,
        "confirm_downloads": false,
        "confirm_sync": true,
        "confirm_overwrite_newer": false,
        
        "host": "example.com",
        "user": "username",
        //"password": "password",
        //"port": "22",
        
        "remote_path": "/example/path/",
        "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,
        //"ftp_obey_passive_host": false,
        //"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",
        //"allow_config_upload": false,
    }
    
    


  • 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
    Image Added
  • You are all set. You can simply select codes on navigation pane and modify it easily.
    Image Added
  • 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 

...