This section is in my .vimrc:
" Enable omni completion
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags
autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
When editing .html files, i hit < and the neocomplete CompleteTags suggestion list pops up as expected.
Afterwards, when entering < div ng- (as in angularjs directives [no space]) nothing pops up, despite of having the syntax files for angularjs installed (through the javascript-libraries-syntax.vim plugin)
However, when executing the line
set ofu=syntaxcomplete#Complete or similarily set omnifunc=syntaxcomplete#Complete everything works and i see the list of directives.
- shouldn't neocomplete use syntax keywords out of the box?
- can I use multiple omnifuncs to resolve this issue? both #CompleteTags and #Complete?
It does (from neocomplete documentation, neocomplete-syntax section ):
Of course you can (again from neocomplete documentation, g:neocomplete#sources#omni#functions section):
So add the following dictionary to your
.vimrc:Both of first or second approach should resolve the issue.