I use gVim on windows and save my current working files to session. However, when openning old session, it did not load files from other folder except home folder ~ (where I store my _vimrc file). My _vimrc setting is as below:

autocmd! VimLeave * mks! 
autocmd! VimEnter * if argc() == 0 | source ~/Session.vim | endif

File ~/test.txt was loaded but file C:\Users\VPG1HC\Desktop\project notes\test.txt was not loaded (it's empty). All the files are in current session. When I checked buffer, it's there but the content was empty. I opened with notepadd++ or reopened the file with Vim, then the content was loaded.

  • is that file in the session? Sep 28, 2020 at 11:05
  • Don't you want to try vim-ctrlspace plugin?
    – eyal karni
    Sep 28, 2020 at 17:56
  • Have you checked :buffers?
    – eyal karni
    Sep 28, 2020 at 17:57
  • 1
    OP, Welcome to Vi and Vim! If you can edit to add more details, such as those asked of you in the comments, that will help get your question answered (I hope)!
    – D. Ben Knoble
    Sep 28, 2020 at 18:26
  • 1
    @eyalkarni this question is about (windows) gvim, and not neovim. So mentioning the 'shada' option is just confusing. Sep 29, 2020 at 5:50


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.