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.

Here is my setup:

  1. My .vim directory is under source control with git
  2. I use Pathogen for managing my plugins
  3. My SnipMate plugin is a git submodule under .vim/bundle/snipmate

This means I can't really edit the snippets in .vim/bundle/snipmate/snippets because they are not tracked. I have discovered that I can define my own custom snippets in .vim/snippets, or create a new directory .vim/bundle/snipmate-custom/snippets/ and define them there.

This works beautifully on linux. For example I can have the original file html.snippets in .vim/bundle/snipmate/snippets and my own html.snippets in .vim/snippets/ and vim will use both files.

On Windows I have noticed that creating another snippets directory (either in .vim/snippets/ or in .vim/bundle/snipmate-custom/snippets/ breaks the plugin. The tab completion no longer works - it ignores both the original snippets that came with the plugin, and the ones in the new repository.

Any idea why this is happening?

I'm running Vista, and I my vim config is in %USERPROFILE%\.vim. I have vimfiles folder symlinked to that directory using:

mklink /d vimfiles .vim

Every other plugin works. Shipmate works perfectly provided the .vim/snippets directory does not exist. The above setup works fine on Ubuntu and on Mac. Any idea why it breaks on Windows?

EDIT

I might have answered my own question. I managed to work around this problem by explicitly telling snipmate which directories to use:

   if has('win32')
      let g:snippets_dir="c:/Users/me/.vim/bundle/snipmate/snippets/,
                          c:/Users/me/.vim/bundle/snipmate-custom/snippets"
   endif

Not the most elegant solution, but it works. Let me know if you figure out a better way to do this.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I have answered my own question. I managed to work around this problem by explicitly telling snipmate which directories to use:

   if has('win32')
      let g:snippets_dir="c:/Users/me/.vim/bundle/snipmate/snippets/,
                          c:/Users/me/.vim/bundle/snipmate-custom/snippets"
   endif
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.