Skip to content

Instantly share code, notes, and snippets.

@lpil
Created October 30, 2014 10:30
Show Gist options
  • Save lpil/e8121f43ef738a958b08 to your computer and use it in GitHub Desktop.
Save lpil/e8121f43ef738a958b08 to your computer and use it in GitHub Desktop.

hjdivad commented 3 days ago

@lpil the way I do this for my own snippets is to invent my own file types for libraries and then have a project local vimrc that sets those filetypes.

For example, if I have a ruby project using the rspec library my project-local vimrc might contain something like

augroup ExtraTypes
  autocmd!
  autocmd BufNewFile,BufRead *_spec.rb set ft+=.rspec
augroup end

Then I can keep my rspec.snippets separate from my ruby.snippets.

I realise your problem is a little different... I'm not sure of a good way to deal with this when using communal snippets repositories, but maybe a similar idea could be helpful?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment