views:

81

answers:

3

I turned on completion in Vim:

autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType c set omnifunc=ccomplete#Complete

Where can I modify those completions (e.g. CSS completion). Where is the file that has those completions?

A: 

Look in your /home/.vim directory and the /home/.vimrc file.

There seems to be several ways of implementing this.

Here's one.

pavium
+4  A: 

On unix, it's most likely at:

/usr/share/vim/vim<version>/autoload/<language>complete.vim

and the like.

On my system it's:

/usr/share/vim/vim72/autoload/pythoncomplete.vim

On some systems it might be /usr/local/share/vim instead. In Windows look in your GVim install folder.

There's also the chance that it's in ~/.vim/autoload.

Crast
+3  A: 

You might also want to know about vim's magnificent general purpose "Where the hell is that set?" command :verbose eg. to solve this problem you could have gone.

:verbose fun pythoncomplete#Complete (fun is because it is a function)
....
Last set from ~/.vim/plugin/pythoncomplete.vim
....

This can be used for a commands, maps, autocommands etc. eg.

:verbose map \t 

should list where all key maps starting with \t

michael
That is indeed a magnificent command to know!
Andy Stewart