1

I have previously used the Putty terminal in Windows. It does not have mouse scrolling activated within a vim screen, but DOES allow me to scroll "above" the vim window to see previous shell commands/output.

Now I am using gnome terminal. It's behavior is the opposite. It allows mouse scrolling within the vim window, but does not allow me to scroll "above" to see previous shell output. Is there any way to allow me to scroll "up" to see shell output while I have vim open?

1
  • Ctrl+Shift+Up/Down to scroll on gnome-terminal but I don't know about vim Commented Sep 17, 2014 at 20:47

4 Answers 4

1

You can use <ctrl-z> to suspend vim and return to the shell, where you can scroll up and down all you like.

fg will resume vim, i.e. bring it to the (f)ore(g)round

Sign up to request clarification or add additional context in comments.

Comments

1

While not "exactly" like what you describe you can type

:!

that will suspend your vim session and let you scroll back up through your prior output. You can also use :! to execute commands as follows...

:!ls

will run ls in your current directory.

1 Comment

This works nicely. I mapped the command to F2 in my vimrc so all it takes is an extra keystroke to see the shell output. Thanks!
0

You can use the :shell command to run the terminal from vim. Then you can scroll up and do all the stuff you want. Use <C-d> to return to vim.

Comments

0

you can use the :sh command to switch to the terminal, and type exit on terminal to switch back to vim. you can always see all your shell output on the terminal.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.