Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've been trying to get snippets to work with Vim (specifically, MacVim). I have tried both snippetsEmu and snipMate (preferred). Other plugins are working fine.

I have been able to get snippetsEmu to temporarily work via A Byte of Vim's note to run :runtime! ftplugin/python_snippets.vim if they aren't working, except the author doesn't mention why they may not be working or what kind of permanent solutions are available.

So, basically when I type for<tab> in a PHP file it just puts a tab after 'for' instead of expanding into the snippet. I'm new to Vim and can't seem to figure this out. The only main difference that these two plugins (snippetsEmu and snipMate) have compared to other plugins is that they use the ~/.vim/after directory. But knowing that hasn't helped me any.

What I have seen some people suggest is to make sure the following is in your .vimrc file, but this has not helped:

set nocompatible
filetype on
filetype plugin on
share|improve this question

4 Answers 4

up vote 2 down vote accepted

Turns out I had left the folder ~/.vim/after/ftplugin from when I installed snippetsEmu and put one of snipMate's files in there instead of where it was supposed to go, ~/.vim/after/plugin. And here I was assuming I had installed everything correctly. Sorry to have wasted anyone's time who may have looked over this. I still don't know why snippetsEmu didn't work, but I don't feel like messing with it as it seems to have been abandoned and lacking the features that snipMate has.

share|improve this answer

I had this problem too (with gvim on Win32), but for me, it turned out that the "after" directory wasn't on the runtime path.

set runtimepath=$VIMRUNTIME,c:/Users/$USERNAME/_vim/after

Seemed to sort it out...

share|improve this answer

I had the following line in my .vimrc:

:set paste 

Commenting that line out made snipMate work just fine.

share|improve this answer

I solved this problem by removing the set paste from .vimrc.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.