Skip to content

Snippet Offset #31

@cophilot

Description

@cophilot

When creating a snippet it should also be possible to specifiy a offset. Meaning the snippet is not direktly generated above/below the id and rather its placed X lines before or after with (offset = X)

snippets:
   - id: ID # This is being used to identifiy the exact location of the snippet. The content will be placed to the '~~ID~~' placeholder in the file.
     file: src/file.txt # The file where the snippet should be inserted
     content: MyContent
     before: true # If the content should be inserted before the placeholder. Optional, default is false.
     offset:  2
MyContent
<empty-line>
<empty-line>
~~ID~~

Metadata

Metadata

Labels

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions