Re: [code] Opening remote files in textadept`

From: Martin \ <>
Date: Thu, 4 Feb 2016 10:31:59 +0100


if you are on Linux sftp FUSE module is one solution, and pretty sufficient
when doing quick edits, but it might get bit flaky sometimes.

If, during your workflow, you tend to replicate parts of project tree from
server on your local host, or your work is "project" based, you might want to
look into lsuncd [1].

lsyncd is linux only, but it is lua based, so you can use your lua familiarity
to your advantage. You spawn lsyncd instance, that is monitoring your local tree
with epoll.

It monitors file changes and collects them into batches, and after some
configurable interval, it pushes them together upstream (usually 1 second).

Default lsyncd module uses rsync to do synchronization task, but there are
lua scripts to use lftp instead (that one supports ssh-agent should you be so
inclined and supports parallel uploads).

With this setup, you can for example achieve "instant sync" workflow, like when
doing website development. As soon as you press save bind in textadept, changes
are usually almost immediately sent upstream and you can do relaod (F5) in
browser to see the effects immediately.

 - you can track your project locally with dcvs/cvs system, while on server
   only "runtime" files are stored (by making lsyncd ignore .svn,.hg,.git
 - you do your edits locally, so it's pretty quick, and you local tree always
   has proper version of files
 - you can use local tools to inspect tree you work on (grep, ag, various
   lints, application package managers)
 - you can set lsyncd to ignore uploading of certain local directories and
   files (build recipes, "makefiles" and other artifacts)
 - you can "shellout" from TA into helper scripts and operate directly on
   files in ways not otherwise possible
 - as lsyncd tool is standalone and pretty scriptable, you have infinite
   eg. trigger "rebuild" script on tree change and upload even it's results
 - if you store per project lsyncd setup in project tree and git for example,
   you can share all this with colleagues (given they have linux textadept and
   other dependencies) easily so you all have same "environment"
 - once you get your setup working (like for longterm project) you can be very

 - it only works on linux
 - some ditributions have old lsyncd version or are missing it rntirely (but
   it's pretty straightforward to compile yourself)
 - you need to learn lsyncd, lua, rsync, maybe lftp, and use terminal a bit
 - you need to keep local tree (might be actually good thing)
 - you will burn some time finding setup that works for you
 - it will take some time to get up to full speed, you might not want to invest
   time into that

For me it was well worth it though. lsynd is nice companion to TA.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Thu 04 Feb 2016 - 04:31:59 EST

This archive was generated by hypermail 2.2.0 : Thu 04 Feb 2016 - 06:34:57 EST