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

Line Number

Satoshi Yamamoto

|
1,940 installs
| (1) | Free
Inserting and deleting line numbers in text.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Line Number

This extension has the following functions.

  • You can insert line numbers at the beginning of lines of text.
  • You can specify line numbers by file line number or by input value.
  • You can delete line numbers from text.
  • You can remove blank lines from text containing line numbers.
  • You can remove indentation from text containing line numbers.

Attention Information

Since v3.0.0, this extension no longer has the ability to copy to the clipboard.

If you need that functionality, please use the following extension

  • Copy Format Code - Visual Studio Marketplace
    https://marketplace.visualstudio.com/items?itemName=SatoshiYamamoto.vscode-copy-format-code

The Copy Format Code extension is more versatile and easier to use than previous versions of this extension. Please use the Copy Format Code Extension.

Install

https://marketplace.visualstudio.com/items?itemName=SatoshiYamamoto.vscode-line-number

Usage

Following commands are available:

- Line Number : Insert File Line Number
- Line Number : Insert Input Start
- Line Number : Delete Line Number
- Line Number : Edit Line Number Text : Delete Blank Line
- Line Number : Edit Line Number Text : Delete Indent

Or Select Function

- Line Number : Select Function ...
  - Insert File Line Number
  - Insert Input Start Number
  - Delete Line Number
  - Edit Line Number Text : Delete Blank Line
  - Edit Line Number Text : Delete Indent

Operation

Line Number : Insert File Line Number

ABC
DEF
GHI

↓

1: ABC
2: DEF
3: GHI

Line Number : Insert Input Start

ABC
DEF
GHI

↓ Input [99]

099: ABC
100: DEF
101: GHI

Line Number : Delete Line Number

1: ABC
2: DEF
3: GHI

↓

ABC
DEF
GHI

Line Number : Edit Line Number Text : Delete Blank Line

_ = Space

099:_ABC
100:_
101:__
102:____DEF
103:___
104:_____
105:_______GHI

↓

099:_ABC
102:____DEF
105:_______GHI

Line Number : Edit Line Number Text : Delete Indent

_ = Space

099:____ABC
100:_
101:____DEF
102:_
103:_______GHI

↓

099:_ABC
100:_
101:_DEF
102:_
103:____GHI

Setting

default: settings.json

{
  "LineNumber.delimiter": ": ",
}

The delimiter must contain non-whitespace characters. All spaces and all tabs cannot be specified.

Contact

Please contact me if you have any requests.

Satoshi Yamamoto
standard.software.net@gmail.com  
Japanese / English
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft