Skip to content
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

make --watch work with vim #24

Merged
merged 2 commits into from
Dec 28, 2020
Merged

make --watch work with vim #24

merged 2 commits into from
Dec 28, 2020

Conversation

matslina
Copy link
Contributor

Vim appears to move/rename the original file on save, resulting
in a RENAME event from fsnotify. Reacting to this by re-adding
the original file name also catches two CHMOD (but no WRITE).

Not sure what's going on, but re-adding on RENAME and reloading
on CHMOD seems to do the trick.

Vim appears to move/rename the original file on save, resulting
in a  RENAME event from fsnotify. Reacting to this by re-adding
the original file name also catches two CHMOD (but no WRITE).

Not sure what's going on, but re-adding on RENAME and reloading
on CHMOD seems to do the trick.
@matslina
Copy link
Contributor Author

Hey @mackorone, were you by any chance using vim when you ran into issue #16? I was able to repro this with vim on both ubuntu and macOS, but not with e.g emacs or echo >> in bash.

Not the most elegant solution, but seems to do the trick for now.

@mackorone
Copy link
Contributor

Yep, I was using Vim. Good catch!

@matslina matslina merged commit a334d4a into main Dec 28, 2020
@matslina matslina deleted the fsnotify_and_vim branch December 28, 2020 19:28
@matslina matslina mentioned this pull request Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants