0

If I already have vim running with numerous documents open and I want to use tmux, it seems that I have to quit vim, start the tmux session and then reopen everything again.

Is there anyway to start the new tmux session with the vim open inside of it?

  • 2
    I would be enclined to close this question because it is "how can I start a new tmux session with my current shell" which is not specific to vim (the answer would be the same if you wanted to start tmux with your current instace of emacs or htop). However a workaround would be to use the client-server feature of Vim which makes the question borderline on topic I guess. – statox Mar 7 at 15:26
  • 3
    Just an idea: Create a session file Session.vim by executing :mksession. Then exit Vim and start your tmux session. Start Vim again without args and execute :source Session.vim. : – Ralf Mar 7 at 15:45
  • 1
    Should be exported to unix.stackexchange.com... by the way @Ralf's answer should be a good hack. – klaus Mar 7 at 16:18
  • 1
    perhaps reptyr can be of help – Christian Brabandt Mar 7 at 16:32
  • @Ralf or use vim -S – D. Ben Knoble Mar 8 at 6:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.