Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-populate new files from template #488

Open
gamberoillecito opened this issue Nov 21, 2024 · 0 comments
Open

Pre-populate new files from template #488

gamberoillecito opened this issue Nov 21, 2024 · 0 comments
Labels
feature request New feature or request.

Comments

@gamberoillecito
Copy link

Description

Add an option so that whenever a user creates a new file, instead of being an empty file, it has some customizable predefined content. Similarly to what can be done in Obsidian: https://help.obsidian.md/Plugins/Templates

Use Case

The reason why I think this would be helpful is that in typst it is not possible to use functions (and similar) defined in the parent file in a child file. This requires to define all functions in a separate file (e.g. global_funcs.typ) and import it in every new file.

In the way I structure my projects (one file per chapters), it becomes annoying to always have to copy-paste the same import line.

Although this is the use case that prompted me to open this issue, I am sure there are many other similar cases (such as creating a new chapter with predefined headings and so on).

@gamberoillecito gamberoillecito added the feature request New feature or request. label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request.
Projects
None yet
Development

No branches or pull requests

1 participant