Update tmux key bindings and enhance formatting

This commit also lists the default key bindings for tmux in the
additional 3 tables (vi-copy, vi-choice, and vi-edit)
vimbundler
nirenjan 2013-01-14 17:55:11 -08:00
parent 78ec4eaf5c
commit 251ea0b3b8
1 changed files with 153 additions and 1 deletions

154
tmux.conf
View File

@ -42,7 +42,8 @@ set-option -g status-fg colour7
# Status bar - left
# <username>@<host> <session name>
set-option -g status-left "#[fg=blue]#(whoami)@#h "
set-option -g status-left "#[fg=blue]#(whoami) "
set-option -ga status-left "#[fg=green]#h "
set-option -ga status-left "#[default][#S]"
# Status bar - left length
set-option -g status-left-length 40
@ -56,9 +57,18 @@ set-option -g status-right-length 30
# Status bar - window status
set-window-option -g window-status-current-bg red
set-window-option -g window-status-current-fg colour7
set-window-option -g window-status-bg colour8
set-window-option -g window-status-fg colour7
set-window-option -g window-status-format "#I-#P:#W#F"
set-window-option -g window-status-current-format "#I-#P:#W#F"
# Message bar formatting
set-option -g message-bg green
set-option -g message-fg black
set-option -g message-command-bg yellow
set-option -g message-command-fg black
# Pane highlighting
set-option -g pane-active-border-fg green
@ -83,6 +93,25 @@ bind-key H \
pipe-pane -o 'cat >> ~/tmux_logs/tmux_log.#I-#P' \;\
display-message 'Toggled logging to ~/tmux_logs/tmux_log.#I-#P'
# Synchronize panes - have a hotkey to switch sync on and off
bind-key -n F5 set-window-option synchronize-panes
# Tweak the copy mode bindings
unbind-key -t vi-copy C-e
unbind-key -t vi-copy C-y
unbind-key -t vi-copy Enter
unbind-key -t vi-copy Space
unbind-key -t vi-copy v
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy C-v rectangle-toggle
bind-key -t vi-copy y copy-selection
# Resize the panes using vi-style keys
bind-key -r h resize-pane -L
bind-key -r j resize-pane -D
bind-key -r k resize-pane -U
bind-key -r l resize-pane -R
# Terminator style pane switching
# OSX Terminal.app, enable Use option as meta key
# and delete the key bindings for Option Cursor left & Option Cursor right
@ -183,3 +212,126 @@ bind-key H \
# bind-key -r C-Down resize-pane -D
# bind-key -r C-Left resize-pane -L
# bind-key -r C-Right resize-pane -R
#
# bind-key -t vi-edit C-c cancel
# bind-key -t vi-edit C-h backspace
# bind-key -t vi-edit Tab complete
# bind-key -t vi-edit Enter enter
# bind-key -t vi-edit C-u delete-line
# bind-key -t vi-edit C-w delete-word
# bind-key -t vi-edit Escape switch-mode
# bind-key -t vi-edit BSpace backspace
# bind-key -t vi-edit DC delete
# bind-key -t vi-edit Home start-of-line
# bind-key -t vi-edit End end-of-line
# bind-key -t vi-edit Up history-up
# bind-key -t vi-edit Down history-down
# bind-key -t vi-edit Left cursor-left
# bind-key -t vi-edit Right cursor-right
# bind-key -ct vi-edit C-c cancel
# bind-key -ct vi-edit C-h backspace
# bind-key -ct vi-edit Enter enter
# bind-key -ct vi-edit $ end-of-line
# bind-key -ct vi-edit 0 start-of-line
# bind-key -ct vi-edit B previous-space
# bind-key -ct vi-edit D delete-end-of-line
# bind-key -ct vi-edit E next-space-end
# bind-key -ct vi-edit W next-space
# bind-key -ct vi-edit X backspace
# bind-key -ct vi-edit ^ start-of-line
# bind-key -ct vi-edit a switch-mode-append
# bind-key -ct vi-edit b previous-word
# bind-key -ct vi-edit d delete-line
# bind-key -ct vi-edit e next-word-end
# bind-key -ct vi-edit h cursor-left
# bind-key -ct vi-edit i switch-mode
# bind-key -ct vi-edit j history-down
# bind-key -ct vi-edit k history-up
# bind-key -ct vi-edit l cursor-right
# bind-key -ct vi-edit p paste
# bind-key -ct vi-edit w next-word
# bind-key -ct vi-edit x delete
# bind-key -ct vi-edit BSpace backspace
# bind-key -ct vi-edit DC delete
# bind-key -ct vi-edit Up history-up
# bind-key -ct vi-edit Down history-down
# bind-key -ct vi-edit Left cursor-left
# bind-key -ct vi-edit Right cursor-right
#
# bind-key -t vi-copy C-b page-up
# bind-key -t vi-copy C-c cancel
# bind-key -t vi-copy C-e scroll-down
# bind-key -t vi-copy C-f page-down
# bind-key -t vi-copy C-h cursor-left
# bind-key -t vi-copy Enter copy-selection
# bind-key -t vi-copy C-y scroll-up
# bind-key -t vi-copy Escape clear-selection
# bind-key -t vi-copy Space begin-selection
# bind-key -t vi-copy $ end-of-line
# bind-key -t vi-copy , jump-reverse
# bind-key -t vi-copy / search-forward
# bind-key -t vi-copy 0 start-of-line
# bind-key -t vi-copy 1 start-number-prefix
# bind-key -t vi-copy 2 start-number-prefix
# bind-key -t vi-copy 3 start-number-prefix
# bind-key -t vi-copy 4 start-number-prefix
# bind-key -t vi-copy 5 start-number-prefix
# bind-key -t vi-copy 6 start-number-prefix
# bind-key -t vi-copy 7 start-number-prefix
# bind-key -t vi-copy 8 start-number-prefix
# bind-key -t vi-copy 9 start-number-prefix
# bind-key -t vi-copy : goto-line
# bind-key -t vi-copy ; jump-again
# bind-key -t vi-copy ? search-backward
# bind-key -t vi-copy B previous-space
# bind-key -t vi-copy D copy-end-of-line
# bind-key -t vi-copy E next-space-end
# bind-key -t vi-copy F jump-backward
# bind-key -t vi-copy G history-bottom
# bind-key -t vi-copy H top-line
# bind-key -t vi-copy J scroll-down
# bind-key -t vi-copy K scroll-up
# bind-key -t vi-copy L bottom-line
# bind-key -t vi-copy M middle-line
# bind-key -t vi-copy N search-reverse
# bind-key -t vi-copy T jump-to-backward
# bind-key -t vi-copy W next-space
# bind-key -t vi-copy ^ back-to-indentation
# bind-key -t vi-copy b previous-word
# bind-key -t vi-copy e next-word-end
# bind-key -t vi-copy f jump-forward
# bind-key -t vi-copy g history-top
# bind-key -t vi-copy h cursor-left
# bind-key -t vi-copy j cursor-down
# bind-key -t vi-copy k cursor-up
# bind-key -t vi-copy l cursor-right
# bind-key -t vi-copy n search-again
# bind-key -t vi-copy q cancel
# bind-key -t vi-copy t jump-to-forward
# bind-key -t vi-copy v rectangle-toggle
# bind-key -t vi-copy w next-word
# bind-key -t vi-copy BSpace cursor-left
# bind-key -t vi-copy NPage page-down
# bind-key -t vi-copy PPage page-up
# bind-key -t vi-copy Up cursor-up
# bind-key -t vi-copy Down cursor-down
# bind-key -t vi-copy Left cursor-left
# bind-key -t vi-copy Right cursor-right
# bind-key -t vi-copy C-Up scroll-up
# bind-key -t vi-copy C-Down scroll-down
#
# bind-key -t vi-choice C-b page-up
# bind-key -t vi-choice C-c cancel
# bind-key -t vi-choice C-e scroll-down
# bind-key -t vi-choice C-f page-down
# bind-key -t vi-choice Enter choose
# bind-key -t vi-choice C-y scroll-up
# bind-key -t vi-choice j down
# bind-key -t vi-choice k up
# bind-key -t vi-choice q cancel
# bind-key -t vi-choice NPage page-down
# bind-key -t vi-choice PPage page-up
# bind-key -t vi-choice Up up
# bind-key -t vi-choice Down down
# bind-key -t vi-choice C-Up scroll-up
# bind-key -t vi-choice C-Down scroll-down