Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>copy-with-fileNew to Visual Studio Code? Get it now.
copy-with-file

copy-with-file

Anais Killian

|
5 installs
| (0) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Copy With File

Copy the current selection (or line) along with the full file path and line number.

Features

  • cmd + shift + P: Copy With File (code, file, line)

Output format:

<code>,
"/full/path/to/file",
line <n>

Example:

data = [5, 1, 4, 2, 8],
"/Users/dir/file.py",
line 26

Demo: Copy With File demo

Default Keybinding

  • macOS/ windows/ linux: : cmd + option + c
  • You can change this in your own keybindings.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft