簡體   English   中英

Vim插件youcompleteme錯誤消息

[英]Vim plugin youcompleteme error message

每次我寫一個新的python源代碼*.py ,會出現以下錯誤消息:

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

我該如何解決?

在我輸入這個問題之前,我根據這篇文章修改了我的_vimrc文件,但錯誤信息仍然存在。 更糟糕的是,還會出現另一條錯誤消息:

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.

我是一個新的Gvim用戶,我在Windows 10中使用gVim 8.0。我通過搜索Internet設置了我的python開發環境,並通過Vundle安裝了YouCompleteMe插件,但現在我自己編譯YCM太困難了。

像錯誤一樣

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

添加| set xxx結束

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

"Flagging Unnecessary Whitespace
highlight BadWhitespace ctermbg=red guibg=darkred
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/

YCM依賴ycmd來做實際工作。 ycmd是在后台運行的已編譯服務,因此您必須對其進行編譯才能使其正常工作。

基本安裝過程包括為您的操作系統打開一個shell /命令行, cd -ing到YouCompleteMe的vim插件目錄,然后在那里運行./install.py來編譯它。 如果您需要Python以外的語言,請運行./install.py --help並查找需要添加的任何其他標志,以啟用對您要使用的語言的支持。

以上假設您已閱讀YCM的安裝指南並已安裝所需的依賴項。 有兩個與您的案例相關的指南,它們相當詳細,寫得清晰:

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM