解決"Error detected while processing /root/.vimrc:"

因爲Linux的自帶vim看起代碼相當反人類,所以今天搞了一套C++的IDE,頓時舒服多了,但在root下vim 有的文件時,就會報錯:

Error detected while processing /root/.vimrc:
line    5:
E492: Not an editor command: Plug 'Valloric/YouCompleteMe'
line    6:
E492: Not an editor command: Plug 'bling/vim-airline'
line    7:
E492: Not an editor command: Plug 'vim-airline/vim-airline-themes'
line    8:
E492: Not an editor command: Plug 'morhetz/gruvbox'
line    9:
E492: Not an editor command: Plug 'octol/vim-cpp-enhanced-highlight'
line  299:
E31: No such mapping
line  300:
E31: No such mapping
line  301:
E31: No such mapping
line  302:
E31: No such mapping
line  307:
E492: Not an editor command: ^Iterminal
Press ENTER or type command to continue

也無法使用我新配置的vim編輯器;

解決方案(修改默認編輯器)

在root下輸入:

vim /root/.bashrc

添加:
export EDITOR=/usr/bin/vim
在這裏插入圖片描述
保存退出後重新進入用戶,完美解決!

ps:Linux下美美噠C++IDE一鍵安裝

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章