You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new markdown.experimental.updateLinksOnPaste setting allows VS Code to automatically update any relative links in text that is copy and pasted between markdown files in the current window. For example, if you copy this text from ./readme.md:
![alt](img.png)
If you paste it into ./sub/other.md, the text will automatically be rewritten to:
![alt](../img.png)
This feature works for:
Relative links and images:
[text](file.md)[text](/file.md)[text](../file.md)[text](file) No extension used but resolves to `file.md`---
Links in `src` html elements:
<videosrc="file.mp4"></video>
<ahref="file.md">...</a>
---
Fragment links:
[text](#header-in-current-file)[text](other.#header-in-other-file)---
Reference links:
[Some text][def] <-- Copy this and the definition below should get added to the new file on paste
[def]: http://example..com
Testing
Set "markdown.experimental.updateLinksOnPaste": true
Try copying text that includes some of the link formats above
Make sure the links are correctly updated on paste
Try testing other variations or combinations
Make sure you can use the paste widget to switch back to a normal paste if you want instead
Known limitations
This only works for when copy and pasting within editors in the same window. It does not work across VS Code windows or from another app into VS Code
We currently support multicursor paste but not multi-cursor copy. This means the first cursor's content is always used on paste
The text was updated successfully, but these errors were encountered:
Test for #209318
Complexity: 3
Create Issue
Summary
The new
markdown.experimental.updateLinksOnPaste
setting allows VS Code to automatically update any relative links in text that is copy and pasted between markdown files in the current window. For example, if you copy this text from./readme.md
:If you paste it into
./sub/other.md
, the text will automatically be rewritten to:This feature works for:
Testing
Set
"markdown.experimental.updateLinksOnPaste": true
Try copying text that includes some of the link formats above
Make sure the links are correctly updated on paste
Try testing other variations or combinations
Make sure you can use the paste widget to switch back to a normal paste if you want instead
Known limitations
This only works for when copy and pasting within editors in the same window. It does not work across VS Code windows or from another app into VS Code
We currently support multicursor paste but not multi-cursor copy. This means the first cursor's content is always used on paste
The text was updated successfully, but these errors were encountered: