Based on Mislav's gist, svenfuch's gist and vim-tmux-navigator.
My goal was to allow svenfuch's zoom feature to work in any direction. The original implementation relied on pane numbers, which works when you only split in one direction (either only horizontal or only vertical, but not both).
The logic is simple: use a panes width, height, x, and y along with the width width and height to determine if a pane is the top, bottom, leftmost, or rightmost pane. The reason I switched to ruby is that getting the panes x and y requires parsing the window_layout
string.
always cool to see people build on your stuff :) but after having used my own version i agree with @mislav that it sucks having it clutter the vim command history.