Can I steal a vim session from another terminal?
I forgot to start screen
before I started working, and now I've SSH'd into my machine from my laptop. ps -a
gives me the process ID of the vim process. Can I steal the vim session from my other terminal and attach it to my ssh session?
The reptyr program would allow you to do that.
You could save the vim session using :mksession ~/session.vim
, and reload it in screen using vim -S ~/session.vim
.
:mksession
essentially saves the current vim session as a file that you can pass around between terminals, or re-open once you have shut your computer down, etc.