Skip to content

Commit

Permalink
Add more comments for tmux.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
xuxiaodong committed Jul 7, 2012
1 parent 7d21b54 commit 8cd5e75
Showing 1 changed file with 41 additions and 29 deletions.
70 changes: 41 additions & 29 deletions _tmux.conf
@@ -1,48 +1,60 @@
#
# author : Xu Xiaodong <xxdlhy@gmail.com>
# modified : 2012 Jul 01
# modified : 2012 Jul 07
#

#-- base --#
#-- base settings --#
set -g default-terminal "screen-256color"
set -g display-time 3000
set -g escape-time 0
set -g history-limit 65535
set -g base-index 1
set -g pane-base-index 1
set -s escape-time 0

#-- bindkeys --#
# prefix key (Ctrl+a)
set -g prefix ^a
unbind ^b
bind a send-prefix

# split window
unbind '"'
bind - splitw -v
bind - splitw -v # vertical split (prefix -)
unbind %
bind | splitw -h

bind k selectp -U
bind j selectp -D
bind h selectp -L
bind l selectp -R

bind -r ^k resizep -U 10
bind -r ^j resizep -D 10
bind -r ^h resizep -L 10
bind -r ^l resizep -R 10

bind ^u swapp -U
bind ^d swapp -D

bind ^e last
bind q killp

bind ! splitw htop
bind m command-prompt "splitw 'exec man %%'"
bind @ command-prompt "splitw 'exec perldoc -t -f %%'"
bind * command-prompt "splitw 'exec perldoc -t -v %%'"
bind % command-prompt "splitw 'exec perldoc -t %%'"
bind / command-prompt "splitw 'exec ri %%'"
bind | splitw -h # horizontal split (prefix |)

# select pane
bind k selectp -U # above (prefix k)
bind j selectp -D # below (prefix j)
bind h selectp -L # left (prefix h)
bind l selectp -R # right (prefix l)

# resize pane
bind -r ^k resizep -U 10 # upward (prefix Ctrl+k)
bind -r ^j resizep -D 10 # downward (prefix Ctrl+j)
bind -r ^h resizep -L 10 # to the left (prefix Ctrl+h)
bind -r ^l resizep -R 10 # to the right (prefix Ctrl+l)

# swap pane
bind ^u swapp -U # swap with the previous pane (prefix Ctrl+u)
bind ^d swapp -D # swap with the next pane (prefix Ctrl+d)

# misc
bind e lastp # select the last pane (prefix e)
bind ^e last # select the last window (prefix Ctrl+e)
bind q killp # kill pane (prefix q)
bind ^q killw # kill window (prefix Ctrl+q)

# app
bind ! splitw htop # htop (prefix !)
bind m command-prompt "splitw 'exec man %%'" # man (prefix m)
bind @ command-prompt "splitw 'exec perldoc -t -f %%'" # perl func (prefix @)
bind * command-prompt "splitw 'exec perldoc -t -v %%'" # perl var (prefix *)
bind % command-prompt "splitw 'exec perldoc -t %%'" # perl doc (prefix %)
bind / command-prompt "splitw 'exec ri %%'" # ruby doc (prefix /)

# reload config
bind r source ~/.tmux.conf \; display "Configuration reloaded!"

#-- statusbar --#
set -g status-utf8 on
Expand Down Expand Up @@ -82,7 +94,7 @@ set -g status-right-length 80
setw -g window-status-current-fg colour223
setw -g window-status-current-bg colour237
setw -g window-status-current-attr bold
setw -g window-status-current-format '#I:#W#F'
setw -g window-status-current-format "#I:#W#F"

#setw -g window-status-alert-attr bold
#setw -g window-status-alert-fg colour255
Expand Down

0 comments on commit 8cd5e75

Please sign in to comment.