How do I open a file for editing without saving the modifications to
the current file? You can open a file for editing without saving the modifications to the current file and without losing the changes using one of the following methods:
:split
:new
You can also set the ‘hidden’ option and edit a new file:
:set hidden
:e
If you want to discard the changes made to the current file and load another file for editing, then you can use the following command:
:e!
Comments (1)
Pepsh Pepshinsky
Let’s see you to :help viminfo-file-name (option -i) :set viminfofile=NONE