Skip to content

Instantly share code, notes, and snippets.

@hgrimelid
Last active January 18, 2021 18:14
Show Gist options
  • Save hgrimelid/008da331bcd7c12351826d9f8558c0e5 to your computer and use it in GitHub Desktop.
Save hgrimelid/008da331bcd7c12351826d9f8558c0e5 to your computer and use it in GitHub Desktop.
My tmux configuration and key bindings
# Requires Fish
# Rebind prefix key to C-a
unbind C-b
set -g prefix C-a
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# Set shell
set-option -g default-shell "/usr/local/bin/fish"
# start window numbering at 1 for easier switching
set -g base-index 1
# colors
set -g default-terminal "screen-256color"
# status bar config
set -g status-left "#h:[#S]"
set -g status-left-length 50
set -g status-right-length 50
set -g status-right "%H:%M %d.%m.%Y"
setw -g window-status-current-format "|#I:#W|"
set-window-option -g automatic-rename off
# listen to alerts from all windows
set -g bell-action any
# rebind pane tiling
bind V split-window -h
bind H split-window
# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
# screen like window toggling
bind Tab last-window
bind Escape copy-mode
# Use vim keybindings in copy mode
setw -g mode-keys vi

Tmux key bindings and commands

Based on my configuration

Splits

Split horizontally C-a H

Split vertically C-a V

Navigate split with C-a and arrows.

Detach

tmux detach or

C-a d

List

tmux list-sessions

Attach

tmux attach -t 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment