Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to alias tmux commands?

Tags:

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?

like image 853
Jeff Wu Avatar asked Aug 07 '13 23:08

Jeff Wu


1 Answers

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.

like image 147
Paul Fenney Avatar answered Oct 13 '22 20:10

Paul Fenney