-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Closed
Labels
*as-designedDescribed behavior is as designedDescribed behavior is as designed
Description
- My
keybindings.json
{
"key": "alt+l",
"command": "workbench.action.terminal.sendSequence",
"args": { "text": "\u000AMdLink \"${file}\" \"${selectedText}\" \u000A" },
"when": "!editorReadonly"
//"when": "!editorReadonly && editorLangId == 'markdown'"
}It executes a bash script called MdLink with arguments path of the file and the selected text.
This script should do something special when a text is selected. And when nothing is selected, then I want the script to do something general. I know that I can create another keybinding without selectedText variable but its not elegant.
But the shortcut fails if no text is selected. May be its useful to still run the command even if no text is selected.
Metadata
Metadata
Assignees
Labels
*as-designedDescribed behavior is as designedDescribed behavior is as designed