Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Sequence FillNew to Visual Studio Code? Get it now.
Sequence Fill

Sequence Fill

Andreas Demetriou

|
1 install
| (0) | Free
Fill multiple cursors with a sequence — numbers, letters, any base, any step. With live preview.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Sequence Fill

Fill multiple cursors with a sequence — numbers, letters, any base, any step — with a live preview as you type.

CI Marketplace Open VSX License: MIT

Put a cursor everywhere you want a value, press Ctrl+Alt+0 (Cmd+Alt+0 on macOS), and describe the sequence. Values appear inline as ghost text while you type; the document is untouched until you press Enter.

before                after  `1`         after  `10+10`      after  `a`
──────                ───────────        ─────────────       ──────────
item_                 item_1             item_10             item_a
item_                 item_2             item_20             item_b
item_                 item_3             item_30             item_c

Quick reference

Type any of these into the prompt:

Spec Produces
1 1, 2, 3, 4 count up from 1
0 0, 1, 2, 3 zero-based
1+2 1, 3, 5, 7 step by 2
10-1 10, 9, 8, 7 count down
1*2 1, 2, 4, 8 multiply each time
001 001, 002, 003 leading zeros set the width
1 pad=4 0001, 0002 or set it explicitly
1.5+0.5 1.5, 2.0, 2.5 fractions
.1+.1 0.1, 0.2, 0.3 no floating-point drift
a a, b, c … z, aa, ab letters, spreadsheet-style
A+2 A, C, E, G letters with a step
0x0e 0x0e, 0x0f, 0x10 hex, casing preserved
0b10 0b10, 0b11, 0b100 binary
0o16 0o16, 0o17, 0o20 octal
g radix=36 g, h, i, j any base from 2 to 36
1 roman I, II, III, IV roman numerals
1 roman lower i, ii, iii, iv lowercase roman
-5 -5, -4, -3 negatives

Full syntax

<start> [<operator> <step>] [flags]
  • start — a number (1, 007, 1.5, -5), a letter (a, Z, aa), or a based literal (0xff, 0b1010, 0o17).
  • operator — +, -, or *. Defaults to +. ++ and -- are accepted as shorthand for a step of 1.
  • step — how much to add, subtract, or multiply by. Defaults to 1.
  • flags — any of:
Flag Meaning
pad=N / width=N Minimum digits, zero-padded. pad=0 disables inferred padding.
radix=N / base=N Base 2–36. Overrides letter detection, so a radix=16 is the number 10.
roman Render as roman numerals.
upper / lower Force the case of letters, roman numerals, and hex digits.

The original positional form still works: <start> <op> <step> : <pad> : <radix>, for example 1 + 2 : 3 : 16. The middle section can be skipped — 1::16 sets only the radix.

Commands

Command Default keybinding
Sequence Fill: Insert Sequence… Ctrl+Alt+0 / Cmd+Alt+0
Sequence Fill: Repeat Last Sequence Ctrl+Alt+Shift+0
Sequence Fill: Insert Numbers (1, 2, 3…) —
Sequence Fill: Insert Numbers from Zero (0, 1, 2…) —
Sequence Fill: Insert Letters (a, b, c…) —
Sequence Fill: Clear Remembered Sequence —

All of them are in the command palette under Sequence Fill.

On non-US keyboard layouts, Ctrl+Alt is the same chord as AltGr, which some layouts use to type characters on the number row. If the default binding is unreliable for you, rebind it in Keyboard Shortcuts — every command is also reachable from the command palette.

Settings

Setting Default Description
sequenceFill.onSelection replace What to do when a cursor has text selected: replace, append, or prepend. Cursors with no selection always insert at the caret.
sequenceFill.preview true Show inline ghost-text preview while typing.
sequenceFill.rememberLastSpec true Pre-fill the prompt with your previous sequence.
sequenceFill.defaultSpec 1 Sequence used on first run.
sequenceFill.maxPreviewCursors 500 Stop drawing preview beyond this many cursors. Does not affect what gets inserted.

Coming from vscode-input-sequence

This is a maintained continuation of tomoki1207/vscode-input-sequence, last released in 2016. Switching over:

  • Your syntax still works. 1, 1+2, 001, 1 + 2 : 3 : 16, 1++, 10-- and a:0:16 all parse the same way.
  • Your keybindings still work. The insertSequentialNumbers command id is still registered.
  • Delete "sequence.replaceSelection": true if you added it. It was a workaround for the duplicated-digits bug, which is fixed. Settings now live under sequenceFill.*, and sequenceFill.onSelection defaults to replace.
  • Uninstall the old extension to avoid two extensions bound to the same key.

Everything fixed and added is listed in the changelog, with links to the upstream issues each item closes.

How it works

The original wrote a real edit into the document on every keystroke, then tried to compute where the previous preview had ended so it could overwrite it. That arithmetic is where its bugs came from: on a plain cursor the computed range was empty, so each keystroke appended instead of replacing, and with several cursors on one line the offsets were never rebased after a sibling's insert.

Sequence Fill draws the preview as ghost text instead, so the document is not touched until you accept. On accept, every value is written in a single atomic TextEditor.edit() against original coordinates, and the editor rebases the offsets itself. That makes it one undo step and removes the whole class of bug.

The parsing, value generation, and range planning are pure functions with no dependency on the vscode API, so they are unit-tested directly.

What it stores

Nothing leaves your machine. The extension makes no network requests, contains no telemetry or analytics, and never reads the text of your documents — only the line/character positions of your cursors.

The one thing it persists is your last sequence spec (the short string you type, like 1+2), kept in VS Code's local extension storage so the prompt can pre-fill it. It is not registered for Settings Sync, so it stays on the machine that wrote it. Turning off sequenceFill.rememberLastSpec stops it being read or updated and deletes it the next time the extension runs — VS Code only loads an extension when you first use it, so the deletion can't happen any earlier than that. To erase it immediately, run Sequence Fill: Clear Remembered Sequence.

Development

npm install
npm run watch          # esbuild in watch mode
npm test               # types + lint + unit + integration
npm run test:unit      # fast, no VS Code needed
npm run vsix           # build a .vsix

Press F5 in VS Code to launch the extension host. There is also a Run Extension (Web) launch config for testing the browser build.

Credits

Built on vscode-input-sequence by tomoki1207, which was itself a port of Atom's sequential-number. MIT licensed, and the original copyright is retained in LICENSE.

License

MIT

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