Improvements to UltiSnipsEdit command by jmcantrell which partially fixes bug 748433

This commit is contained in:
Holger Rapp 2011-04-09 17:58:30 +02:00
parent eeb8dc4831
commit a63c3f9a18

View File

@ -85,12 +85,14 @@ function! UltiSnipsEdit(...)
endif
exe ':'.mode.' '.g:UltiSnipsSnippetsDir.'/'.type.'.snippets'
else
for dir in split(&runtimepath, ',')
if isdirectory(dir.'/UltiSnips')
let g:UltiSnipsSnippetsDir = dir.'/UltiSnips'
call UltiSnipsEdit(type)
break
endif
for dir in g:UltiSnipsSnippetDirectories
for p in reverse(split(&runtimepath, ','))
if isdirectory(p.'/'.dir)
let g:UltiSnipsSnippetsDir = p.'/'.dir
call UltiSnipsEdit(type)
break
endif
endfor
endfor
endif
endfunction