Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
doc
 
 
 
 
 
 

README.md

Vim Tmux Resizer

Resize tmux panes and vim splits with Alt + hjkl! Plays well with vim-tmux-navigator.

Installation

Tmux

Add the following lines to your .tmux.conf file

is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"'

bind -n M-h if-shell "$is_vim" "send-keys M-h" "resize-pane -L 10"
bind -n M-l if-shell "$is_vim" "send-keys M-l" "resize-pane -R 10"
bind -n M-k if-shell "$is_vim" "send-keys M-k" "resize-pane -U 5"
bind -n M-j if-shell "$is_vim" "send-keys M-j" "resize-pane -D 5"

Configuration

Custom bindings

If you'd prefer to use your own shortcuts instead of the alt keys and Vim movement, add the following to your .vimrc, changing mappings as needed!

let g:tmux_resizer_no_mappings = 1

nnoremap <silent> {Left-mapping} :TmuxResizeLeft<cr>
nnoremap <silent> {Down-Mapping} :TmuxResizeDown<cr>
nnoremap <silent> {Up-Mapping} :TmuxResizeUp<cr>
nnoremap <silent> {Right-Mapping} :TmuxResizeRight<cr>

About

Resize tmux panes and vim splits with same shortcuts

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.