【问题标题】:vim plugins not loading: macvim 插件未加载:mac
【发布时间】:2016-12-08 21:29:33
【问题描述】:

我正在尝试为 javascriopt 和其他插件加载插件。 我正在使用Vundle 这是我的~/.vimrc。 (我在 mac 上使用 gvim)

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

我正在使用this link中建议的插件

这是js文件截图。

任何关于我缺乏的想法,请分享。

【问题讨论】:

  • 第二行,你能不能把filetype on改成filetype off
  • 这种情况下也行不通。
  • call vundle#end() 重新设置文件类型和语法之后。我也无法理解究竟是什么不起作用。也可以参考一下我的.vimrcgithub.com/Roshanjossey/dot-files/blob/master/.vimrc
  • @sudobangbang 感谢您的文件。您的文件正在运行,但我的文件完全是怪异的。您是否觉得我缺少任何步骤或代码?
  • 我没有从您在上面分享的 sn-p 获得的足够信息。我在那里看不到任何call vundle#end()。另外我还是不知道是什么问题

标签: vim macvim vim-plugin


【解决方案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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多