diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/bash_completion_tmux.sh | 105 | ||||
-rw-r--r-- | examples/h-boetes.conf | 42 | ||||
-rw-r--r-- | examples/n-marriott.conf | 110 | ||||
-rw-r--r-- | examples/screen-keys.conf | 102 | ||||
-rw-r--r-- | examples/t-williams.conf | 104 | ||||
-rw-r--r-- | examples/tmux.vim | 292 | ||||
-rw-r--r-- | examples/tmux_backup.sh | 81 | ||||
-rw-r--r-- | examples/vim-keys.conf | 36 | ||||
-rw-r--r-- | examples/xterm-keys.vim | 52 |
9 files changed, 924 insertions, 0 deletions
diff --git a/examples/bash_completion_tmux.sh b/examples/bash_completion_tmux.sh new file mode 100644 index 00000000..74728b91 --- /dev/null +++ b/examples/bash_completion_tmux.sh @@ -0,0 +1,105 @@ +# START tmux completion +# This file is in the public domain +# See: http://www.debian-administration.org/articles/317 for how to write more. +# Usage: Put "source bash_completion_tmux.sh" into your .bashrc +_tmux() +{ + local cur prev opts + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + + opts=" \ + attach-session \ + bind-key \ + break-pane \ + capture-pane \ + choose-client \ + choose-session \ + choose-window \ + clear-history \ + clock-mode \ + command-prompt \ + confirm-before \ + copy-buffer \ + copy-mode \ + delete-buffer \ + detach-client \ + display-message \ + display-panes \ + down-pane \ + find-window \ + has-session \ + if-shell \ + join-pane \ + kill-pane \ + kill-server \ + kill-session \ + kill-window \ + last-window \ + link-window \ + list-buffers \ + list-clients \ + list-commands \ + list-keys \ + list-panes \ + list-sessions \ + list-windows \ + load-buffer \ + lock-client \ + lock-server \ + lock-session \ + move-window \ + new-session \ + new-window \ + next-layout \ + next-window \ + paste-buffer \ + pipe-pane \ + previous-layout \ + previous-window \ + refresh-client \ + rename-session \ + rename-window \ + resize-pane \ + respawn-window \ + rotate-window \ + run-shell \ + save-buffer \ + select-layout \ + select-pane \ + select-prompt \ + select-window \ + send-keys \ + send-prefix \ + server-info \ + set-buffer \ + set-environment \ + set-option \ + set-window-option \ + show-buffer \ + show-environment \ + show-messages \ + show-options \ + show-window-options \ + source-file \ + split-window \ + start-server \ + suspend-client \ + swap-pane \ + swap-window \ + switch-client \ + unbind-key \ + unlink-window \ + up-pane" + + COMPREPLY=($(compgen -W "${opts}" -- ${cur})) + return 0 + +} +complete -F _tmux tmux + +# END tmux completion + + + diff --git a/examples/h-boetes.conf b/examples/h-boetes.conf new file mode 100644 index 00000000..2aa86dc5 --- /dev/null +++ b/examples/h-boetes.conf @@ -0,0 +1,42 @@ +# $Id: h-boetes.conf,v 1.2 2009-10-25 21:45:26 nicm Exp $ +# +# From Han Boetes. + +set -g default-command zsh +set -g status-right "#(uptime|awk '{print $11}') #(date)" + +# Statusbar properties. +set -g display-time 3000 +set -g status-bg black +set -g status-fg cyan +set-window-option -g window-status-current-attr bright,reverse +set-window-option -g window-status-current-bg cyan +set-window-option -g window-status-current-fg black + +# Use c-t instead of c-b as the prefix +unbind C-b +set -g prefix C-t +bind C-t send-prefix +bind t send-prefix + +# Bind function keys. +bind -n F1 select-window -t 1 +bind -n F2 select-window -t 2 +bind -n F3 select-window -t 3 +bind -n F4 select-window -t 4 +bind -n F5 select-window -t 5 +bind -n F6 select-window -t 6 +bind -n F7 select-window -t 7 +bind -n F8 select-window -t 8 + +# All new windows started at startup. +new emacs +neww irssi +neww mutt +neww +neww +neww +neww +neww + +select-window -t 1 diff --git a/examples/n-marriott.conf b/examples/n-marriott.conf new file mode 100644 index 00000000..6a047ec9 --- /dev/null +++ b/examples/n-marriott.conf @@ -0,0 +1,110 @@ +# $Id: n-marriott.conf,v 1.11 2009-11-24 19:03:59 nicm Exp $ +# +# By Nicholas Marriott. Public domain. + +# Default global options. +set -g status-bg green +set -g status-right "%H:%M" # %d-%b-%y +set -g bell-action none +set -g lock-after-time 1800 + +# Default global window options. +setw -g remain-on-exit on +setw -g window-status-current-attr "underscore" +#setw -g xterm-keys on + +# Prefix key. +set -g prefix C-a +unbind C-b +bind C-a send-prefix + +# Keys to switch session. +bind Q switchc -t0 +bind W switchc -t1 +bind E switchc -t2 + +# Other key bindings. +bind F1 selectw -t:10 +bind F2 selectw -t:11 +bind F3 selectw -t:12 +bind F4 selectw -t:13 +bind F5 selectw -t:14 +bind F6 selectw -t:15 +bind F7 selectw -t:16 +bind F8 selectw -t:17 +bind F9 selectw -t:18 +bind F10 selectw -t:19 +bind F11 selectw -t:20 +bind F12 selectw -t:21 + +bind m setw monitor-activity + +bind y setw force-width 81 +bind u setw force-width 0 + +bind -n F1 run-shell 'mpc toggle >/dev/null 2>&1' +bind -n F2 run-shell 'mpc' +bind -n F3 run-shell 'mpc prev >/dev/null 2>&1' +bind -n F4 run-shell 'mpc next >/dev/null 2>&1' +bind -n F5 run-shell 'mpc volume -5 >/dev/null 2>&1' +bind -n F6 run-shell 'mpc volume +5 >/dev/null 2>&1' + +# Hide and show window name from status line +bind '-' setw window-status-format '#I'\; setw window-status-current-format '#I' +bind '+' setw window-status-format '#I:#W#F'\; setw window-status-current-format '#I:#W#F' + +# First session. +new -d -s0 -nirssi 'exec ssh -t natalya exec sh ~/bin/tmux-start' +setw -t0:0 monitor-activity on +setw -t0:0 aggressive-resize on +set -t0 status-bg green +neww -d -ntodo 'exec emacs ~/TODO' +setw -t0:1 aggressive-resize on +neww -d -ntodo2 'exec emacs ~/TODO2' +setw -t0:2 aggressive-resize on +neww -d -nncmpc 'exec ncmpc -f ~/.ncmpc.conf' +setw -t0:3 aggressive-resize on +neww -d -nmutt 'exec mutt' +setw -t0:4 aggressive-resize on +neww -d +neww -d +neww -d +neww -d +neww -d +neww -d +neww -d +neww -d +neww -d +neww -d +neww -d +neww -d + +# Second session. +new -d -s1 +set -t1 status-bg cyan +linkw -dk -t0 -s0:0 +linkw -dk -t1 -s0:1 +linkw -dk -t2 -s0:2 +linkw -dk -t3 -s0:3 +linkw -dk -t4 -s0:4 +neww -d +neww -d +neww -d +neww -d +neww -d +neww -d + +# Third session. +new -d -s2 +set -t2 status-bg yellow +linkw -dk -t0 -s0:0 +linkw -dk -t1 -s0:1 +linkw -dk -t2 -s0:2 +linkw -dk -t3 -s0:3 +linkw -dk -t4 -s0:4 +neww -d +neww -d +neww -d +neww -d +neww -d +neww -d diff --git a/examples/screen-keys.conf b/examples/screen-keys.conf new file mode 100644 index 00000000..ce149290 --- /dev/null +++ b/examples/screen-keys.conf @@ -0,0 +1,102 @@ +# $Id: screen-keys.conf,v 1.7 2010-07-31 11:39:13 nicm Exp $ +# +# By Nicholas Marriott. Public domain. +# +# This configuration file binds many of the common GNU screen key bindings to +# appropriate tmux key bindings. Note that for some key bindings there is no +# tmux analogue and also that this set omits binding some commands available in +# tmux but not in screen. +# +# Note this is only a selection of key bindings and they are in addition to the +# normal tmux key bindings. This is intended as an example not as to be used +# as-is. + +# Set the prefix to ^A. +unbind C-b +set -g prefix ^A +bind a send-prefix + +# Bind appropriate commands similar to screen. +# lockscreen ^X x +unbind ^X +bind ^X lock-server +unbind x +bind x lock-server + +# screen ^C c +unbind ^C +bind ^C new-window +unbind c +bind c new-window + +# detach ^D d +unbind ^D +bind ^D detach + +# displays * +unbind * +bind * list-clients + +# next ^@ ^N sp n +unbind ^@ +bind ^@ next-window +unbind ^N +bind ^N next-window +unbind " " +bind " " next-window +unbind n +bind n next-window + +# title A +unbind A +bind A command-prompt "rename-window %%" + +# other ^A +unbind ^A +bind ^A last-window + +# prev ^H ^P p ^? +unbind ^H +bind ^H previous-window +unbind ^P +bind ^P previous-window +unbind p +bind p previous-window +unbind BSpace +bind BSpace previous-window + +# windows ^W w +unbind ^W +bind ^W list-windows +unbind w +bind w list-windows + +# quit \ +unbind '\' +bind '\' confirm-before "kill-server" + +# kill K k +unbind K +bind K confirm-before "kill-window" +unbind k +bind k confirm-before "kill-window" + +# redisplay ^L l +unbind ^L +bind ^L refresh-client +unbind l +bind l refresh-client + +# split -v | +unbind | +bind | split-window + +# :kB: focus up +unbind Tab +bind Tab select-pane -t:.+ +unbind BTab +bind BTab select-pane -t:.- + +# " windowlist -b +unbind '"' +bind '"' choose-window diff --git a/examples/t-williams.conf b/examples/t-williams.conf new file mode 100644 index 00000000..0a2cc3f5 --- /dev/null +++ b/examples/t-williams.conf @@ -0,0 +1,104 @@ +# $Id: t-williams.conf,v 1.1 2009-11-02 18:59:28 nicm Exp $ +# +# ~/.tmux.conf - tmux terminal multiplexer config +# Thayer Williams (http://cinderwick.ca) +# "Feel free to do whatever you like with it." + +# I typically start tmux from ~/.xinitrc with the following: +# +# urxvt -e bash -c "tmux attach -d -t mysession" & +# +# and recall it any time thereafter with xbindkeys (Mod4+s): +# +# "urxvt -e bash -c 'tmux attach -d -t mysession'" +# m:0x50 + c:39 + + +# set prefix key to ctrl+a until I have time to adapt +unbind C-b +set -g prefix C-a + +# send the prefix to client inside window (ala nested sessions) +bind-key a send-prefix + +# toggle last window like screen +bind-key C-a last-window + +# confirm before killing a window or the server +bind-key k confirm kill-window +bind-key K confirm kill-server + +# toggle statusbar +bind-key b set-option status + +# ctrl+left/right cycles thru windows +bind-key -n C-right next +bind-key -n C-left prev + +# open a man page in new window +bind / command-prompt "split-window 'exec man %%'" + +# quick view of processes +bind '~' split-window "exec htop" + +# scrollback buffer n lines +set -g history-limit 5000 + +# listen for activity on all windows +set -g bell-action any + +# on-screen time for display-panes in ms +set -g display-panes-time 2000 + +# start window indexing at one instead of zero +set -g base-index 1 + +# enable wm window titles +set -g set-titles on + +# wm window title string (uses statusbar variables) +set -g set-titles-string "tmux.#I.#W" + +# session initialization +new -s mysession mutt +neww -t 2 +neww -d -t 3 +neww -d -t 5 mocp +neww -d -t 6 rtorrent +selectw -t 1 + +# statusbar -------------------------------------------------------------- + +set -g display-time 2000 + +# default statusbar colors +set -g status-fg white +set -g status-bg default +set -g status-attr default + +# default window title colors +set-window-option -g window-status-fg cyan +set-window-option -g window-status-bg default +set-window-option -g window-status-attr dim + +# active window title colors +set-window-option -g window-status-current-fg white +set-window-option -g window-status-current-bg default +set-window-option -g window-status-current-attr bright + +# command/message line colors +set -g message-fg white +set -g message-bg black +set -g message-attr bright + +# center align the window list +set -g status-justify centre + +# show some useful stats but only when tmux is started +# outside of Xorg, otherwise dwm statusbar shows these already +set -g status-right "" +set -g status-left "" +if '[ -z "$DISPLAY" ]' 'set -g status-left "[#[fg=green] #H #[default]]"' +if '[ -z "$DISPLAY" ]' 'set -g status-right "[ #[fg=magenta]#(cat /proc/loadavg | cut -d \" \" -f 1,2,3)#[default] ][ #[fg=cyan,bright]%a %Y-%m-%d %H:%M #[default]]"' +if '[ -z "$DISPLAY" ]' 'set -g status-right-length 50' + diff --git a/examples/tmux.vim b/examples/tmux.vim new file mode 100644 index 00000000..4d64514a --- /dev/null +++ b/examples/tmux.vim @@ -0,0 +1,292 @@ +" Vim syntax file +" Language: tmux(1) configuration file +" Maintainer: Tiago Cunha <tcunha@users.sourceforge.net> +" Last Change: $Date: 2010-07-27 18:29:07 $ +" License: This file is placed in the public domain. +" +" To install this file: +" +" - Drop the file in the syntax directory into runtimepath (such as +" ~/.vim/syntax/tmux.vim). +" - Make the filetype recognisable by adding the following to filetype.vim +" (~/.vim/filetype.vim): +" +" augroup filetypedetect +" au BufNewFile,BufRead .tmux.conf*,tmux.conf* setf tmux +" augroup END +" +" - Switch on syntax highlighting by adding "syntax enable" to .vimrc. +" + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +setlocal iskeyword+=- +syntax case match + +syn keyword tmuxAction any current none +syn keyword tmuxBoolean off on + +syn keyword tmuxCmds + \ attach[-session] + \ bind[-key] + \ break-pane + \ breakp + \ capture-pane + \ capturep + \ choose-buffer + \ choose-client + \ choose-list + \ choose-session + \ choose-tree + \ choose-window + \ clear-history + \ clearhist + \ clock-mode + \ command-prompt + \ confirm[-before] + \ copy-mode + \ delete-buffer + \ deleteb + \ detach[-client] + \ display[-message] + \ display-panes + \ displayp + \ find-window + \ findw + \ has[-session] + \ if[-shell] + \ join-pane + \ joinp + \ kill-pane + \ killp + \ kill-server + \ kill-session + \ kill-window + \ killw + \ last-pane + \ lastp + \ last[-window] + \ link-window + \ linkw + \ list-buffers + \ lsb + \ list-clients + \ lsc + \ list-commands + \ lscm + \ list-keys + \ lsk + \ list-panes + \ lsp + \ list-sessions + \ ls + \ list-windows + \ lsw + \ load-buffer + \ loadb + \ lock-client + \ lockc + \ lock[-server] + \ lock-session + \ locks + \ move-pane + \ movep + \ move-window + \ movew + \ new[-session] + \ next-layout + \ nextl + \ next[-window] + \ paste-buffer + \ pasteb + \ pipe-pane + \ pipep + \ previous-layout + \ prevl + \ prev[ious-window] + \ refresh[-client] + \ rename[-session] + \ rename-window + \ renamew + \ resize-pane + \ resizep + \ respawn-pane + \ respawnp + \ respawn-window + \ respawnw + \ rotate-window + \ rotatew + \ run[-shell] + \ save-buffer + \ saveb + \ select-layout + \ selectl + \ select-pane + \ selectp + \ select-window + \ selectw + \ send[-keys] + \ send-prefix + \ server-info + \ info + \ set-buffer + \ setb + \ set-environment + \ setenv + \ set[-option] + \ set-window-option + \ setw + \ show-buffer + \ showb + \ show-environment + \ showenv + \ show-messages + \ showmsgs + \ show[-options] + \ show-window-options + \ showw + \ source[-file] + \ split-window + \ splitw + \ start[-server] + \ suspend-client + \ suspendc + \ swap-pane + \ swapp + \ swap-window + \ swapw + \ switch-client + \ switchc + \ unbind[-key] + \ unlink-window + \ unlinkw + \ wait[-for] + +syn keyword tmuxOptsSet + \ assume-paste-time + \ base-index + \ bell-action + \ bell-on-alert + \ buffer-limit + \ default-command + \ default-shell + \ default-terminal + \ destroy-unattached + \ detach-on-destroy + \ display-panes-active-colour + \ display-panes-colour + \ display-panes-time + \ display-time + \ escape-time + \ exit-unattached + \ focus-events + \ history-limit + \ lock-after-time + \ lock-command + \ lock-server + \ message-command-style + \ message-limit + \ message-style + \ mouse-resize-pane + \ mouse-select-pane + \ mouse-select-window + \ mouse-utf8 + \ pane-active-border-style + \ pane-border-style + \ prefix + \ prefix2 + \ quiet + \ renumber-windows + \ repeat-time + \ set-clipboard + \ set-remain-on-exit + \ set-titles + \ set-titles-string + \ status + \ status-interval + \ status-justify + \ status-keys + \ status-left + \ status-left-length + \ status-left-style + \ status-position + \ status-right + \ status-right-length + \ status-utf8 + \ staus-right-style + \ terminal-overrides + \ update-environment + \ visual-activity + \ visual-bell + \ visual-content + \ visual-silence + \ word-separators + +syn keyword tmuxOptsSetw + \ aggressive-resize + \ allow-rename + \ alternate-screen + \ automatic-rename + \ c0-change-interval + \ c0-change-trigger + \ clock-mode-colour + \ clock-mode-style + \ force-height + \ force-width + \ main-pane-height + \ main-pane-width + \ mode-keys + \ mode-mouse + \ mode-style + \ monitor-activity + \ monitor-content + \ monitor-silence + \ other-pane-height + \ other-pane-width + \ pane-base-index + \ remain-on-exit + \ synchronize-panes + \ utf8 + \ window-status-activity-style + \ window-status-bell-style + \ window-status-content-style + \ window-status-current-format + \ window-status-current-style + \ window-status-format + \ window-status-last-style + \ window-status-separator + \ window-status-style + \ wrap-search + \ xterm-keys + +syn keyword tmuxTodo FIXME NOTE TODO XXX contained + +syn match tmuxKey /\(C-\|M-\|\^\)\+\S\+/ display +syn match tmuxNumber /\d\+/ display +syn match tmuxOptions /\s-\a\+/ display +syn match tmuxVariable /\w\+=/ display +syn match tmuxVariableExpansion /\${\=\w\+}\=/ display + +syn region tmuxComment start=/#/ end=/$/ contains=tmuxTodo display oneline +syn region tmuxString start=/"/ end=/"/ display oneline +syn region tmuxString start=/'/ end=/'/ display oneline + +hi def link tmuxAction Boolean +hi def link tmuxBoolean Boolean +hi def link tmuxCmds Keyword +hi def link tmuxComment Comment +hi def link tmuxKey Special +hi def link tmuxNumber Number +hi def link tmuxOptions Identifier +hi def link tmuxOptsSet Function +hi def link tmuxOptsSetw Function +hi def link tmuxString String +hi def link tmuxTodo Todo +hi def link tmuxVariable Constant +hi def link tmuxVariableExpansion Constant + +let b:current_syntax = "tmux" diff --git a/examples/tmux_backup.sh b/examples/tmux_backup.sh new file mode 100644 index 00000000..bc0bf370 --- /dev/null +++ b/examples/tmux_backup.sh @@ -0,0 +1,81 @@ +#!/bin/bash +# +# By Victor Orlikowski. Public domain. +# +# This script maintains snapshots of each pane's +# history buffer, for each tmux session you are running. +# +# It is intended to be run by cron, on whatever interval works +# for you. + +# Maximum number of snapshots to keep. +max_backups=12 +# Names of sessions you may wish to exclude from snapshotting, +# space separated. +ignore_sessions="" +# The directory into which you want your snapshots placed. +# The default is probably "good enough." +backup_dir=~/.tmux_backup/snapshot + +######################################################################## + +# Rotate previous backups. +i=${max_backups} +while [[ ${i} != 0 ]] ; do +if [ -d ${backup_dir}.${i} ] ; then + if [[ ${i} = ${max_backups} ]] ; then + rm -r ${backup_dir}.${i} + else + mv ${backup_dir}.${i} ${backup_dir}.$((${i}+1)) + fi +fi +i=$((${i}-1)) +done + +if [ -d ${backup_dir} ] ; then + mv ${backup_dir} ${backup_dir}.1 +fi + +## Dump hardcopy from all windows in all available tmux sessions. +unset TMUX +for session in $(tmux list-sessions | cut -d' ' -f1 | sed -e 's/:$//') ; do + for ignore_session in ${ignore_sessions} ; do + if [ ${session} = ${ignore_session} ] ; then + continue 2 + fi + done + + # Session name can contain the colon character (":"). + # This can screw up addressing of windows within tmux, since + # target windows are specified as target-session:target-window. + # + # We use uuidgen to create a "safe" temporary session name, + # which we then use to create a "detached" session that "links" + # to the "real" session that we want to back up. + tmpsession=$(uuidgen) + tmux new-session -d -s "$tmpsession" -t "$session" + HISTSIZE=$(tmux show-options -g -t "$tmpsession" | grep "history-limit" | awk '{print $2}') + for win in $(tmux list-windows -t "$tmpsession" | grep -v "^\s" | cut -d' ' -f1 | sed -e 's/:$//'); do + session_dir=$(echo "$session" | sed -e 's/ /_/g' | sed -e 's%/%|%g') + win_spec="$tmpsession":"$win" + + if [ ! -d ${backup_dir}/${session_dir}/${win} ] ; then + mkdir -p ${backup_dir}/${session_dir}/${win} + fi + + for pane in $(tmux list-panes -t "$win_spec" | cut -d' ' -f1 | sed -e 's/:$//'); do + pane_path=${backup_dir}/${session_dir}/${win}/${pane} + pane_spec="$win_spec"."$pane" + + tmux capture-pane -t "$pane_spec" -S -${HISTSIZE} + tmux save-buffer ${pane_path} + + if [ ! -s ${pane_path} ] ; then + sleep 1 + rm ${pane_path} + fi + done + done + tmux kill-session -t "$tmpsession" + +done diff --git a/examples/vim-keys.conf b/examples/vim-keys.conf new file mode 100644 index 00000000..d587d0bf --- /dev/null +++ b/examples/vim-keys.conf @@ -0,0 +1,36 @@ +# $Id: vim-keys.conf,v 1.2 2010-09-18 09:36:15 nicm Exp $ +# +# vim-keys.conf, v1.2 2010/09/12 +# +# By Daniel Thau. Public domain. +# +# This configuration file binds many vi- and vim-like bindings to the +# appropriate tmux key bindings. Note that for many key bindings there is no +# tmux analogue. This is intended for tmux 1.3, which handles pane selection +# differently from the previous versions + +# 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 hjkl, as one would in vim after pressing ctrl-w +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind 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 < resize-pane -L 1 +bind > resize-pane -R 1 +bind - resize-pane -D 1 +bind + resize-pane -U 1 + +# bind : to command-prompt like vim +# this is the default in tmux already +bind : command-prompt + +# vi-style controls for copy mode +setw -g mode-keys vi diff --git a/examples/xterm-keys.vim b/examples/xterm-keys.vim new file mode 100644 index 00000000..af44968d --- /dev/null +++ b/examples/xterm-keys.vim @@ -0,0 +1,52 @@ +" tmux.vim - Set xterm input codes passed by tmux +" Author: Mark Oteiza +" License: Public domain +" Description: Simple plugin that assigns some xterm(1)-style keys to escape +" sequences passed by tmux when "xterm-keys" is set to "on". Inspired by an +" example given by Chris Johnsen at: +" https://stackoverflow.com/a/15471820 +" +" Documentation: help:xterm-modifier-keys man:tmux(1) + +if exists("g:loaded_tmux") || &cp + finish +endif +let g:loaded_tmux = 1 + +function! s:SetXtermCapabilities() + set ttymouse=sgr + + execute "set <xUp>=\e[1;*A" + execute "set <xDown>=\e[1;*B" + execute "set <xRight>=\e[1;*C" + execute "set <xLeft>=\e[1;*D" + + execute "set <xHome>=\e[1;*H" + execute "set <xEnd>=\e[1;*F" + + execute "set <Insert>=\e[2;*~" + execute "set <Delete>=\e[3;*~" + execute "set <PageUp>=\e[5;*~" + execute "set <PageDown>=\e[6;*~" + + execute "set <xF1>=\e[1;*P" + execute "set <xF2>=\e[1;*Q" + execute "set <xF3>=\e[1;*R" + execute "set <xF4>=\e[1;*S" + + execute "set <F5>=\e[15;*~" + execute "set <F6>=\e[17;*~" + execute "set <F7>=\e[18;*~" + execute "set <F8>=\e[19;*~" + execute "set <F9>=\e[20;*~" + execute "set <F10>=\e[21;*~" + execute "set <F11>=\e[23;*~" + execute "set <F12>=\e[24;*~" + + execute "set t_kP=^[[5;*~" + execute "set t_kN=^[[6;*~" +endfunction + +if exists('$TMUX') + call s:SetXtermCapabilities() +endif |