Closed wildskyf closed 8 years ago
手動升級一下 Vundle
cd .vim/bundle/vundle
git pull
我的是這個 https://github.com/VundleVim/Vundle.vim 剛剛更新過後還是一樣有問題
Follow the readme ~~
call vundle#begin()
這個是我目前的設定檔,應該沒錯才對 https://github.com/wi1d5ky/myConfig/blob/master/.vimrc
我目前在 Debian 8 底下補上 molokai.vim 這個 colorscheme 還有 ctags 後,再設個 vundle 都挺正常的喔!
不好意思忘記提供了!
我的環境是這樣 VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 20 2015 09:52:41) Fedora 23
Cannot find color scheme 'molokai'
是因為 Vim 在 ~/.vim/colors/ 底下找不到 molokai 這個 colorscheme。
$ mkdir ~/.vim/colors
$ cp ~/.vim/bundle/Molokai/colors/molokai.vim ~/.vim/colors/
請附上您的 gitconfig。
$ cat ~/.gitconfig
您一提到 git config 就讓我想起我好像沒有設定 editor 設定過後就沒有了!!!
預設可能是用 vi 所以不認得 vim 的東西 附上修改 editor 的指令:
$ git config --global core.editor vim
感謝 @chusiang !
@wi1d5ky 在 redhat, fedora, centos 的系統裡,裝好 vim 後是不會取代掉 vi 這個指令。在使用 git commit 時還是會代出 vi 來操作,但因為 vi 不支援寫給 vim 的 plugin 才會造成以上的問題。
解法除了指定 editor 給 git 外,還可以用 bash alias 或 path 來取代 vi。
bash alias.
$ alias vi='vim'
path.
$ ln -s /usr/bin/vim /usr/local/bin/vi
但我直接在 command line 輸入 vi 時打開的卻是 vim,我記得我好像也沒有做過類似的設定 感謝提供其他方法!!
試試看在 console 裡輸入 $ \vi
看看。
[root@5d76d90bb044 sandbox]# \vi
Error detected while processing /root/.vimrc:
line 23:
E492: Not an editor command: Plugin 'VundleVim/Vundle.vim'
line 26:
E492: Not an editor command: Plugin 'Molokai'
line 27:
E492: Not an editor command: Plugin 'itchyny/lightline.vim'
line 28:
E492: Not an editor command: Plugin 'snipMate'
line 29:
E492: Not an editor command: Plugin 'mattn/emmet-vim'
line 30:
E492: Not an editor command: Plugin 'ap/vim-css-color'
line 31:
E492: Not an editor command: Plugin 'scrooloose/syntastic'
line 32:
E492: Not an editor command: Plugin 'vim-scripts/taglist.vim'
line 33:
E492: Not an editor command: Plugin 'scrooloose/nerdtree'
line 34:
E492: Not an editor command: Plugin 'xolox/vim-misc'
line 35:
E492: Not an editor command: Plugin 'xolox/vim-notes'
line 36:
E492: Not an editor command: Plugin 'cakebaker/scss-syntax.vim'
line 108:
E185: Cannot find color scheme 'molokai'
Press ENTER or type command to continue
看起來還是 Vim,不過就像我當時開這個 issue 一樣,出現一堆錯誤訊息。
vim 是有分 minimal 跟 enhanced 的,minimal 的話只有基本功能喔!
[root@5d76d90bb044 sandbox]# rpm -qa | grep vim
vim-minimal-7.4.827-1.fc23.x86_64
vim-common-7.4.827-1.fc23.x86_64
vim-filesystem-7.4.827-1.fc23.x86_64
vim-enhanced-7.4.827-1.fc23.x86_64
詳情請自己比對一下 $ vi --version
和 $ vim --version
了。
ps: 在下是使用 docker 建置測試環境的,一般不建議直接使用 root 操作系統。
感謝凍仁大大詳細的解說 <( )>
docker 我還沒學,之後有空再來學;P
如附圖,想問有沒有人有遇過這樣的狀況,以及如何解決。