Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 3
    +1 Wonderful answer, but writing the scrollback to a file in /tmp looks like a bad idea since others get the permission to read it! Additionally, in case one is going to use this just to navigate the scrollback with full Vim powers and don't actually want to keep it in a file polluting the filesystem, then one could immediately delete the file after Vim gets its contents in a buffer. E.g. this is what I do: bind v capture-pane -S - \; save-buffer ~/.x \; delete-buffer \; new-window 'vim "set buftype=nofile" +"!rm ~/.x" ~/.x +'. Commented Apr 29, 2021 at 20:05
  • This is a decent solution but doesn't work well. I got $ divim /tmp/tmux -bash: divim: command not found. looks like sending keys ddi has issues. tmux version. 3.3a Commented Aug 16, 2022 at 16:15
  • @JustinLin is your terminal in vim mode? unix.stackexchange.com/questions/4870/… Commented Aug 16, 2022 at 17:48
  • @CiroSantilliПутлерКапут六四事 I have tmux.conf set-window-option -g mode-keys vi. guess that what you mean by vim mode Commented Aug 16, 2022 at 18:21
  • @JustinLin no, I mean in .inputrc: unix.stackexchange.com/questions/4870/… Commented Aug 17, 2022 at 5:04