-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vis and entr #758
Comments
I was trying to reproduce this using
The first series is me opening the file in vis, three seconds later I save the file. From the manpage about the delete_self event:
It seems vis deletes the file, replacing it with a new one. This causes inotify (and probably kqueue, the other backend of entr) to stop listening. |
I recall some discussion about this in which was stated why this is how vis works, but I can't find the relative issue. |
It should work if you put this in your vis.events.subscribe(vis.events.WIN_OPEN, function(win)
vis:command'set savemethod inplace'
end) |
Using savemethod inplace fixes the problem. Thanks. Please note that savemethod has to be in the WIN_OPEN event, it does not work if you put it under INIT (which I had tried previously). I kinda assumed that putting under INIT, that would make it the default (like some of the other settings) but anyway. |
Vis doesn't work with a tool like entr (https://github.com/clibs/entr) as the file on disk is not updated on write (:w). It works the first time but then fails. The file is updated on write and close (:wq).
Is there anyway to configure it so that it works? Is there anyway to force vis to flush the file to disk without closing vis.
The text was updated successfully, but these errors were encountered: