Easy Markdown link generation with VIM & VSCode
1 min read
I wanted a simple workflow to quickly convert text to links in VIM as I use the VIM extension in VSCode. Type CMD + Shift + P and enter Open Keyboard Shortcuts (JSON). From here, we can define a simple rule.
[
{
"key": "cmd+l",
"command": "editor.action.insertSnippet",
"args": {
"snippet": "[$TM_SELECTED_TEXT](${CLIPBOARD})"
},
"when": "editorTextFocus"
}
]
Now I can simply:
<cmd>+dto highlight the word using VIM<cmd>+lto turn selection into a Markdown link while auto-copying the clipboard value into the parenthesis.
