From: Colin P. McCabe Date: Wed, 25 Sep 2024 18:34:21 +0000 (-0700) Subject: tmux: Enter copy mode with ctrl-i X-Git-Url: http://club.cc.cmu.edu/~cmccabe/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;hp=47664caf64a47c2af3593e4c9c4a041e20d84bbc;p=cmccabe-etc tmux: Enter copy mode with ctrl-i --- diff --git a/.tmux.conf b/.tmux.conf index efa953b..747c2c3 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,34 +1,73 @@ -# turn off esc-wait so that vi works correctly -set-option -sg escape-time 0 +# +# ████████ ███ ███ ██ ██ ██ ██ +# ██ ████ ████ ██ ██ ██ ██ +# ██ ██ ████ ██ ██ ██ ███ +# ██ ██ ██ ██ ██ ██ ██ ██ +# ██ ██ ██ ██████ ██ ██ +# -# use control-K as the prefix +# Global key options. +# Turn off esc-wait so that vi works correctly. +set-option -sg escape-time 0 + +# Use control-K as the prefix. set -g prefix C-k unbind C-b bind C-k send-prefix -set-option -g history-limit 100000 -set-window-option -g xterm-keys on - +# Use vi keys everywhere. set-window-option -g mode-keys vi set-option -g status-keys vi + +# History settings. +set-option -g history-limit 100000 + +# Scary global settings. +# The UTF8 stuff doesn't seem to be recognized any more? +set-window-option -g xterm-keys on #set-window-option -g utf8 on +#set-option -g status-utf8 on #set-window-option -g mode-mouse off # disable mouse #set -g mouse-select-pane off set -g default-terminal "screen-256color" set -as terminal-overrides ",*:Tc" - set -g visual-bell off -bind-key -n F5 prev -bind-key -n F6 select-pane -t :.+ -bind-key -n F7 select-pane -t :.- -bind-key -n F8 next - +# Appearance. set-window-option -g window-status-current-style "fg=black bg=cyan" -#set-option -g status-utf8 on set-option -g status-bg blue set-option -g status-fg white -set-option -g status-interval 5 +set-option -g status-interval 10 set-option -g visual-activity off set-window-option -g monitor-activity off +# Require the prefix before each command for moving around. +set-option -g repeat-time 0 + +# Enter copy-mode with ctrl-i +bind-key C-i copy-mode + +# Moving between panes and windows with the F-keys. +#bind-key -n F5 prev +#bind-key -n F6 select-pane -t :.+ +#bind-key -n F7 select-pane -t :.- +#bind-key -n F8 next + +# Moving between panes and windows with vim movement. +bind -r C-h select-window -t :- +bind -r C-l select-window -t :+ +bind -r C-j select-pane -t :.+ +bind -r C-k select-pane -t :.- + +# Moving between panes with vim movement. +# This is kind of redundant with the above but maybe it's still useful. +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + +# Resizing panes with the vim movement keys. +bind -r H resize-pane -L 2 +bind -r J resize-pane -D 2 +bind -r K resize-pane -U 2 +bind -r L resize-pane -R 2 diff --git a/.vimrc b/.vimrc index 5aa3cfc..ce37af6 100644 --- a/.vimrc +++ b/.vimrc @@ -34,6 +34,7 @@ set t_Co=256 set sw=4 set ts=4 set et +set modelines=0 "*************** bell *************** set vb t_vb="."