Sublime Forum

[Feature] Option to autoReload all files in reload dialog

#1

When a file is changed outside of Sublime, you get a prompt asking whether you’d like to reload the file.
There’s also “autoReloadChanged” option, which always you to always reload files.

I’d like a simple check-box in the Reload dialog, asking whether to automatically reload all files from disk.
This is because I don’t want to always autoReload, but a lot of the time, especially when checking out new version from version control, I do want to reload all the files.

0 Likes

#2

Hey, edanm.

A plugin seems to be the right way to go about this.

Generally, I’m against overloading the UI and custom behavior is better dealt with through plugins anyway.

If I’ve understood correctly, your desired functionality is trivial to code; roughly:

myFiles = get open files' names
close all open files
for each file in myFiles
    create new view
    open file

Now I know nearly all (if not all?) options can be found in the option files. I don’t like the prospect of a redundant UI.

0 Likes

#3

On a related note, check out the SublimeModelines plugin. It will let you set options local to a particular file/buffer.

0 Likes

#4

Hey,

First of all, I actually don’t like relying on plugins too much. My theory is that the editor should come with all the functionality you’re likely to want “out of the box”, and unless I’m completely mistaken, this seems like something pretty basic which other people will want

Anyways, I’m not sure I properly explained what I was talking about. So just in case, I’ve added a screenshot showing the current dialog, and a screenshot showing what I’d like to be available:

As it is today:
http://dl.dropbox.com/u/5938530/SublimeForum/Reload%20file%20Screenshot.png

Modified:
http://dl.dropbox.com/u/5938530/SublimeForum/Reload%20all%20files%20Screenshot.jpg

It’s not redundant at all, it fits exactly for people who sometimes want to not reload the files, sometimes want to reload their whole project, and sometimes just reload one file.

0 Likes

#5

Oh and by the way, where can I find the Modelines plugin? I don’t see it on the wiki.

0 Likes

#6

Ok, now I understand. Yes, that seems to be more generally useful, but still doable with a plugin. I also try to keep the number of plugins I use to a minimum, and I think some sort of facility to selectively disable them is needed.

But modal dialogs look so damn prehistoric! :smile:

0 Likes

#7

Oh, yeah, and regarding plugins/packages, not all of them are listed in the Wiki… Having all of them scattered in different places is a huge PITA. Personally, the ones I’ve authored are all hosted in Bitbucket.

0 Likes

#8

I think this would be useful, especially for editing large projects, and you do a CVS update and a bunch of files get changed at once. But IMHO, we should keep with the OS integration and instead of “Reload all files”, display buttons with text “Yes to all” and “No to all” if Sublime Text detects that more than one buffer has been updated outside the program.

0 Likes

#9

Just wanted to throw out there that I also would really like to see this implemented.

Another thing: when a file is reloaded through this dialog, all of its bookmarks are moved to the first line. It would be very nice if they could stay at the same line (by analyzing the file) or even just the same line number, because it’s usually close enough.

0 Likes