Skip to content

Instantly share code, notes, and snippets.

@mgenov
Created July 10, 2017 15:17
Show Gist options
  • Save mgenov/7b978a33efc3bcf313b645aacfa948d1 to your computer and use it in GitHub Desktop.
Save mgenov/7b978a33efc3bcf313b645aacfa948d1 to your computer and use it in GitHub Desktop.
set-option -g prefix C-a
bind-key C-a last-window
# Start numbering at 1
set -g base-index 1
# Allows for faster key repetition
set -s escape-time 0
# Set status bar
set -g status-bg black
set -g status-fg white
set -g status-left ""
set -g status-right "#[fg=green]#H"
setw -g aggressive-resize on
set-window-option -g window-status-current-bg red
bind -n C-k send-keys -R \; send-keys C-l \; clear-history
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# Copy-paste integration
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Use vim keybindings in copy mode
setw -g mode-keys vi
# 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"
# Bind ']' to use pbpaste
bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer"
set -g default-terminal "screen-256color"
bind R source-file ~/.tmux.conf
set -g mouse on
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment