mirror of
https://github.com/gryf/snipmate.vim.git
synced 2026-10-09 23:22:29 +02:00
now using finddir() to find snippet directory
This commit is contained in:
1 parent
a9ae5af003
commit
899fe4f5ce
1 file changed
+2
-3
@@ -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