7

As an academic, I often have to conduct "numerical experiments" by running a small computer program that outputs to a text file. I use TextEdit to read the text file. However, when I re-run the program, and the contents of the text file changes, I find that the contents in TextEdit do not automatically update to the new version. In order to access the new version, I need to close the existing TextEdit window, and open the file again in TextEdit.

Is there a way to refresh the file to the new version in TextEdit? For those of you who know about the program Vim, what I am looking for is like the command :e[dit] in Vim which allows one to

Edit the current file. This is useful to re-edit the current file, when it has been changed outside of Vim.

  • I do not use TextEdit, but BBEdit will definitely update when edited elsewhere. – Dave Nelson Dec 27 '13 at 4:39
  • 1
    Thank you for your comment. I decided to try TextWrangler (the free version of BBEdit) and it also auto-refreshes. – I Like to Code Dec 27 '13 at 19:49
8

There's a ugly way of doing it, as far as I know.

Once the file has been edited just try to save it. TextEdit will prompt you saying something like:

The document "Untitled.txt" couldn't be saved. Other application modified the file.

Giving you the choice to either Restore or Save anyway.

While Save anyway will keep your changes and save as a new version the changes made by the other application, Restore will update your file with these new changes.

Unless there's a specific reason to use TextEdit I'd recommend using any other text editor, such as TextMate, which supports the automatic refresh.

-3

Refresh current open file is refresh by using ALT+F and R

  • Isn't that a Windows set of keys? – Mark Jan 15 at 13:50

You must log in to answer this question.

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