Vim vi how to reload a file your editing

5.8. How do I reload/re-edit the current file?

You can use the ":edit" command, without specifying a file name, to reload
the current file. If you have made modifications to the file, you can use
":edit!" to force the reload of the current file (you will lose your
modifications).

For more information, read

:help :edit
:help :edit!
:help 'confirm'


from - http://vimdoc.sourceforge.net/cgi-bin/vimfaq2html3.pl#5.8

Comments

Anonymous said…
awesome, thanks!
Mark McD said…
just what i was looking for, thanks!
Thanks for this - very helpful. Also, I use this to automatically reload files without asking me:
:set autoread

Rob
:)
ostlerc said…
Wow that is very useful! Everytime I learn something new in vim I wonder how I ever lived without it...
Manish said…
hey thanks yar.. was looking for this got it here.
phylae said…
Thanks. But you might want to change "your" to "you're."
mistik1 said…
6 years later and still very useful.
Thanks
Abhir said…
Extremely useful small tip.
Matsukubokkuri said…
useful! thanks.
thanks, help.
me_me_me said…
you are dammit
Japan Shah said…
Cool ! Hope it will remain the first result for "vim reload current file" search ! Thanks you've saved time of lots of vim users !

appreciated !
Anonymous said…
Indeed. This post is from 2005 and I'm learning this on 2013. Still useful. Thank you!
Anonymous said…
This comment has been removed by a blog administrator.
Anonymous said…
`e!` as for short :D
Unknown said…
I've discovered this is a workaround for a bug in Vim folding.
Unow22 said…
Ups and downs are parts of life. Everything was going well. You were partying; the job was good and hence, life was good. Suddenly, you have been called upon for a hair follicle drug test at your workplace. An article published in the Forensic Science International in 2005 made such a claim. The subject of this study was a woman who had stopped consuming cocaine after year-long drug abuse. Visit: https://www.urineworld.com/

Popular posts from this blog