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
{{ message }}
This repository was archived by the owner on May 11, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,8 @@ All notable changes to the "vscode-didact" extension will be documented in this
23
23
- Added `Insert Didact Badge` completion to show `Powered by Didact` badge with link back to the project in GitHub
24
24
- Added new `vscode` URI processing to handle registering a Didact tutorial via a web link and a new command - `Didact: Process VSCode link from web` to process a copied link
25
25
- Add new `Ctrl/Cmd+Alt+T` shortcut to convert selected text into a `sendNamedTerminalAString` Didact link
26
+
- Added new settings to customize the link text shown and whether to execute the command in the terminal
27
+
- Add new `sendNamedTerminalAStringNoLF` command that sends text to the terminal but doesn't execute it
Command to take the currently selected text in the open editor (of a Didact Markdown or AsciiDoc file) and add a new Didact `sendNamedTerminalAString` or `sendNamedTerminalAStringNoLF` link with the selected text automatically URLencoded.
222
+
223
+
This is triggered by default using `Ctrl+Alt+T` or `Cmd+Alt+T`. Note that the key combination can be changed by going into Keyboard Shortcuts (`File->Preferences->Keyboard Shortcuts`) and searching for `copyTextToCLI`, then overwriting the Keybinding.
224
+
225
+
A couple of things to note:
226
+
227
+
* Any link inserted using this method will be surrounded by parentheses. For example, `^ execute` will appear in the Didact link as `(^ execute)`.
228
+
* Though you can modify the text inside the parentheses (i.e. `^ execute`) in the [`Didact>Edit: Cli Link Text` field in the Settings for Didact](https://redhat-developer.github.io/vscode-didact/settings), some characters will need to be escaped such as close square brackets (`\]`) due to the way links are formatted in Markdown and AsciiDoc.
229
+
* You can insert emojis such as the [play button](https://emojipedia.org/play-button/) or [two-hump camel](https://emojipedia.org/two-hump-camel/) instead of text.
Copy file name to clipboardExpand all lines: docs/settings.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,4 +7,9 @@ The Didact Extension has several configurable settings available. To access the
7
7
* To turn on generic Didact completion notifications (off by default), set the `Didact: Disable Notifications` checkbox. If unchecked, additional notifications will occur when Didact actions are activated in the IDE.
8
8
* To have Didact open a window with the default Didact file on startup, set the `Didact: Open Default Tutorial At Startup` checkbox.
9
9
10
+
The `vscode.didact.copyTextToCLI` command (accessible via the default keyboard shorcut `Ctrl/Cmd+Alt+T`) has two customizations available:
11
+
12
+
* By default, the Didact link generated commits the change, executing it in the VS Code terminal. To simply add the text to the terminal without executing it, uncheck the `Didact>Edit:Cli Link LF` checkbox.
13
+
* By default, the Didact link generated uses the label `(^ Execute)`, but you can change that by updating the `Didact>Edit: Cli Link Text` field. Note that this field can also use Emojis, so you can use characters such as the `Play` button [(▶️)](https://emojipedia.org/play-button/).
Copy file name to clipboardExpand all lines: package.json
+15-1Lines changed: 15 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@
45
45
"contributes": {
46
46
"configuration": [
47
47
{
48
-
"title": "Didact Extension Settings",
48
+
"title": "Didact",
49
49
"properties": {
50
50
"didact.defaultUrl": {
51
51
"type": "string",
@@ -70,6 +70,20 @@
70
70
"default": "true",
71
71
"description": "Automatically add the default Didact tutorials to the Didact Tutorials view at workspace startup if not already registered",
72
72
"scope": "window"
73
+
},
74
+
"didact.edit.cliLinkText": {
75
+
"type": "string",
76
+
"default": "^ execute",
77
+
"markdownDescription": "Link text to use when converting text for use in a copyTextToCLI terminal link. Cannot be an empty string. Special characters must be escaped. Defaults to `^ execute`. [Read more.](https://redhat-developer.github.io/vscode-didact/settings)",
78
+
"scope": "window",
79
+
"pattern": "^(?!\\s*$).+",
80
+
"patternErrorMessage": "Link text cannot be an empty string. Please provide at least one character."
0 commit comments