mhinz / vim-startify

:link: The fancy start screen for Vim.
MIT License
5.3k stars 186 forks source link

"g:startify_session_dir" wrong default value for Vim/Windows #397

Closed EtiamNullam closed 4 years ago

EtiamNullam commented 4 years ago

According to :help g:startify_session_dir it should default to: $HOME/vimfiles/session for Vim/Windows, but it actually is $HOME/.vim/session

EtiamNullam commented 4 years ago

Actually I'm not sure if g:startify_session_dir should be responsible for it but a file default.vim gets created at ~/.vim/sessions whenever I close vim without custom session saved, :SSave saves in a proper ~/vimfiles/session.

mhinz commented 4 years ago

Disclaimer first: I don't have a Windows for testing at the moment.

The default path is set only once when Startify gets sourced, so when :SS is working as intended, it's a bit weird when ~/.vim/session gets created anyway. Honestly, I don't think Startify is the issue here.

Do you have any other session plugins? If so, disable them during testing. When you use :SS, the internal Vim variable v:this_session gets set to that path. Before using :SS, and without any other session plugin, v:this_session is usually empty.

EtiamNullam commented 4 years ago

Weird.

==============

I narrowed it down to coc.nvim - it creates that session file even without startify, thanks for your time!

mhinz commented 4 years ago

Yeah, I'm guessing that CoC creates the default.vim session file on its own unless v:this_session is set. At least that would explain all 4 points.

Just create another issue with them. It's probably easy to fix. :)