Costa Michailidis
Costa Michailidis

Reputation: 8178

Vim: Can't get pathogen to load bundles

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.

Upvotes: 4

Views: 1979

Answers (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.

Upvotes: 1

romainl
romainl

Reputation: 196476

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

Upvotes: 1

Related Questions