snippet tt "tiddlywiki header" bA
created: `date +%Y%m%d%H%M%S`
creator:
modified: `date +%Y%m%d%H%M%S`
modifier:
tags: test
title: `!v expand("%:r")`
type: text/vnd.tiddlywiki
${1:add your content}
endsnippet
-
just a case, use vim to create tid file with header snippet
-
the below code is a simple function to create tid file in specifical path
--- create_tid
---@param tid_name string
creat_tid = function(tid_name)
local ft = ".tid"
local prefix = "wiki/tiddlers/neovim_created"
local tid_path = string.format("%s/%s/", os.getenv("HOME"), prefix)
if vim.fn.isdirectory(tid_path) == 1 then
local tid_full_path = tid_path .. tid_name .. ft
vim.cmd(([[edit %s]]):format(tid_full_path))
else
vim.notify("THis directory is empty")
end
end