VIM return to scrolling after "Type number and <Enter> (empty cancels)"

Viewed 82

Some times you have a long list of options and you have to scroll to the end or type q to get prompted with: "Type number and Enter (empty cancels)"

Is it possible to return back to scrolling? Some times the list is long and I want to see my options again before making a decision. Especially since you exit to the "Type number..." without warning. Or the only option after reaching this point is to exit and enter again?

1 Answers

Is it possible to return back to scrolling? Some times the list is long and I want to see my options again before making a decision. Especially since you exit to the "Type number..." without warning.

Unfortunately, you cannot get back to scrolling. The pager is very minimal and doesn't have this option, in fact it supports little to no customization. See :h pager or :h more-prompt to familiarize with the navigation commands inside a pager, which to some extent will help mitigate this.

Or the only option after reaching this point is to exit and enter again?

Yes, but there are faster ways that doesn't require you to enter the entire command again. Meet @: and g<

@:

typing @: in normal mode re-executes the last command you ran. This means, you can get back to the top of the pager in 3 keystrokes (<cr>@:) after you reached the end of the pager and in the colon prompt.

g<

Less useful in your specific use-case, but this is useful when you hit enter accidentally. Typing g< right after you hit enter in the colon prompt, will take you back to the end of the pager, with option to enter a number again.

Related