Test: Add option to configure date string format #1073
This commit is contained in:
@@ -118,14 +118,20 @@ endfunction
|
||||
|
||||
|
||||
function! s:template_full_name(name) abort
|
||||
if a:name ==? ''
|
||||
let name = a:name
|
||||
if name ==? ''
|
||||
let name = vimwiki#vars#get_wikilocal('template_default')
|
||||
else
|
||||
let name = a:name
|
||||
endif
|
||||
|
||||
let fname = expand(vimwiki#vars#get_wikilocal('template_path').
|
||||
\ name . vimwiki#vars#get_wikilocal('template_ext'))
|
||||
" Suffix Path by a / is not
|
||||
let path = vimwiki#vars#get_wikilocal('template_path')
|
||||
if strridx(path, '/') +1 != len(path)
|
||||
let path .= '/'
|
||||
endif
|
||||
|
||||
let ext = vimwiki#vars#get_wikilocal('template_ext')
|
||||
|
||||
let fname = expand(path . name . ext)
|
||||
|
||||
if filereadable(fname)
|
||||
return fname
|
||||
|
||||
@@ -1286,7 +1286,6 @@ endfunction
|
||||
" 4. Command (exported) {{{1
|
||||
" ----------------------------------------------------------
|
||||
|
||||
|
||||
function! s:get_anywhere(key, ...) abort
|
||||
" Get variable anywhere
|
||||
" Returns: [value, location] where loc=global|wikilocal|syntaxlocal|bufferlocal|none
|
||||
@@ -1390,7 +1389,7 @@ endfunction
|
||||
|
||||
function! vimwiki#vars#cmd(arg) abort
|
||||
" Set or Get a vimwiki variable
|
||||
" :param: (1) key <string> [space] value <string>
|
||||
" :param: (1) <string> command parameter: key [space] value
|
||||
" -- name of the variable [space] value to evaluate and set the variable
|
||||
" Called: VimwikiVar
|
||||
" Get key and value
|
||||
|
||||
Reference in New Issue
Block a user