fotNelton
fotNelton

Reputation: 3894

Prevent vim 8 from re-opening previously edited files upon restart

Browsing the documentation for vim 8 I wasn't able to find a way to turn off the (new ?) behaviour that it would re-open all (or some?) files that were open during last session.

Note that I haven't saved anything using e.g. mksession, vim's behaviour just seems to have changed starting with v8. Does anybody know how to get rid of this feature?

Upvotes: 1

Views: 56

Answers (1)

fotNelton
fotNelton

Reputation: 3894

@romainl's comment helped me find that this really is due to some lines that I've had in my configuration for quite some time, however the previous versions of vim which I've used appear to have been compiled without +viminfo support, which is why I haven't experienced this behaviour before.

As a reminder: viminfo can be used in order to save and restore things like open buffers, search expression, etc. between vim sessions. This works apart from manual session management via e.g. mksession.

Upvotes: 1

Related Questions