- Improved neosnippet#util#expand().
This commit is contained in:
parent
f79f3df531
commit
f87a6b324a
@ -1,7 +1,7 @@
|
||||
"=============================================================================
|
||||
" FILE: util.vim
|
||||
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
|
||||
" Last Modified: 30 Sep 2012.
|
||||
" Last Modified: 23 Oct 2012.
|
||||
" License: MIT license {{{
|
||||
" Permission is hereby granted, free of charge, to any person obtaining
|
||||
" a copy of this software and associated documentation files (the
|
||||
@ -55,11 +55,12 @@ function! neosnippet#util#iconv(...)"{{{
|
||||
endfunction"}}}
|
||||
|
||||
function! neosnippet#util#expand(path)"{{{
|
||||
return s:V.substitute_path_separator(
|
||||
\ (a:path =~ '^\~') ? substitute(a:path, '^\~', expand('~'), '') :
|
||||
let path = (a:path =~ '^\~') ?
|
||||
\ substitute(a:path, '^\~', expand('~'), '') :
|
||||
\ (a:path =~ '^\$\h\w*') ? substitute(a:path,
|
||||
\ '^\$\h\w*', '\=eval(submatch(0))', '') :
|
||||
\ a:path)
|
||||
\ a:path
|
||||
return s:V.substitute_path_separator(fnamemodify(path, ':p'))
|
||||
endfunction"}}}
|
||||
function! neosnippet#util#set_default(var, val, ...) "{{{
|
||||
if !exists(a:var) || type({a:var}) != type(a:val)
|
||||
|
@ -454,6 +454,9 @@ snippet *neosnippet-unite-action-snippet*
|
||||
==============================================================================
|
||||
CHANGELOG *neosnippet-changelog*
|
||||
|
||||
2012-10-23
|
||||
- Improved neosnippet#util#expand().
|
||||
|
||||
2012-10-21
|
||||
- Added options head.
|
||||
- Added options word.
|
||||
|
Loading…
Reference in New Issue
Block a user