Created
November 6, 2017 14:20
-
-
Save tomeara/4c8462c6e09a19a2f259d80312134c28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Terminal colors | |
set -g default-terminal "xterm-256color" | |
# Fixes the problem with Vim/Tmux rendering | |
set-window-option -g utf8 on | |
# Set new binding | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
# Change delay | |
set -sg escape-time 1 | |
# Window/Pane index | |
set -g base-index 1 | |
setw -g pane-base-index 1 | |
# Allow mouse input when available | |
#setw -g mode-mouse on | |
#set -g mouse-select-pane on | |
#set -g mouse-resize-pane on | |
#set -g mouse-window-window on | |
# Splitting panes | |
bind v split-window -h | |
bind s split-window -v | |
bind t split-window -p 15 | |
bind T split-window -h -p 30 | |
# moving between panes | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
bind a last-window | |
# Quick pane selection | |
bind -r C-h select-window -t :- | |
bind -r C-l select-window -t :+ | |
# Pane resizing | |
bind -r H resize-pane -L 2 | |
bind -r J resize-pane -D 2 | |
bind -r K resize-pane -U 2 | |
bind -r L resize-pane -R 2 | |
# enable activity alerts | |
setw -g monitor-activity on | |
set -g visual-activity on | |
# set the status line's colors | |
set -g status-fg white | |
set -g status-bg black | |
# set the color of the window list | |
setw -g window-status-fg cyan | |
setw -g window-status-bg default | |
setw -g window-status-attr dim | |
# set colors for the active window | |
setw -g window-status-current-fg white | |
setw -g window-status-current-bg red | |
setw -g window-status-current-attr bright | |
# Command / message line colors | |
set -g message-fg white | |
set -g message-bg black | |
set -g message-attr bright | |
# Status line left side | |
set -g status-left-length 8 | |
set -g status-left "#[fg=green]S:#S" | |
#utf8 | |
set -g status-utf8 on | |
# Update the status bar every sixty seconds | |
set -g status-interval 60 | |
# Center the window list | |
set -g status-justify centre | |
# enable vi keys. | |
setw -g mode-keys vi | |
# Setup 'v' to begin selection as in Vim | |
bind-key -t vi-copy v begin-selection | |
# smart pane switching with awareness of vim splits | |
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"' | |
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" | |
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" | |
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" | |
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" | |
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment