-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add option to disable auto-reload file content #1666
Comments
you mean rather than set the following, you want an option so that it will never auto-reload files and never ask to either? // Always prompt before reloading a file, even if the file hasn't been
// modified. The default behavior is to automatically reload a file if it
// hasn't been edited. If a file has unsaved changes, a prompt will always
// be shown.
"always_prompt_for_file_reload": true, |
It might be useful to configure it for certain syntaxes or file sizes: EDIT: (i.e. two settings, one that works in syntax-specific settings files to disable auto reloading entirely, and one that can control the maximum size of file that should (prompt to) auto-reload) |
@keith-hall Yes I want new option, because with "always_prompt_for_file_reload": true its still unusable for view file (confirmation window appears every second). |
We often need a setting not to update the file |
+1 |
When I am debugging and reading logs, I need to do it on a live file and move back and forth to other application. When I come back to ST3, the file flashes and is scrolled back to the top and I loose my line. I've been trying to get rid of this issue for a very long time and gave up and started reading the log file in notepad++ in parallels. Would love to use ST3 again as I really like using it and I am quite handsy with the various shortcuts in ST3. I think this feature has been requested for many years now. I request the Sublime developers to focus on this issue asap. |
One could easily bind a key to the |
Viewing large active log files is effectively unusable in ST3 |
@keith-hall the described solution (with screenshots) is not for the problem to reload file with shortcut, but how can i determine are the file was updated or not (if i switched off auto-reload option in future). |
@menkow currently, the following setting will be picked up by your theme to display the tab differently when the file has been modified:
However, this would only be helpful if you haven't made any changes to the file in ST, because there would be no way (with the current system) to tell whether the changes to the file were made in ST or externally (or both). If/when the ST devs do end up implementing this, most likely they will update the theme documentation to mention a new attribute that themes can use to distinguish "dirty" files from those changed in ST and those changed outside ST, but this is purely speculation on my part. |
Affects editing files on remote volumes via MountainDuck on the Mac. File reloads are attempted by ST3 each time a file is saved, obliterating any code folding and momentarily blanking out the content pane due to network latency. It would be really nice to inhibit attempts by ST3 to reload based on the mounted volume where the changes occur. |
Admins, please look into this enhancement. |
Some few options for Sublime Text to handle big files:
Detect when a file is too big and perform a silent reload, not presenting the load bar. Just put some sign to the user on the status bar, stating the file is being silently reloaded. And if the user wishes:
Also a option to do a silent reload now. So the user can to reload the file, when he wants to. It would be useful when the user disabled the silent reload for the current file, or globally on the settings. |
@evandrocoan, I might have misunderstood your comment here. We are discussing how to stop the silent reloads because it messes up with trace, search and reading logs and not do silent reloads in general. In our option if the silent reload option is off then Sublime should present the user with a visual indication that the file was modified. So the options we are looking at are described in #1666 (comment) and older comments than that. |
Sorry, I will opened a new issue specifically for this suggestion on how handle the file reload. |
I agree this is a useful option. This affects me even if I have a different file opened -- if I try to highlight text in my current file and a background file is reloaded, my current highlight is interrupted. |
@ericsubach that bug is being tracked here: #1177 |
Agree with the author. It is so annoying when you are working with logs files. I don't want to see reload asking window! I just want to not reload the document automatically and only on my request. |
I finally switched to VScode and it is not only way-way faster to load big files but also you can move the search results panels around. VScode has become by default IDE now. |
This also seems to kill performance when a large number of files are modified. Often sublime becomes unusable for me, (and stuck at 20% cpu usage) when I have a large number of writes happening, even if those files are not in the sublime workspace. So perhaps there is a problem with the way callbacks happen which consume CPU power. I would prefer a way to just disable all file watchers. |
A good way to implement this setting would be to provide a customizable flag/option for syntax definitions which would control the default behaviour of the file watcher for this syntax. This would allow code to reload automatically, but by shipping ST3 with the auto reload disabled for the TXT syntax would solve the issue. This would also enable custom syntaxes from packages to have their behaviour set by the plugin maintainer. If implemented this way, a pair of new settings should be created, to list file extensions to ALWAYS and NEVER auto reload, similar to the search ignore list. |
I like the suggestion, but imo it should just be a normal view setting. View settings are sourced from project and also syntax-specific settings, so everything you described is also possible through syntax-specific settings. In addition to this, you could enable or disable it per view. |
Convenient! |
Do we have any plugins or workaround? I just couldn't believe that ST3 does not have this implemented yet. |
On the latest development build I am experiencing a random bug which stops reloading some views from the file system:
But, I am not sure how to trigger it yet. |
We still really need a solution for this. |
This should not be that difficult to implement: All you need to do is add an option "file_reload_on_changed_in_filesystem: true;" ... and only execute the file-system watcher when this is true. If you want to make it fancy, an option in the tab context menu would be even better. But just that option in the preferences / settings would already be enough for me. Without this, I need to make a copy of the logfile to load it up in Sublime Text. That's not cool. |
After almost two years and many comments with same issue from users its still not implemented minor feature, why @keith-hall ? |
@menkow, may be after reading these two topics, they can answer you question: |
I am having the same issue at work, trying to read some large log file, while a program updates it, it is unusable. |
Same issue with large logfiles here. Unable to take a look into the file while the log-file is updated in the background... |
Came here hoping for the same feature. This would be so useful! |
I'd love to see this as a feature also. I like the refresh idea above, potentially a pause/resume icon instead to toggle the auto-refresh behaviour would be an improvement? |
I also need this option. Automatically reloading a file is not usable for many people (such as myself) and makes this editor useless in many situations. The way this works in most other editors that I have used is:
This seems to be a basic feature that almost every editor I have used has, which Sublime is missing. |
@menkow, if you are using Linux, due this other bug:
You can "disable" the auto reload of the files by mounting your files by I use this to mount my own files somewhere else and stop Sublime Text from reloading them:
This assumes you have |
@evandrocoan, thx for the tricky workaround, but my servers on Windows. |
According to the changelog fixed in |
@jrappen the build 4050 should be a secret so for I know. Such that this is labeled in a millstone called "next dev cycle". @FichteFoll, can you delete both our comments? |
@evandrocoan 4050 is in limited beta release, although not secret, just not published in high-traffic areas. We will publish more info once it is ready for mass consumption. |
This is fixed for the current ST4 development build. |
If I am viewing a huge logfile of +200MB and it is often updated (each second), it is very annoying that ST3 reloads it - I would even say useless.
There should really be an option to control the auto-reload so it can at least be disabled.
The text was updated successfully, but these errors were encountered: