1

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  
:e!

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.

3
  • For people voting to close: consider reading this discussion in meta.
    – sidyll
    Oct 3, 2011 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. Oct 3, 2011 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, 2011 at 13:24

2 Answers 2

4

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):

.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
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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