Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When snipmate is installed using Vundle instead of Pathogen the path to snipmate is different. #23

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ 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")
@snippets_dir = [File.join(pathogen_dir, 'snipmate', 'snippets'), File.join(pathogen_dir, 'snipmate.vim', 'snippets'), File.join(vim_dir, "snippets")].select do | folder |
File.exists? folder
end[0]
end

desc "Purge the contents of the vim snippets directory"
Expand Down
6 changes: 3 additions & 3 deletions javascript/for.snippet
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
for (var <+i+>=0; <+i+> < <+<+Things+>.length+>; <+i+>++) {
<+<+Things+>[<+i+>]+>
};
for (var ${1:i}=0; ${1:i} < ${2:collection}.length; ${1:i}++) {
${2:collection}[${1:i}]
}