11 ms·
YouCompleteMe - A code-completion engine for Vim
- hawkharris 13y agoGreat name
- RVijay007 13y agoLove the name!
- zerooneinfinity 13y agoHaha, yea it's pretty great.
- Ironballs 13y agoWhat colour scheme is he using?
- swah 13y agoVividchalk or vibrantink IIRC.
- mynegation 13y agoMost probably author's custom scheme: https://github.com/Valloric/vim-valloric-colorscheme/blob/master/colors/valloric.vim https://github.com/Valloric/vim-valloric-colorscheme/blob/ma...
- deleted 13y ago[deleted]
- terhechte 13y agoSadly, it is still not working too well with Objective-C, which is currently my main language (1). Luckily, unofficial VIM plugins for XCode like XVim (2) or VIEmu (3) are getting better and better, so at least I can use vim bindings for objective-c now, too. Nevertheless, good clang support in Vim would still be great, so that I could tap into the huge amount of vim plugins during objc development. [1] https://github.com/Valloric/YouCompleteMe/issues/84 https://github.com/Valloric/YouCompleteMe/issues/84 [2] https://github.com/JugglerShu/XVim https://github.com/JugglerShu/XVim [3] http://www.viemu.com/ http://www.viemu.com/
- rjzzleep 13y agoyou might want to consider clang_complete with ultisnips. it generates tab triggers for objective-c methods. i tried to add that functionality to youcompleteme, but the main problem with it is that youcompleteme tries to be very generic in completions, therefore there is no real way of knowing what kind of methods you get back from your completion backend. you could hack it to do some regex parsing on method names, but i'd really suggest that if objective-c is your main target go for clangcomplete+ultisnips. https://github.com/Rip-Rip/clang_complete https://github.com/Rip-Rip/clang_complete https://github.com/SirVer/ultisnips https://github.com/SirVer/ultisnips
- skue 13y agoThanks, that's good to know. I have been using XVim for a while now. It can be quirky, but it's amazing what JugglerShu has been able to pull off. Have you used both Xvim and ViEmu? How does ViEmu compare?
- syncontrol 13y agoBetter Objective-C triggering support (the issue you linked to) is coming soon.
- swombat 13y agoHow the hell is that a "super-quick installation" for Mac OS? Can anyone figure out an actually quick way to install it with Pathogen? PS: the plugin looks great - I'm just bitching about the installation docs because I'm in the middle of 10 different things at the moment and don't have the time to engage in a potential yak shaving expedition...
- TheCraiggers 13y agoBut you had plenty of time to bitch about it? ;-) Edit: It suddenly occurred to me just how reliant everyone now is on package managers. Once upon a time, I would think installing a dependency or two before compiling a new toy commonplace, if not expected. Nowadays... it's yak shaving. Not that I'm no less guilty of this. I've even downloaded AUR helper tools because I'm too lazy to even wget a package and do a makepkg any longer.
- Timothee 13y agoThe yak shaving part is not the steps described, but the steps not described that will end up being required. Where you follow the given steps carefully and one fails because whichever version of something is not the right one, then you end up in a weird state where you have a hard time going back to how your setup was before, and you have to google things like "Compiler error: missing dependency foo.h" even though you can see that foo.h is right there. You then finally fixed the foo.h error to discover that you need to update Ruby for whatever reason, but the system doesn't pick up the version you installed with Homebrew anymore but is using the old default one, you then start updating Homebrew. Etc., etc. until you don't even know what you were trying to achieve in the first place and you are now super irritable. (yes, I had a recent experience with that kind of yak shaving :))
- swombat 13y agoExactly. Been there, done that, got a billion t-shirts and switched away from Linux to get away from this.
- nilkn 13y ago
- jasonkostempski 13y agoHate the name. I can't help picturing Tom Cruise and Renee Zellweger's crying faces.
- AYBABTME 13y agoI found that other solutions for Vim completion tend tomake Vim slowish when they index a lot of data, for medium~large codebases. How does your pluggin scale?
- rjzzleep 13y agoit's "kinda" async. and it very much depends on the language of your choice.
- cks 13y agoI highly recommend this plugin! I find it really snappy on my projects. I haven't had the opportunity to try it on any gigantic projects, but I have found configuration files for YCM in the Chromium source tree which suggests that it scales nicely (assuming it's usable on the Chromium tree).
- McUsr 13y agoI haven't tried it on anything but rather small projects in C: 10-15 source files/modules, but I prefer vim and ycm to XCode for coding. As a matter of fact, all other code completion thingy's I use seem a bit crappy in comparision, with the excempt of bbautocomplete. Time to install the new beta of vim, and check out ycm! :)
- meunier 13y agoI've been using this for Python development for a few months now and it's by far the best completion solution I've found in vim and I've tried most. Jedi by itself is great but the actual interface to it was always lacking and YCM's fuzzy matching makes it breeze.
- jaroslavj 13y agoIf you are a ruby or javascript developer, just use Supertab, because you will waste more time installing it than getting any substantial benefits over default vim completion.
- VeejayRampay 13y agoHow do you achieve completion in Ruby with vim? I'd be interested cause the only things doing completion I've seen for vim so far are always extremely limited (completion on stuff you have in your buffer).
- jaroslavj 13y agoautocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1 autocmd FileType ruby,eruby let g:rubycomplete_rails = 1 autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1 and for Supertab let g:SuperTabDefaultCompletionType = "<c-x><c-o>" or autocmd FileType ruby let g:SuperTabDefaultCompletionType = "context" That way you will get omni completion with supertab. I compiled this from http://www.cuberick.com/2008/10/ruby-autocomplete-in-vim.html http://www.cuberick.com/2008/10/ruby-autocomplete-in-vim.htm... and some SO answers.
- SteveDeFacto 13y agoWorks pretty nice but is there anyway I can get it to display function parameters as I type?
- tmister 13y agoI 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 https://github.com/Shougo/neocomplete.vim
- hyperbling 13y agoneocomplete 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.
- djeikyb 13y agoI use this with Eclim to enhance java writing. The Vrapper plugin for Eclipse is getting very good, but sometimes it's nice to work directly in vim.
- arianvanp 13y agoI've never gotten eclim to fully work before. I don't do a lot of java nowadays but I just got back into a project where parts of the codebase are in java. So I might try it once again. What has your experience been so far?
- deleted 13y ago[deleted]
- no_gravity 13y agoThis takes "super-quick installation" to a new level... * compile Vim from source * install and understand Vundle * depending on some library issues maybe recompile ycm * Install development tools and CMake * Make sure you have Python headers installed How is the usual "unzip it to ~/.vim" installation called these days?
- jlgreco 13y agoYouCompleteMe has an unusually complex installation. These days most vim plugins allow you to simply: cd ~/.vim/bundle git clone .... and you are good to go. YouCompleteMe isn't this nice, and suffers for it I think. The "unzip it to ~/.vim" is usually called "a real pain in the ass to keep up to date and disabled or uninstall."
- umarrana 13y agowhat!! no dude
- city41 13y agoYouCompleteMe is included with subvim[0], which I have found to be a great flavor of vim. I just forked subvim and tweaked it how I liked from there. Which gets around the painful install of YCM. [0] https://github.com/fatih/subvim https://github.com/fatih/subvim
- syncontrol 13y agoI'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 that difficult. The _only_ difference between installing any "average" plugin with Vundle/Pathogen and YCM is running ./install.sh from the YCM directory after you pull it in. That's it. The script will download dependencies for you (libclang), run cmake, make and all the other tools so that everything is installed correctly. It will clean up after itself too. It's pretty hand-holdy so it will tell you if you need to install something (like CMake). The docs are pretty extensive so you should not get stuck anywhere even if you encounter problems. I'm happy to hear suggestions on how to further improve the installation procedure. As always, pull requests are welcome too. 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. There's no going around this, a real compiler is used to build the AST so we need the compiler flags. All 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). The installation you go through once and forget about; you use the plugin every day. Here are excerpts from the FAQ about some of the other things people have brought up: # Why isn't YCM just written in plain VimScript, FFS? Because of the identifier completion engine and subsequence-based filtering. 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. When the user types, YCM needs to perform subsequence-based filtering on all of those identifiers (every single one!) in less than 10 milliseconds. I'm sorry, but that level of performance is just plain impossible to achieve with VimScript. I've tried, and the language is just too slow. 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. # Why does YCM demand such a recent version of Vim? During YCM's development several show-stopper bugs were encountered in Vim. Those needed to be fixed upstream (and were). 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. A few critical bugfixes for pyeval() landed in Vim 7.3.584 (and a few commits before that).
- mmgutz 13y agoCould not get it to install on Debian. Depends on newer libs than found on conservative Wheezy. Mac was easier but still somewhat arduous. It's necessary complex to install because he's using C++ to get the speed boost. VimScript was too slow. Once you get it working. It's amazing with Go :)
- anonymous 13y agoJust one question. Where do I give money?
- randy909 13y agoThis is an absolutely fantastic plugin. The minor installation pain is paid back easily after a few hours of use. Fast, fuzzy matching autocomplete people!!
- freshhawk 13y agoSo 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 that turned off and staying with ycm for now. Excellent plugin, thank you!
- syncontrol 13y ago> 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!
- lynndylanhurley 13y agoI 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.
- ras_hatak 13y agoSo, 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<Object, pytype>::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<Ref>::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<3u>::impl<F, Policies, Sig>::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<boost::python::list, const boost::python::list&, const std::string&, const std::string&>]’ /home/zdrillings/.vim/bundle/YouCompleteMe/cpp/BoostParts/boost/python/object/py_function.hpp:38: instantiated from ‘PyObject boost::python::objects::caller_py_function_impl<Caller>::operator()(PyObject, PyObject) [with Caller = boost::python::detail::caller<boost::python::list ()(const boost::python::list&, const std::string&, const std::string&), boost::python::default_call_policies, boost::mpl::vector4<boost::python::list, const boost::python::list&, const std::string&, const std::string&> >]’ /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 "<string>", 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 "<string>", 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.
- SmileyKeith 13y agoCan't wait until this is resolved. https://github.com/Valloric/YouCompleteMe/issues/84 https://github.com/Valloric/YouCompleteMe/issues/84
- steven5158 13y agoHad 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! :)
- general_failure 13y agoI think this thread is a perfect example of why cloud apps are all the rage these days. The installation hassle is a big turn off.
- davidbanham 13y agoI've been using YCM for a few months now and I love it. It's a big part of my coding experience now. It's a bit of a pain to get a supported vim version up and running, but completely worth it.
- binbrain 13y agoEasy to install actually. Worked pretty much out of the box for me. Does anyone know how to change the autocompletion popup background color? A black popup window on black background make things a little harder to read.
- binbrain 13y agoAnswered, Pmenu color
- lsiebert 13y agoI love YCM. My only issue with installation was that I would prefer to actually upgrade my systems clang, instead of just installing it in my home dir, and there aren't step by step instructions for doing so. Once it is installed it is great for C lang stuff and python. It makes me wish other languages had equally good support you could integrate. Perl omni complete is super slow for example. But I know that isn't you.