It is hard to read a markdown document in Visual Code if it contains links with long URLs. Is there a way to collapse/fold link addresses?
Question posted in Visual Studio Code
View the official documentation.
View the official documentation.
2
Answers
As far as I can tell from looking through the markdown settings (you can try it yourself by triggering autocomplete/suggestions after typing
markdownlink
in a settings.json file), there is no setting that enables the behaviour you are looking for.One possible workaround would be to just read the markdown preview (instead of the source markup). You can do this with the buttons at the top right, or with these commands and keyboard shortcuts:
Markdown: Open Preview
(ctrl+shift+v)Markdown: Open Preview to the Side
(ctrl+k,v)Markdown: Open Locked Preview to the Side
If you want the feature you are asking for, you can create a feature request on their GitHub issue tracker. If you do so, add a link here to the issue you create for posterity.
There are two other options that make the long URL situation a bit more bearable:
Example:
See also How can I switch word wrap on and off in Visual Studio Code?