Comments (5)
Thanks @DanielJoyce
Unfortunately what you are talking about is the default functionality in Atom.
The file-watcher
package is triggered by the conflict state from Atom's internal file tracking, and that is not fired in the scenario you describe.
I did a quick check on editor behaviour:
Editor | Behavior |
---|---|
Atom | Automatically reloads |
VS Code | Automatically reloads |
Notepad++ | Prompts to reload |
WebStorm | Automatically reloads |
It looks like this might be a personal preference thing by the creators of each editor. I will look into this as an optional addition to file-watcher
but I do not know if I can intercept the base Atom behaviour.
from file-watcher.
+1 for this feature.
Imagine you're analysing a log file from a running application that updates this log file. Auto reloading the log file is awful!
As far as I know, the default behaviour on Atom is to auto reload the file, and there is no option to set it to prompt you for a confirmation to reload.
IMO, it would be nice having a way to get a prompt confirmation for reloading the file (no matter if it has changes or not).
from file-watcher.
I have been looking into this and it might require an update to TextBuffer since it does not expose the event that the file on disk has changed unless there is a conflict.
from file-watcher.
Resolved by 52bb9c0
I added an option (off by default) to file-watcher
where it will intercept file change events before text-buffer
reloads. It does this by faking out the conflict status.
I had to re-register the text-buffer
file events due to an order of operation issue, but it does work for now.
If this is a feature you want please make sure you check the option in settings.
I'm closing this issue for now but I'll re-open it if this solution is inconsistent.
Thanks!
from file-watcher.
Thanks a lot for adding this important feature!! (It's also working this way with the Kate, Geany, gvim and Scite text editors, maybe it's more common to have this with Unix / Linux editors). I hope next releases of Atom won't break this option.
from file-watcher.
Related Issues (20)
- Path must be a string. Received undefined
- Changing Branchs HOT 3
- Add "Reload All" option HOT 5
- Reload all changes of the same file together HOT 1
- No prompt when using filezilla HOT 3
- File is not updated in Atom when it was edited outside Atom HOT 3
- Uncaught TypeError: this.editor.buffer.updateCachedDiskContents is not a function HOT 3
- Is there a way to make it work with PyCharm 'safe write'? HOT 1
- Failed to load the file-watcher package HOT 4
- Only show message once when file is foreground
- Uncaught (in promise) Error: Invalid encoding name: windows1252 HOT 2
- The plugin is not working with Atom 1.23.3 and macOS 10.13.2 HOT 1
- Prompt on change does not work on nfs files changed outside Atom HOT 1
- Not prompting on change and reloading automatically even with option turned off. HOT 4
- "Mounted file systems" in documentation is misleading. HOT 2
- file-watcher is completely inconsistent HOT 4
- AutoReload to confirm only if has unsaved changes
- Add an option to avoid bringing the atom window to the foreground when a file has changed HOT 2
- File won't reload when doing "git checkout"
- How this work in VisualCode HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from file-watcher.