Way to alias tmux commands

tmux

tmux has a command mode that can be accessed via C-b : and I'm wondering if there is a way to alias commands in my .tmux.conf file like split-window to something I use more often like vsp in vim.

I know I can bind keyboard shortcuts with bind but can I alias commands as well?

Best Answer

tmux 2.4 adds the command-alias array option which does this, so for example you can do

:set -s command-alias[10] vsp='split-window -h'

And then you can use :vsp in the command-prompt just like you'd expect.

Related Topic