0

I often want to copy (yank) text in copy-mode-vi, while the terminal is outputting text.

However, it seems impossible to reliably mark the text, while the terminal is not still (i.e., it outputs text to the terminal, making the terminal content change).

Is there any way to "freeze" the terminal, so that I can mark and copy (yank) terminal output, while the terminal is outputting text?

Shuzheng
  • 4,411
  • CTRL+s should temporarily suspend output. CTRL+q to resume – Panki Sep 23 '20 at 07:21
  • @Panki - will you elaborate? Are those Tmux, Bash (Readline), or Terminal commands? – Shuzheng Sep 23 '20 at 08:10
  • See https://unix.stackexchange.com/questions/137842/what-is-the-point-of-ctrl-s – Panki Sep 23 '20 at 09:23
  • What terminal are you using? Also, besides XON/XOFF, consider scroll-lock. – Quasímodo Sep 23 '20 at 12:21
  • @Quasímodo - what is the effect of scroll-lock? I'm using gnome-terminal and Terminal.app – Shuzheng Sep 24 '20 at 06:52
  • @Panki - I've read it thank you. If I press Ctrl-s to suspend, and the running application outputs LOTS of text, will the Terminal "blow" up, if I wait too long before pressing Ctrl-q? I mean, will some buffer get full? – Shuzheng Sep 24 '20 at 07:03
  • @Panki - I assume that the "remote" side in the link you refer to, is the computer's OS? – Shuzheng Sep 24 '20 at 07:07
  • Scroll-lock prevents the terminal window from scrolling, even if more input is generated. You can still manually scroll, differently from XON/XOFF. And yes, in any case if there is a lot of output, the buffer can't hold it all and you won't be able to copy the output. – Quasímodo Sep 24 '20 at 13:23
  • Is it the terminal buffer that gets full? I’m just curious. Can I control the size of this buffer? What happens in the case that buffer gets full? Is it circular, so that things are overwritten? – Shuzheng Sep 28 '20 at 05:35

0 Answers0