momodalo / vimtouch

vimtouch
Apache License 2.0
349 stars 71 forks source link

Doesn't play nicely when file is observed with android.os.FileObserver #35

Closed untitaker closed 11 years ago

untitaker commented 11 years ago

I am using ownCloud's "Keep file up to date" feature to push changes to a text file immediately to the server. This works with most editors, except with VIM Touch, ownCloud doesn't recognize any changes to the file.

Here is the code that ownCloud uses to watch changes of the file: https://github.com/owncloud/android/blob/master/src/com/owncloud/android/files/OwnCloudFileObserver.java

Related issue: owncloud/android#3

momodalo commented 11 years ago

I tested vimtouch with dropbox application and it works fine.

teranex commented 11 years ago

I'm using VimTouch with DropSync which also watches a folder and I have not encountered any problems so far. As soon as i :w in VimTouch dropsync picks up the change and transfers the modified file to my Dropbox...

untitaker commented 11 years ago

Yeah, i don't know, it seems to be the reliability of FileObserver that's causing problems. Maybe these apps don't use that and just compare hashes regularly.

sherpya commented 10 years ago

dropbox uses a native library that calls inotify api, so they may encountered some problems with android sdk api