Skip to content

How to always autosave to default session instead of the current one? #79

@cirosantilli

Description

@cirosantilli

I would like the default session to always contain the last buffers I was in, even if I have already saved another session before exiting.

A similar effect is possible with default_to_last 1 + autosave 'yes' + autoload 'yes', but the problem is that this saves on the current session, not on the default one, and when I close vim I often have many buffers which are only used for the moment, and I don't want them to be part to my last manually saved session which I will use many times.

I have tried:

let g:session_autosave = 'no'
let g:session_autoload = 'yes'
autocmd VimLeave * SaveSession default

but for some reason it generates a lock on the default session, and load fails at the next startup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions