1
0
mirror of https://github.com/gryf/snipmate.vim.git synced 2025-12-25 07:32:35 +01:00

now using finddir() to find snippet directory

This commit is contained in:
Michael Sanders
2009-03-22 21:10:25 -04:00
parent a9ae5af003
commit 899fe4f5ce

View File

@@ -16,10 +16,9 @@ au FileType objc,cpp,cs let &ft = expand('<amatch>').'.c'
" By default load snippets in ~/.vim/snippets/<filetype>
if !exists('snippets_dir')
let snippets_dir = $HOME.(has('win16') || has('win32') || has('win64') ?
\ '\vimfiles\snippets\' : '/.vim/snippets/')
let snippets_dir = $HOME.'/'.finddir('snippets', &rtp).'/'
endif
if !isdirectory(snippets_dir) | finish | endif
if empty(snippets_dir) | finish | endif
if isdirectory(snippets_dir.'_')
call ExtractSnips(snippets_dir.'_', '_')