Skip to content

Instantly share code, notes, and snippets.

@olegkovalenko
Created December 8, 2015 10:48
Show Gist options
  • Save olegkovalenko/424f6ade381dd07fbb6e to your computer and use it in GitHub Desktop.
Save olegkovalenko/424f6ade381dd07fbb6e to your computer and use it in GitHub Desktop.
short tmux conf
bind s split-window -v -c "#{pane_current_path}"
bind v split-window -h -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind < resize-pane -L 1
bind > resize-pane -R 1
bind - resize-pane -D 1
bind + resize-pane -U 1
bind : command-prompt
setw -g mode-keys vi
set -g prefix C-j
unbind C-a
bind-key C-j send-prefix
set -sg escape-time 1
set -g base-index 1
setw -g pane-base-index 1
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
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
set -g default-terminal "screen-256color"
set -g status-fg white # colour232 # colour152 # white
set -g status-bg colour8 # colour158 # 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 black # white
setw -g window-status-current-bg cyan # red
setw -g window-status-current-attr bright
set -g pane-border-fg cyan # green
set -g pane-border-bg black # black
set -g pane-active-border-fg cyan # white
set -g pane-active-border-bg cyan # yellow
set -g message-fg white
set -g message-bg black
set -g message-attr bright
set -g status-left "#[fg=green]#S"
set -g status-right "#[fg=white]\"#h\" %H:%M %Y-%m-%d"
set -g utf8 on
set-window-option -g utf8 on
set -g status-utf8 on
set -g status-justify centre
setw -g monitor-activity on
set -g visual-activity on
unbind g
bind g choose-session
unbind p
bind-key -r 'p' select-window -t:-
unbind n
bind-key -r 'n' select-window -t:+
bind -t vi-copy 'a' begin-selection
bind -t vi-copy 's' copy-selection
bind 'I' run "tmux save-buffer - | xclip -i"
bind 'C' run "tmux save-buffer - | xclip -i -sel clipboard"
bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
unbind O
bind O new-window -d -n tmp \; swap-pane -s tmp.1 \; select-window -t tmp
unbind o
bind o last-window \; swap-pane -s tmp.1 \; kill-window -t tmp
bind -r ( switch-client -p
bind -r ) switch-client -n
set -g set-titles on
set -g set-titles-string '#S:#I.#P #W | #T'
bind c new-window -c "#{pane_current_path}" # for 1.9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment