DEV Community

loading...

Discussion on: Edit tmux output with Vim (or any text editor)

Collapse
genkobar profile image
Valdimar Bjorn Asgeirsson

Great tip!

I modified the script to open with the editor currently set via $EDITOR, because I wanted to edit with neovim instead of vim:

#!/bin/bash

# $HOME/bin/vim-edit-tmux-output

file=`mktemp`.sh
tmux capture-pane -pS -32768 > $file
tmux new-window -n:mywindow "$EDITOR '+ normal G $' $file"