Vim: Can't get pathogen to load bundles

让人想犯罪 __ 提交于 2019-12-14 03:48:05

问题


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:


  1. Create a directory in bundle with name of your plugin

    mkdir ~/.vim/bundle/surround/

  2. 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

  3. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!