Skip to content

Commit

Permalink
[VS Code] Smart link paste for Markdown: ⌥⌘V to invert behaviour (mat…
Browse files Browse the repository at this point in the history
…ching GitHub).

See: microsoft/vscode#188871 (comment)
  • Loading branch information
lgarron committed Sep 21, 2023
1 parent 96aa834 commit b6385b0
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,22 +172,27 @@
"command": "-extension.toggleCase",
"when": "editorHasSelection"
},
// Smart link paste for Markdown
// See: https://github.com/microsoft/vscode/issues/188871#issuecomment-1728667796
{
"key": "cmd+v",
"command": "editor.action.pasteAs",
"args": {
"id": "text"
},
"when": "!editorHasSelection && editorLangId == 'markdown'"
"when": "inputFocus && !editorHasSelection && editorLangId == 'markdown'"
},
{
"key": "cmd+v",
"command": "editor.action.clipboardPasteAction",
"args": {},
"when": "editorHasSelection || editorLangId != 'markdown'"
"command": "-editor.action.clipboardPasteAction",
"when": "inputFocus && !editorHasSelection && editorLangId == 'markdown'"
},
{
"key": "cmd+v",
"command": "-editor.action.clipboardPasteAction"
"key": "shift-cmd+v",
"command": "editor.action.pasteAs",
"args": {
"id": "text"
},
"when": "inputFocus && editorHasSelection"
}
]

0 comments on commit b6385b0

Please sign in to comment.