diff --git a/autoload/neosnippet.vim b/autoload/neosnippet.vim index 6f5f029..74f3c88 100644 --- a/autoload/neosnippet.vim +++ b/autoload/neosnippet.vim @@ -45,7 +45,7 @@ function! s:initialize()"{{{ if exists('g:neocomplcache_snippets_dir') for dir in split(g:neocomplcache_snippets_dir, '\s*,\s*') - let dir = neocomplcache#util#expand(dir) + let dir = neosnippet#util#expand(dir) if !isdirectory(dir) call mkdir(dir, 'p') endif @@ -594,7 +594,7 @@ function! s:get_snippet_range(begin_line, begin_patterns, end_line, end_patterns if empty(a:begin_patterns) let begin = line('.') - 50 else - let [begin, _] = searchpos('^' . neocomplcache#util#escape_pattern( + let [begin, _] = searchpos('^' . neosnippet#util#escape_pattern( \ a:begin_patterns[0]) . '$', 'bnW') if begin <= 0 let begin = line('.') - 50 @@ -608,7 +608,7 @@ function! s:get_snippet_range(begin_line, begin_patterns, end_line, end_patterns if empty(a:end_patterns) let end = line('.') + 50 else - let [end, _] = searchpos('^' . neocomplcache#util#escape_pattern( + let [end, _] = searchpos('^' . neosnippet#util#escape_pattern( \ a:end_patterns[0]) . '$', 'nW') if end <= 0 let end = line('.') + 50 diff --git a/autoload/neosnippet/util.vim b/autoload/neosnippet/util.vim index 1ca1b14..3faef9a 100644 --- a/autoload/neosnippet/util.vim +++ b/autoload/neosnippet/util.vim @@ -54,6 +54,13 @@ function! neosnippet#util#iconv(...)"{{{ return call(s:V.iconv, a:000) endfunction"}}} +function! neosnippet#util#expand(path)"{{{ + return s:V.substitute_path_separator( + \ (a:path =~ '^\~') ? substitute(a:path, '^\~', expand('~'), '') : + \ (a:path =~ '^\$\h\w*') ? substitute(a:path, + \ '^\$\h\w*', '\=eval(submatch(0))', '') : + \ a:path) +endfunction"}}} function! neosnippet#util#set_dictionary_helper(...)"{{{ return call(s:V.set_dictionary_helper, a:000) endfunction"}}} diff --git a/doc/neosnippet.txt b/doc/neosnippet.txt index 5364a70..bbd4173 100644 --- a/doc/neosnippet.txt +++ b/doc/neosnippet.txt @@ -320,6 +320,7 @@ CHANGELOG *neosnippet-changelog* 2012-09-30 - Changed runtime directory. - Vitalized. +- Deleted neocomplcache#util functions. 2012-09-27 - Ver.3 development is started.