9

I am using GEDIT and I would like to have a shortcut key that allows me to tell GEDIT (on Ubuntu) to force reloading from file system the currently opened file.

How can I do that?

2
  • 1
    Actually, gedit will not automatically reload file if the file is located in network (sharing file). In my case, the file is share on MS-OS machine, accessed through smb connection. In this situation, reload or refresh button will be usefull, to tell gedit to reopen the file with single click, without the need to click file, click close and than click the name of the file in history (three times click). The drawback is, during the work, reload/refresh button can be accidentally clicked, destroying un-save work. Perhaps, additional prompt, "are you sure" can prevent that.
    – user115723
    Jan 28, 2012 at 14:45
  • gedit already promts if there are any unsaved changes before reloading. This is really annoying and i have to resort to ctrl+w, ctrl+shift+t.
    – Dan M.
    Jul 27, 2021 at 16:52

4 Answers 4

5

Not forced reloading, but revert to last saved version. File/Revert.

The keystroke combination is Alt - R, R, Alt - R.

1
  • Hm, doesn't work for me on CentOS 7.
    – Dan M.
    Jul 27, 2021 at 16:48
4

This functionality is not yet present in Gedit, but it's on the Requested plugins list

6
  • 3
    any updates on this?
    – a06e
    Oct 9, 2014 at 23:48
  • 2
    Any update on this?
    – Tim
    Apr 2, 2015 at 17:46
  • 2
    Any updates on this?
    – kame
    Oct 23, 2016 at 16:18
  • 1
    Any updates on this?
    – Dan M.
    Jul 27, 2021 at 16:49
  • 1
    I guess, here it is.
    – ENIAC
    Jul 25, 2022 at 16:57
0

What are you trying to accomplish? If an external program touches the file, gedit will already notice that and offers to reload the file. This is the case at least with Ubuntu 10.04 LTS.

If you want to undo all the changes instead, the already mentioned File->Revert gives you the latest saved version.

2
  • 4
    I assume he's annoyed about having to aim-and-click the "Reload" button in the GUI, and would rather use a keyboard shortcut for doing that action. It currently takes 7 tabs or 2 shift-tabs and an enter to switch to the correct button - a direct shortcut would be much more comfortable. Jul 29, 2010 at 16:46
  • 1
    On my machine, gedit will not automatically notice. If you switch to a different open document, and then back, only then will it pop up to reload it. Jun 22, 2015 at 21:54
-1

Try this for gedit 3.8+: https://github.com/raelgc/gedit-restore-tabs, said by author:

Upon starting Gedit, this plugin will try restore all open documents from the last Gedit window that was closed.

1
  • 1
    Please read the question again carefully. Your answer does not answer the original question. He wants to force reload the current file from disk. Nothing to do with restoring open documents or restarting gedit.
    – DavidPostill
    Jul 13, 2016 at 9:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .