So, after building vim from source, python from source, and cmake from source (damn old repos.), I'm finally getting stuff to build. A few critical bugfixes for pyeval() landed in Vim 7.3.584 (and a few commits before that). A few months after those bugs were fixed, Vim trunk landed the pyeval() function which improved YCM performance even more since less time was spent serializing and deserializing data between Vim and the embedded Python interpreter. Those needed to be fixed upstream (and were). # Why does YCM demand such a recent version of Vim?ĭuring YCM's development several show-stopper bugs were encountered in Vim.
No, you can't get acceptable performance even if you limit yourself to just the identifiers in the current file and simple prefix-based fitering. I've tried, and the language is just too slow. I'm sorry, but that level of performance is just plain impossible to achieve with VimScript. When the user types, YCM needs to perform subsequence-based filtering on all of those identifiers (every single one!) in less than 10 milliseconds. Let's say you have many dozens of files open in a single Vim instance (I often do) the identifier-based engine then needs to store thousands (if not tens of thousands) of identifiers in its internal data-structures. # Why isn't YCM just written in plain VimScript, FFS?īecause of the identifier completion engine and subsequence-based filtering. Here are excerpts from the FAQ about some of the other things people have brought up: The installation you go through once and forget about you use the plugin every day. There's no going around this, a real compiler is used to build the AST so we need the compiler flags.Īll in all, if the installation procedure is the main complaint, I'm happy (not really, but you get the point) because that means that actually _using_ the plugin is a good experience (I hope). YCM too goes out of its way to inform you if you missed something you needed to do, like create a ycm_extra_conf.py file with your build flags (if you want the C-family semantic completion to work) because YCM can't conjure out of the air all the include paths and such needed to compile your project. As always, pull requests are welcome too.
I'm happy to hear suggestions on how to further improve the installation procedure. The docs are pretty extensive so you should not get stuck anywhere even if you encounter problems.
It's pretty hand-holdy so it will tell you if you need to install something (like CMake).
The script will download dependencies for you (libclang), run cmake, make and all the other tools so that everything is installed correctly. install.sh from the YCM directory after you pull it in. The _only_ difference between installing any "average" plugin with Vundle/Pathogen and YCM is running. Other than complicated/rare configurations, installing YCM is IMO not that difficult.
The compiled module is the main reason why YCM is so fast when you get it configured. I tried to make it as easy as possible, but the root of the problem is that you _have to_ compile the ycm_core module so that completion is fast. Most complaints here are about the installation procedure. Sounds like a nice plugin, maybe I'll try again in the future. In a perfect world maybe I would have an extra hour or two to debug this, run through some regressions but right now I don't. Launch vim, which immediately crashes with error: Vim: Caught deadly signal ABRT Compilation eventually completes, no errors.ĩ. install.sh -clang-completer in the YCM directory.Ĩ. Run :BundleInstall, which tells me I should compile and impolitely adding "Read the docs!" (Which docs? The GitHub docs, which tell me I should only need to recompile in rare cases? Or the bundle's vim docs, which didn't exist on my system prior to running this command?)ħ.
Launch vim, note error saying YCM needs installation.Ħ. Go research Vundle because up until now, I've been happily using Pathogen.
Read through the full page of installation instructions.ģ. Here was my "super-quick installation" experience on OS X:ġ.