I have configured Byobu to open a dozen text files at startup:
new-session -n memo /home/nico/bin/vim-my-memo.sh; new-window -n client1 /home/nico/bin/vim-client1.sh; [...]
It works well, but closing all vim sessions whenever I need to shut down my computer would take too much time, so I close the whole Byobu by clicking on the red X button at the upper left.
PROBLEM: When I reopen Byobu, all vim sessions are showing:
E325: ATTENTION Found a swap file by the name "~/.memo.txt.swp" owned by: nico dated: Fri Jul 17 21:18:38 2015 file name: ~nico/memo.txt modified: no user name: nico host name: nico process ID: 21813 (still running) While opening file "/home/nico/memo.txt" dated: Fri Jul 17 21:08:32 2015 (1) Another program may be editing the same file. If this is the case, be careful not to end up with two different instances of the same file when making changes. Quit, or continue with caution. (2) An edit session for this file crashed. If this is the case, use ":recover" or "vim -r /home/nico/memo.txt" to recover the changes (see ":help recovery"). If you did this already, delete the swap file "/home/nico/.memo.txt. swp" to avoid this message. Swap file "~/d/n/.memo.txt.swp" already exists! [O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort:
QUESTION: How to avoid this?
Maybe Byobu could somehow send a kill signal to vim to make it exit properly?
Or maybe all that's needed is some vim configuration/trick?