Skip to content

Custom User Function in Template #354

Closed Answered by lervag
sez11a asked this question in Q&A
Discussion options

You must be logged in to vote

It's me again. :-)

Hi :)

It's a new month, and in my planning system that means I plan out what I want to do that month in a separate file. To create that file in wiki.vim, I decided to auto-create a link in my daily.md template using a custom user function as described in the docs. This way, whenever I create a new daily file, the link to that month's plan is right at the top, and I can :vsplit and have the day on the left and the month on the right (similar to what I used to do in Logseq).

Sounds like a good idea!

I have this super-simple global function in lua:

function WikiMonthLink()
  return print(os.date("[%B %Y](/journal/%Y/%m/plan.md)"))
end

Here's my template: …

The proble…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@sez11a
Comment options

@lervag
Comment options

@lervag
Comment options

@sez11a
Comment options

@lervag
Comment options

Answer selected by sez11a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants