From b401e12fd96d74e76d7e9046bcad1f4c0d4dbed9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 22 Sep 2025 08:52:28 +0530 Subject: [PATCH] Note how to use nvim as scrollback pager in the docs for that option --- docs/overview.rst | 2 +- kitty/options/definition.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/overview.rst b/docs/overview.rst index e05977c9b..b83bc022d 100644 --- a/docs/overview.rst +++ b/docs/overview.rst @@ -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 ` 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 `__ or `kitty-grab `__ or see more tips for using various editor programs, in :iss:`this thread <719>`. diff --git a/kitty/options/definition.py b/kitty/options/definition.py index c930abf8f..11f947909 100644 --- a/kitty/options/definition.py +++ b/kitty/options/definition.py @@ -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 ` +you can use with more features that works with older neovim as well. ''' )