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 plugin for using cppman #82

Open gauteh opened 5 years ago

gauteh commented 5 years ago

I wanted to use cppman from within an existing VIM instance rather than launching a new vim instance pager. Your existing script for the vim-pager provides most of the necessary parts, but some things had to be changed. I created a small plugin, heavily based on your script, for this purpose: https://github.com/gauteh/vim-cppman

It sets itself up whenver C++ or C files are opened so that keywordprg and iskeyword settings utilize cppman. The keywordprg sets up a new vert buffer which loads cppman in the same way as cppman.vim does.

Perhaps this should rather be included in cppman as a vim plugin? A few other modifications I had to make: use winwidth(0) rather than &co. Only load when for C++.

SGSSGene commented 5 years ago

I think this should not be included in cppman, but referenced in the README.