Reputation: 3
In Vim
:w
saves the document document1
:wq
or :x
quits the document document1
after saving
wq!
quits the document document1
without saving
:sav document2
or :w
+ :e document2
saves the document document1
and opens the document document2
What I want is that I want to open a a new document document2
without saving the document document1
, and I want to do so using a single command.
Is it possible?
Upvotes: 0
Views: 25
Reputation: 247210
You want
:e! document2
to edit document2, discarding all changes to the current buffer.
Upvotes: 1