lucc/nvimpager

nvimpager doesn't work inside nvim terminal emulator

Closed this issue · 2 comments

When neovim/neovim#11009 was merged neovim started defining $NVIM when you open the terminal and it is not the path to nvim executable.

I use nvimpager as a substitute for less. This means that I cannot print systemctl status or journalctl, etc. in the nvim terminal emulator.

lucc commented

What would be better names for the variable on our end?

  • NVIMPAGER_NVIM
  • NVIM_COMMAND
  • ...?

I checked and this and XDG_CONFIG_HOME seem to be the only environment variables that we read from outside, so there are not other variables that we have to align with.

I think NVIMPAGER_NVIM is better. But we can also add a check like this to maintain compatibility:

if [[ ! $("$NVIM" --version) =~ vim ]]; then
    NVIM=nvim
fi