Skip to content

Latest commit

 

History

History
58 lines (35 loc) · 3.49 KB

README.md

File metadata and controls

58 lines (35 loc) · 3.49 KB

Copy File Syntax - VS Code Extension

Copy File Syntax banner

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.

Features

  • 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.

Usage

  1. Select the code you want to copy in the active editor.
  2. 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.
  3. The highlighted code with syntax formatting will be copied to your clipboard.
  4. Paste the markdown-formatted code snippet in your desired location.

Installation

  1. Launch Visual Studio Code.
  2. 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.
  3. Search for "Copy File Syntax" and install the extension.
  4. 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:

  1. 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 File > Preferences > Keyboard Shortcuts.
    • On macOS: Navigate to Code > Settings > Keyboard Shortcuts.
  2. 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.

  3. 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.

  4. 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.

  5. 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!

Contributing

Contributions to this extension are welcome! Feel free to create issues, provide suggestions, or submit pull requests on the GitHub repository.

License

This extension is licensed under the MIT License.


Made with ❤️ by Gustavo Mello