Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
125 lines (101 sloc) 3.52 KB
# Prefix
set-option -g prefix C-q
unbind-key C-b
bind-key C-q send-prefix
# Wait after an escape (ms)
set-option -g escape-time 1
# Message display time (ms)
set-option -g display-time 5000
# Source setup file
bind-key t source-file ~/.tmux.conf \; display-message 'source ~/.tmux.conf'
bind-key C-t source-file ~/.tmux.conf \; display-message 'source ~/.tmux.conf'
# For such ESC. Especially needed for Neovim (otherwise key is recognized as M-X (X is following key).) Default: 500 ms.
set -g escape-time 10
# TERM
set -g default-terminal "screen-256color"
# Split
#unbind-key '"'
#unbind-key %
bind-key s run 'tmuxUtils split'
bind-key S run 'tmuxUtils split'
bind-key C-s run 'tmuxUtils split'
bind-key v run 'tmuxUtils vsplit'
bind-key V run 'tmuxUtils vsplit'
bind-key C-v run 'tmuxUtils vsplit'
# window/pane
bind-key n run 'tmuxUtils next'
bind-key C-n run 'tmuxUtils next'
bind-key p run 'tmuxUtils prev'
bind-key C-p run 'tmuxUtils prev'
# create new window
bind-key c run 'tmuxUtils create'
bind-key C-c run 'tmuxUtils create'
# Only one pane, and reverse
bind-key q run 'tmuxUtils only'
# Move current pane to back
bind-key m run 'tmuxUtils move'
# Same size windows
bind-key r run 'tmuxUtils four'
bind-key C-r run 'tmuxUtils four'
# Select layout
bind-key L command-prompt -p "tiled/even-horizontal/even-vertical/main-horizontal/main-vertical?" "select-layout '%%'"
# Kill pane
#unbind-key x
bind-key K kill-pane
# Change pane
bind-key h run "tmuxUtils left"
bind-key j run "tmuxUtils down"
bind-key k run "tmuxUtils up"
bind-key l run "tmuxUtils right"
bind-key -r BSpace run "tmuxUtils left"
bind-key -r C-h run "tmuxUtils left"
bind-key -r C-j run "tmuxUtils down"
bind-key -r C-k run "tmuxUtils up"
bind-key -r C-l run "tmuxUtils right"
# Resize pane
bind-key -r C-y resize-pane -L
bind-key -r C-u resize-pane -D
bind-key -r C-i resize-pane -U
bind-key -r C-o resize-pane -R
# Copy mode
set-window-option -g mode-keys vi
set-window-option -g wrap-search off
set-window-option -g history-limit 10000
bind-key C-[ copy-mode
bind-key C-] paste-buffer
#bind-key -T copy-mode-vi BSpace send-keys -X cursor-left
bind-key -T copy-mode-vi C-h send-keys -X cursor-left
bind-key -T copy-mode-vi C-j send-keys -X cursor-down
bind-key -T copy-mode-vi C-k send-keys -X cursor-up
bind-key -T copy-mode-vi C-l send-keys -X cursor-right
bind-key -T copy-mode-vi V send-keys -X select-line
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi a send-keys -X start-of-line
bind-key -T copy-mode-vi s send-keys -X copy-end-of-line
#bind-key Y run "tmux send-keys V Left Enter"
bind-key Y send-keys V Left Enter
bind-key a choose-buffer
bind-key C-a choose-buffer
# Clipboard
bind-key A run "tmuxUtils clip"
# Parallel session
bind-key b set-window-option synchronize-panes on
bind-key B set-window-option synchronize-panes off
# Border
set-option -g pane-border-style "fg=colour008,bg=colour008"
set-option -g pane-active-border-style "fg=white,bg=white"
# Pipe-pane
bind-key P pipe-pane -o 'cat >>~/tmp/tmux.#I-#P'
# Status line
set-option -g status on
set-option -g status-interval 1
set-option -g status-style "bg=colour236,fg=black"
set-option -g status-left "#(tmuxUtils leftstatus)"
set-option -g status-left-length 1000
#set-option -g status-left ""
set-option -g status-right ""
#set-window-option -g window-status-format "#W"
#set-window-option -g window-status-current-format "#W"
set-window-option -g window-status-format ""
set-window-option -g window-status-current-format ""
set-window-option -g message-style "bg=colour255,fg=black"
You can’t perform that action at this time.