Note how to use nvim as scrollback pager in the docs for that option

This commit is contained in:
Kovid Goyal
2025-09-22 08:52:28 +05:30
parent 7b0caaa491
commit b401e12fd9
2 changed files with 9 additions and 1 deletions

View File

@@ -219,7 +219,7 @@ arbitrary, command running in a new :term:`window`, :term:`tab` or
Would open the scrollback buffer in a new :term:`window` when you press the
:kbd:`F1` key. See :sc:`show_scrollback <show_scrollback>` for details.
If you want to use it with an editor such as :program:`vim` to get more powerful
If you want to use it with an editor such as :program:`nvim` to get more powerful
features, see for example, `kitty-scrollback.nvim
<https://github.com/mikesmithgh/kitty-scrollback.nvim>`__ or `kitty-grab <https://github.com/yurikhan/kitty_grab>`__
or see more tips for using various editor programs, in :iss:`this thread <719>`.

View File

@@ -529,6 +529,14 @@ representing which line should be at the top of the screen. Similarly
CURSOR_LINE and CURSOR_COLUMN will be replaced by the current cursor position or
set to 0 if there is no cursor, for example, when showing the last command
output.
If you would rather use neovim to view the scrollback, use something like this::
scrollback_pager nvim --cmd 'set eventignore=FileType' +'nnoremap q ZQ' +'call nvim_open_term(0, {})' +'set nomodified nolist' +'$' -
The above works for neovim 0.12 and newer. There is also a dedicated plugin
:link:`kitty-scrollback.nvim <https://github.com/mikesmithgh/kitty-scrollback.nvim>`
you can use with more features that works with older neovim as well.
'''
)