When I work in terminal, I see the history of the last shell commands execution output. If I run vim, I see the file I open full screen. When I exit vim, I can see the history of the last shell commands again.
However, when I use vim from screen. I see the footprint of the file I was just editing on my exit from vim instead of the history of the last shell commands. I'd like to see the shell's history though.
How can I achieve this behaviour?
I used:
- terminal.app and iterm2.app
- tried switching xterm to xterm-256color (in iterm2.app)
- checking and unchecking "Save lines to scrollback when an app status bar is present" and "Save lines to scrollback in alternate screen mode" (in iterm2)
- adding termcapinfo xterm ti@:te@ to .screenrc (although it should be a solution to the opposite problem, but why not to try)
- sshing to linux machines and trying to use gnu-screen there
Up to now I didn't get the desired behaviour.
P.S.
I googled a bit and saw comments of people who try to solve the opposite problem:
The main idea behind this behaviour is whether programs use alternate screen to save a picture of the shell history and show it when vim exits. Thus if one wants to solve the opposite problem, he should