Skip to content

mpearson/vscode-insert-numeric-range

Repository files navigation

Insert Numeric Range - VSCode Extension

This is yet another extension for inserting a number at each selection caret.

Why should you use this one?

  • Numbers increment by location in the document, not the order the carets were added. This means if you multi-select from the bottom up, the numbers aren't reversed.
  • Both initial value and step can be specified (defaulting to 0 and 1, respectively).
  • You can easily configure separate shortcuts for 0-indexed or 1-indexed numbers.

Basic Usage

  1. Create one or more selection carets and run "Insert Numeric Range" in the command panel. Screenshot 1

  2. Optionally, you can enter start and step parameters. Screenshot 2

  3. Press enter to insert the number sequence. Screenshot 3

Future Features

  • Configurable number format string

Recommended keyboard shortcuts

  {
    "key": "ctrl+alt+n",
    "command": "insert-numeric-range.insertNumericRange",
    "when": "editorFocus",
    "args": 0
  },
  {
    "key": "ctrl+alt+shift+n",
    "command": "insert-numeric-range.insertNumericRange",
    "when": "editorFocus",
    "args": 1
  }

About

Insert increasing numbers at each selection caret starting at 0. Hold shift to start at 1.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published