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.
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\+$/
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:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With