-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
help wantedOpen for community input, suggestions, or implementation helpOpen for community input, suggestions, or implementation help
Description
Feature Summary
Add support for user-defined snippets that can be quickly inserted into files. Snippets may include code blocks, text templates, or reusable structures, and should be accessible via shortcuts or command palette.
Motivation
Users often reuse common code patterns, documentation blocks, or configuration fragments. Manually typing or copying these each time is inefficient. A snippet system improves productivity, reduces repetition, and encourages consistency across files and projects.
Proposed Design
- Introduce a
snippets.txtin data directory to store user-defined snippets. - Each snippet includes a name, content, optional description, and trigger keyword.
- Provide a UI or command palette interface to insert snippets into the current cursor position.
- Support placeholders (e.g.,
{{cursor}},{{date}},{{filename}}) for dynamic insertion.
Acceptance Criteria
- Users can define and manage custom snippets.
- Snippets can be inserted via shortcut, command palette, or context menu.
- Placeholders are correctly replaced during insertion.
- Documentation includes instructions and examples for snippet creation.
Related Issues / Discussions
- Template system #2: These issues are similar so we can use template manager and placeholders system here.
Implementation Notes (Optional)
- Use structured text for snippet definitions.
- Support import/export of snippet collections for sharing.
Localization & Accessibility
Nothing
Community Feedback (Optional)
Nothing
Metadata
Metadata
Assignees
Labels
help wantedOpen for community input, suggestions, or implementation helpOpen for community input, suggestions, or implementation help
Type
Projects
Status
Accepted