Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Simple and free FTP(S) syncing (SFTP not available)
Python JavaScript

This branch is 305 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
Context.sublime-menu
Default.sublime-commands
FTPSync.py
LICENCE
Main.sublime-menu
README.md
Side Bar.sublime-menu
ftplib.py
ftpsync.default-settings
ftpsync.sublime-settings
ftpsyncfiles.py
ftpsyncprogress.py
ftpsyncwrapper.py

README.md

SublimeText2-FTPSync

Simple and free plugin for FTP syncing. Just hit the save as usual and it's upped.

Recently new

  • Rewritten core execution code for brevity and clarity
  • Able to upload solely folders as well
  • Full relative path in status bar
  • Added protection from overwriting remote file by renaming
  • AfterSaveWatch for uploading changed files

What's there for you?

  • Multiple named upload targets
  • Ignored file regex patterns
  • Secure transfer using TLS
  • Determining newer remote files, overwrite protection
  • Manual multiple file & folder up/downloading (sidebar context menu)
  • Local&remote renaming
  • Progress bar for multiple up/download

Current focus:

  • Downloading from selected location
  • Safer downloading/uploading of files (tempfile)
  • SFTP support (hopefully soon)

For more info look into Wiki

How to use

To mark a folder and descendants for upload insert ftpsync.settings file in following format. Don't worry - the skeleton can be simply inserted using Preferences > Package Settings > FTPSync > Setup FTPSync in this folder or using context menu in Side bar or using Control/CMD+Shift+P.

Format:

{
    <connection_name>: {
        host: {string},

        username: {null|string=null}, // null means anonymous manipulation
        password: {null|string=""},

        path: {string="/"}, // remote root for these files

        upload_on_save: true, // whether upload on save or manually
        download_on_open: false, // checks whether there's a newer remote file on opening a file
        overwrite_newer_prevention: true, // overwrite protection when remote file is newer
        upload_delay: {int=0}, // delays [seconds] upload triggered by upload_on_save

        port: {int=21}, // remote port, pretty much always 21, unless SFTP
        tls: {bool=false}, // set true to use secured transfer, recommended! (server needs to support)
        passive: {bool=true}, // whether to use passive or active connection
        timeout: {int=30}, // seconds to invalidate the cached connection
        ignore: {null|string}. // regular expression, matched against file path - not applied for downloading

        line_separator: {string=\n}. // line separator for text files used in your project, usually \n, can be \r\n

        after_save_watch: {null|list<list<subfolder, filepatter>>=null} // after save watch
        // example: [ [ "code/assets/css", "*.css" ], [ "code/assets/", "*.jpg, *.png, *.gif" ] ]
        // more in Wiki

    } //,
    // <connection2_name>: { ... }
}

Files are automatically uploaded on save (unless disabled by upload_on_save=false setting). In your newly created settings file some options are preceded with //, this means they are commented out (and default value from global settings file is used) - remove the // to enable the entry.

About

Done by @NoxArt ~ Twitter

Released under MIT licence.

Feel free to add issues, ideas, pull requests...

Thanks to castus, tommymarshall, TotallyInformation, saiori, vnabet, Jcrs, ItayXD, bibimij, digitalmaster, alfaex, seyDoggy, Nuno and mikedoug for reporting issues, ideas and fixing!

Tips

  • Working from more places? Or in team?

You can either use download_on_open=true to check files upon openning or FTPSync: Check current file command to see whether you have the same version as is on all servers. Using overwrite_newer_prevention is also recommended (it's actually enabled by default).

  • Upload different language versions to different servers of paths

    {
        <connection_name>: {
            host: "ftp.host.en.com",
            ignore: "/locale/(?!fr)\\w+/.*"
        },
        <connection2_name>: {
            host: "ftp.host.cz.com",
            ignore: "/locale/(?!cz)\\w+/.*"
        }
    }
    
Something went wrong with that request. Please try again.