Sublime Forum

Alert in ST3 on external modified files

#1

what is the setting to make an alert , instead of auto-refresh ing the file, if the same file is modified by another process/editor externally, btw, I bought a licensed ST3.

Thanks
Rajesh

0 Likes

#2

I too am in desperate need of this function. If someone else edits the file I’m currently working on then I need Sublime to alert me, and not silenty discard my changes to the file.

I’ve found a few related topics, but no answer to your question:

sublimetext.com/forum/viewt … f=3&t=7626
sublimetext.userecho.com/topic/7 … le-reload/

0 Likes

#3

Sublime Text will never silently discard your changes, it only reloads without prompting when you have no unsaved changes.

0 Likes

#4

Is possible add setting “Prompt for reload changed files”?

0 Likes

#5

It would be nice to have a overlay on the bottom that can also be accessible by the plugin API. Something like a “warning bar” or “notification bar”. The bar would be like the findbar - but you would be able to control its message and also it could have buttons that would return a response to the plugin.
So for example - when a file is detected as modified - it would show the message-bar overlay showing the last modified time of the current file and the newly detected revision - and on that overlay it would have a button for “Revert to new version”, “Ignore”.

0 Likes

#6

Thanks for clearing this up. Would it be possible to add an option to disable the auto-reload altogether and always show a warning on file changes?

0 Likes

#7

As someone who frequently needs to browse large live log files over a slow network connection, I would also love to have a way to turn off file auto-reloading.

0 Likes

#8

There is a feature request to add this function to Sublime Text: sublimetext.userecho.com/topic/7 … le-reload/

If you like to see this feature then please vote for it. (I did)

0 Likes

#9

Is this working now?

0 Likes

#10

Yes, just set "always_prompt_for_file_reload": true, in your user preferences.

0 Likes

Detect File changes?
Notify about file change on disk
#11

Thanks, but how to change this? I’ve found it under Preferences -> Settings - Default but I’m unable to save changes in this file. Also the file that it points to .\Data\Packages/Default/Preferences.sublime-settings does not exists.

0 Likes

#12

Preferences -> Settings - Default is not intended to be modified. You should use Preferences -> Settings - User instead, to override the default settings. It will start as a blank file, so ensure it is a valid JSON dictionary:

{ "always_prompt_for_file_reload": true }
0 Likes

#13

Thanks I’ve found similar answer here. Just to complete you, it will edit following file: .\Data\Packages\User\Preferences.sublime-settings May I ask what is the purpose of Preferences -> Settings - Default if it cannot be modified? Thanks

0 Likes

#14

So you can see (as well as copy and paste) the default settings I believe, as there is no UI within which one can edit them. Also, the default settings have to be stored somewhere :slightly_smiling:

0 Likes

#15

Oh, does not comes to my mind. Nice idea :wink:

0 Likes

#16

I’ve noticed that there is e.g. option remember_open_files mentioned here but it is not contained in my Settings - Defalut why? Are there any other options that are not mentioned?

0 Likes

#17

because this setting doesn’t exist (any more?), I believe. I just tried it, setting it to false in my user preferences, closed ST, re-opened ST and it still opened my previous tabs.

0 Likes

#18

It has been deprecated because in 99% of its use cases, hot_exit is the more appropriate setting (and you need to disable it in case you want temember_open_files to be false). Iirc it is still interpreted though.

0 Likes