VIMPAGER(1)

πŸ“¦ version 2.06, in arch rolling

✨ VIMPAGER(1): vimpager β€” your new fave less.sh replacement ✨

Manual name folded in near the top like a little name tag: VIMPAGER(1) 🫢

🌸 NAME 🌸

  • vimpager β€” less.sh replacement

πŸ¦‹ SYNOPSIS πŸ¦‹

vimpager 'some file'

# or (this won't always syntax highlight as well)

cat 'some file' | vimpager

🧸 RUN-TIME DEPENDENCIES 🧸

  • vim
  • sharutils or some uudecode (optional)

πŸ› οΈ BUILD DEPENDENCIES πŸ› οΈ

  • sharutils or some uuencode
  • pandoc

πŸŽ€ INSTALL πŸŽ€

git clone git://github.com/rkitover/vimpager
cd vimpager
sudo make install

If you got vimpager from the vim.org scripts section, just put it somewhere in your PATH, e.g.:

cp vimpager ~/bin
chmod +x ~/bin/vimpager

In your ~/.bashrc add the following:

export PAGER=/usr/local/bin/vimpager
alias less=$PAGER
alias zless=$PAGER

πŸ’– DESCRIPTION πŸ’–

A PAGER using less.vim with support for highlighting of man pages and many other features. Works on most UNIX-like systems as well as Cygwin and MSYS. Slay, honestly. πŸ’…

On GitHub: <http://github.com/rkitover/vimpager>

To use a different vimrc with vimpager, put your settings into a ~/.vimpagerrc or ~/.vim/vimpagerrc or a file pointed to by the VIMPAGER_RC environment variable.

You can also have a global config file for all users in /etc/vimpagerrc, users can override it by creating a ~/.vimpagerrc or a ~/.vim/vimpagerrc.

These are the keys for paging while in vimpager, they are the same as in less for the most part:

  • Space β€” One page forward
  • b β€” One page backward
  • d β€” Half a page forward
  • u β€” Half a page backward
  • Enter β€” One line forward
  • k β€” One line backward
  • G β€” End of file
  • g β€” Start of file
  • N% β€” percentage in file
  • ,h β€” Display this help
  • /pattern β€” Search for pattern
  • ?pattern β€” Search backward for pattern
  • n β€” next pattern match
  • N β€” Previous pattern match
  • :n β€” Next file
  • :p β€” Previous file
  • q β€” Quit
  • ,v β€” Toggle Less Mode

To disable loading plugins, put set noloadplugins into a vimpagerrc file.

You can also switch on the vimpager variable in your vimrc to set alternate settings for vimpager.

Put the following into your .vimrc/vimpagerrc if you want to use gvim/MacVim for your pager window:

let vimpager_use_gvim = 1

To turn off the feature of passing through text that is smaller than the terminal height use this:

let vimpager_passthrough = 0

See β€œPASSTHROUGH MODE” further down.

To start vim with -X (no x11 connection, a bit faster startup) put the following into your .vimrc/vimpagerrc:

let vimpager_disable_x11 = 1

The scroll offset (:help scrolloff), may be specified by placing the following into your .vimrc/vimpagerrc (default = 5, disable = 0):

let vimpager_scrolloff = 5

The process tree of vimpager is available in the vimpager_ptree variable, an example usage is as follows:

if exists("vimpager")
  if exists("vimpager_ptree") && vimpager_ptree[-2] == 'wman'
    set ft=man
  endif
endif

To disable the use of AnsiEsc.vim to display ANSI colors in the source, set:

let vimpager_disable_ansiesc = 1

see the section β€œANSI ESCAPE SEQUENCES AND OVERSTRIKES” for more details.

πŸŽ›οΈ COMMAND LINE OPTIONS πŸŽ›οΈ

🏁 + | +G

Start at the end of the file, just like less.

🧚 -c cmd

Run a vim command after opening the file. Multiple -c arguments are supported.

🌈 --cmd cmd

Run a vim command when entering vim before anything else. Multiple --cmd arguments are supported.

πŸ“ -u vimrc

Use alternate .vimrc or .vimpagerrc.

πŸ”₯ ANSI ESCAPE SEQUENCES AND OVERSTRIKES πŸ”₯

If your source is using ANSI escape codes, the AnsiEsc plugin will be used to show them, rather than the normal vim highlighting, however read the caveats below. If this is not possible, they will be stripped out and normal vim highlighting will be used instead.

Overstrikes such as in man pages will always be removed.

vimpager bundles the AnsiEsc (http://www.vim.org/scripts/script.php?script_id=4979) plugin (it is expanded at runtime, there is nothing you have to do to enable it.)

However, your vim must have been compiled with the 'conceal' feature enabled. To check, try

:echo has("conceal")

if the result is '1' you have conceal, if it’s '0' you do not, and the AnsiEsc plugin will not be enabled.

If you’re on a Mac, the system vim does not enable this feature, install vim from Homebrew.

To disable the use of AnsiEsc.vim, set:

let vimpager_disable_ansiesc = 1

in your .vimrc.

🌊 PASSTHROUGH MODE 🌊

If the text sent to the pager is smaller than the terminal window, then it will be displayed without vim as text. If it has ansi codes, they will be preserved, otherwise the text will be highlighted with vimcat.

You can turn this off by putting

let vimpager_passthrough = 0

Passthrough mode requires a POSIX shell with arithmetic expansion, if there is one on your system and it is not detected please submit an issue with the path and your OS version.

πŸͺŸ CYGWIN/MSYS/MSYS2 NOTES πŸͺŸ

vimpager works correctly with the native Windows gvim, just put it in your PATH and set the vimpager_use_gvim option as described above.

πŸ‘‘ AUTHORS πŸ‘‘

Rafael Kitover <rkitover@gmail.com>.


That’s the whole manual, bestie β€” source/version: vimpager user manual; date: April 29, 2015; manual: VIMPAGER(1). Mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from