In bash commandline, you can use vim shortcuts by setting set editing-mode vi in the ~/.inputrc file. I want to be able do the same when typing <prefix>:new to create a new window for example.

(In my ~/.tmux.conf file, i have set-window-option -g mode-keys vi, which does not achieve the above in the command mode.)

  • isn't this just <prefix>:neww as : is bound to the command prompt by default, and neww is an alias for new-window ?
    – thrig
    Dec 22, 2017 at 23:08

1 Answer 1


You just need to run the following tmux command:

set -g status-keys vi

Then after entering the command line (prefix-key + :) you can, for example, press Esc and move left and right with the H and L keys.

Many other things you are used to with Bash command-line editing are available, too. Esc then K to scroll back through your command history, for instance.

Note: If you're used to hitting Esc to exit the command-line try Ctrl+C instead.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .