Vim YouCompleteMe plugin file

Created a file for the Vim YouCompleteMe plugin to work properly with Vim.
All the input and changes are welcome. Couldn’t find this anywhere so thought this would be a good share :wink:
It is more a hack than something really well made… so please cool changes are welcome (like a way of getting addon includes automatically )

Gist file

2 Likes

Thanks for you effort! Much appreciated!

@daragao Do I need to somehow set up where my openFrameworks folder is? I see a lot of relative paths which suggest so.

Wow! This still hasn’t been fixed. Sorry @godzsa haven’t used this for years now, can’t really help much. But I would assume so. I might have had something at the time that allowed me to setup plugins on vim per directory

So for anyone who needs vim + YouCompleteMe to work with OF in the future I have 2 solutions:

  1. use a file similar to the one provided by @daragao but update the flags array (run make and it will output every flag just use those, you might need to rewrite to use it relatively), and also you need to add a Settings function which is called by ycm. What I did was added the file as .ycm_extra_conf.py to the emptyExample project, so when I copy paste it it copies this file too. When you run vim ycm will look for this file automatically and it will just work (however I did not have the patience to set the flags array sooo I did solution 2.)
  2. use compiledb make to generate a json file with the flags. ycm will also see this automatically and work <3
    CompileDb -> https://pypi.org/project/compiledb/