# use 256color terminal set -g default-terminal screen-256color # split windows like vim # vim's definition of a horizontal/vertical split is reversed from tmux's bind s split-window -v bind v split-window -h # move around panes with j and k, a bit like vim # as of tmux 1.1, there is no way to move based on pane position (ie, no way to # move the pane to the right) bind -r j select-pane -D bind -r k select-pane -U bind -r h select-pane -L bind -r l select-pane -R # resize panes like vim # feel free to change the "1" to however many lines you want to resize by, only # one at a time can be slow bind -r < resize-pane -L 1 bind -r > resize-pane -R 1 bind -r - resize-pane -D 1 bind -r + resize-pane -U 1 # create new window and show statusbar # useful if you spawn session without one bind c new-window \; set status on \; bind c new-window # bind : to command-prompt like vim # this is the default in tmux already bind : command-prompt # I can't bind C-: so use C-l for now bind -n "C-l" command-prompt # to reload config file bind R source ~/.tmux.conf bind K confirm-before kill-pane bind L choose-buffer "copy-buffer -a %%" bind P choose-buffer bind b set status off bind B set status on bind m setw monitor-activity off bind M setw monitor-activity on # X11 clipboard integration bind x run "tmux save-buffer - | xclip -i" bind X run "xclip -o | tmux load-buffer -" bind e capture-pane \; neww "tmux save-buffer - | vim -" # vi-style controls for copy mode setw -g mode-keys vi set -g status-keys vi bind-key -t vi-copy V rectangle-toggle # enter 'visual mode' bind-key -t vi-copy v begin-selection # enter 'visual mode' bind-key -t vi-copy y copy-selection # 'yank' # format strings for window title & statusbar set -g set-titles on set -g set-titles-string "#W - tmux::#S:#(whoami)@#H" #set -g status-justify centre set -g status-bg black set -g status-fg white set -g status-left-fg green set -g status-left-length 30 set -g status-left "[#(whoami)@#H:#S]" set -g status-right-fg yellow set -g status-right "%Y-%m-%d %H:%M" setw -g window-status-alert-attr default setw -g window-status-alert-fg yellow setw -g window-status-fg cyan setw -g window-status-format "(#I#F #10W)" setw -g window-status-current-format "#[fg=red][#[fg=white]#I#F #W#[fg=red]]"