1
Fork 0
satellite/dotfiles/tmux/tmux.conf

36 lines
968 B
Plaintext
Raw Normal View History

2022-03-08 11:12:09 +01:00
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# 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
2022-03-08 22:26:20 +01:00
# 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 (?)