Reputation: 4148
I'm using tmux with tmuxinator to configure it. I always have different panes open, with two or more editor sessions open and other stuff. Every time I have to close the whole tmux session, because I'm turning off the computer, it takes time, because there are processes active in various tmux panes. So I have to manually quit every Vim instance, because if I just kill the pane containing it, then I will end up having vim swap files.
So, is there a way to quit the whole tmux session (not just detaching it) and automatically closing all the processes running in it?
Upvotes: 7
Views: 1634
Reputation: 516
Tmux Resurrect uses obsession.vim and it gives you the ability to save & restore Vim sessions on system reboot.
Upvotes: 2
Reputation:
Executing tmux kill-server
kills all the sessions, windows, panes and also all processes running in them. This is the way to completely quit everything related to currently running tmux.
The above will unfortunately not solve the issue with vim swap files - you will still get them.
I solve the swap-file issue by having the following line in .vimrc
:
set noswapfile
As you might guess, it disables swap files in vim. If you save files in vim regularly and you have a reliable computer, setting the above option might be perfectly acceptable.
Upvotes: 4