Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6214497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:53:17+00:00 2026-05-24T06:53:17+00:00

When using snipmate + vim, is it possible to have many snippet files load

  • 0

When using snipmate + vim, is it possible to have many snippet files
load for a given language/filetype?

Ex:
snipmate comes with javascript.snippets
I’ve also loaded the mootools snippets and added this to my vimrc:
autocmd FileType javascript set ft=javascript.mootools

Now I can use

  • the stock js snippets
  • the mootools snippets

I want to add a 3rd set of snippets, javascript.myCustomSnippets, that will also load for the filetype javascript.

When I try to add my custom snippets using something like this
autocmd FileType javascript set ft=javascript.myCustomSnippets
it overwrites/disables the mootools snippets, however the default javascript snippets continue to work.

How do I accomplish this, or is it possible?

ps: I know I could just add my snippets to the default javascript snippets file, but since I have the snipmate github repo synced inside my .vim/bundle/ folder, I want to keep the personal stuff separate from the live repo.

My Solution

The specific solution that finally got my files working side-by-side was to structure my files like this (by the way, I’m using pathogen to auto-load the bundle dir)

~/.vim/bundles/
    snipmate.vim/snippets/javascript.snippet
    vim-snippets.mootools/snippets/mootools.snippet
    vim-snippets.myCustomSnippets/snippets/javascript.snippets

By naming my file “javascript.snippets” it’s auto-loaded along with the defaults.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T06:53:18+00:00Added an answer on May 24, 2026 at 6:53 am

    Ruy Diaz is right about the personal stuff, you can keep all of your own snippets in “~/.vim/snippets” and you won’t have any problems with the github repo. If this is not working for you, the g:snippets_dir variable might have the wrong value — just set it explicitly in your vimfiles.

    As for combining several snippets, you can use the ExtractSnipsFile function. That should do what you want without messing around with dotted filetype syntax.

    Let’s say you have the following three snippet files, all in your snippet directory:

    • javascript.snippets
    • mootools.snippets
    • myCustomSnippets.snippets

    Create a file “after/plugin/snippets.vim” and place the following in it:

    call ExtractSnipsFile(g:snippets_dir.'javascript.snippets', 'javascript')
    call ExtractSnipsFile(g:snippets_dir.'mootools.snippets', 'javascript')
    call ExtractSnipsFile(g:snippets_dir.'myCustomSnippets.snippets', 'javascript')
    

    This will associate all of these snippets with the javascript filetype, no explicit autocommands needed. For more information, you can try :help ExtractSnipsFile.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Vim (7.2.445 on Debian Squeeze) with the vim-snipmate plugin (specially this fork
When editing my Rails app, snipMate only seems to load the ruby snippets file
I am using Vim to write my LaTeX files, and figured I'd make a
Using online interfaces to a version control system is a nice way to have
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using the HTML5 <canvas> element, I would like to load an image file (PNG,
Using the navigator.geolocation object in JavaScript. Trying to establish accurate ranges, but wondering exactly
Using android 2.3.3, I have a background Service which has a socket connection. There's
I'm using Vim 7.3 on Windows 7. When I try to open a .rb
Using report builder 3.0, I have a report that queries a cube. How do

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.