Closed GoogleCodeExporter closed 9 years ago
hmm, sorry, don't use google issues that often, would have liked to make this a
different type - it's more useability or wishlist.
Original comment by glba...@gmail.com
on 26 Jul 2011 at 3:12
This is not vimwiki's job.
try https://github.com/hotoo/template.vim
Original comment by HoToo.cn
on 16 Aug 2011 at 3:42
That's not exactly the same - template.vim is cool, but it only associates
templates with file extensions, but for example wouldn't know about different
wikis. The way I see it, it would make much more sense to have a template
option on wikis so that when you create a new page, that template is taken -
but only inside this wiki.
Original comment by glba...@gmail.com
on 16 Aug 2011 at 4:00
You can have different file extensions for different wikis
Original comment by m...@zmlka.com
on 16 Aug 2011 at 5:55
I found that creating a template using snipmate was an easy solution, and more
flexible than template.vim.
For example, to insert TrunkNotes style metadata at the top of a wiki page, I
created a snippet called `tnhdr` in my `snippets/vimwiki.snippets` file.
{{{ text
snippet tnhdr
Title: ${1}
Timestamp: `strftime("%F %T")` +0000
Created: `strftime("%F %T")` +0000
Last Accessed: `strftime("%F %T")` +0000
Times Accessed: 1
Tags:
Metadata:
}}}
Note that lines start with tab-chars, and that I am using the system command
strftime available on my mac.
To quickly insert this snippet, I added the following mapping to my .vimrc:
au FileType vimwiki nmap <Leader>wl ggitnhdr<c-r>=TriggerSnippet()<cr><Esc>
Original comment by stu.andrews
on 18 Aug 2011 at 5:45
Original comment by habamax
on 20 Aug 2011 at 4:34
I would suggest to use existing template plugins for that purpose.
Don't forget that you can set up different extensions to your wikies, thus
template.vim would be able to differetiate them.
Original comment by habamax
on 14 May 2012 at 5:45
Original issue reported on code.google.com by
glba...@gmail.com
on 26 Jul 2011 at 3:11