✅ Overview
The document template system provides yasnippet/skeleton-like functionality for quickly creating new documents or inserting pre-defined content. Templates support:
Multiple formats: Org-mode, Markdown, and LaTeX
Tab stops for quick navigation between placeholders
Auto-fill variables for dates, author, filenames, etc.
User-defined templates stored in a configurable directory
Built-in templates for common document types
✅ Quick Start
Insert a Template
Open a file (org, markdown, or latex)
Press
C-c T ior runScimax: Quick Insert TemplateSelect a template from the list
Tab through placeholders to fill in values
Create a New File from Template
Press
C-c T nor runScimax: New File from TemplateSelect a template
Enter the filename
The file is created and opened with the template content
✅ Built-in Templates
✅ Org-mode Templates
| Template | Description |
|---|---|
| Article | Basic article with title, author, and sections |
| Research Notes | Problem, approach, experiments, results |
| Meeting Notes | Attendees, agenda, discussion, action items |
| Project Plan | Goals, milestones, tasks, risks |
| Literature Review | Paper review with key contributions, methods |
| Source Block | Code block with language selection |
Custom Exporter Templates
Every loaded custom exporter also contributes an org template, listed under the Custom Exporters category and named after the exporter. Inserting it writes the header that exporter needs -- for the CMU Memo example:
#+TITLE: Memo subject
#+AUTHOR: ...
#+DATE: 2026-09-02
#+LATEX_CLASS: cmu-memo
#+DEPARTMENT: Department of Chemical Engineering
#+TO: <<<TO>>>
#+FROM: ...
#+SUBJECT: Memo subject
Defaults from the manifest are filled in and required keywords appear as
<<<PLACEHOLDER>>>. Scimax: Insert Custom Exporter Header does the same thing
from the export side, and exporting with a required keyword missing offers it.
✅ Markdown Templates
| Template | Description |
|---|---|
| README | Standard project README |
| Blog Post | Blog post with frontmatter |
| Technical Documentation | Step-by-step technical documentation |
✅ LaTeX Templates
| Template | Description |
|---|---|
| Article | LaTeX article with standard preamble |
| Beamer Presentation | Beamer slide deck |
| Letter | Formal letter template |
| Equation | Numbered equation environment |
| Figure | Figure environment with caption |
| Table | Table environment with caption |
Snippets
Short prefixes expand into org syntax when you press Tab right after them:
type ti and Tab for #+TITLE:, or <py and Tab for a Python source
block. Tab stops then move through the parts to fill in (Tab to go on,
Escape to finish). The snippets also appear in the suggestion list as you
type.
Tab expands them because scimax sets editor.tabCompletion to
onlySnippets for org files: Tab expands a word only when it is exactly a
snippet's prefix, and inserts a tab otherwise. On a heading, list item or table,
Tab keeps its org meaning (fold, indent, next cell). To turn expansion on
Tab off, add this to your settings:
"[org]": { "editor.tabCompletion": "off" }
| Prefix | Inserts |
|---|---|
<sh | Shell source block |
<bash | Bash source block |
<p | Python source block |
<py | Python source block |
<jp | Jupyter Python source block |
<jj | Jupyter Julia source block |
<jr | Jupyter R source block |
<js | JavaScript source block |
<ts | TypeScript source block |
<el | Emacs Lisp source block |
<elisp | Emacs Lisp source block |
<rb | Ruby source block |
<r | R source block |
<jl | Julia source block |
<sql | SQL source block |
<l | LaTeX source block |
<c | C source block |
<cpp | C++ source block |
<java | Java source block |
<go | Go source block |
<rs | Rust source block |
<s | Source block with language prompt |
<e | Example block |
<q | Quote block |
<center | Center block |
<comment | Comment block |
<v | Verse block |
<html | HTML export block |
<latex | LaTeX export block |
<note | Note block |
<warning | Warning block |
<tip | Tip block |
<prop | Property drawer |
<i | Inline source code |
ti | Document title keyword |
ca | Caption keyword for figures/tables |
The snippets live in snippets/org.json in the extension. To add your own, run
Snippets: Configure Snippets (Preferences: Configure Snippets) and choose
org.
✅ Template Syntax
✅ Tab Stops
Tab stops mark positions where the cursor should stop when pressing Tab:
${1:First placeholder}
${2:Second placeholder}
$0 # Final cursor position
After inserting, press Tab to move between placeholders.
✅ Auto-fill Variables
These variables are automatically replaced when the template is inserted:
| Variable | Description |
|---|---|
{{date}} | Current date (configurable format) |
{{time}} | Current time (configurable format) |
{{datetime}} | Date and time combined |
{{year}} | Current year (yyyy) |
{{month}} | Current month (MM) |
{{day}} | Current day (dd) |
{{weekday}} | Full day name (e.g., "Monday") |
{{timestamp}} | ISO 8601 timestamp |
{{author}} | Configured author name |
{{user}} | System username |
{{filename}} | Current file name (without extension) |
{{filepath}} | Full path to current file |
{{directory}} | Directory containing current file |
{{workspace}} | Workspace folder name |
{{workspacePath}} | Full workspace path |
{{uuid}} | Random UUID |
✅ Named Variables
Named variables prompt the user for input:
${title} # Prompts for "title"
${title:Default} # Prompts with default value
✅ Creating User Templates
✅ Template Directory Structure
User templates are stored in ~/scimax/templates by default (under scimax.directory). You can override this with scimax.templates.directory:
~/scimax/templates/
├── org/
│ ├── my-article.org
│ └── weekly-report.org
├── markdown/
│ └── project-proposal.md
└── latex/
└── thesis-chapter.tex
Template File Format
Templates can include metadata in header comments:
The metadata block must be the first thing in the file and is terminated by a
blank line. Everything after that blank line is template content, so an org
template can begin with real keywords (#+TITLE:, #+AUTHOR:, #+TO: ...)
without them being mistaken for template metadata.
Recognized metadata keys are NAME, DESCRIPTION, CATEGORY, FILENAME
(or DEFAULTFILENAME), and FORMAT. A leading block that contains none of
these is treated as document content and is kept in the template; its TITLE
is still used to name the template when NAME is absent.
✅ Org-mode Template
#+NAME: Weekly Report
#+DESCRIPTION: Weekly status report template
#+CATEGORY: Work
* Week of {{date}}
** Accomplishments
- ${1:Accomplishment 1}
** Next Week
- ${2:Plan 1}
** Blockers
${3:None}
$0
✅ Markdown Template
<!-- NAME: Project Proposal -->
<!-- DESCRIPTION: Proposal for new projects -->
<!-- CATEGORY: Work -->
# ${1:Project Name}
## Overview
${2:Brief description}
## Goals
- ${3:Goal 1}
$0
✅ LaTeX Template
% NAME: Thesis Chapter
% DESCRIPTION: Chapter template for thesis
% CATEGORY: Academic
\chapter{${1:Chapter Title}}
\label{chap:${2:label}}
${3:Introduction paragraph}
\section{${4:Section Title}}
$0
Create Template from Selection
Select text in the editor
Press
C-c T sor runScimax: Create Template from SelectionEnter a name for the template
Optionally add a description
The template is saved to your templates directory
Commands
| Command | Keybinding | Description |
|---|---|---|
scimax.templates.quickInsert | C-c T i | Insert template (auto-detect format) |
scimax.templates.insert | Insert any template | |
scimax.templates.insertOrg | Insert org-mode template | |
scimax.templates.insertMarkdown | Insert markdown template | |
scimax.templates.insertLatex | Insert LaTeX template | |
scimax.templates.newFile | C-c T n | Create new file from template |
scimax.templates.newOrgFile | Create new org file from template | |
scimax.templates.newMarkdownFile | Create new markdown file | |
scimax.templates.newLatexFile | Create new LaTeX file | |
scimax.templates.list | C-c T l | List all templates |
scimax.templates.createFromSelection | C-c T s | Create template from selection |
scimax.templates.editTemplates | Open templates in VS Code | |
scimax.templates.openDirectory | Open templates dir in file explorer | |
scimax.templates.reload | Reload templates from disk | |
scimax.export.insertExporterHeader | Insert a custom exporter's org header |
✅ Configuration
| Setting | Default | Description |
|---|---|---|
scimax.templates.directory | {scimax.directory}/templates | Directory for user templates |
scimax.templates.defaultFormat | org | Default format for new templates |
scimax.templates.dateFormat | yyyy-MM-dd | Date format (date-fns) |
scimax.templates.timeFormat | HH:mm | Time format (date-fns) |
scimax.templates.author | (system user) | Author name for {{author}} variable |
✅ Date Format Reference
The date and time formats use date-fns format strings:
| Pattern | Description | Example |
|---|---|---|
yyyy | Full year | 2024 |
yy | 2-digit year | 24 |
MM | Month (2 digits) | 01-12 |
MMM | Month abbreviation | Jan |
MMMM | Full month name | January |
dd | Day (2 digits) | 01-31 |
EEEE | Full day name | Monday |
EEE | Day abbreviation | Mon |
HH | Hour (24h) | 00-23 |
hh | Hour (12h) | 01-12 |
mm | Minutes | 00-59 |
ss | Seconds | 00-59 |
✅ Tips and Workflows
✅ Project-Specific Templates
Create a .scimax-templates directory in your project for project-specific templates:
my-project/ ├── .scimax-templates/ │ └── org/ │ └── experiment-notes.org ├── src/ └── docs/
Then configure scimax.templates.directory in your workspace settings.
✅ Template Libraries
Share templates across projects by:
Creating a Git repository for your templates
Cloning it to
~/scimax/templates(or your configured templates directory)Pulling updates when templates change
✅ Combining with Capture
Templates and capture serve different purposes:
Templates: Create complete documents or insert large content blocks
Capture: Quick notes appended to existing files
Use templates for new documents, capture for quick additions.