diff --git a/.tmux.conf b/.tmux.conf index eef7879..7fa715a 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -74,7 +74,14 @@ set -g @session-wizard 'C-x' # fix clipboard in neovim set-option -g set-clipboard on -bind C-c run "tmux save-buffer - | xclip -selection clipboard" +# bind C-c run "tmux save-buffer - | xclip -selection clipboard" +# +bind-key v capture-pane -S -1000 \; save-buffer /tmp/tmux-buffer \; new-window -n '[scrollback]' 'n /tmp/tmux-buffer; rm /tmp/tmux-buffer; tmux kill-window' + +# bind-key v capture-pane -S -1000 \; save-buffer /tmp/tmux-buffer \; split-window -h "nvim /tmp/tmux-buffer" +# + +bind C-c copy-mode bind C-v run "tmux set-buffer \"$(xclip -selection clipboard -o)\"; tmux paste-buffer" setw -g mode-keys vi bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -sel clip" @@ -105,6 +112,9 @@ bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" bind-key \\ run-shell 'tmux-td' # bind-key \\ run-shell "tmux display-popup -E 'tmux detach-client'" +# bind u copy-mode +unbind u +unbind -n u bind-key -T copy-mode-vi C-h select-pane -L # bind-key -T copy-mode-vi C-j select-pane -D # bind-key -T copy-mode-vi C-k select-pane -U