Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried to setup gVim 7.3 with SnipMate on Windows 7 64-bit but it doesn't work.

  1. I got the latest version from github
  2. I copied all files into USER/vimfiles/
  3. I put "filetype plugin on" into my _gvimrc
  4. I tried:

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

Any ideas?

share|improve this question
up vote 1 down vote accepted

You shouldn't have to change 'runtimepath'--the default setting should work in all but some unusual cases.

If you set 'runtimepath' as you show above, yet you put your SnipMate files under USER/vimfiles/plugin or USER/vimfiles/ftplugin, Vim isn't going to find them.

I would:

  1. put configuration settings in _vimrc rather than _gvimrc,
  2. not set 'runtimepath',
  3. make sure the SnipMate files are where they are supposed to be.

Then if it still doesn't work, execute

:scriptnames

to see all the runtime files that Vim actually loaded and make sure you put the SnipMate files someplace Vim is looking.

share|improve this answer
    
I tried your approach: 1. removed runtime path 2. config in _vimrc 3. :scriptnames shows it loads plugin/snipmate, ftplugin/snipmate, ftplugin/html_snip_helper, after/plugin/snipmate ... It seems like it's all loaded correctly, but when I enter 'html' or 'doctype' in a html file an hit TAB nothing happens. Do I have to map the key? Isn't it done by the script? It also looks like there are no snippets loaded, shouldnt there be a file like: html.snippets ? – rootman Sep 1 '10 at 11:04
    
There is a file, snippets/html.snippets, that should also be read by the SnipMate plugin, but it won't appear in the output of :scriptnames because Vim doesn't load it itself. Did you include filetype plugin on in your _vimrc? (It looks like you did.) I don't use the snipMate plugin, but I downloaded the zip file from vim.sf.net and installed it in a test directory. I opened foo.html, typed html, hit <tab> and got <html> and </html> tags, so it seems to work for me. The script maps tab. What do you see if you execute :map <tab>, where <tab> is five characters, not a literal tab? – garyjohn Sep 1 '10 at 15:19
    
i get: "s <Tab> * <Esc>i<Right><C-R>=TriggerSnippet()<CR>" ... yes i included filetype plugin on in my _vimrc .. if i hit tab it only jumps to the next tabstop and doesnt trigger the snippet – rootman Sep 1 '10 at 15:59

I reinstalled vim from scratch, added snipMate first and it works. Curious what caused the problem i started adding the other plugins one by one, now i have all plugins reinstalled and it still works. That leaves me wondering why it didn't work in the first place.

In case I find out what the excact problem was I'll update it here. Thanks for your support garyjohn, much appreciated!

share|improve this answer

In my case snipMate did not work because of wrong line im .vimrc - the line contains two commas:

set wildignore+=*.gif,*.jpg,*.png,tmp,,cache

But I guess I'm the only one in the world who ever experienced it ;-)

share|improve this answer
    
Well I was experiencing it too! Thanks for the fix! – Aryeh May 25 '12 at 5:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .