How to enable Autocomplete in vim or vim Intellisense

1.Install vim

sudo apt-get install vim

2.Create a file .vimrc on home folder

touch ~/.vimrc

3.Put these lines inside .vimrc

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

4.Now use vim , to autocomplte your code use “CTRL+N”

Advertisements

2 thoughts on “How to enable Autocomplete in vim or vim Intellisense

  1. thanks that was really useful for me i was looking for a way to autocomplete c language with and did not found anything now i read your topic and i can make autocomplete with vim really thank to you peace ^^

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s