MobaXterm: How to see previous commands' terminal output while still being in VIM? (Equivalent of 'Shift + Page Up' in PuTTY)

12,444

A simple solution is to suspend the running command, usually by typing control-Z. You should then be back in the shell. Give the fg command to return and bring the command back to the foreground again.

Share:
12,444

Related videos on Youtube

Srikanth
Author by

Srikanth

Updated on September 18, 2022

Comments

  • Srikanth
    Srikanth over 1 year

    What I want (which is possible in PuTTY):

    1) Login to a machine (using PuTTY)

    2) $ cat /some/file

    [contents of the /some/file shown on screen]

    3) $ vim

    4) Press Shift + Page Up

    Result: I can see [contents of the /some/file ] and everything else that was shown on the screen before I entered vim.

    Now if I try the same thing in Mobaxterm, which is another terminal application on Windows, I don't get to see the output of the previous commands; it only scrolls the file that I opened in vim which is not what I want.

    I tried to echo $TERM from both PuTTY and Mobaxterm, and they both show xterm as the output, so I'm not sure what's different in PuTTY.

    • Srikanth
      Srikanth almost 9 years
      Can someone please add mobaxterm to the list of tags? It seems I need 300+ points for it.
  • Wildcard
    Wildcard about 8 years
    Or just run :shell, which is more readable. Are those equivalent?
  • Wildcard
    Wildcard about 8 years
    I've had bad experiences when doing this. My advice: Never background Vim; just use :shell.