Vim - sessionman.vim session recovery
In my vimrc, I have a configuration:
" Sessionman set viminfo='100,<500,s10,h,! autocmd VimEnter * SessionOpenLast let sessionman_save_on_exit = 1 But when I try to open the file
vim some_file.rb This is the opening of the last shortcut, but I would like to open some_file.rb with this command. How to change this configuration?
In accordance with the provided configuration fragment, the last open session is restored unconditionally. To load a session only if it is not the files supplied as command line arguments, check the number of arguments using the argc() function. Therefore, consider the following change in an auto-command.
:autocmd VimEnter * if argc() == 0 | SessionOpenLast | endif