eTechtips

Tech Tips and Insights

VI: Reload Current file

When I am editing and having a “clumsy fingers” day, I find that I have to reload the file that I am editing from disk repeatedly. I usually just do a quick “:q!” and re-run the vi command that opened the file. But there is a better way!

Use the :edit command:

:edit

Or you can shorten it to

:e

Now if you have typed in the window you are editing and want to reload from disk anyway without saving, remember to add the exclamation point(!) to the command.

:edit!

or

:e!

Loading

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.