4

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.

Costa Michailidis
  • 7,691
  • 15
  • 72
  • 124

2 Answers2

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
romainl
  • 186,200
  • 21
  • 280
  • 313
  • Good point, thanks! Still isn't working though. I've posted some more info on github here: https://github.com/tpope/vim-pathogen/issues/83#issuecomment-13098223 – Costa Michailidis Feb 04 '13 at 20:50
  • 1
    You have a lot of *crazy* things in your `runtimepath`: `/var/lib/vim/addons/bundle/*`, `/usr/share/vim/vimfiles/bundle/*`, etc. You should stick to one plugin installation method and **not ever touch your system files.** The only `bundle` directory should be `~/.vim/bundle`. – romainl Feb 04 '13 at 20:55
  • Totally fair! I'm still learning, and I would love to do a clean install, but I haven't been able to accomplish that either. – Costa Michailidis Feb 04 '13 at 20:58
  • 1
    1. Use Synaptic to remove every package with `vim` in the name. 2. Install the vim-gnome package and all its dependencies. 3. Quit Synaptic. 4. Empty `~/.vim`. 5. Install pathogen and other plugins carefully following their instructions. – romainl Feb 04 '13 at 21:24
  • That didn't work. I removed (using the 'remove completely' option) everything with vim in it, and followed your steps in that order, but I still have the same problems, in addition snipmate.vim isn't working. I noticed even after removing everything that my usr/share/vim folder was still full of files and directories unchanged. – Costa Michailidis Feb 04 '13 at 21:58
1
  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.