Annika Backstrom is a user on xoxo.zone. You can follow them or interact with them if you have an account anywhere in the fediverse.
Annika Backstrom @annika

Eyyy you can use `autocmd BufNewFile` for templates in . Here's one for that autodetects a new Markdown file in my "content" directory and populates an article template with the correct headers:

if has("autocmd")
augroup templates
autocmd BufNewFile */blog/content/*.md 0r %:h/pages/template.md
augroup END
endif

`autocmd` with paths is one of my new favorite things. I'm also using it for project-aware indent settings.

· Web · 0 · 0