Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

search for bundle/snipmat.vim/snippets as a snippets dir #20

Open
wants to merge 1 commit into from

2 participants

@cutalion

Hey Martin,

I'm using vundle (https://github.com/gmarik/vundle) to manage vim scripts. It has a short syntax for scripts hosted on github, like

Bundle 'msanders/snipmate.vim'
Bundle 'scrooloose/snipmate-snippets'
Bundle 'scrooloose/nerdtree'
Bundle 'vim-scripts/NERD_Tree-and-ack'

there is the last part of the url https://github.com/msanders/snipmate.vim in the config.
And it installs the snipmate into the bundle/snipmate.vim directory.

I've change the rake task to search for that directory as well as .vim/snipmate and bundle/snipmate

Thanks,
Alex

@jeroenbourgois

Indeed otherwise you get the multi_snip warning...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 2 deletions.
  1. +7 −2 Rakefile
View
9 Rakefile
@@ -4,8 +4,13 @@
namespace :snippets_dir do
task :find do
vim_dir = File.join(ENV['VIMFILES'] || ENV['HOME'] || ENV['USERPROFILE'], RUBY_PLATFORM =~ /mswin|msys|mingw32/ ? "vimfiles" : ".vim")
- pathogen_dir = File.join(vim_dir, "bundle")
- @snippets_dir = File.directory?(pathogen_dir) ? File.join(pathogen_dir, "snipmate", "snippets") : File.join(vim_dir, "snippets")
+ possible_dirs = [
+ File.join(vim_dir, 'snippets'),
+ File.join(vim_dir, 'bundle', 'snipmate', 'snippets'),
+ File.join(vim_dir, 'bundle', 'snipmate.vim', 'snippets')
+ ]
+
+ @snippets_dir = possible_dirs.find{ |dir| File.directory? dir }
end
desc "Purge the contents of the vim snippets directory"
Something went wrong with that request. Please try again.