Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>copy-code-and-filenameNew to Visual Studio Code? Get it now.
copy-code-and-filename

copy-code-and-filename

Alexander Deleeck

|
11 installs
| (0) | Free
An extension to copy a code from a file, and automatically paste it in a formatted codeblock with the filename and file extension, as as optimized for LLM readability.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

copy-code-and-filename

Copy code with automatic code-block formatter including filename and file extension. Optimized for quickly sharing code with LLMs whereby they easily recognize the language of code in the file.

Features

Transform this: const a;

to this:

const a;

with adding template literals and new lines: ```\n${copiedContent}\n```

Default keybinding

  • Windows: Ctrl+Alt+C
  • Mac: Cmd+Shift+F9

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft