Here is a snippet that I have now if someone needs something like this (no need to vote). It saves sessions under .session.xyz , which are also excluded from my Git project. I like to store them in the Git project folder so that they are backed up.
I like the confirmation of the echo, because when you press enter after saving the session, otherwise you do not see that something happened. This is just for feedback.
map <S-F5> :execute "source ".input("Load session: ", "~/Some/Project/.session.", "file")<cr> map <cs> :execute "mksession! ".input("Save session: ", "~/Some/Project/.session.", "file")\| :echo "Session saved."<CR>
File completion makes this very convenient, thanks!
user58777
source share