Update tmux config

- Remove template code for additional plugins
- Remap Ctrl-b to Ctrl-a
- Split panes with | and -
- Reload config file with "r"
- Switch panes with Alt-arrow
- Enable mouse mode
- Add option to disable automatic window rename as comment
This commit is contained in:
Sravan Balaji
2020-05-27 15:24:44 -04:00
parent 5cd0a09ad8
commit f3e6b0f9ac

View File

@@ -3,10 +3,31 @@ set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'dracula/tmux'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h
bind - split-window -v
unbind '"'
unbind %
# reload config file
bind r source-file ~/.tmux.conf
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on
# don't rename windows automatically
# set-option -g allow-rename off
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'