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.

  • Can someone please add mobaxterm to the list of tags? It seems I need 300+ points for it.
    – Srikanth
    Jul 7, 2015 at 13:33

2 Answers 2


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.

  • I've had bad experiences when doing this. My advice: Never background Vim; just use :shell.
    – Wildcard
    Feb 15, 2016 at 7:37

I think that another way is to send the command ":!" to vim. Then, you will view back the terminal, and would be able to see previous commands, until you type "enter" or a new VIM command. Then vim would come back. Enjoy ! Gilles.

  • Or just run :shell, which is more readable. Are those equivalent?
    – Wildcard
    Feb 15, 2016 at 7:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .