49 lines
1.5 KiB
Plaintext
49 lines
1.5 KiB
Plaintext
# PREFIX | splits horizontally and PREFIX - splits vertically
|
|
bind | split-window -h -c "#{pane_current_path}"
|
|
bind - split-window -v -c "#{pane_current_path}"
|
|
|
|
# open new window with pwd
|
|
bind c new-window -c "#{pane_current_path}"
|
|
|
|
# PREFIX T makes current window index 1
|
|
bind T swap-window -t 1
|
|
|
|
# use vim movement for panes
|
|
bind h select-pane -L
|
|
bind j select-pane -D
|
|
bind k select-pane -U
|
|
bind l select-pane -R
|
|
|
|
# mouse support
|
|
set-option -g -q mouse on
|
|
|
|
# Copy Mode
|
|
bind-key -t root PPage if-shell -F "#{alternate_on}" "send-keys PPage" "copy-mode -e; send-keys PPage"
|
|
bind-key -t vi-copy PPage page-up
|
|
bind-key -t vi-copy NPage page-down
|
|
# Mouse Wheel
|
|
bind-key -t root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
|
|
bind-key -t root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
|
|
bind-key -t vi-copy WheelUpPane halfpage-up
|
|
bind-key -t vi-copy WheelDownPane halfpage-down
|
|
|
|
# Make sure the client is always using the correct environment
|
|
# eval $(tmux switch-client \; show-environment -s)
|
|
|
|
# Copy/Paste
|
|
#
|
|
# provide access to clipboard
|
|
# set-option -g default-command "reattach-to-user-namespace -l zsh"
|
|
# set-window-option -g automatic-rename on
|
|
|
|
# use vim keybindings in copy mode
|
|
setw -g mode-keys vi
|
|
|
|
# v selection
|
|
bind-key -t vi-copy v begin-selection
|
|
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
|
|
|
|
# make enter use copy pipe
|
|
unbind -t vi-copy Enter
|
|
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
|