[Feature Request] Provide capability for external tools (eg Neovim) to access scrollback buffer (like Kitty's get-text) #4870
-
This has been discussed in the open issue for integrated scrollback search but it relates specifically to allowing plugins for external editors/programs like Neovim to access the scrollback buffer so that it can be searched, highlighted etc within the user's native environment, therefore is out of scope of that specific ticket. I'm therefore reproducing my comment in this discussion. This feature request is proposed as a solution to the problem of the many different preferences users have for how to search and copy from the scrollback buffer, particularly for specific vim-like behaviours. By providing the capabilities for external tools to access the scrollback buffer, it becomes possible for all manner of preferences to be indirectly supported without bloating Ghostty. I propose capability like Kitty's get-text which allows retrieving all or part of the scrollback without dumping to a file first. For an example of what this makes possible see this incredible Neovim plugin which integrates with the Kitty scrollback buffer and provides some extra handy functionality. Here is part of a demo by the author (starting at 9:05) showing switching seamlessly between live Kitty and the scrollback buffer within Neovim. Note the little flash of the text redrawing but other than that you wouldn't know that you had left the terminal! Most relevant to this discussion is that the author also details here (same video from 4:50) various approaches to getting the scrollback buffer into Neovim, starting with writing to a file then eventually settling on Kitty's built-in remote calls like get-text. It will be great if Ghostty can also allow for this kind of deep integration which offers the best of both worlds of native terminal and your raw custom Neovim power, plugins and all. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
this will probably need #2353 or is a dupe of that discussion |
Beta Was this translation helpful? Give feedback.
this will probably need #2353 or is a dupe of that discussion
which talks about a remote communication method for ghostty (kitty remote calls), the title is specific to windows tabs and splits but in general the ideas discussed there are about a more general remote communication protocol for other things as well