Snippets in Vim not working

Posted by donut on Super User See other posts from Super User or by donut
Published on 2009-08-25T07:25:41Z Indexed on 2010/05/18 22:40 UTC
Read the original article Hit count: 409

Filed under:
|
|

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

© Super User or respective owner

Related posts about vim

Related posts about macvim