Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim plugin youcompleteme error message

Tags:

Every time I write a new python source code *.py, the following error message comes up:

Error detected while processing BufRead Auto commands for"*.py":
E518:Unknow option:set
E28:No such highlight group name: BadWhitespace

How can I fix it?

Before I typed this question , I modified my _vimrc file according to this post, but the error message remains. Even worse another error message occurs as well:

The ycmd server SHUT DOWN(restart with':YcmRestartSever').YCM core library not detected;you need to compile YCM before using it. Follow the instructions in the documentation.

I am a new Gvim user and I use gVim 8.0 in Windows 10. I set up my python development environment by searching the Internet and I installed the YouCompleteMe plugin via Vundle but It is too difficult for me to compile YCM myself now.

like image 267
J.Neue Avatar asked Oct 12 '16 15:10

J.Neue


2 Answers

for error like

Error detected while processing BufRead Auto commands for"*.py":
E518:Unknow option:set
E28:No such highlight group name: BadWhitespace

add | to end of set xxx

au BufNewFile,BufRead *.js,*.html,*.css,*.vue
\ set tabstop=2 |
\ set softtabstop=2 |
\ set shiftwidth=2

set

"Flagging Unnecessary Whitespace
highlight BadWhitespace ctermbg=red guibg=darkred
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
like image 172
Jackiexiao Avatar answered Oct 19 '22 06:10

Jackiexiao


YCM depends on ycmd to do actual work. ycmd is a compiled service running in the background so you have to compile it to make it work.

The basic installation procedure consists of opening a shell / command line for your OS, cd-ing to YouCompleteMe's vim plugin directory and running ./install.py there to compile it. If you need it for languages other than Python, run ./install.py --help and look up any additional flags you need to add to turn on support for the languages you want to use.

The above assumes you have read YCM's installation guide and have installed the required dependencies. There are two guides relevant to your case and they are rather detailed and clearly written:

  • Windows installation guide (provided on a best-case basis)
  • Full installation guide (to resolve any problems if the former doesn't work)
like image 23
dkasak Avatar answered Oct 19 '22 05:10

dkasak