Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SnipMate with Pathogen

I've just installed pathogen on my ~/.vim and add the new command to run the bundles

:call pathogen#infect() 

I've already add to my ~/.vim/bundle folder vim-surround and NERDtree and everything works great. Nevertheless, when I tried to add garbas SnipMate it didn't work. Could someone help with this issue? Thanks

like image 830
Jonatas Eduardo Avatar asked Aug 29 '11 15:08

Jonatas Eduardo


3 Answers

I installed snimpmate following this guide with no problem at all John Andersons vim guide

$ mkdir ~/.vim/
$ mkdir ~/.vim/{autoload,bundle}
$ cd ~/.vim/
$ git init

git submodule add https://github.com/msanders/snipmate.vim.git bundle/snipmate

To create your own snippets

$ mkdir ~/.vim/snippets
$ vim ~/.vim/snippets/python.snippets

His example for pdb snippet

snippet pdb
    import pdb; pdb.set_trace()

You should be then good to go.

like image 78
sayth Avatar answered Sep 19 '22 09:09

sayth


I don't now why but when I remove the option

set paste 

from my .vimrc the snipmate pluging start work perfectly.

like image 21
Jonatas Eduardo Avatar answered Sep 18 '22 09:09

Jonatas Eduardo


The official way of snipmate distribution is vim-addon-manager. Like pathogen it puts each plugin in a separate folder, but it also does more, see the documentation. I have not tried pathogen at all, but I know what may be the cause here:

  1. You forgot to install some dependencies. In this case it is likely that some errors will be thrown.
  2. Pathogen is not sourcing after/ directory (and vim won't do this for all &runtimepath items, just for a few as documented in :h after-directory). As far as I know all mappings are located there.
like image 30
ZyX Avatar answered Sep 18 '22 09:09

ZyX