问题
I've read five other questions about this on Stackoverflow, and github and so on, but have not been able to solve this problem, and am totally lost at this point.
I'm on Ubuntu 11.10 with Vim 7.3.
Here's my .vimrc
set nocp
call pathogen#infect()
syntax on
filetype plugin indent on
call pathogen#infect()
colorscheme xoria256
set rnu
set expandtab
set tabstop=2
set shiftwidth=2
set cindent
set virtualedit=all
pathogen.vim is in ~/.vim/autoload and I've got vim-jade and vim-surround in ~/.vim/bundle/
I don't get any errors when I run vim index.jade I just don't have syntax highlighting and I can't use the vim surround commands.
Any help would rock! I've been at this for a few hours.
回答1:
You only need one call to pathogen and this must happen before you do filetype plugin indent on
.
This version of your ~/.vimrc
should work.
set nocompatible
call pathogen#infect()
syntax on
filetype plugin indent on
colorscheme xoria256
set relativenumber
set expandtab
set tabstop=2
set shiftwidth=2
set cindent
set virtualedit=all
回答2:
Create a directory in bundle with name of your plugin
mkdir ~/.vim/bundle/surround/
Unzip the plugin to the directory, you created.
cp ~/surround.zip ~/.vim/bundle/surround/ cd ~/.vim/bundle/surround/ unzip surround.zip rm -rf surround.zip
Add these lines to the beginning of the ~/.vimrc
execute pathogen#infect() syntax on filetype plugin indent on
Now you will able to use surround.vim plugin.
来源:https://stackoverflow.com/questions/14694624/vim-cant-get-pathogen-to-load-bundles