We can scroll tmux output with
C-b [ by default, and it provides vim like key binding.
However, some bindings are different from my customized vim.
So I add some scripts and settings to open tmux output with Vim (or any other text editor).
Fortunately, tmux has a nice command
#!/bin/bash file=`mktemp`.sh tmux capture-pane -pS -32768 > $file tmux new-window -n:mywindow "vim $file"
chmod +x $HOME/bin/vim-edit-tmux-output
setenv -g PATH "$HOME/bin:$PATH" bind-key C-e run-shell "vim-edit-tmux-output"
C-b C-e and you can open your tmux output!
Another nice feature is that tmux automatically closes the new pane for Vim after quiting vim.