The solution here is to simply ignore the VimEnter autocommand when started with a session file, since starting with an existing session is functionally equivalent to having started with a specific file to edit (when argc() > 0).
A possible alternative solution would be to listen for the SessionLoadPost autocommand and do something like set g:projectionist_vim_enter = 0, but this solution is shorter and more straightforward.
This is my proposed fix for https://github.com/tpope/vim-projectionist/issues/185.
The solution here is to simply ignore the
VimEnter
autocommand when started with a session file, since starting with an existing session is functionally equivalent to having started with a specific file to edit (whenargc() > 0
).A possible alternative solution would be to listen for the
SessionLoadPost
autocommand and do something like setg:projectionist_vim_enter = 0
, but this solution is shorter and more straightforward.