- yanking/cutting and pasting between the two displayed buffers in the panes.
- being able to quickly swap one pane to show a different file, then swap back to that same file again (or do it with the right pane)
- being able to horizontally split either vertical pane, ie you can tile the panes exactly how you like very fast.
:mouse=a
and now you can drag the split around
- showing differences between to versions you have open
:windo diffthis
highlights them - can't really do it at all with tmux
- Having the whole thing inside a screen session you can resume it from where you left off over ssh remotely later.
- Saving it as a vim session if you want to power the box down and resume from where you were, with precisely those splits and buffers open scrolled to what you see now.
- Backgrounding the whole thing to do something else quickly.
Yeah, there's a few, I doubt that list is exhaustive and doing things that way means some other trade offs. Whether these advantages are actually things you want is a different question that only you + experimentation can answer..?
I see lots of discussion about using tmux and vim together. Most of the articles are more about configuring each instead of how that persons workflow. I get stuck on this problem; where to draw the line between tmux splits and vim splits (and by extension window management).
When do you do use tmux for splitting versus vim? What are your key bindings for creating, resizing, and navigating each?
Personally, I drop back to the shell constantly so I tend to launch a lot of separate vims. The only time I use vim splits are if it explicitly occurs to me or if I'm using vimdiff. This means I have a lot of problems copy/pasting or end up opening the same file in multiple vim sessions (but different tmux panes/windows).
Oh yeah, it's not a problem or conflict. Many of the examples people give tend to remap similar or the same keys for splitting in vim and tmux or navigating between splits (alt or ctrl + hjkl for navigating them).
I'm looking for more of a mental model or workflow of when to use vimsplits over tmux splits and how to navigate. I generally avoid vimsplits because I haven't found a good workflow to use both and my muscle memory gets messed up when I mix them.
- being able to quickly swap one pane to show a different file, then swap back to that same file again (or do it with the right pane)
- being able to horizontally split either vertical pane, ie you can tile the panes exactly how you like very fast.
:mouse=a
and now you can drag the split around
- showing differences between to versions you have open
:windo diffthis
highlights them - can't really do it at all with tmux
- Having the whole thing inside a screen session you can resume it from where you left off over ssh remotely later.
- Saving it as a vim session if you want to power the box down and resume from where you were, with precisely those splits and buffers open scrolled to what you see now.
- Backgrounding the whole thing to do something else quickly.
Yeah, there's a few, I doubt that list is exhaustive and doing things that way means some other trade offs. Whether these advantages are actually things you want is a different question that only you + experimentation can answer..?