Created
November 20, 2013 17:41
-
-
Save Apsu/7567592 to your computer and use it in GitHub Desktop.
WIP tmux config
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
# Prefix and cycle | |
set-option -g prefix C-\\ | |
bind C-\ last-window | |
# Reload config | |
bind r source-file ~/.tmux.conf | |
# vi copy-mode | |
setw -g mode-keys vi | |
# Add expected vim keybindings | |
bind-key -t vi-copy 'v' begin-selection | |
bind-key -t vi-copy 'y' copy-selection | |
# Smart pane switching with awareness of vim splits | |
bind -n M-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-h) || tmux select-pane -L" | |
bind -n M-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-j) || tmux select-pane -D" | |
bind -n M-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-k) || tmux select-pane -U" | |
bind -n M-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)vim$' && tmux send-keys C-l) || tmux select-pane -R" | |
# Quick copy-mode access | |
bind -n M-` copy-mode | |
# New window | |
bind -n M-t new-window | |
# Window naviation | |
bind -n M-n next-window | |
bind -n M-p previous-window | |
# Move windows | |
bind -n C-M-n swap-window -t +1 | |
bind -n C-M-p swap-window -t -1 | |
# Copy to clipboard | |
bind -t vi-copy Enter copy-pipe 'xclip -i -sel p -f | xclip -i -sel c' | |
# Move panes | |
bind -n M-, rotate-window -U | |
bind -n M-. rotate-window -D | |
# Cycle layouts | |
bind -n M-Space next-layout | |
# Split windows into panes | |
bind -n M-- split-window | |
bind -n M-| split-window -h | |
# Zoom! | |
bind -n M-z resize-pane -Z | |
# Parse URLs for launching | |
bind -n M-u capture-pane \; save-buffer /tmp/tmux-buffer \; new-window -n urlscan '$SHELL -c "urlscan -b < /tmp/tmux-buffer"' | |
# QUIET!! | |
set -g quiet on | |
# UTF8 is great | |
set -g status-utf8 on | |
# Less delay for commands; might disable complex chords | |
set -s escape-time 0 | |
# Clamp TERM | |
set -g default-terminal "screen-256color" | |
# Show me your history | |
set -g history-limit 10000 | |
# Set title | |
set -g set-titles on | |
set -g set-titles-string "#T" | |
# Renumber windows on deletion | |
set -g renumber-windows on | |
# Tweak pane borders a smidge | |
set -g pane-active-border-fg "#ffffff" | |
set -g pane-border-fg "#555555" | |
# Set default shell | |
set default-shell "/usr/bin/zsh" | |
# Powerline ahoy! | |
source '.local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment