Last active
November 11, 2022 14:06
-
-
Save tomasflopes/96e3c0961ac68fcdcca699a4b7566d52 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Change leader key to Space | |
unbind C-b | |
unbind C-Space | |
set -g prefix C-Space | |
bind C-Space send-prefix | |
set -ga terminal-overrides ",xterm-256color*:Tc" | |
set -s escape-time 0 | |
set -g status-style 'bg=#333333 fg=#5eacd3' | |
# Realod confs | |
unbind r | |
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf" | |
# Mouse mode | |
set -g mouse on | |
# Bind vertical & horizontal splitting | |
unbind v | |
unbind h | |
unbind % # Split vertically | |
unbind '"' # Split horizontally | |
bind v split-window -h -c "#{pane_current_path}" | |
bind h split-window -v -c "#{pane_current_path}" | |
# Navigate panes with vim keybinds | |
bind -n C-h select-pane -L | |
bind -n C-j select-pane -D | |
bind -n C-k select-pane -U | |
bind -n C-l select-pane -R | |
# Increse history limit | |
set -g history-limit 100000 | |
unbind n #DEFAULT KEY: Move to next window | |
unbind w #DEFAULT KEY: change current window interactively | |
bind n command-prompt "rename-window '%%'" | |
bind w new-window -c "#{pane_current_path}" | |
# Start counting from 1 | |
set -g base-index 1 | |
set-window-option -g pane-base-index 1 | |
setw -g pane-base-index 1 | |
# Change windows with vim keybinds + Alt | |
bind -n M-Left previous-window | |
bind -n M-Right next-window | |
bind -n M-h previous-window | |
bind -n M-l next-window | |
# Set copy mode with vim keybinds | |
set-window-option -g mode-keys vi | |
# Use system clipboard | |
unbind -T copy-mode-vi Space; #Default for begin-selection | |
unbind -T copy-mode-vi Enter; #Default for copy-selection | |
bind P paste-buffer | |
bind-key -T copy-mode-vi v send-keys -X begin-selection | |
bind-key -T copy-mode-vi y send-keys -X copy-selection | |
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -sel clip -i' | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'dracula/tmux' | |
run -b '~/.tmux/plugins/tpm/tpm' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment