9

Note: Not using vim as a pager. That's covered extensively on the Internet.

When you press Tab to complete various kinds of stuff inside vim/gvim, it brings up a fairly basic pager. For example, enter :help taTab. You get a list of matching items, with the pager prompt like this:

-- More -- SPACE/d/j: screen/page/line down, b/u/k: up, q:quit

How do I replace this pager with something a bit more sophisticated?

1
  • Not sure about your sample but for other commands see this answer
    – laktak
    Dec 1, 2016 at 20:19

3 Answers 3

4

That pager is built-in: you can disable it with set nomore but you can't replace it with something else.

You'd better read :h pager and get comfortable with the mappings.

Also, what sophistication do you have in mind?

2

That's built-in; you'd have to modify the source code, and recompile.

A radical change (or complete alternative) is unlikely to be accepted by Bram, but if you have good ideas for simple usability enhancements that can be implemented without introducing much additional code, please send such patches to the vim_dev mailing list.

0

Here is working solution:

Redirect the output of a Vim or external command into a scratch buffer

Description of this script is in this answer for question:

Can listings in the awful 'more' be displayed, instead, in a vim window?

Described and used scratch buffer is similar to less command. Navigation and search function is available in it.


Checked in Vim with clipboard support:

VIM - Vi IMproved 8.1 (2018 May 18, compiled Dec 07 2023 15:42:49) Included patches: 1-213, 1840, 214-579, 1969, 580-1848, 4975, 5023, 2110, 1849-1854, 1857, 1855-1857, 1331, 1858, 1858-1859, 1873, 1860-1969, 1992, 1970-1992, 2010, 1993-2068, 2106, 2069-2106, 2108, 2107-2109, 2109-2111, 2111-2112, 2112-2269, 3612, 3625, 3669, 3741, 1847 under Ubuntu 20.04

sudo apt install vim
sudo apt install vim-gtk3

apt - How do I install vim-gnome on Ubuntu 19.10?

You must log in to answer this question.

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