sublime-rsync-ssh icon indicating copy to clipboard operation
sublime-rsync-ssh copied to clipboard

Auto syncing as watcher feature

Open jnahlovsky opened this issue 8 years ago • 3 comments

Hi, at first of all thanks for this awesome plugin for SublimeText :)

Do you think there is a possibility to make syncing automatically? Just like "auto_sync": true in config json for example?

jnahlovsky avatar Oct 07 '16 09:10 jnahlovsky

Thanks!

Are you generating files outside Sublime and want them to sync automatically? As in please watch this directory, and sync when changed?

davidolrik avatar Oct 07 '16 09:10 davidolrik

Hi, basically yes. But I will try to describe my situation for better understanding. I have a project on my local mac and I'm doing all the build-compile fun using grunt on the server. But the problem is when I'm switching between branches. I sometimes forget to perform command+shift+fn+f12 cool shortcut ;) then I'm wondering, why do I have errors :D so, the best solution would be for me to have some automatic watching tool for the whole project, maybe even with some possibility to change the delay before the automatic rsync transfer would do it instead of me.

jnahlovsky avatar Oct 14 '16 16:10 jnahlovsky

Just some thoughts.

The part of the plugin I find the most useful is handling rsync options (remotes, path, excludes and such) from project config. This is really nice and works good.

I used to live with an FS watcher that basically just runs something like rsync -a --exclude=this --exclude=that ./ to@where:the/project/lives/ when anything changes. And I do some stuff with the source from the terminal and therefore have to trigger full sync manually too. That means handling FS events seems to be the best way in my case.

Also I don't exclude .git directory since I want a real git working copy on the remote including current branch, stash etc. This doesn't feel right and probably may mess something up in some setups (e.g. where there are some absolutes paths in .git/config pointing to shared hooks directory) but it will work in most cases I think.

And I don't care much as well about users, ports host names and other SSH stuff since I have my ~/.ssh/config with all my remotes configured. IMO this should be the recommended way of using this plugin b/c it leaves the project config less cluttered with connection-specific stuff. Especially since the plugin already sets some requirements regarding SSH setup.

Thanks!

timka avatar Sep 06 '22 09:09 timka