Skip to content

Instantly share code, notes, and snippets.

@mizchi
Created March 16, 2016 08:38
Show Gist options
  • Save mizchi/2bfc987409ec873a6e29 to your computer and use it in GitHub Desktop.
Save mizchi/2bfc987409ec873a6e29 to your computer and use it in GitHub Desktop.
set-option -g prefix C-t
set -g status-left-length 16
set -g status-right-length 50
set -g status-bg black
set -g status-fg white
set -g message-attr bold
set -g message-fg white
set -g message-bg red
set -g pane-active-border-fg cyan
set -g pane-active-border-bg black
setw -g window-status-current-fg blue
set-window-option -g mode-bg white
set-window-option -g mode-fg black
set-window-option -g window-status-fg white
set-window-option -g window-status-bg black
set-window-option -g window-status-current-bg black
set-window-option -g window-status-current-fg green
# Option
set-window-option -g utf8 on
set-window-option -g mode-keys vi
set-window-option -g automatic-rename on
set-option -g mouse-select-pane on
setw -g mode-mouse on
set-option -g base-index 0
set-option -g default-command "reattach-to-user-namespace -l fish"
# set-option -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL || $SHELL"
# KeyBindings
unbind l
unbind ^C
bind t next-window
bind C-t last-pane
bind -r C-l next-layout
bind 'c' neww -c "#{pane_current_path}"
bind s split-window -vc "#{pane_current_path}"
bind v split-window -hc "#{pane_current_path}"
bind C-s split-window -v
bind C-v split-window -h
bind -r C-h resize-pane -L 3
bind -r C-l resize-pane -R 3
bind -r C-j resize-pane -D 3
bind -r C-k resize-pane -U 3
bind -r s swap-pane -U
bind k kill-pane
bind K kill-window
bind i display-panes
bind y copy-mode
unbind ^"["
bind -r ^"[" copy-mode
unbind ^]
bind -r ^] paste-buffer
bind -t vi-copy v begin-selection
bind -t vi-copy y copy-selection
set-option -g default-terminal screen-256color
set-window-option -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on
set-window-option -g utf8 on
set-option -g status-position top
set-window-option -g window-status-current-format "#[fg=colour235, bg=colour27]⮀#[fg=colour255, bg=colour27] #I ⮁ #W #[fg=colour27, bg=colour235]⮀"
set-option -g renumber-windows on
# Setup 'v' to begin selection as in Vim
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment