Ubuntu: Vim mksession not saving split windows


I'm trying to save a Vim session that contains 2 panels in a vertically split layout.

I have tried using mksession and also the vim-session plugin, but whenever I reload a session, the split window is gone and I just get the panel that was selected when I saved the session. I have seen videos of other people doing the exact same process, and their split window configuration reappears.

How can I get the session to save and reload with my split window layout?


Take a look at this question and answer.

To save your session including the buffers that were open at the time use this command :mksession ~/mysession.vim.

To restore/reload your session use :source ~/mysession.vim if vim is already open, this will restore the window splits and files.

To restore/reload your session if vim is not open, open vim and restore your session using this command from the terminal $ vim -S ~/mysession.vim.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »