V
V
Valery Sotnikov2017-03-23 17:55:30
vim
Valery Sotnikov, 2017-03-23 17:55:30

How to save "unsaved buffer changes" in Vim on exit?

Hello!
I want to exit Vim with NOT saved buffers and have it restore all the changes I made the next time I log in.
For example:
- opened a file vi ~/.vimrc
- made edits, but did not save
- then opened a new buffer enewand wrote something there
- then closed Vim without saving changes to files (the first question is “ how to do this? ”)
- after a while I open Vim and I continue to edit the same buffers (the second question is “ how is this? ”)
I want to achieve the same behavior when closing and opening, as in Sublime Text, where tabs are saved and changes without saving, too.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question