thlorenz / replpad

Pipes content of files to a node repl whenever they change to enable a highly interactive coding experience.
http://thlorenz.github.com/replpad/
MIT License
213 stars 19 forks source link

hack to fix double-eval when editing w/ Vim #14

Closed wildeyes closed 9 years ago

wildeyes commented 10 years ago

Small hack to fix #13 (#7?), works for me on windows.

Might be useful for othesr?

thlorenz commented 10 years ago

Looks interesting but doesn't fix #7 since that one is about replpad not picking up any file changes after the first one. This one seems to be about removing to fire twice.

I had a hack like this previously but removed it and instead only reacted to mtime and ctime changes which fixed it in most cases.

So this has nothing to do with vim IMO or does it work without this hack when you use different editors?

I think it may be that mtime, ctime is not properly reported on windows? However if we bring this hack back it should probably not be vim related and just on by default instead of an option. Also it could just be implemented the same way it was before I removed it.

That is unless only your implementation fixes this problem properly, I see that you are delaying to fire the change vs. the previous solution which prevented duplicate fires within a range of seconds.

thlorenz commented 9 years ago

This should be fixed with 0.13, we now use chokidar to watch files, mind giving it another try?