Update tmux conf

This commit is contained in:
ViViDboarder 2015-06-03 13:26:27 -07:00
parent e88a9eded7
commit 0c04d66549
1 changed files with 18 additions and 19 deletions

View File

@ -11,17 +11,11 @@ if-shell 'test "$(uname -s)" = "Darwin"' 'set-option -g default-command "reattac
# look good
set -g default-terminal "screen-256color"
# act like GNU screen
# update prefix
unbind C-b
#set -g prefix C-a
#set -g prefix C-Space
set -g prefix C-q
# Move thorugh panes with a repeat
#bind C-a select-pane -t :.+
#bind C-Space select-pane -t :.+
bind C-q select-pane -t :.+
# a mouse
# mouse
set -g mode-mouse on
setw -g mouse-select-window on
setw -g mouse-select-pane on
@ -34,16 +28,21 @@ bind _ split-window -c "#{pane_current_path}"
# act like vim
setw -g mode-keys vi
# move between panes
bind C-q select-pane -t :.+
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# swap panes
bind-key -r J swap-pane -D
bind-key -r K swap-pane -U
bind -r J swap-pane -D
bind -r K swap-pane -U
# move panes
bind C-j command-prompt -p "Join pane from:" "join-pane -s '%%'"
bind C-s command-prompt -p "Send pane to:" "join-pane -t '%%'"
bind C-b break-pane
# move between windows
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
# bind -r C-h select-window -t :-
# bind -r C-l select-window -t :+
# use vim style copy mode
unbind [
bind ` copy-mode
@ -54,15 +53,15 @@ bind -t vi-copy V rectangle-toggle
bind -t vi-copy y copy-selection
# after copying to a tmux buffer, hit y again to copy to clipboard
if-shell 'test "$(uname -s)" = "Darwin"' 'bind-key y run "tmux show-buffer | reattach-to-user-namespace pbcopy"'
if-shell 'test "$(uname -s)" = "Linux"' 'bind-key y run "tmux show-buffer | xclip -sel clip -i"'
if-shell 'test "$(uname -s)" = "Darwin"' 'bind y run "tmux show-buffer | reattach-to-user-namespace pbcopy"'
if-shell 'test "$(uname -s)" = "Linux"' 'bind y run "tmux show-buffer | xclip -sel clip -i"'
# Auto load tmuxline config for themes
if-shell "test -f ~/.tmuxline.conf" "source ~/.tmuxline.conf"
# smart pane switching with awareness of vim splits
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
# bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
# bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
# bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
# bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
# bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"