Using Neovim as a pager

by Hund | November 19, 2025

When I couldn’t find a decent pager that supports basic features like proper theming, I turned to the fediverse for some recommendations. I only received one reply, but luckily enough, it was a really good recommendation. R.L. Dane advised me that I could use my text editor Neovim as a pager like this: nvim -R +"set scrolloff=999" +"norm L".

I decided to build upon this idea and add a few additional settings:

#!/bin/sh

nvim \
    -c "set filetype=markdown" \
    -c "normal! gg" \
    -c "set titlestring=Reader" \
    -c "Goyo" \
    -c "nnoremap <silent> j <C-e>" \
    -c "nnoremap <silent> k <C-y>" \
    -c "nnoremap q :Goyo<CR>:q!<CR>" \
    -c "hi Cursor blend=100" \
    -c "set guicursor+=a:Cursor/lCursor" \
    "$1"

These commands does the following things:

  1. Sets the file type to Markdown.
  2. Opens the document at the top (probably not needed, but why not).
  3. Sets the title to “Reader”.
  4. Enables the distraction free mode with Goyo.
  5. Makes the keys j and k to always scroll one step, no matter where the cursor is.
  6. Hides the cursor. I don’t need it to read text.
  7. Let’s me exit Neovim with just a single key (q).

And here’s the result:

Left: Newsboat. Right: Neovim as a pager displaying the same article as Newsboat.

This solution gives me much more control over the content, how it looks and how I interact with it. It also means that I don’t have to install another tool.

Meta

Comments

There's no comments for this post. Use this e-mail form if you would like to leave a /public/ comment on this post. Or simply send me a private e-mail message if you have any feedback, or just want to say hello.