The reason for this error is that i am editing a html file, and it seems that gvim does not konw how to handle it.

 

At last i found this solution. Add the code to the /etc/vim/gvimrc

filetype plugin indent on
autocmd FileType ruby,eruby set omnifunc
=rubycomplete#Complete
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 java set omnifunc=javacomplete#Complete
if has("autocmd"&& exists("+omnifunc")
     autocmd Filetype 
*
   \ 
if &omnifunc == "" |
   \   setlocal omnifunc
=syntaxcomplete#Complete |
   \ endif
endif
let g:rubycomplete_buffer_loading 
= 1
let g:rubycomplete_classes_in_global 
= 1
"let g:rubycomplete_rails = 1

相关文章:

  • 2021-10-20
  • 2021-12-14
  • 2022-12-23
  • 2021-09-18
  • 2022-12-23
  • 2021-11-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-17
  • 2022-12-23
  • 2021-12-15
  • 2021-07-19
  • 2022-12-23
  • 2021-08-20
相关资源
相似解决方案