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
Copy file name to clipboardExpand all lines: README.md
+38-4
Original file line number
Diff line number
Diff line change
@@ -18,24 +18,58 @@ All features can be used via different ways in VS Code
18
18
19
19
- ⌨️ The **Command Palette** and the pre-configured **Keyboard Shortcuts**
20
20
21
-

21
+

22
22
23
23
- 📝 The **Context Menu** on selected text in the editor
24
24
25
-

25
+

26
26
27
27
### Copy Snippet
28
28
29
29
Simply get a copy of your currently selected code or text snippet added to your clipboard – without any leading indentation that you would otherwise need to remove manually.
30
30
31
31
### Copy Snippet as Markdown Code Block
32
32
33
-
This command has an additional configuration option that let's you determine if the Markdown code block should contain the file's language identifier which enables [syntax highlighting](https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting) in some places:
33
+
Copies the currently selected snippet without leading indentation and automatically wraps it in a [fenced Markdown code block](https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks).
34
+
35
+
## Options
36
+
37
+
### Include Language Identifier
38
+
39
+
The "Copy Snippet as Markdown Code Block" command can optionally include the current VS Code document's language identifier in the Markdown code block. Including a language identifier enables [syntax highlighting](https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting) in some places (like in Issue or Pull Request comments on GitHub) but is incompatible with other tools, such as Slack.
40
+
41
+
This behavior can be controlled through a configuration setting:
34
42
35
43
```json
36
-
"snippet-copy.addLanguageIdToMarkdownBlock": false// Default is false
44
+
"snippet-copy.markdownCodeBlock.includeLanguageIdentifier": "prompt"// Default is to always prompt on use
|`"prompt"`| Default. Prompts you whenever the "Copy Snippet as Markdown Code Block" command is used. |
52
+
|`"always"`| Always include the document's language identifier in the Markdown code block. |
53
+
|`"never"`| Never include the language identifer. |
54
+
55
+
### Convert Tabs to Spaces
56
+
57
+
Many tools or websites often render tabs very widely or generally in a weird way and make therefore them not very pleasant to look at. Snippet Copy therefore by default automatically converts a tab character to two spaces.
0 commit comments