Copy File Syntax - VS Code Extension
Copy File Syntax is a powerful Visual Studio Code extension designed to streamline the process of copying highlighted code snippets and formatting them with syntax highlighting. Whether you're sharing code on forums, writing documentation, or creating technical blog posts, this extension helps you create visually appealing and reader-friendly markdown representations of your code.
- Copy selected code: Quickly copy the highlighted code snippet from your active editor.
- Automatic file extension detection: The extension detects the file extension of your code snippet to apply accurate syntax highlighting.
- Markdown formatting made easy: Transform your code snippets into well-formatted markdown with just a click.
- Versatile language support: Supports a wide range of programming languages for precise syntax highlighting.
- Enhance productivity: Focus more on content creation and less on formatting intricacies.
- Select the code you want to copy in the active editor.
- Run the "File Syntax: Copy Code With Highlight!" command either by right-clicking and selecting it from the context menu or using the provided keyboard shortcut.
- The highlighted code with syntax formatting will be copied to your clipboard.
- Paste the markdown-formatted code snippet in your desired location.
- Launch Visual Studio Code.
- Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window or use the
Ctrl+Shift+X keyboard shortcut.
- Search for "Copy File Syntax" and install the extension.
- Reload your VS Code window to activate the extension.
Setting up a Keyboard Shortcut
To optimize your experience with the "File Syntax: Copy Code With Highlight!" extension, we recommend configuring a custom keyboard shortcut to activate the extension's command. Here's a step-by-step guide to assist you in setting it up:
Open Keyboard Shortcuts: Launch Visual Studio Code and access the Keyboard Shortcuts settings. You can do this by following these steps:
- On Windows/Linux: Go to
- On macOS: Navigate to
Locate the Extension Command: In the Keyboard Shortcuts search bar, type "File Syntax: Copy Code With Highlight!" to find the command provided by your extension.
Assign the Recommended Keyboard Shortcut: When you identify the extension's command, you'll see an associated pencil icon. Click on it to open the keybinding editor for that command.
Configure the Shortcut: In the keybinding editor, there will be a field to input your chosen keyboard shortcut. We strongly recommend using the
Ctrl+Shift+C combination for its familiarity and ease of use.
Save and Apply: After entering the keyboard shortcut, simply save your changes. Your newly created key binding will be applied automatically.
Now, whenever you employ the
Ctrl+Shift+C keyboard shortcut, the command will be triggered, allowing you to effortlessly copy highlighted code!
Contributions to this extension are welcome! Feel free to create issues, provide suggestions, or submit pull requests on the GitHub repository.
This extension is licensed under the MIT License.
Made with ❤️ by Gustavo Mello