aitjcize / cppman

C++ 98/11/14 manual pages for Linux/MacOS
GNU General Public License v3.0
1.27k stars 79 forks source link

Vim: Reading from stdin... #92

Closed jdowner closed 5 years ago

jdowner commented 5 years ago

If vim is used as the pager, cppman prints the following message to the terminal when a page is closed,

Vim: Reading from stdin...

This is an issue in vim that is related to piping content through stdin. There is a flag that can be used in v8.0+ of vim to prevent this text,

echo "foo" | vim - --not-a-term

But this will not work for users with an older version of vim, and I suspect there are a lot of people who are still using older versions.

There is a work-around that works for older versions,

echo "foo" | vim </dev/tty <(cat)

However, this does not work when invoked from within the python interpreter.

SGSSGene commented 5 years ago

Thanks for pointing this out. I created a fix for it.