Open Frydac opened 5 years ago
FYI: another issue: it seems that the plugin removes the colon :
as word boundary (though I can't seem to find the code that is responisble for this), which breaks some things: completion of coc.nvim after namespaces, and highilghting of todo in e.g. //TODO: bla bla
.
I guess this is so to make <cword>
better and include the namespace.
Maybe theres some changes being made to the keyword chars, I think other c/cpp plugins could interfere with this? Either way, once you get into the cppman window it should be correct. FileType should help here.
Perhaps the same filetype as for regular help could be used, if not helpcpp or cppman sounds like good options. Feel free to submit a PR for this.
There are a few forks of the plugin (without PRs) where I think relevant settings have been modified. Maybe these could be incorporated into this one.
On Tue, Dec 18, 2018 at 11:15 AM Emile Vrijdags notifications@github.com wrote:
Hi,
I tried your plugin, but its hyperlinking behavior isn't working as expected. For example: When I have some cpp code with vector in it, I position the cursor on vector and press K, and it brings me to the correct std::vector page. But then, when I scroll down to say, the constructors of vector and I want to use Ctrl-] to open the link, it doesnt find the ctor page of vector, but just opens the vector page again. This does work when using cppman from the command line. Also, when positioning on the begin() member function, the link will bring me to the wrong begin() function page.
Also, maybe give the help window a unique new filtype, something like helpcpp or something (dont know the conventions here). I have wrap set globally, but I would like to be able to disable it for the helpcpp window, but I only know how to do it easily with e.g. a autocmd with a filetype. I could adjust your plugin code and set nowrap I guess, but I also guess that setting some filetype for the window helps with other configurations like this.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gauteh/vim-cppman/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AADd-9b7bN5ZLitJcLs-v4S5Zeoy6KRbks5u6MA4gaJpZM4ZX_NZ .
FYI the setl iskeyword
seems to be the culprit for the broken <cword>
behavior:
setl iskeyword+=:,=,~,[,],*,!,<,>
https://github.com/gauteh/vim-cppman/blob/master/ftplugin/cpp.vim#L147
Maybe this could work if keywordprg
was set in such a way that it runs a command that saves and restores iskeyword
, instead of running :Cppman
only.
Hi,
I tried your plugin, but its hyperlinking behavior isn't working as expected. For example: When I have some cpp code with
vector
in it, I position the cursor onvector
and pressK
, and it brings me to the correct std::vector page. But then, when I scroll down to say, the constructors of vector and I want to useCtrl-]
to open the link, it doesnt find the ctor page of vector, but just opens the vector page again. This does work when using cppman from the command line. Also, when positioning on thebegin()
member function, the link will bring me to the wrongbegin()
function page.Also, maybe give the help window a unique new filtype, something like
helpcpp
or something (dont know the conventions here). I havewrap
set globally, but I would like to be able to disable it for the helpcpp window, but I only know how to do it easily with e.g. aautocmd
with a filetype. I could adjust your plugin code and setnowrap
I guess, but I also guess that setting some filetype for the window helps with other configurations like this.