Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# basic configs #
setw -g mode-keys vi
set -g default-terminal "xterm-256color"
set -g history-limit 10000
# C-a is escape sequence #
unbind C-b
set -g prefix C-a
bind C-a last-window
bind a send-prefix
# Open new window to pane's current path
unbind c
bind c new-window -c "#{pane_current_path}"
# copy should work more like vim
unbind [
bind Tab copy-mode
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
unbind P
bind P paste-buffer
# easier window split
unbind %
unbind '"'
bind \ split-window -h -c "#{pane_current_path}" # Split panes horizontal
bind - split-window -v -c "#{pane_current_path}" # Split panes vertically
# set window title
unbind '$'
bind A command-prompt "rename-window %%"
# open man page with /
bind / command-prompt "split-window -h 'exec man %%'"
# increase time to diplay pane numbers
set -g display-panes-time 3000
# better highlight of current window
set -g status-bg colour4
set -g status-fg colour11
set -g status-left-fg colour11
set -g status-right-fg colour11
setw -g window-status-current-bg colour11
setw -g window-status-current-fg colour4
set -g set-titles on
set -g set-titles-string '[#S:#I #H] #W'
# switch panes using Alt-arrow without prefix
#bind -n A-y select-pane -L
#bind -n A-l select-pane -R
#bind -n A-k select-pane -U
#bind -n A-j select-pane -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.