mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-11-05 16:16:31 +00:00
63 lines
1.8 KiB
Plaintext
63 lines
1.8 KiB
Plaintext
# set default shell
|
|
set-option -g default-shell $SHELL
|
|
|
|
# Sets xterm window title
|
|
set-option -g set-titles on
|
|
set-option -g set-titles-string '[#S:#I] #W'
|
|
|
|
# copy and paster
|
|
set-option -g default-command "reattach-to-user-namespace-tmux bash"
|
|
|
|
# look good
|
|
set -g default-terminal "screen-256color"
|
|
|
|
# act like GNU screen
|
|
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
|
|
set -g mode-mouse on
|
|
setw -g mouse-select-window on
|
|
setw -g mouse-select-pane on
|
|
|
|
# easy splitting
|
|
if-shell "vertest `tmux -V` '>=' 1.9" 'bind | split-window -h -c "#{pane_current_path}"'
|
|
if-shell "vertest `tmux -V` '>=' 1.9" 'bind - split-window -c "#{pane_current_path}"'
|
|
if-shell "vertest `tmux -V` '>=' 1.9" 'bind _ split-window -c "#{pane_current_path}"'
|
|
# old versions
|
|
if-shell "vertest `tmux -V` '<' 1.9" 'bind | split-window -h'
|
|
if-shell "vertest `tmux -V` '<' 1.9" 'bind - split-window'
|
|
if-shell "vertest `tmux -V` '<' 1.9" 'bind _ split-window'
|
|
|
|
# act like vim
|
|
setw -g mode-keys vi
|
|
# move between panes
|
|
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
|
|
# move between windows
|
|
bind-key -r C-h select-window -t :-
|
|
bind-key -r C-l select-window -t :+
|
|
# use vim style copy mode
|
|
unbind [
|
|
bind ` copy-mode
|
|
unbind p
|
|
bind p paste-buffer
|
|
bind -t vi-copy v begin-selection
|
|
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"'
|
|
|