Skip to content

Instantly share code, notes, and snippets.

@helloravi
Created March 19, 2016 01:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save helloravi/56720bb393d9cc7c9b9a to your computer and use it in GitHub Desktop.
Save helloravi/56720bb393d9cc7c9b9a to your computer and use it in GitHub Desktop.
Tmux Configuration
#Changes prefix to Ctrl-a from Ctrl-b
set -g prefix C-a
unbind C-b
#Sets delay to 1sec? when sending commands
set -sg escape-time 1
#Sets first window number as 1 instead of 0
set -g base-index 1
#Sets first pane number as 1 instead of 0
setw -g pane-base-index 1
#Set command for relaoding tmux.conf whenever it is changed
bind r source-file ~/.tmux.conf \; display "Reloaded!"
#Sends the C-a to other application running within tmux terminal
bind C-a send-prefix
#Split window horizantally shortcut
bind | split-window -h
#Split window vertically shortcut
bind - split-window -v
#Remaps movement keys
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
#keys for cycling through windows
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
#Shortcut for resizing windows
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
#Restricts us from using mouse
setw -g mode-mouse on
#Display thing sin 256 colors
set -g default-terminal "screen-256color"
#### Begin Setting colors ###
#Status bar colors
set -g status-fg white
set -g status-bg black
setw -g window-status-fg cyan
setw -g window-status-bg default
setw -g window-status-attr dim
setw -g window-status-current-fg white
setw -g window-status-current-bg red
setw -g window-status-current-attr bright
set -g pane-border-fg green
set -g pane-border-bg black
set -g pane-active-border-fg white
set -g pane-active-border-bg yellow
set -g message-fg white
set -g message-bg black
set -g message-attr bright
#Configuring status bar items
set -g status-interval 2
set -g status-left-length 60
set -g status-left "#[fg=green]#S #[fg=yellow]#I #[fg=cyan]#P #[fg=green,bg=black]#(tmux-mem-cpu-load --colors --interval 2)#[default]"
set -g status-right "#[fg=cyan]%d %b %R"
#UTF-8 support for status bar
set -g status-utf8 on
#Keeping Status Bar Info Up to Date
set -g status-interval 60
#Centering the window list
set -g status-justify centre
#Identifying Activity in other windows
setw -g monitor-activity on
set -g visual-activity on
#To make sure communication between vim and tmux to be smooth - also fix NERDTreeToggle issue
set-window-option -g utf8 on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment