+110
Inversion 3 years ago • updated by Graham Watts 1 month ago 17

Sometimes it is important to be asked before file refresh if it was modified externally. Currently there is no any question. It would be helpful to set some option for particular files/tabs to ask before reload.

Also is good to save such option for files permanently. So if file will be closed and opened again, you do not need to set this option again.

+3
I concur with asking before reloading, or being able to set the option.  Notepad++ offers the feature, and one I was surprised Sublime Text 2 didn't have.  Though, on the other hand it could get annoying.  Hmm, decisions decisions.  
+10
This is really important as automatic reload could lead to potential data loss.
-6
The editor should always display the updated version of the file behing worked on.
If there is something writing the file unintentionally in the background, that's the problem which you should take care of.
Introducing an alert is one more step when the file is changed intentionally like when using a SCM like git or overwriting the file manually
+5
I disagree. Finding out "the hard way" that something else modified a file by silently losing your unsaved edits is not very desirable.


To your point though, the confirmation probably should only be shown if the opened file in ST2 has unsaved edits. 


Additionally perhaps ST2 could check if there are actually any differences between the unsaved buffer and the new file, and just silently refresh if they're identical.

That seems a good solution
Upon further inspection I believe this is exactly what ST2 does. I *do* get a confirm box if I have unsaved edits and modify the file on disk outside of ST2.

Oops. :)
+3
I disagree. I use Sublime Text to edit files that might be changed in the background for a variety of reasons (for instance, they're on a a shared network drive). It shouldn't casually throw away my modifications because someone else changed the file.

Another issue I have is that Sublime scrolls the buffer back on reload, which is really annoying when reading log files.
+1
As far as I Joel Thornton described, it currently asks as long as you have unsaved changes, and that makes a lot of sense. You shouldn't rely on the text editor as a backup mechanism for files on your filesystem.
+9

I definitely need an accessible option somewhere to toggle off the "Auto-reload" feature so that it won't event prompt me for reload regardless of whether I have modifications or not. The use case is when I'm viewing log files that are changing, reloading the file (especially large ones) totally interrupts my work as not only it takes time to (needlessly) reload the file, but quite often I lose the position in the file I was at before the reload.


I was googling for this option actually (I thought it had to be there) and arrived at this topic.

+2

I too would like to see this feature.



There are a few others who talked about this in the Sublime Text forum: http://www.sublimetext.com/forum/viewtopic.php?f=2&t=11275&p=45780


+1

Me too!  Sublime is very forward at making things default like this auto reload thing but they should at least give users the option to turn it off!!

I prefer the way it works when you haven't saved I want that state all the time.

+4

When you have to investigate on log files on a running server, it could be very interesting to have this feature available and control the reload of the file in the mouse right click menu for sample "Refresh"

A strong +1 for having this feature. 

+1 for this too.  Having an option to disable this would be fantastic, maybe the ability to highlight the tab in a different color if the file has been modified on disk.  I just had a .csproj project file open with changes I wanted to keep and had to over-write the file to check it out from source control.  I thought I could just go back to sublime text and save the file with the changes but it reloaded the new file from disk.  I've never been happy that files automatically load if changed on disk.
+1
I like having the files automatically load, but I'd really like to have an undo for it. 
-4
I love arrogant developers who proceed to tell me what a software tool should or shouldn't do.  I guess everyone who uses the tool needs to use it in exactly the same way.
+1 from me, too.  As has been mentioned, having the ability to switch off auto-reload and also not be prompted that the file has changed on disk is essential for being able to look at log files while an application is running.

Maybe a less intrusive notification that a file has changed on disk would be nice, instead of a dialog that interrupts what you're doing?