From b70a613a5a45a55d99bfb950885f664e3528bed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Wed, 31 May 2023 00:58:56 +0200 Subject: [PATCH] feat: add vimlike selection and copy in tmux --- tmux/tmux.conf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tmux/tmux.conf b/tmux/tmux.conf index 8e8fd1d..df64156 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -7,9 +7,13 @@ set-option -g prefix C-s bind-key C-s send-prefix 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-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 bind -r ^ last-window bind -r k select-pane -U @@ -17,4 +21,5 @@ bind -r j select-pane -D bind -r h select-pane -L 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"