70

How can I make Sublime Text (3) re-load the file currently being edited, to take into account changes having been made externally?

2
  • 3
    It does automatically already. I am looking a solution to prevent it.
    – atilkan
    Apr 5, 2016 at 0:01
  • @atilkan always_prompt_for_file_reload has to be set to true in settings. Feb 26 at 13:25

4 Answers 4

91

To re-load the current file, you can revert the file, either through the menu entry File | Revert File or through the command File: Revert (open the command palette by pressing Ctrl+Shift+P and type revert).

To make it easier in the future, you can bind a shortcut to the revert command, for example F5, simply by adding an entry to your key bindings (Preferences | Key Bindings - User):

{
    "keys": ["f5"],
    "command": "revert"
}
5
  • 23
    "revert"?! Uggh. I thought that did something else. Thanks!
    – Wes Alvaro
    Apr 1, 2015 at 2:32
  • Reverting causes the file to go blank :( Sublime build 3114. Jul 28, 2016 at 11:47
  • Right answer, but this keybind is unwise a bit
    – Apeiron
    Sep 26, 2016 at 9:50
  • 2
    @Apeiron why do you say the keybind is unwise? Feb 17, 2017 at 18:56
  • this does not reload files loaded via FTPS
    – snh_nl
    Mar 29, 2020 at 9:37
9

Although there is an accepted answer, it requires that we have to refresh manually everytime by pressing F5. Try this package Auto Refresh here. This automatically refreshes the file in x seconds which is configurable.

1
  • 1
    I'm guessing "automatic" was the original intention of the question though not explicitly stated.
    – Pete Alvin
    Mar 26, 2016 at 10:14
1

Though asked more than a year ago: you can also use "File->Reopen with encoding..." command. Note, all your changes made so far will be discarded while performing reload/revert

2
  • 1
    how can we do this to all files, not just individually, manually? and how can we make it do this right away, rather than having to trigger it manually after a merge or checkout?
    – ahnbizcad
    Nov 30, 2015 at 22:33
  • What's the point of making such a note. How do I open a door? Well, you open a door, but note the door will be open. Wow. Thanks.
    – poige
    Feb 2, 2018 at 10:56
0

In addition, I just realized that when switching from the search bar to the main editor panel, it refresh the view.

So ctrl+F then escape.

Not the best, but no configuration or clicking required. Also, I would expect it not to work if you have unsaved edition.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.