xolox / vim-session

Extended session management for Vim (:mksession on steroids)
http://peterodding.com/code/vim/session/
961 stars 80 forks source link

Request: Default session name should use the path/file that vim was started on #157

Open dylan-chong opened 7 years ago

dylan-chong commented 7 years ago

to achieve this behaviour:

cd my-project
nvim .
# do some stuff
:qa
nvim .
# session seamlessly restored
tombeynon commented 7 years ago

I've achieved this using the following config - it sets the default session name to the current working directory name, and prompts to load it when you re-open vim from that directory.

let g:session_autoload = 'prompt'
let g:session_default_name = fnamemodify(getcwd(), ':t')