tmux status bar configuration

The man page has very detailed descriptions of all of the various options (the status bar is highly configurable). Your best bet is to read through man tmux and pay particular attention to those options that begin with status-. So, for example, status-bg red would set the background colour of the bar. The three components … Read more

TMUX using HJKL to navigate panes

You can do this as follows: bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R Note that mode-keys refers to using vi-like navigation within a buffer and status-keys refers to using vi-like editing within the status bar, but neither refers to switching between panes.

Fix Vim + Tmux yank/paste on unnamed register

From the error message (Nothing in register *), it appears that when you do a plain? p, your instance of Vim is using the * register instead of the unnamed register*. This is probably because your clipboard option includes the value unnamed. When configured this way, Vim will use the * register instead of the unnamed register … Read more

tmux send-keys syntax

The key names used by send-keys are the same ones that bind-key uses. From the Key Bindings section of the tmux manpage: When specifying keys, most represent themselves (for example ‘A’ to ‘Z’). Ctrl keys may be prefixed with ‘C-’ or ‘^’, and Alt (meta) with ‘M-’. In addition, the following special key names are … Read more

How to automatically rename tmux windows to the current directory

With tmux 2.3+, the b: format modifier shows the “basename” (or “tail”) of a path. set-option -g status-interval 5 set-option -g automatic-rename on set-option -g automatic-rename-format ‘#{b:pane_current_path}’ The FORMATS section of man tmux describes other modifiers, such as #{d:} and even #{s/foo/bar/:}. With tmux 2.2 or older, the basename shell command can be used instead. … Read more

How to copy and paste between different tmux panes running vim instances

Sorry, I’m trying to convince you to use vim built-in features. To make the copy/paste easy, you can open files in another Tabpages: :tabe /path/to/another/file Use gt or gT to switch Tabpages. Or split the window to edit another file: :sp /path/to/another/file Use Ctrl-ww to switch Windows. To split the window vertically, please use :vsp … Read more