mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-11-22 04:26:29 +00:00
Update tmux conf
This commit is contained in:
parent
e88a9eded7
commit
0c04d66549
@ -11,17 +11,11 @@ if-shell 'test "$(uname -s)" = "Darwin"' 'set-option -g default-command "reattac
|
|||||||
# look good
|
# look good
|
||||||
set -g default-terminal "screen-256color"
|
set -g default-terminal "screen-256color"
|
||||||
|
|
||||||
# act like GNU screen
|
# update prefix
|
||||||
unbind C-b
|
unbind C-b
|
||||||
#set -g prefix C-a
|
|
||||||
#set -g prefix C-Space
|
|
||||||
set -g prefix C-q
|
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
|
set -g mode-mouse on
|
||||||
setw -g mouse-select-window on
|
setw -g mouse-select-window on
|
||||||
setw -g mouse-select-pane on
|
setw -g mouse-select-pane on
|
||||||
@ -34,16 +28,21 @@ bind _ split-window -c "#{pane_current_path}"
|
|||||||
# act like vim
|
# act like vim
|
||||||
setw -g mode-keys vi
|
setw -g mode-keys vi
|
||||||
# move between panes
|
# move between panes
|
||||||
|
bind C-q select-pane -t :.+
|
||||||
bind h select-pane -L
|
bind h select-pane -L
|
||||||
bind j select-pane -D
|
bind j select-pane -D
|
||||||
bind k select-pane -U
|
bind k select-pane -U
|
||||||
bind l select-pane -R
|
bind l select-pane -R
|
||||||
# swap panes
|
# swap panes
|
||||||
bind-key -r J swap-pane -D
|
bind -r J swap-pane -D
|
||||||
bind-key -r K swap-pane -U
|
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
|
# move between windows
|
||||||
bind-key -r C-h select-window -t :-
|
# bind -r C-h select-window -t :-
|
||||||
bind-key -r C-l select-window -t :+
|
# bind -r C-l select-window -t :+
|
||||||
# use vim style copy mode
|
# use vim style copy mode
|
||||||
unbind [
|
unbind [
|
||||||
bind ` copy-mode
|
bind ` copy-mode
|
||||||
@ -54,15 +53,15 @@ bind -t vi-copy V rectangle-toggle
|
|||||||
bind -t vi-copy y copy-selection
|
bind -t vi-copy y copy-selection
|
||||||
|
|
||||||
# after copying to a tmux buffer, hit y again to copy to clipboard
|
# 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)" = "Darwin"' 'bind 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)" = "Linux"' 'bind y run "tmux show-buffer | xclip -sel clip -i"'
|
||||||
|
|
||||||
# Auto load tmuxline config for themes
|
# Auto load tmuxline config for themes
|
||||||
if-shell "test -f ~/.tmuxline.conf" "source ~/.tmuxline.conf"
|
if-shell "test -f ~/.tmuxline.conf" "source ~/.tmuxline.conf"
|
||||||
|
|
||||||
# smart pane switching with awareness of vim splits
|
# 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-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-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-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-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-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
|
||||||
|
Loading…
Reference in New Issue
Block a user