Live data from Hacker News

YouCompleteMe - A code-completion engine for Vim

valloric.github.io

51–60 of 78 posts

Re: YouCompleteMe - A code-completion engine for Vim

#51

I'm the main YCM developer. Most complaints here are about the installation procedure. 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. There's no going around it. The compiled module is the main reason why YCM is so fast when you get it configured. Other than complicated/rare configurations, installing YCM is IMO not tha…

Are you familiar with NeoBundle? It's mostly a drop-in replacement for Vundle, but it has support for post-installation hooks. This could potentially make it a one-step install (assuming NeoBundle was already installed). For example, here is the install snippet from vimproc, which also requires compiling: https://gist.github.com/lynndylanhurley/5951180 . https://github.com/Shougo/neobundle.vim

I use NeoBundle to run the YouCompleteMe module build upon installation. Works great. Especially since the build is triggered by a single simple command. (People really complain about that being hard?)

Re: YouCompleteMe - A code-completion engine for Vim

#52

So I cloned the repo, ran install.sh and got prompted to run the git submodule checkout for jedi the first time I opened a python file. Seems like a pretty excellent installation process (on linux anyway) despite the "hackers" complaining in other comment threads. But the important part is that I'm really impressed by the completion ability, I've only played with it a bit but I'm leaving the rest of my plugins for th…

> So I cloned the repo, ran install.sh and got prompted to run the git submodule checkout for jedi the first time I opened a python file.

Yep, I added that check to better support the use case of people checking out the repo themselves instead of using Vundle (which will checkout the git submodules for you automatically).

I'm happy you enjoy the plugin!

Re: YouCompleteMe - A code-completion engine for Vim

#53
post #25

I could not install it in my work machine as the OS is windows. As a replacement I use neocomplete.vim[1]. It is very fast, responsive, has fuzzy auto-complete. But it requires vim version greater than 7.3.885 and vim compiled with lua bindings. Still it is small annoyance compared to YCM installation procedure. [1] https://github.com/Shougo/neocomplete.vim

neocomplete is also my preferred autocomplete plugin. it integrates very well with all of shougo's other plugins, and it works on windows. YCM officially does not support windows and it's not uncommon for it to be broken for a week or two.

Re: YouCompleteMe - A code-completion engine for Vim

#54
post #51

Earlier quoted context omitted.

Are you familiar with NeoBundle? It's mostly a drop-in replacement for Vundle, but it has support for post-installation hooks. This could potentially make it a one-step install (assuming NeoBundle was already installed). For example, here is the install snippet from vimproc, which also requires compiling: https://gist.github.com/lynndylanhurley/5951180 . https://github.com/Shougo/neobundle.vim

I use NeoBundle to run the YouCompleteMe module build upon installation. Works great. Especially since the build is triggered by a single simple command. (People really complain about that being hard?)

Yeah I don't get it - I had zero issues with installation (and I usually find a way to screw everything up). Can you post your YouCompleteMe install block for NeoBundle?

Re: YouCompleteMe - A code-completion engine for Vim

#55

So I cloned the repo, ran install.sh and got prompted to run the git submodule checkout for jedi the first time I opened a python file. Seems like a pretty excellent installation process (on linux anyway) despite the "hackers" complaining in other comment threads. But the important part is that I'm really impressed by the completion ability, I've only played with it a bit but I'm leaving the rest of my plugins for th…

I agree. I've used both AutoComplPop and NeoComplCache extensively (1-2 years each) and YCM is superior to both in terms of speed. NeoComplCache has great completion ability, but it lacks fuzzy matching, and the configuration was a total rat's nest. I've been using YCM for like 2 months and I haven't looked back.

Re: YouCompleteMe - A code-completion engine for Vim

#56

I'm the main YCM developer. Most complaints here are about the installation procedure. 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. There's no going around it. The compiled module is the main reason why YCM is so fast when you get it configured. Other than complicated/rare configurations, installing YCM is IMO not tha…

> you _have to_ compile the ycm_core

Couldn't you ship a several already compiled binaries for major OSes? What do you do during compilation (and do you have to do this during compilation instead of on runtime) that makes it impossible?

I'm not using VIM anymore, so the question is just at out of curiosity :)

Re: YouCompleteMe - A code-completion engine for Vim

