18

I have a terminal window in vim and need to see the output that is on a higher line than is shown. How do I "scroll" up to see that?

Command that I opened my terminal with:

:term bash
3
  • have you tried CTRL+Y or CTRL+E?
    – mael'
    Jun 13, 2019 at 19:46
  • @mael' That works in the editor window but not the terminal window. Thanks for the suggestion though Jun 13, 2019 at 20:00
  • 2
    Might be a good question for vi.stackexchange.com Jun 18, 2019 at 18:42

2 Answers 2

45
+50

If you press Ctrl + w, followed by Shift + n, it pauses the terminal, and you can navigate it like any buffer. Pressing i takes you back into the terminal as you were before.

1

If you are using neovim, press Ctrl + \ followed by Ctrl + n to enter normal mode in a terminal.

The help (:help terminal-input) says the following:

In this mode all keys except <C-\><C-N> are sent to the underlying program. Use <C-\><C-N> to return to normal-mode. CTRL-\_CTRL-N

ps. You might want to map this to a more sensible combination, like for example double escape:

tnoremap <Esc><Esc> <C-\><C-n>
1
  • Not using neovim but good to know Jul 6, 2020 at 0:55

You must log in to answer this question.

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