MobaXterm: How to see previous commands' terminal output while still being in VIM? (Equivalent of 'Shift + Page Up' in PuTTY)
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.
Related videos on Youtube
Srikanth
Updated on September 18, 2022Comments
-
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 showxterm
as the output, so I'm not sure what's different in PuTTY.-
Srikanth almost 9 yearsCan someone please add mobaxterm to the list of tags? It seems I need 300+ points for it.
-
-
Wildcard about 8 yearsOr just run
:shell
, which is more readable. Are those equivalent? -
Wildcard about 8 yearsI've had bad experiences when doing this. My advice: Never background Vim; just use
:shell
.