diff --git a/.tmux.conf b/.tmux.conf index c7528a20..40c631a5 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -20,3 +20,5 @@ bind-key -T copy-mode-vi Escape send -X cancel bind-key -n C-p run "xclip -o | tmux load-buffer -" bind-key -n C-y run "tmux show-buffer | xclip -i -sel p -f | xclip -i -sel c" + +bind-key -n C-e run "tmux setenv TMUX_PANE_CONTENT \"$(tmux capture-pane -p | sed 's/\\\"/\\\\\"/g')\" && tmux new-window -n:edit_pane \"echo $TMUX_PANE_CONTENT | nvim \\\"+normal G\\\" \\\"+set filetype=zsh\\\" -\" && tmux setenv -u TMUX_PANE_CONTENT"