From ed553c4d519a89385bada57fa6fb531d72cec0d1 Mon Sep 17 00:00:00 2001 From: Kacper Marzecki Date: Wed, 26 Mar 2025 17:06:15 +0100 Subject: [PATCH] tmux scrollback in neovim --- .tmux.conf | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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