mirror of
https://github.com/gryf/snipmate.vim.git
synced 2025-12-27 17:02:36 +01:00
now using finddir() to find snippet directory
This commit is contained in:
@@ -16,10 +16,9 @@ au FileType objc,cpp,cs let &ft = expand('<amatch>').'.c'
|
|||||||
|
|
||||||
" By default load snippets in ~/.vim/snippets/<filetype>
|
" By default load snippets in ~/.vim/snippets/<filetype>
|
||||||
if !exists('snippets_dir')
|
if !exists('snippets_dir')
|
||||||
let snippets_dir = $HOME.(has('win16') || has('win32') || has('win64') ?
|
let snippets_dir = $HOME.'/'.finddir('snippets', &rtp).'/'
|
||||||
\ '\vimfiles\snippets\' : '/.vim/snippets/')
|
|
||||||
endif
|
endif
|
||||||
if !isdirectory(snippets_dir) | finish | endif
|
if empty(snippets_dir) | finish | endif
|
||||||
|
|
||||||
if isdirectory(snippets_dir.'_')
|
if isdirectory(snippets_dir.'_')
|
||||||
call ExtractSnips(snippets_dir.'_', '_')
|
call ExtractSnips(snippets_dir.'_', '_')
|
||||||
|
|||||||
Reference in New Issue
Block a user