Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Copy with line numbers and file name.New to Visual Studio Code? Get it now.
Copy with line numbers and file name.

Copy with line numbers and file name.

diigu

|
6,709 installs
| (5) | Free
Just let you can copy selected code with line numbers and file name.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Copy with line numbers

Just copy with line numbers and file name.

Like this.

File: xxx\xxxx
29:   To protect your rights, we need to prevent others from denying you
30: these rights or asking you to surrender the rights.  Therefore, you have
31: certain responsibilities if you distribute copies of the software, or if
32: you modify it: responsibilities to respect the freedom of others.
33: 

Hotkey: Ctrl + Shift + C

Requirements

If needed, please npm install copy-paste or install xclip but I'm not sure.

I'm a newbee here.

0.0.2

Chage log from alert information window to status bar message.

Just this.

Feedback

Request features and report bugs using https://github.com/diigu/vscode-copywithlinenumbers.


Enjoy!

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