X-Git-Url: http://git.iain.cx/?a=blobdiff_plain;f=.tmux.conf;h=d85e935e82d1ba639a217c07e8dded296ce56d34;hb=11580fbc4dedde05c704c8124d8a5ac7cf56204f;hp=5d9d8b79e6b3fa704e3f2d36f50296ec63fc6205;hpb=d6ccc8abb1b587d6c9e2b4f416c1236cc61e7c3c;p=profile.git diff --git a/.tmux.conf b/.tmux.conf index 5d9d8b7..d85e935 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -13,12 +13,24 @@ set -s escape-time 100 setw -g clock-mode-colour white setw -g clock-mode-style 24 +# Scrollback buffer. +set -g history-limit 4096 + +# Don't use the mouse to select text by default. +# It has two important flaws. Double-clicking to select a word doesn't work. +# Middle clicking to paste doesn't work. +set -g mouse-resize-pane off +set -g mouse-select-pane off +set -g mouse-select-window off +set -g mode-mouse off + ################################################################################ # Screen compatibility. ################################################################################ set -g prefix C-p unbind C-b bind C-p last-window +bind p send-keys C-p bind C-l refresh-client bind l refresh-client bind S split-window -v @@ -61,6 +73,8 @@ bind = display-panes bind b break-pane # Split another pane into this window. bind B command-prompt -p "Select [.] to join:" 'join-pane -s %1' +# Split vertically. +bind C-\ split-window -v # Next pane. bind i select-pane -t :.+ bind C-i select-pane -t :.+ @@ -90,6 +104,8 @@ bind { copy-mode -u #bind '"' choose-buffer 'show-buffer -b %%' bind '"' list-buffers \; command-prompt -p "Choose buffer to show:" 'show-buffer -b %1' bind "'" show-buffer +# Toggle mouse mode as it is useful despite the flaws listed above. +bind C-m set -g mouse-resize-pane \; set -g mouse-select-pane \; set -g mouse-select-window \; set -g mode-mouse ################################################################################ # Fix missing binds in Vi modes. @@ -110,7 +126,7 @@ bind -t vi-copy y copy-selection ################################################################################ set -g default-terminal 'screen-256color' # PuTTY needs help to set bold colours. -set -g terminal-overrides 'putty-256color:C8' +set -a -g terminal-overrides ',putty-256color:C8:Ms=\\E]52;%p1%s;%p2%s\\007m' ################################################################################ # Window and pane settings.