2016-12-07 50 views
1

我正在爲javascriopt和其他人加載插件。我正在使用Vundle 這是我的~/.vimrc。 (我在Mac上使用gvim的)vim插件未加載:mac

set nocompatible 
filetype on 

" set the runtime path to include Vundle and initialize 

" set t_Co=256 
syntax on 
set nu 
set background=light 
colorscheme solarized 
set laststatus=2 

set rtp+=~/.vim/bundle/Vundle.vim 
call vundle#rc() 
" Declare all plugins here 

" let Vundle manage Vundle, required 
Plugin 'VundleVim/Vundle.vim' 

" The following are examples of different formats supported. 
" Keep Plugin commands between vundle#begin/end. 
" plugin on GitHub repo 
Plugin 'tpope/vim-fugitive' 
" plugin from http://vim-scripts.org/vim/scripts.html 
Plugin 'L9' 
" Git plugin not hosted on GitHub 
" Plugin 'git://git.wincent.com/command-t.git’ 

Plugin 'jelera/vim-javascript-syntax' 
Plugin 'pangloss/vim-javascript' 
Plugin 'nathanaelkane/vim-indent-guides' 
Plugin 'Raimondi/delimitMate' 



" All of your Plugin must be added before the following line 
filetype plugin indent on " required 
" To ignore plugin indent changes, instead use: 
"filetype plugin on 
" 
" Brief help 
" :Bundle  - lists configured plugins 
" :Bundle - installs plugins; append `!` to update or just :Bundle 
" :Bundle foo - searches for foo; append `!` to refresh local cache 
" :Bundle  - confirms removal of unused plugins; append `!` to auto-approve removal 
" 
" see :h vundle for more details or wiki for FAQ 
" Put your non-Plugin stuff after this line 

目錄結構在家裏〜/ vim的

enter image description here

我使用this link

這表明插件是js文件屏幕截圖。

enter image description here

約我缺乏在我的任何想法,請分享。

+0

在第二行中,您可以嘗試將'filetype on'改爲'filetype off'嗎? –

+0

它在這種情況下也不起作用。 'call vundle#end()'之後的 – PJ1405

+0

設置文件類型和語法。我也不明白什麼是不工作。另外作爲參考,你可以看看我的'.vimrc':https://github.com/Roshanjossey/dot-files/blob/master/.vimrc –

回答

1

這是因爲.vimrc中的某些語法錯誤導致Vundle無法正常工作。較舊版本的vim需要

filetype off 

加載vundle插件之前。有關更多詳細信息,請參閱此question

另外call vundle#end()似乎缺失。

請按照以下鍋爐板,並根據您的要求進行編輯。

set nocompatible 
filetype off 
set rtp+=~/.vim/bundle/Vundle.vim 
call vundle#begin() 

" Let vundle manage itself: 
Plugin 'VundleVim/Vundle.vim' 
" Syntax checking plugin 
Plugin 'scrooloose/syntastic' 

Plugin 'jelera/vim-javascript-syntax' 
Plugin 'pangloss/vim-javascript' 
Plugin 'nathanaelkane/vim-indent-guides' 
Plugin 'Raimondi/delimitMate' 


call vundle#end() 

filetype plugin indent on " Filetype auto-detection 
syntax on " Syntax highlighting