I often work in vi, suspend vi, run something on the cli, and then fg back into vi to work on the results. For instance, fixing errors that showed up when I ran the cli command.
However, when I fg vi, vi "wipes" the current terminal buffer and I can't see the "last screenful" of terminal output in the scrollback buffer.
Is there some setting in vi (or screen, I use screen) which would help me here?
I have searched google for a long time with no answers. I also realize that there are other workflows that solve this problem, but they aren't perfect (run from inside vi means no shell completion, etc).
If you're using screen
, then surely it would make sense to do your editing in one window, and your compiles in the other, and then just use the ^A[n]
sequences to flip between your terminal output and code screens?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With