nvim-terminal icon indicating copy to clipboard operation
nvim-terminal copied to clipboard

Reuse same terminal after nvim restart

Open PSeitz opened this issue 3 years ago • 2 comments
trafficstars

When I leave the terminal open and quit nvim with :qa and restart nvim. I got the same terminal, but the default toggle binds to a new terminal, so it will open two terminals. It would be nice to have the defaul toggle reattach to the same terminal.

abc

PSeitz avatar Sep 12 '22 06:09 PSeitz

I believe you are using some kind of a session management plugin. I don't think there is a way to do that outside the session plugin you are using. Although in order to make that possible, I may have to make some changes to the APIs.

What is the session management plugin you are using?

s1n7ax avatar Oct 13 '22 10:10 s1n7ax

I use two plugins, but I think this is about the buffers setting in combinations with nvims mksession command. So it restores the buffer with the terminal, but nvim-terminal creates a new terminal after a restart.

" Session handling
Plug 'tpope/vim-obsession'
Plug 'dhruvasagar/vim-prosession'
...
set sessionoptions=buffers,curdir,tabpages,winsize

PSeitz avatar Oct 13 '22 12:10 PSeitz