is a microblog
home archives search feed blogroll

Early tmux Config

I only recently started to use tmux. This is my current configuration. Maybe you’ll learn something new. If nothing else, this is a good reference for future me that lost all his dotfiles (again).

Mouse support

set -g mouse on

Enables mouse support in tmux. It allows you to select a pane by clicking and resize panes by dragging.

Re-define escape time

set -g escape-time 0

If you use the escape key in Vim to go to normal mode from insert mode, there will be a delay caused by tmux. This fixes the issue.

Re-bind C-b to C-a

unbind C-b
set -g prefix C-a

C-b is an annoying shortcut. C-a is easier to me. Especially because my Caps Lock key acts as a Ctrl key.

Re-bind pane navigation with Vim movement keys

bind 'h' select-pane -L
bind 'j' select-pane -D
bind 'k' select-pane -U
bind 'l' select-pane -R

This one is straightforward. I don’t usually have my right hand near the arrow keys. It’s usually on the home row. This is easier for me.

There is a vi mode in tmux that you can enable with the following command. I have not tried it yet.

set-window-option -g mode-keys vi

Reload config

You can reload your tmux config with the following command.

tmux source-file ~/.tmux.conf
Posted on 2018-04-07

← Next post    ·    Previous post →