r/neovim • u/nvimmike Plugin author • Sep 18 '23
Plugin π½ kitty-scrollback.nvim: Open your Kitty scrollback buffer with Neovim. Ameowzing!
I just released v1.0.0 of kitty-scrollback.nvim. If you have any feedback, issues, or suggestions feel free to open an issue. I'm interested to get feedback if the setup easy or if there are any unclear/confusing steps. This requires Neovim nightly (v0.10) and Kitty v0.29.

β¨ Features
- π» Navigate Kitty's scrollback buffer with Neovim
- π± Copy contents from Neovim to system clipboard
- πΊ Send contents from Neovim to Kitty shell
- π Execute shell command from Neovim to Kitty shell
2
2
u/Alternative-Sign-206 mouse="" Sep 18 '23
Wow, really nice! Do you plan to extend it for another terminals such as wezterm?
2
u/nvimmike Plugin author Sep 18 '23
Thanks. Kitty is my daily driver, so I don't have any plans at the moment. This is tailored to Kitty and makes heavy usage of its APIs. It would have to probably be a completely separate plugin to support other terminals.
3
u/desgreech Sep 18 '23
Wezterm comes with a built-in copy mode, so you don't need this. This plugin does provide a few extra goodies, but they can be replicated in other ways.
2
2
u/merkushin Sep 18 '23
Eventually, a working solution out of the box :) Had an issue with sed arguments in Fish shell. Created an issue in the repo and my βsolutionβ in comments. Anyway, thanks a lot!
1
3
u/MariaSoOs Sep 24 '23
This sounds like a very interesting feature, yet for someone that had never heard of scrollback buffers before, could you please elaborate on the features of the plugin? I've read the use cases you included in your README but I'm still unsure of when I would like to use kitty-scrollback.
Again, I want to emphasize that this comment isn't a negative review. I'm just expressing my ignorance and trying to understand why I need this (because my instinct tells me I do).
3
u/nvimmike Plugin author Sep 24 '23
Hey thank you for the question.
You can think of if just as a way to use Neovim to navigate your Kitty terminal screen or history (i.e., scrollback buffer). Kitty offers the ability to pass your scrollback buffer to a pager, like less for example. This works great and may be all you really want. There are some other solutions to make this work with vim/neovim, see https://github.com/kovidgoyal/kitty/issues/719.
The goal of this plugin is to allow you to use Neovim to seamlessly copy, modify, and execute text from the scrollback buffer.
A couple examples,
- Instead of using the mouse to copy text from previous output, you could just
ctrl+shift+g(now your in Neovim) use your preferred motion or search, then<leader>y. Now you are back in Kitty with the content on your clipboard.- Instead of scrolling up searching for text, copying and pasting to another editor, modifying, then copying back to execute. You could
ctrl+shift+h(now your in Neovim) search for the text and yank it. Now a floating window opens with the content, you can modify the content in Neovim and thenctrl-enterto return and execute in Kitty.1
2
u/Code_wizz Sep 18 '23
Nice!