Skip to content

Support communication with parent nvim if run in :terminal #73

Description

@lucc

It should be possible to communicate with a parent nvim instance via the $NVIM socket if nvimpager is run in a :terminal.

Something like

[[ -S $NVIM ]] && [[ -r $NVIM ]] && [[ -w $NVIM ]]
nvim --clean --headless -u NONE \
  --cmd 'let id=sockconnect("pipe", $NVIM, {"rpc":1})' \
  --cmd 'echo rpcrequest(id, "nvim_command", "echo 1")' \
  --cmd 'qa!'

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions