how to disable vim autocomplete popup for plain text files?

Posted by doorfly on Stack Overflow See other posts from Stack Overflow or by doorfly
Published on 2012-06-17T00:50:37Z Indexed on 2012/06/19 21:16 UTC
Read the original article Hit count: 224

Filed under:
|

After literally days of tweaking, I think I got vim's autocomplete (omnicomplete + Acp plugin) to work acceptably. But the annoying thing is that it is still enabled for plain text files so I would have to type :DisableAcp for README or plain text files. How do I add logic to my vimrc so that if it detects an empty filetype it disables the Acp on startup?

here is what I wrote:

if &filetype == ""
     let g:acp_enableStartup = 0
endif

but this disables Acp on start up for all files.

© Stack Overflow or respective owner

Related posts about vim

Related posts about plugins