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 have problems installing snipMate for gvim.

My .vimrc file has the obviously required line

filetype plugin on

The $VIMRUNTIME/plugin/snipMate.vim file is exectued when I startup gvim. I verified this with an echo statement in this file.

Interestingly, I can make it work with the following sequence:

Startup gvim and read an existing c-file

c:\> gvim x.c

Then, in Vim

:source $VIMRUNTIME/after/plugin  

Now it works, as it is supposed to. I have no idea why this could be. And I was able to install snipMate on another machine without problems.

share|improve this question

migrated from Oct 5 '11 at 3:53

This question came from our site for professional and enthusiast programmers.

For people voting to close: consider reading this discussion in meta. – sidyll Oct 3 '11 at 12:18
@Sidyll as this is not a question of vim functionality but rather a question of installation issues (of a plugin at that), it may be better suited on SU. However, I generally agree vim questions belong here. – Randy Morris Oct 3 '11 at 13:12
@RandyMorris Hmm, good point. I didn't even think about it, it just became automatic: "Vim questions with close votes" -> "post link to meta" :-) Ok if it gets moved there. – sidyll Oct 3 '11 at 13:24
up vote 4 down vote accepted

Typically you don't want to touch your $VIMRUNTIME folder. This has many drawbacks, some consider the worst drawback being the fact that this folder will be overwritten in Vim updates, and you'll lose everything silently. Also, it's definitely not practical.

In your runtime path a "personal" directory should be included. In Unix et al this directory is ~/.vim. Looks like you're under Windows, so it might be something like $HOME/vimfiles. You may want to check :h runtimepath

If you don't have that folder, create it and put your plugins there. The structure is the same from $VIMRUNTIME and is described in the very same help topic.

Note that the snipMate plugin require many other files to be included in your installation. After you unzip (manually) the archive, place each of those folders in your Vim folder, or just the files if the folder already exist. It will end up being something like this (in my case, the folder is .vim):

  ├ after
  │  ├ plugin
  │  └ snipMate.vim
  ├ autoload
  │  └ snipMate.vim
  ├ doc
  │  └ snipMate.vim
  ├ ftplugin
  │  └ html_snip_helper.vim
  ├ plugin
  │  └ snipMate.vim
  ├ snippets
  │  ├ _.snippets
  │  ├ c.snippets
  │  ├ objc.snippets
  │  ├ ...
  │  ├ sh.snippets
  │  └ vim.snippets
  └ syntax
     └ snippet.vim
share|improve this answer

I strongly recommend you to take a look at a "modern" way of installing Vim plugins:

Personally I use pathogen but I think the other two plugin are fine too. Certainly, I would gid into vim runtime paths to understand better what it's going on but I can't imagine to deal with all my plugins without one of this tools.

share|improve this answer

You must log in to answer this question.

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