useful tmux changes
- set history size - show tmux msgs longer - key binding s|S for sync panes - key binding m|M for man - double tab C-b to switch to the last window
This commit is contained in:
38
.tmux.conf
38
.tmux.conf
@@ -9,7 +9,10 @@ set -g default-terminal "screen-256color"
|
||||
set-option -g detach-on-destroy off
|
||||
|
||||
# Scroll History
|
||||
#set -g history-limit 30000
|
||||
set-option -g history-limit 10000
|
||||
|
||||
# keep tmux msgs around longer
|
||||
set -g display-time 2000
|
||||
|
||||
# Set ability to capture on start and restore on exit window data when running an application
|
||||
setw -g alternate-screen on
|
||||
@@ -18,17 +21,17 @@ setw -g alternate-screen on
|
||||
set -s escape-time 50
|
||||
|
||||
# loud or quiet?
|
||||
set-window-option -g monitor-activity off
|
||||
set-option -g visual-activity off
|
||||
set-option -g visual-bell off
|
||||
set-option -g visual-silence off
|
||||
set-window-option -g monitor-activity off
|
||||
set-option -g bell-action none
|
||||
|
||||
# mouse
|
||||
set -g mode-mouse on
|
||||
set -g mouse-select-pane on
|
||||
set -g mouse-resize-pane
|
||||
set -g mouse-select-window on
|
||||
set-window-option -g mouse-mode on
|
||||
set-option -g mouse-select-window on
|
||||
set-option -g mouse-select-pane on
|
||||
set-option -g mouse-resize-pane on
|
||||
|
||||
|
||||
##########################################
|
||||
@@ -90,8 +93,9 @@ set -g status-left ''
|
||||
### some tmux tweaks
|
||||
##########################################
|
||||
|
||||
# Use vim keybindings in copy mode
|
||||
setw -g mode-keys vi
|
||||
# Use vim mode keys
|
||||
set-option -g status-keys vi
|
||||
set-option -g mode-keys vi
|
||||
|
||||
# Setup 'v' to begin selection as in Vim
|
||||
bind-key -t vi-copy v begin-selection
|
||||
@@ -101,27 +105,33 @@ bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
|
||||
unbind -t vi-copy Enter
|
||||
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
|
||||
|
||||
|
||||
# split panes using | and -, open new pane in current directory
|
||||
bind | send-keys " ~/.tmux/newpanes -h" C-m
|
||||
bind - send-keys " ~/.tmux/newpanes -v" C-m
|
||||
unbind '"'
|
||||
unbind %
|
||||
|
||||
|
||||
# Start windows and panes at 1, not 0
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
|
||||
|
||||
# reload config file (change file location to your the tmux.conf you want to use)
|
||||
bind r source-file ~/.tmux.conf \; display "tmux config reloaded..."
|
||||
|
||||
|
||||
# Setup 'x' zoom into a panes (maximize) an save/restore other panes in the current window
|
||||
bind x run ". ~/.tmux/zoom"
|
||||
|
||||
|
||||
# set terminal title
|
||||
set -g set-titles on
|
||||
set -g set-titles-string '#(whoami)@#h | #(curl ipecho.net/plain;echo)'
|
||||
set -g set-titles-string '#(whoami)@#h | #(curl ipecho.net/plain;echo)'
|
||||
|
||||
# duplicate input to all panes in the same window
|
||||
bind S set-window-option synchronize-panes on
|
||||
bind s set-window-option synchronize-panes off
|
||||
|
||||
# open a man page in new pane or window
|
||||
bind m command-prompt -p "man page:" "split-window -h 'exec man %%'"
|
||||
bind M command-prompt -p "Man page:" "new-window -n 'man %1' 'exec man %1'"
|
||||
|
||||
# Double tapping the prefix jumps to last window
|
||||
bind-key C-b last-window
|
||||
Reference in New Issue
Block a user