Closed tianxingyzxq closed 4 years ago
Hey
I was only able to reprouce it with the pip3 version
. The apt version worked fine.
For pip3
there actually seems to be some missing dependencies on ubuntu 18.04.
TL;DR;
Step by Step instruction:
$ ### remove cppman via apt-get
$ apt-get remove cppman
$ ### remove config and cache files of cppman
$ rm -r ~/.config/cppman ~/.cache/cppman
$ ### install missing packages (missing in dependency path, probably groff-base is what is missing in your case)
$ apt-get install less bsdmainutils groff-base
$ ### install python3-pip
$ apt-get install python3-pip
$ ### install cppman via pip3
$ pip3 install cppman
the same result. My python version is 3.7.3
apt-get cppman version is 0.4.8-3, the same result.
I am just no able to reproduce your problem. Ubunutu 18.04 only seems to have python 3.7.1 (not 3.7.3), but I also tried it with the packages from ppa:deadsnakes/ppa which provides it in version 3.7.3. But also no luck.
Are the urls cplusplus.com and cppreference.com accessible? (Like can you open them in your webbrowser).
Next step for me would be to install ubuntu 18.04 in a virtual machine. I have no clue what is not working.
I tried it on a clean ubuntu 18.04 and can't reproduce it.
Well, I was facing the same issue.
I had this in my .vimrc
autocmd vimenter * if !argc() | Explore | endif
Removing it resolved the problem.
Well, I was facing the same issue. I had this in my .vimrc
autocmd vimenter * if !argc() | Explore | endif
Removing it resolved the problem.
Cool! that is great. As far as I understand this argument it means: If vim was started without file, open the file explorer (default behavior opens a empty file).
The only thing I don't understand is, how it solved the issue :/ I tried to recreate it. But it works fine.
The core command that fails should look something like this:
gunzip -c .cache/cppman/cppreference.com/std::vector.3.gz | groff -t -c -m man -Tutf8 2>/dev/null | sed "s/\033\[[^m]*m//g" | col -x -b 3<&- | { vim -R -c "let g:page_name=\"vim\"" -S /usr/lib/python3.7/site-packages/cppman/lib/cppman.vim /dev/fd/3 </dev/tty } 3<&0
We can see that vim is called with its own configuration file "/usr/lib/python3.7/site-packages/cpp/lib/cppman.vim" and also has a file attached "/dev/fd/3" which shouldn't trigger "autcmd vimenter * if !argc()" since argc() should be 0.
I really can't figure out what is going wrong. :/
cppman: 0.5 %cppman vector Vim: Reading from stdin...
I have tried pip and apt-get, the result is same. can anyone help?