new tool for vim users

Markus Mohrhard markus.mohrhard at
Mon Aug 11 05:55:22 PDT 2014


On Mon, Aug 11, 2014 at 12:52 PM, Eike Rathke <erack at> wrote:
> Hi Markus,
> On Thursday, 2014-08-07 23:10:35 +0200, Markus Mohrhard wrote:
>> looking for a task that does not make my head spin while being sick in
>> bed I worked on support for YouCompleteMe [1]. For people who don't
>> know it, it is a VIM plugin -- one more reason for emacs users to
>> switch to the good side ;) -- that provides code-completition based on
>> clang. Therefore it actually understands the code and can give correct
>> suggestions.
> Sounds all good, but does the in-the-background-compilation and the
> actual completion search really scale with our code base?

It does for me. The in background compilation takes about a second or
two in my dbgutil build but that hardly matters as it is mostly
helpful to find compile errors and warnings. The completion search is
actually quite fast after looking up the type for the first time. So I
don't get suggestions for the first time but after that all the
suggestions are instant.

> What scares me away is "that no keyboard shortcuts had to be pressed to
> get the list of completion candidates" ;-)  so it is continuously
> popping up suggestions I didn't ask for? That looks a little annoying in
> the demo. Other than that the description reads as if it was a quite
> sophisticated utility.

Yes it is a bit different to the normal omni complete behavior but I
actually like it. I have integrated it with UltiSnips so it shows also
suggestions for my snippets and I like that it provides me with a
quick overview of the methods that are available.

> So far I'm using
> OmniCppComplete : C/C++ omni-completion with ctags database
> where our ctags tags file already provides the necessary information
> for. It does have some shortcomings but most times works when needed.

I think it is similar. I was never really happy with the ctags based
suggestions but if you like them I think they are a good alternative.
My only open item is to check if it is possible to teach clang that
uno::Reference<X> x; x-> should suggest methods based on X and not on
uno::Reference. After that I would be totally happy with the
suggestions based on YCM.

On an unrelated note: the code has just landed in master so you can
try it now if you want. make vim-ide-integration will directly
generate the clang compilation database that YCM uses.


More information about the LibreOffice mailing list