Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there an autocompletion plugin for vim? What are my options here?

At the moment I'm using AutoComplPop, but it has bad integration with snipMate that I use and dead slow on Ruby files (even < 100 lines).

I've seen a couple of other plugins, but they are dead since at least more than a year. So, any ideas?

share|improve this question
    
ACP works very very well here and I have no problem with SnipMate. There's a settings (let g:acp_behaviorSnipmateLength=-1 see :help autocomplpop) you are supposed to add to your .vimrc, did you add it? –  romainl Oct 6 '11 at 5:16

4 Answers 4

Here's a nice one: YouCompleteMe

YouCompleteMe that makes the dropdown menu appear automatically as you type, and it supports fuzzy selection, so if you have an identifier called partition_finder and you type something like ptf while editing a C++ file, the dropdown suggestion list will include both printf and partition_finder because they contain the same letters in the same order. If you have a variable called myBrain, you can type brn and it will suggest that. YouCompleteMe also prioritizes the suggestions based on previous usage frequency.

share|improve this answer

I am trying out necomplecache with neosnippet I am guessing it will have better integration as both are authored by the same person

share|improve this answer

I use neocomplcache with the snipmate + snipmate snippets

let g:neocomplcache_snippets_dir='~/.vim/bundle/snipmate-snippets/snippets'

you can see my vimrc

share|improve this answer

I believe vim has one built-in called OmniComplete. In insert mode use ctrl+x,ctrl+o.

Otherwise you can do keyword completion from insert mode with ctrl+n. When you invoke it it will give you a dropdown displaying possible matches of words found in the file you're editing, as well as found from other files you have open. Keep hitting ctrl+n to cycle through the options. When you come to the word you want, just continue typing like normal.

If you can't find the word you want, ctrl+n will eventually cycle off the list and you can keep typing, or you can hit ESC and then bcw to go back to the start of the offending word and change the word to the one you wanted.

share|improve this answer
    
Vim's built-in one seems to suck. Whenever I press <c-x><c-o> it just says "Pattern not found". However, if I press <c-n>, completions appear in a dropdown right below the word being typed. Is that the same thing? Is there a way to make the autocomplete drop down appear automatically, without having to press a shortcut? –  trusktr Apr 9 '13 at 1:11
    
I'm not aware of a plugin that makes autocomplete pop up without interaction, sorry :(. <c-x><c-o> only works for things that vim has been explicitly told how to support. By default I think it can only do a couple of minor things, and stuff like CSS completion, but if you want something like Eclipse there are a couple of vim plugins that try to provide that for you. –  Conrad.Dean Apr 9 '13 at 15:59
1  
I found a plugin for vim called YouCompleteMe that makes the dropdown menu appear automatically as you type, and it supports fuzzy selection, so if I have an identifier called partition_finder and I type something like ptf while editing a C++ file, the dropdown menu will suggest both printf and partition_finder because they contain the same letters in the same order. If I have a variable called myBrain, I can type brn and it will appear. YouCompleteMe also prioritizes the suggestions based on previous usage frequency. Check it out here: valloric.github.io/YouCompleteMe –  trusktr Apr 13 '13 at 6:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.