Add vscode-markdown command to convert selected text into collapsible section
See original GitHub issueWhat is the problem?
Add a new vscode command to convert selected text into a collapsible section.
How can I reproduce it?
Feature doesn’t exists
Is there any error message in the console?
No Error
Feature Request Details
Given a text section, a vscode command can be used to convert a text area to a collapsible area. For e.g.
To convert the following text in markdown syntax
Hidden Block
> echo "hello world!"
to the collapsible section, we need to surround this text with the following tags which enable the above text to be rendered as collapsible section
<details> <summary>Expand</summary> <p>
Hidden Block
> echo "hello world!"
</p> </details>
which is rendered as follows:
Expand
Hidden Block
> echo "hello world!"
A vscode command similar to generate Table of Contents can be useful TOC Command
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to add a collapsible section in markdown. - gists · GitHub
selectionEnd, 'select'); })();. Click in an editable text field; Click the bookmarklet and it will insert the minimalist snippet at your current cursor ......
Read more >How do I collapse sections of code in Visual Studio Code for ...
This is bound to the above remove command: Ctrl + K Ctrl + . Code folding by regions has arrived with v1.17. Folding...
Read more >collapsible-markdown-headers - Visual Studio Marketplace
This extension provides a command that can insert the required snippet for converting any text collapsible. I prefer to use it with headers...
Read more >How to: Collapse and Hide Sections of Code - Visual Basic
The #Region directive enables you to collapse and hide sections of code in Visual Basic files. The #Region directive lets you specify a ......
Read more >Getting Started with VSCode and Markdown Step-By-Step ...
Key Command Command id
⌘X (Windows, Linux Ctrl+X) Cut line (empty selection) editor.action.clipboardCutA...
⌘C (Windows, Linux Ctrl+C) Copy line (empty selection) editor.action.clipboardCopy...
⇧⌘K (Windows, Linux Ctrl+Shift+K)...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This can be easily done by defining a user snippet (with
TM_SELECTED_TEXT
variable). Also see here.VSCode doesn’t insert
\t
in this case: it inserts spaces.FYI.