At my previous employment I was forced to use a windows system.
Although not ideal, I was able to continue using my Linux terminal workflows by heavily utilizing Windows Subsystem for Linux.
As part of this I had to get comfortable with integrating tmux into my workflow as I didn't care to learn the Windows Terminal options for terminal multiplexing.
I don't need tmux quite as much anymore since my current employer allows me run Linux on my development machine, but I still use it when remoting into my work desktop via ssh.
Hopefully this can be of use in improving the efficiency of others that depend on terminal based workflows.
## tmux setup
As a note, all of the below settings should be added to your `~/.tmux.conf` if you are interested in using them.
### Some nice settings
I wanted to start out with some nice settings for tmux that I generally like.
First and foremost I remap the `send-prefix` key.
```tmux
unbind C-b
set -g prefix C-p
bind C-p send-prefix
```
I also rebind the pane splitting commands:
```tmux
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
```
And finally, I enable vim key binds in scrolling mode
```tmux
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi v send -X begin-selection
Here by integration, I mean seamlessly transitioning between tmux and neovim splits.
To do this we want tmux to figure out if the current tmux split contains a vim process (and potential vim splits).
We then can then bind the same motion keys in tmux and nvim so that we can seamlessly move from a tmux split into a vim split and back all using the same keys!
We can do this with the following code snippet in our `~/.tmux.conf`.