20230213-vim_as_a_terminal_multiplexer.txt
I recently (within the past week or so) was looking at some videos
about tricks for vim[0]. In it there was a tutorial on opening a
terminal window inside of vim. Now on the surface, that's not a big
deal. Lots of temporary terminals can interrupt CLI/TUI programs. But
this isn't an interruption, but rather a shell inside of vim. And
that, my friends, is exploitable.

Basically you can use windows and tabs to essentially create a tmux
session in vim, but without needing tmux to control it. There are a
few caveats, though: vim, as far as I know, doesn't have a status bar
like tmux does, so my custom status script won't be running in the
background like it does in tmux. Not a huge loss. The other major
thing is that it lacks some more advanced features like command view
or precise window handling/selecting like tmux. As I don't really use
those features, it's not really a negative for me. The big perk is
being able to take a "screenshot" (text dump) of a program, which is
lacking in tmux, at least without an add-on.

^W = enter window management mode
^W N = enter normal mode (edit the current screen in vim)
^W i = enter insert mode (regular operation in non-vim program)
^W gt = go to next tab
^W w = go to next window
^W [hjkl] = go to window in the HJKL direction
^W : = enter the command(?) for vim

0. https://yewtu.be/S6lK0437hQM