Now the nvimpager code needs to be modularised in such a way that the functionality can be loaded into a running nvim without disturbing the editor. This probably means refactor cat mode and ansi-esc mode work like any normal plugin. The old AnsiEsc plugin from Dr Chip and :TOHtml can serve as examples here.
It should be possible to communicate with a parent nvim instance via the
$NVIM
socket if nvimpager is run in a:terminal
.Something like
can be used to send requests to the parent nvim.
Now the nvimpager code needs to be modularised in such a way that the functionality can be loaded into a running nvim without disturbing the editor. This probably means refactor cat mode and ansi-esc mode work like any normal plugin. The old AnsiEsc plugin from Dr Chip and :TOHtml can serve as examples here.