feat: add vimlike selection and copy in tmux

This commit is contained in:
Matej Janezic 2023-05-31 00:58:56 +02:00
parent 7ffb11d61f
commit b70a613a5a
Signed by: janezicmatej
GPG Key ID: 4298E230ED37B2C0
1 changed files with 6 additions and 1 deletions

View File

@ -7,9 +7,13 @@ set-option -g prefix C-s
bind-key C-s send-prefix bind-key C-s send-prefix
set -g status-style 'bg=#333333 fg=#5eacd3' set -g status-style 'bg=#333333 fg=#5eacd3'
bind r source-file ~/.tmux.conf bind r source-file "$XDG_CONFIG_HOME/tmux/tmux.conf"
set -g base-index 1 set -g base-index 1
set-window-option -g mode-keys vi
bind -T copy-mode-vi v send-keys -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'pbcopy'
# vim-like pane switching # vim-like pane switching
bind -r ^ last-window bind -r ^ last-window
bind -r k select-pane -U bind -r k select-pane -U
@ -17,4 +21,5 @@ bind -r j select-pane -D
bind -r h select-pane -L bind -r h select-pane -L
bind -r l select-pane -R bind -r l select-pane -R
bind -r D neww -c "#{pane_current_path}" "[[ -e TODO.md ]] && nvim TODO.md || nvim ~/.dotfiles/personal/todo.md" bind -r D neww -c "#{pane_current_path}" "[[ -e TODO.md ]] && nvim TODO.md || nvim ~/.dotfiles/personal/todo.md"