Created
April 30, 2022 21:44
-
-
Save philmein23/69addfe904d4d092bcfadd3241cd3a76 to your computer and use it in GitHub Desktop.
Tmux Configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.tmux.conf | |
# unbind default prefix and set it to ctrl-a | |
unbind C-b | |
set -g prefix C-Space | |
bind C-Space send-prefix | |
# make delay shorter | |
set -sg escape-time 0 | |
#### key bindings #### | |
unbind r | |
# reload config file | |
bind r source-file ~/.tmux.conf \; display ".tmux.conf reloaded!" | |
# quickly open a new window | |
bind N new-window | |
# synchronize all panes in a window | |
bind y setw synchronize-panes | |
# pane movement shortcuts (same as vim) | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
# enable mouse support for switching panes/windows | |
# set -g mouse-utf8 on | |
set -g mouse on | |
#### copy mode : vim #### | |
# set vi mode for copy mode | |
setw -g mode-keys vi | |
# copy mode using 'Esc' | |
unbind [ | |
bind Escape copy-mode | |
# start selection with 'space' and copy using 'y' | |
# bind -t vi-copy 'y' copy-selection | |
# paste using 'p' | |
unbind p | |
bind p paste-buffer | |
set -g base-index 1 | |
setw -g pane-base-index 1 | |
set -g renumber-windows on | |
bind-key "|" split-window -h -c "#{pane_current_path}" | |
bind-key "\\" split-window -fh -c "#{pane_current_path}" | |
bind-key "-" split-window -v -c "#{pane_current_path}" | |
bind-key "_" split-window -fv -c "#{pane_current_path}" | |
bind -r "<" swap-window -d -t -1 | |
bind -r ">" swap-window -d -t +1 | |
bind -r C-j resize-pane -D 15 | |
bind -r C-k resize-pane -U 15 | |
bind -r C-h resize-pane -L 15 | |
bind -r C-l resize-pane -R 15 | |
bind c new-window -c "#{pane_current_path}" | |
bind Space last-window | |
bind j choose-window 'join-pane -h -s "%%"' | |
bind J choose-window 'join-pane -s "%%"' | |
# List of plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'tmux-plugins/tmux-yank' | |
set -g @plugin 'christoomey/vim-tmux-navigator' | |
# Other examples: | |
# set -g @plugin 'github_username/plugin_name' | |
# set -g @plugin 'github_username/plugin_name#branch' | |
# set -g @plugin 'git@github.com:user/plugin' | |
# set -g @plugin 'git@bitbucket.com:user/plugin' | |
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |
run '~/.tmux/plugins/tpm/tpm' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment