Skip to content

Commit 338ad46

Browse files
authored
Merge pull request #62 from lumaxis/feature/update-docs-screenshots
Docs: Update feature documentation and screenshots
2 parents 2f95aa5 + 8c7ac33 commit 338ad46

6 files changed

+38
-4
lines changed

README.md

+38-4
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,58 @@ All features can be used via different ways in VS Code
1818

1919
- ⌨️ The **Command Palette** and the pre-configured **Keyboard Shortcuts**
2020

21-
![Command in Command Palette](https://github.com/lumaxis/snippet-copy/raw/main/images/command-palette.png)
21+
![Command in Command Palette](https://github.com/lumaxis/snippet-copy/raw/main/images/command-palette-light.png)
2222

2323
- 📝 The **Context Menu** on selected text in the editor
2424

25-
![Command in Context Menu](https://github.com/lumaxis/snippet-copy/raw/main/images/context-menu.png)
25+
![Command in Context Menu](https://github.com/lumaxis/snippet-copy/raw/main/images/context-menu-light.png)
2626

2727
### Copy Snippet
2828

2929
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.
3030

3131
### Copy Snippet as Markdown Code Block
3232

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:
3442

3543
```json
36-
"snippet-copy.addLanguageIdToMarkdownBlock": false // Default is false
44+
"snippet-copy.markdownCodeBlock.includeLanguageIdentifier": "prompt" // Default is to always prompt on use
3745
```
3846

47+
Possible options are:
48+
49+
| Option | Description |
50+
| --------- | ---------------------------------------------------------------------------------------- |
51+
| `"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.
58+
59+
This can be adjusted in settings:
60+
61+
```json
62+
"snippet-copy.convertTabsToSpaces": {
63+
"enabled": true,
64+
"tabSize": 2
65+
}
66+
```
67+
68+
| Setting | Description |
69+
| ----------- | ------------------------------------------------------------------ |
70+
| `"enabled"` | `true` by default. Whether to convert tabs to spaces. |
71+
| `"tabSize"` | `2` is the default. How many spaces to convert a tab character to. |
72+
3973
---
4074

4175
With an icon lovingly crafted by [@dipree](https://github.com/dipree) 🌺

images/command-palette-dark.png

88.8 KB
Loading

images/command-palette-light.png

82 KB
Loading

images/command-palette.png

-83.5 KB
Binary file not shown.

images/context-menu-light.png

60.3 KB
Loading

images/context-menu.png

-51.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)