https://github.com/yhotta240/paste-as-markdown-codeblock
VS Code extension that pastes copied code into the editor as a Markdown-formatted code block.
https://github.com/yhotta240/paste-as-markdown-codeblock
code-block copy-paste javascript markdown paste typescript vsc vscode-extension
Last synced: 4 months ago
JSON representation
VS Code extension that pastes copied code into the editor as a Markdown-formatted code block.
- Host: GitHub
- URL: https://github.com/yhotta240/paste-as-markdown-codeblock
- Owner: yhotta240
- License: mit
- Created: 2025-06-01T15:29:14.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-06-11T18:26:33.000Z (7 months ago)
- Last Synced: 2025-06-11T19:56:38.491Z (7 months ago)
- Topics: code-block, copy-paste, javascript, markdown, paste, typescript, vsc, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=yhotta240.paste-as-markdown-codeblock
- Size: 141 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Paste as Markdown Codeblock
`paste-as-markdown-codeblock` is a Visual Studio Code extension that allows you to paste selected code or text as a Markdown code block.
## Features
- Paste the copied code as a Markdown code block using `Ctrl+Alt+V`
- Press `Ctrl+Space` to enter a language identifier (e.g., `JavaScript`, `Python`, `TypeScript`).
- Right-click in the editor and select "Paste as Markdown CodeBlock" to use the command from the context menu.

⚠️ Note: This extension does not support automatic language detection. You must specify the language manually after pasting.
## Requirements
No special requirements or dependencies are needed.
- Visual Studio Code version 1.xx or later
## Extension Settings
This extension provides the following settings:
- `pasteAsMarkdownCodeblock.defaultLanguage`
Specifies the default language identifier used when pasting a code block.
Default: `"plaintext"`
- `pasteAsMarkdownCodeblock.languages`
Defines a list of language identifiers available for selection.
You can customize this list to include only the languages you frequently use.
Default:
```json
[
"plaintext",
"javascript",
"typescript",
"python",
"cpp",
"java",
"bash",
"html",
"css",
"json"
]
```
These settings can be configured from the Settings UI or by editing your `settings.json` file directly.
### Keyboard Shortcut
Press `Ctrl+Alt+V` to paste the copied code as a Markdown code block (only when the editor is focused).
## Known Issues
- The language name may not always be correctly inserted, depending on the input.
- The command requires selected or copied text. If nothing is provided, no output will be generated.
## Release Notes
### 1.0.0
- Initial release
- Added functionality to paste selected text as a Markdown code block
## Following extension guidelines
This extension follows the official VS Code extension development guidelines.
- [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines)
## License
This extension is licensed under the [MIT License](./LICENSE).
Thanks for using this extension!
Feel free to report bugs or request features via the Issues page.