Feature Request: Native Code Snippets support (like Zed/VS Code) #4950
rayachristian
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When writing structured technical documents or presentations in MarkText (such as custom Markdown flavors with semantic containers, slide layouts, or complex diagram blocks like Mermaid and WaveDrom), I find myself repeatedly typing or copying/pasting the same boilerplate structures.
Currently, there is no native, user-configurable way to trigger rapid code expansions (snippets) in MarkText.
I would love to see a native Snippets feature implemented in MarkText, similar to how modern editors like Zed or VS Code handle them.
For those unfamiliar, a snippet is a reusable block of text or code that can be inserted into a document using a shortcut trigger (prefix) followed by the
Tabkey. It supports:$1,$2, etc.): Allows the cursor to jump quickly between predefined fill-in fields using theTabkey.${1:default_value}): Pre-fills fields with default text.I have tried using external clipboard managers or operating system text-expansion tools, but they lack context-awareness and do not support dynamic tabstops/placeholders inside the editor buffer.
Following Zed's lightweight approach, this could be configured via simple, user-editable JSON files (e.g.,
markdown.jsonfor block-level snippets andmarkdown-inline.jsonfor inline ones) located in the user configuration directory.Example snippet definition:
{ "Slide Columns Layout": { "prefix": "slide-cols", "body": [ ":::::::::::::: {.cols-full}", ":::: {width=${1:50}%}", "${2:Left Column Content}", "::::", ":::: {width=${3:50}%}", "${4:Right Column Content}", "::::", "::::::::::::::", "$0" ], "description": "Insert a 2-column slide layout container" } }This feature would immensely boost productivity for power users who leverage MarkText for advanced document generation, technical writing, and slide-deck creation.
Thank you for your amazing work on MarkText!
Beta Was this translation helpful? Give feedback.
All reactions