Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Copy Line By NumberNew to Visual Studio Code? Get it now.
Copy Line By Number

Copy Line By Number

Ashraf

|
1 install
| (0) | Free
Easily copy a line from the editor by specifying its line number
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CopyLineByNumber

Easily copy text from the editor by specifying a line numbers using CopyLineByNumber.

Build Status code style: Ashraf code style: Ashraf

Features

Note: Works on any text file in the editor

  • Copy text from a specific line in the editor using the line number.
  • Copy text from a multiple lines in the editor using the line numbers range.
  • Optionally display messages in the status bar.
  • Configurable notifications and status bar message color.

Usage Example

Example 1, copy single line:

  1. Press Alt + C
  2. Enter the line number
  3. Text from that line is copied to the clipboard

Example 2, copy range of lines:

  1. Press Alt + C
  2. Enter range of lines with splitter (/[:.,-_]/), ex 107-200
  3. Text from line 107 to 200 are copied to the clipboard

Extension Settings

  • copyLineByNumber.showNotifications: Enable or disable notifications (default: true)
  • copyLineByNumber.statusBarText.enable: Enable or disable status bar notifications (default: true)
  • copyLineByNumber.statusBarText.color: Color of the status bar message (default: white)
  • copyLineByNumber.statusBarText.displayTimeout: Status bar message display timeout in milliseconds (default: 1500)
  • copyLineByNumber.statusBarText.alignment: Alignment of the status bar message, either "Left" or "Right" (default: "Left").
  • copyLineByNumber.statusBarText.priority: Status bar priority (default: 100).
  • copyLineByNumber.singleLineCopyAddNewLine.enable: Automatically add a newline when copying a single line (default: true).
  • copyLineByNumber.multiLineCopyAddNewLine.enable: Automatically add a newline when copying multiple line (default: true).
  • copyLineByNumber.autoEndAtFileEnd.enable: If enabled, when the end line exceeds the total number of lines in the editor, copy until the last line of the file automatically (default: false).

Default Keybinding

  • Alt + C → Copy line by number

Known Issues

None.

Release Notes

1.0.0

Initial release


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