Closed 3v1n0 closed 4 years ago
This is a known issue. It is noted in the README under known issues and as the last item of the todo list.
nvimpager saves stdin to a file in order to decide if it is small enough to use cat mode or if pager mode is needed. Currently I only know how to do this with wc
on a temp file. I tried to experiment with a pure vimscript solution so that I could stream stdin directly into nvim but did not come up with a solution until now. Maybe you have an idea how that can be done?
I think I was waiting for https://github.com/neovim/neovim/issues/7438 in order to come back to this.
As a workaround you can use export PAGER='nvimapger -p'
which disables auto mode and does not use the temp file. You will still have the "hanging" neovim until all of the input did arrive (see known issues).
I'm using
nvimpager
as my default pager and while being slightly slow for some things (understandable though)This is probably not just an issue with this script though as I'm noticing the same on pure vim and neovim.
It's just enough to launch
git log -p
and neovim starts hanging and after some time it will open the fileHowever this script instead of streaming the actual file contents, it creates a local file that can be quite big, and it's something I assume that a pager should not do, by instead just streaming the content
This is the temp file it's trying to open