This is the best feature of tmux. It's worth pointing out here though (in a post about making the terminal act like an IDE), that you can split the terminal into two panes so you can have an editor and a REPL open at the same time similar to many IDE's. There are even some projects that make it easy to pass code between the editor and the REPL in the other pane, though I have never gotten them to work very well.
Re:Using Vim as a Python IDE
by groovy2shoes on Wednesday February 01, 2017 @02:35AM
(#13539055)
vim (and emacs) can do that without the need for a terminal multiplexer (though in vim you need to use a "plugin" for it, or, at least, you used to, and I'm sure the new async functionality in vim 8 has improved the experience quite a bit)
this x 1000
tl;dr, use tmux if you ssh into places and hate restarting after losing your connection.
Not to mention you can share your command line shell session/screen with other people!!