SnipMate with Pathogen
Asked Answered
R

4

6

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

Ruelas answered 29/8, 2011 at 15:44 Comment(4)
I see that this new version of SnipMate has a few dependencies (the original didn't), did you install them as well? Also do you have some error messages?Hoisch
I did exactly the pathogen installation written in garbas link, I also tried the original snipmate version from msanders adding the snipmate.vim into ~/.vim/bundle and it didn't work too. It doesn't appears any error message, even when I try to run vim -V test.cRuelas
You say "adding the snipmate.vim into ~/.vim/bundle". Do you talk about a "snipmate.vim" file or the whole folder with its 7 subfolders?Hoisch
I did cd ~/.vim/bundle and then git clone git://github.com/msanders/snipmate.vim.gitRuelas
R
2

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

set paste 

from my .vimrc the snipmate pluging start work perfectly.

Ruelas answered 1/9, 2011 at 18:33 Comment(1)
This was the problem for me as well I had set paste in my .vimrc when I commented out "set paste then snipmate worked fine.Tyne
M
16

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.

Matronage answered 12/11, 2011 at 10:20 Comment(0)
R
2

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

set paste 

from my .vimrc the snipmate pluging start work perfectly.

Ruelas answered 1/9, 2011 at 18:33 Comment(1)
This was the problem for me as well I had set paste in my .vimrc when I commented out "set paste then snipmate worked fine.Tyne
S
1

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.
Springspringboard answered 29/8, 2011 at 17:47 Comment(0)
C
0

This is not obvious, but snippets/ directory must be at .vim/.

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

At least one snippet:

snippet pdb
    import pdb; pdb.set_trace()
Claudetteclaudia answered 18/2, 2014 at 11:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.