[Docs] Add VSCode snippets for Dev Docs #5003
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds Visual Studio Code (VSCode) auto-complete snippets for the most common Hugo shortcodes used Developer Docs.
Available snippets:
asideheader
Aside
shortcode with header text.asidenoheader
Aside
shortcode without a header.ccol
content-column
shortcodes.tblwrap
table-wrap
shortcodes.directory
directory-listing
shortcode.headerfullfile
metatitle
headerpartialfile
partialinclude
orrenderpartial
render
shortcode to include content from a partial in the current document.Triggering one of the available snippets will insert their body content at the current cursor position.
Additionally, the following snippets support surrounding existing text:
Aside with header
Aside without header
Surround with content-column
Surround with table-wrap
How to use
To enter a snippet:
Ctrl+Space
.Enter
.Tab
to move to the next placeholder. Keep replacing placeholders and pressingTab
. When there are no more placeholders, pressingTab
will end the process.To surround existing content with a snippet:
Ctrl+Space
.Enter
. VSCode will insert the snippet body and paste the previously selected content in the correct location (determined by$TM_SELECTED_TEXT
in the snippet configuration).Tab
to move to the next placeholder. Keep replacing placeholders and pressingTab
. When there are no more placeholders, pressingTab
will end the process.