1
Fork 0
satellite/dotfiles/tmux/tmux.conf
2022-03-09 02:16:00 +02:00

40 lines
1.1 KiB
Plaintext

# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# More colors
set-option -g default-terminal "tmux-256color"
set -g -a terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[2 q'
# force a reload of the config file (I don't think this works on nixos)
unbind r
bind r source-file ~/.tmux.conf
# quick pane cycling
unbind ^A
bind ^A select-pane -t :.+
# Vim-like keybinds for switching between panes
bind -n m-h select-pane -L
bind -n m-l select-pane -R
bind -n m-k select-pane -U
bind -n m-j select-pane -D
# Vim-mode
set-window-option -g mode-keys vi
# Vim like keybinds for copying
bind -t vi-copy v begin-selection # begin selection
bind -t vi-copy V rectangle-toggle # square selection (?)
bind -t vi-copy y copy-pipe 'xclip -in -set clipboard' # copy
unbind p
bind p run "tmux set-buffer \"$(xclip -o -set clipboard)\"; tmux paste-buffer" # paste
# Vim like mode for leaving insert mode
unbind [ # unbind the default way to copy text
bind Escape copy-mode # allow exiting insert mode with Escape
bind jj copy-mode # allow exiting insert mode with jj (?)