More neovim settings updates
diff --git a/modules/neovim/wiki/wiki.vim b/modules/neovim/wiki/wiki.vim
index 13f6a33..e891588 100644
--- a/modules/neovim/wiki/wiki.vim
+++ b/modules/neovim/wiki/wiki.vim
@@ -7,12 +7,23 @@
let g:wiki_map_create_page = 'WikiCreateTransform'
function WikiCreateTransform(name) abort
let l:name = wiki#get_root() . '/' . a:name
+ let g:lastWikiOriginalName = substitute(a:name, "\.private$", "", "")
" If the file is new, then append the current date
return filereadable(l:name)
\ ? a:name
\ : a:name =~ ".*\.private$"
- \ ? substitute(substitute(a:name, " ", "_", "g"), "\.private$", "", "") . "_" . strftime("%Y%m%d") . ".private"
- \ : substitute(a:name, " ", "_", "g") . '_' . strftime('%Y%m%d')
+ \ ? substitute(g:lastWikiOriginalName, " ", "_", "g") . "_" . strftime("%Y%m%d") . ".private"
+ \ : substitute(g:lastWikiOriginalName, " ", "_", "g") . '_' . strftime('%Y%m%d')
endfunction
+
+function! TemplateFallback(context)
+ call append(0, ['# ' . g:lastWikiOriginalName, ''])
+endfunction
+
+let g:wiki_templates = [
+ \ { 'match_func': {x -> v:true},
+ \ 'source_func': function('TemplateFallback')},
+ \]
+
nnoremap <silent> <Leader>wf :WikiFzfPages<CR>