#57
So, after building vim from source, python from source, and cmake from source (damn old repos...), I'm finally getting stuff to build. and I hit this: Linking CXX static library libBoostParts.a [ 89%] Built target BoostParts Scanning dependencies of target ycm_core [ 90%] [ 92%] Building CXX object ycm/CMakeFiles/ycm_core.dir/LetterNode.cpp.o Building CXX object ycm/CMakeFiles/ycm_core.dir/Utils.cpp.o [ 93%] Building CXX object ycm/CMakeFiles/ycm_core.dir/ycm_core.cpp.o [ 93%] Building CXX object ycm/CMakeFiles/ycm_core.dir/Candidate.cpp.o [ 94%] Building CXX object ycm/CMakeFiles/ycm_core.dir/PythonSupport.cpp.o cc1plus: warnings being treated as errors /home/zdrillings/.vim/bundle/YouCompleteMe/cpp/BoostParts/boost/python/converter/pyobject_type.hpp: In static member function ‘static bool boost::python::converter::pyobject_type::check(PyObject) [with Object = boost::python::list, PyTypeObject pytype = (& PyList_Type)]’: /home/zdrillings/.vim/bundle/YouCompleteMe/cpp/BoostParts/boost/python/converter/obj_mgr_arg_from_python.hpp:101: instantiated from ‘bool boost::python::converter::detail::object_manager_ref_check(const T&) [with T = boost::python::list]’ /home/zdrillings/.vim/bundle/YouCompleteMe/cpp/BoostParts/boost/python/converter/obj_mgr_arg_from_python.hpp:109: instantiated from ‘bool boost::python::converter::object_manager_ref_arg_from_python::convertible() const [with Ref = const boost::python::list&]’ /home/zdrillings/.vim/bundle/YouCompleteMe/cpp/BoostParts/boost/preprocessor/iteration/detail/local.hpp:34: instantiated from ‘PyObject* boost::python::detail::caller_arity::impl::operator()(PyObject, PyObject) [with F = boost::python::list ()(const boost::python::list&, const std::string&, const std::string&), Policies = boost::python::default_call_policies, Sig = boost::mpl::vector4]’ /home/zdrillings/.vim/bundle/YouCompleteMe/cpp/BoostParts/boost/python/object/py_function.hpp:38: instantiated from ‘PyObject boost::python::objects::caller_py_function_impl::operator()(PyObject, PyObject) [with Caller = boost::python::detail::caller)(const boost::python::list&, const std::string&, const std::string&), boost::python::default_call_policies, boost::mpl::vector4 >]’ /home/zdrillings/.vim/bundle/YouCompleteMe/cpp/ycm/ycm_core.cpp:186: instantiated from here /home/zdrillings/.vim/bundle/YouCompleteMe/cpp/BoostParts/boost/python/converter/pyobject_type.hpp:21: warning: dereferencing type-punned pointer will break strict-aliasing rules make[3]: [ycm/CMakeFiles/ycm_core.dir/ycm_core.cpp.o] Error 1 make[3]: * Waiting for unfinished jobs.... make[2]: * [ycm/CMakeFiles/ycm_core.dir/all] Error 2 make[1]: * [ycm/CMakeFiles/ycm_core.dir/rule] Error 2 make: * [ycm_core] Error 2

Now, I went in and removed the -Werror flag from the makefiles and that got around it, but I get a ton of errors when i start vim, doing that:

Error detected while processing function youcompleteme#Enable: line 11: Traceback (most recent call last): Press ENTER or type command to continue Error detected while processing function youcompleteme#Enable: line 11: File "", line 1, in ? Press ENTER or type command to continue Error detected while processing function youcompleteme#Enable: line 11: File "/home/zdrillings/.vim/bundle/YouCompleteMe/autoload/../python/ycm/base.py", line 28 Press ENTER or type command to continue Error detected while processing function youcompleteme#Enable: line 11: except ImportError as e: Press ENTER or type command to continue Error detected while processing function youcompleteme#Enable: line 11: ^ Press ENTER or type command to continue Error detected while processing function youcompleteme#Enable: line 11: SyntaxError: invalid syntax Press ENTER or type command to continue Error detected while processing function youcompleteme#Enable: line 13: Traceback (most recent call last): Press ENTER or type command to continue Error detected while processing function youcompleteme#Enable: line 13: File "", line 0, in ? Press ENTER or type command to continue Error detected while processing function youcompleteme#Enable: line 13: NameError: name 'base' is not defined Press ENTER or type command to continue Error detected while processing function youcompleteme#Enable: line 13: E858: Eval did not return a valid python object Press ENTER or type command to continue YouCompleteMe unavailable: ycm_core too old, PLEASE RECOMPILE ycm_core

I'm guessing it's related. Does anyone have any advice on fixing some of this, so I can try this plugin? it sounds fantastic.

thanks in advance.

Re: YouCompleteMe - A code-completion engine for Vim

#58
post #44

Earlier quoted context omitted.

Just don't advertise it as "super-quick installation", that's quite simply taking the piss.

"Super-quick" was intended to be a bit tongue-in-cheek, although compared to the Full Installation Guide (it's in the docs), trust me, the "super-quick" installation really is super-quick.

Tongue-in-cheek Humor/sarcasm does not convey well in text — especially when the _readers_ are not expecting it.

Re: YouCompleteMe - A code-completion engine for Vim

#60
Had latest vim installed from source already on Mac with +python support.

I already use Pathogen so I didn't use the suggested Vundle.

Just placed YouCompleteMe in ~/.vim/bundle/

ran the ./install.sh in the YouCompleteMe bundle directory and it worked.

Thank you guys, this seems awesome so far! :)

Post reply on HN