Skip to content

Suggestion: Speed up coding workflows when creating documentation, by providing code-snippets files for tools such as vscode #774

@twcau

Description

@twcau

Summary:

As part of the project, it would be a good idea to provide a code-snippets file for users of VSCode, or other tools, so they can quickly and speedily add relevant markdown and elements into their documentation.

Associated documentation would need to be added to the repository to support this.

Example

Snippet file

Attached is an example for VSCode that I've prepared this evening (with some help from Copilot to avoid the repetitive stuff).

Using snippets

With this file, it means that in VSCode, the user can simply type retype-..., and either see the list, or press Ctrl-Space to see the list.

Image showing a list of potential Retype code-snippets displayed within VSCode

Benefits

  1. Faster speed to setup and first publish: The base retype.yml file needed could be a single snippet, which takes all the comments and documentation here to speed creation.

  2. Build confidence and ease with newer users: Would help newer or even experienced user having to constantly refer back to the documentation.

  3. Faster creation and maintenance: Would allow users to more easily leverage AI tools in their projects for delivering consistent documentation and instructions in their projects.

  4. Ease of populating elements: With good design of the snippets (editor dependent) - moving through the editor to populate values becomes easier due to the defined placeholders, and even allow them to be shown relevant documentation inline to help with decision-making for how to populate.

"Insert Replay Basic Page block": {
		"prefix": "retype-page-basic",
		"body": [
			"---",
			"label: $1", // Explained at https://retype.com/configuration/page/#label
			"layout: ${2:layout}", // Explained at https://retype.com/configuration/page/#label
			"order: ${3:replacewithnumber}", // Explained at https://retype.com/configuration/page/#order
			"visibility: ${4:public|hidden|protected|private}", // Explained at https://retype.com/configuration/page/#visibility
			"category: ${5:[overview, howto, module, projectdesign]}", // Explained at https://retype.com/
			"---"
		],
		"description": "Insert a Replay Page block at the cursor postion with label, layout, and order fields"
	},

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions