atom-rsync is an Atom package to sync files bidirectionally between remote host and local over ssh+rsync. Inspired by Sublime SFTP.
Edit Remote Config.
Sync Remote -> Local.
remote: host: "HOSTNAME", # server name or ip or ssh host abbr in .ssh/config user: "USERNAME", # ssh username path: "REMOTE_DIR" # e.g. /home/someone/somewhere behaviour: uploadOnSave: true # Upload every time you save a file syncDownOnOpen: true # Download every time you open a file forgetConsole: false # Never show console panel even while syncing autoHideConsole: true # Hide console automatically after 1.5s alwaysSyncAll: false # Sync all files and folders under the project \ # instead of syncing single file or folder option: deleteFiles: true # Delete files during syncing autoHideDelay: 1500 # Time delay to hide console exclude: [ # Excluding patterns '.sync-config.cson' '.git' 'node_modules' 'tmp' 'vendor' ] flags: 'avzpur' # Advanced option: rsync flags shell: 'ssh' trigger: # Triggers fire after uploading file successfully # which STARTS with following patterns "*": "uptime" # Wildcard trigger for any file uploaded "resources/scripts/coffee": [ # Any file under %PROJECT_ROOT%/resources/scripts/coffee \ # being uploaded will fire this trigger "echo Compile coffeescript to js ..." "coffee -b --output js/ --compile coffee/" "ls public/js/|xargs -I@ echo \\t@" # You can also pipe commands but don't \ # forget to escape special characters ] "resources/scripts/sass": [ "echo Compile sass to css ..." "sass --update resources/scripts/sass:public/css" ]
trigger: "*": [ "echo \'<span class=warning>Every time you\\'ll see me</span>\'" ] "coffee": [ "echo Compile coffeescript to js ..." "mkdir -p js" "coffee -b --output js/ --compile coffee/" "ls js/|xargs -I@ echo \\t@" ] "sass/style.sass": [ "echo Compile sass to css ..." "mkdir -p css" "sass --update sass:css" ]
Trigger is implemented via ssh, it would be great to use triggers with SSH ControlMaster by transferring data through single ssh tunnel instead of making one ssh connection for rsync and another for ssh command, which could be very slow under unideal network speed or connection limits.
Host * ControlMaster auto ControlPath ~/.ssh/ssh-%r@%h:%p ControlPersist 10m ServerAliveInterval 30
l(Mac) Toggle log window
Sync Local -> Remotemanually after renaming and deleting files.
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.