emacs refresh F5 key

I use this little addition to my .emacs file to support reloading the current file I’m editing.

(defun refresh-file ()
  (interactive)
  (revert-buffer t t t)
  )

(global-set-key [f5] 'refresh-file)

You can also use CTRL-x CTRL-v to do a “Find alternative file” and choose the same file that you are currently editing. F5 is a little quicker though.

One Response to “emacs refresh F5 key”

  1. Ryan Says:

    Thanks, I like this little script!

Leave a Reply