This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/env/sh/tmux.conf

77 lines
1.9 KiB
Plaintext
Raw Normal View History

2016-01-06 12:34:29 -06:00
# ^s as prefix
unbind C-b
set -g prefix C-s
bind-key s send-prefix
2016-04-20 16:09:02 -05:00
# statusbar on bottom
set-option -g status-position bottom
2016-01-06 12:34:29 -06:00
# honestly not sure
2016-07-15 11:15:31 -05:00
set -g escape-time 10
2016-04-20 16:09:02 -05:00
setw -g monitor-activity on
2016-01-06 12:34:29 -06:00
# hide tmux status bar by default (prefix H toggles)
2016-04-20 16:09:02 -05:00
set -g status off
2016-01-06 12:34:29 -06:00
2016-04-20 16:09:02 -05:00
bind-key W resize-pane -x 100
2016-01-06 12:34:29 -06:00
# splitting
bind-key v split-window -h
bind-key b split-window
2016-09-13 14:24:51 -05:00
# be xterm
set -g default-terminal "xterm"
2016-04-20 16:09:02 -05:00
# iterating
bind r source-file ~/.tmux.conf
2016-01-06 12:34:29 -06:00
# toggle status bar
bind-key H set status
2016-01-06 12:34:29 -06:00
# vim copying
setw -g mode-keys vi
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
# 1-based indexing for keystroke simplicity
2016-01-06 12:34:29 -06:00
set -g base-index 1
set -g pane-base-index 1
# custom predefined layouts
2016-04-20 16:09:02 -05:00
bind M-l source-file ~/.tmux/layouts/dev.tmux
2016-01-06 12:34:29 -06:00
# mimic pane switching in and out of vim
2016-01-06 12:34:29 -06:00
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# present a menu of urls to open from the visible pane
2016-01-06 12:34:29 -06:00
bind-key u capture-pane \;\
save-buffer /tmp/tmux-buffer \;\
split-window -l 10 "urlview /tmp/tmux-buffer"
2016-04-20 16:09:02 -05:00
# list of plugins
2016-01-06 12:34:29 -06:00
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
2016-04-20 16:09:02 -05:00
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
2016-04-20 16:09:02 -05:00
set -g @plugin 'tmux-plugins/tmux-sessionist'
2016-01-06 12:34:29 -06:00
# plugin options
# enable continuum
2016-09-24 06:25:35 -05:00
set -g @continuum-restore 'off'
2016-09-20 03:07:33 -05:00
# let continuum startup on boot
2016-09-24 06:25:35 -05:00
set -g @continuum-boot 'off'
2016-09-20 03:07:33 -05:00
# initialize tmux plugin manager
2016-01-06 12:34:29 -06:00
run '~/.tmux/plugins/tpm/tpm'
2016-09-20 03:07:33 -05:00
unbind-key C-p