I'm trying to follow the 80 column rule when writing my code, my current tmux setup is split 50/50 horizontally. I like to have vim in the left-hand pane, and in the right-hand pane I have a 75/25 split where I run other things.
On my side monitor 50% is 76 columns wide, but on my laptop's display it's 123 column wide.
I'd like to maximize real-estate for other commands, Is there a way to set this to exactly 80 columns (or so) when I launch my workspace?
I'm currently setting up my workspace with:
bind C-w source-file ~/dotfiles/scripts/tmux_work_layout
that file contains:
selectp -t 0 # Select pane 0
splitw -h -p 50 # Split pane 0 vertically by 50%
selectp -t 1 # Select pane 1
splitw -v -p 25 # Split pane 1 horizontally by 25%
selectp -t 0 # Select pane 0
Best Answer
Is it something like this you want?
Add to file and make executable by
chmod +x filename
. call by e.g.To run it from sourced file:
Code:
One also have to take into account e.g. line-numbers in vim so perhaps 85?
Edit perhaps a bit nicer (not so much clutter) (after
pw0_cur_w=$(tm ...