Commits

Ben Bass committed cd5edb1

update tmux.conf

Comments (0)

Files changed (1)

 # Our .tmux.conf file
 
-# Setting the prefix from C-b to C-a
-# START:prefix
-set -g prefix C-a  
+# Setting the prefix from C-b to C-a # START:prefix
+set -g prefix C-a
 # END:prefix
 # Free the original Ctrl-b prefix keybinding
 # START:unbind
-unbind C-b 
+unbind C-b
 # END:unbind
 #setting the delay between prefix and command
 # START:delay
 
 # moving between panes
 # START:paneselect
-bind h select-pane -L 
-bind j select-pane -D 
+bind h select-pane -L
+bind j select-pane -D
 bind k select-pane -U
-bind l select-pane -R    
+bind l select-pane -R
+# cursor pane selection seems to default to -r (repeating) behaviour.
+# This is annoying; undo it.
+unbind Left; bind-key Left select-pane -L
+unbind Down; bind-key Down select-pane -D
+unbind Up; bind-key Up select-pane -U
+unbind Right; bind-key Right select-pane -R
 # END:paneselect
+# pane-swapping takes place in number order rather than position.
+# TODO: might want some different bindings...
+bind-key S-Down swap-pane -D
+bind-key S-Up swap-pane -U
 
 # Quick pane selection
 # START:panetoggle
 bind -r C-h select-window -t :-
 bind -r C-l select-window -t :+
-# END:panetoggle
+# END:panetoggle 
 
 # Pane resizing
 # START:paneresize
-bind -r H resize-pane -L 5 
-bind -r J resize-pane -D 5 
-bind -r K resize-pane -U 5 
+bind -r H resize-pane -L 5
+bind -r J resize-pane -D 5
+bind -r K resize-pane -U 5
 bind -r L resize-pane -R 5
 # END:paneresize
 # mouse support - set to on if you want to use the mouse
 # START:mouse
-setw -g mode-mouse off 
+setw -g mode-mouse off
 # END:mouse
-set -g mouse-select-pane off 
-set -g mouse-resize-pane off 
+set -g mouse-select-pane off
+set -g mouse-resize-pane off
 set -g mouse-select-window off
 
 # Set the default terminal mode to 256color mode
 
 # set the color of the window list
 # START:windowstatuscolor
-setw -g window-status-fg cyan 
-setw -g window-status-bg default 
+setw -g window-status-fg cyan
+setw -g window-status-bg default
 setw -g window-status-attr dim
 # END:windowstatuscolor
 
 # set colors for the active window
 # START:activewindowstatuscolor
-setw -g window-status-current-fg white 
-setw -g window-status-current-bg red 
+setw -g window-status-current-fg white
+setw -g window-status-current-bg red
 setw -g window-status-current-attr bright
 # END:activewindowstatuscolor
 
 
 # Status line left side
 # START:statusleft
-set -g status-left-length 40 
+set -g status-left-length 40
 set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
 # END:statusleft
 
 # START:vikeys
 setw -g mode-keys vi
 # END:vikeys
+# increase history limit from 2000 upwards a bit
+set -g history-limit 100000
+bind S command-prompt -p ssh: "new-window -n %1 'ssh %1'"
+
+# vim-like copy paste
+unbind [
+bind Escape copy-mode
+## this would normally be 'previous-window'
+unbind p
+bind p paste-buffer
+bind -t vi-copy 'v' begin-selection
+bind -t vi-copy 'y' copy-selection
+
+bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"