Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Cursor UtilsNew to Visual Studio Code? Get it now.
Cursor Utils

Cursor Utils

Marcin Jeznach

|
46 installs
| (0) | Free
Utilities extending experience of working with multiple cursors.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

logo icon small Cursor Utils

Utilities extending experience of working with multiple cursors.

Reasoning

VSCode build-in multi-cursors are quite powerful themselves, however grass is always greener on the other side. This extension attempts to provide some of great ways of programmatically modifying text around multiple cursors.

Feature set

This extension provides few commands:

  • Cursor Utils: Repeat line - provides way to copy current line exactly specified amount of times. Each newly created line attaches new cursor in same column as origin line.
  • Cursor Utils: Generate numbers - provides ability to paste number sequences under cursor positions.
  • Cursor Utils: Align cursors - aligns cursors to right-most one, using provided padding character.
  • Cursor Utils: Pad selections - pads selections to provided length or to length of longest selection, using provided padding characters.

Details

Every command accepts command configuration - most of them also remember up to 15 recent unique configurations (in current session). Due to limitations of VSCode widgets, those commands will try to force usage of one of matched configurations - this can be by design dismissed by placing ' after config, which will be always stripped from final config (individual commands might change dismiss character).

Repeat line

This command accepts number of repetitions as input.

It assumes, that only one cursor is placed in the editor.

Example:

  • > Cursor Utils: Repeat line
  • 4

repeat line showcase

Generate numbers

This command accepts range specification as input.

There are 3 types of range specification:

  • full range specification, which consists of:
    • a first number
    • ..
    • a second number
    • optional !
  • open start range specification, which consists of:
    • a number
    • direction specificator - one of:
      • >>
      • <<
  • open end range specification, which consists of:
    • direction specificator - one of:
      • >>
      • <<
    • a number

Full range direction is determined by comparison of two numbers - if first is smaller, then range is growing towards second number. If first number is smaller, the range is shrinking towards second number. If both are equal, then one number is repeated.
Passing ! after range ensures strict mode - in strict mode, amount on numbers in range must be the same as number of cursors. Otherwise in lenient mode, if number of cursors is smaller, then not all numbers from range will be used (remaining will be skipped). If number of cursors is greater, each time range will run out of numbers, it will simply start counting from beginning again.

Open ranges are generated in specified direction:

  • >> - descending
  • << - ascending

Number on one side of specifier is used as bound of range - other bound is determined automatically by number of cursors - for example:

  • 5 cursors are placed in file
  • we input range 4>>
  • cursors are now numbered 4 3 2 1 0

It is important that cursors will be processed in order of characters in file (top-bottom, left-right) and not order that they were placed.

Selections are treated as they were cursors placed on beginning of those selections.

Example:

  • > Cursor Utils: Generate numbers
  • 0..5!

generate numbers showcase

For alignment of numbers, ie. zero-padding, you should select numbers and use Pad selections command.

Align cursors

This command accepts single character as input.

It aligns all cursors in line, putting padding character before cursors as necessary. If multiple cursors are placed in each line, they are processed in groups ("columns") from left to right. If only one selection in given column is available, it will not be modified.

Selections are treated as they were cursors placed on beginning of those selections.

Example:

  • > Cursor Utils: Align cursors

align cursors showcase

Pad selections

This command accepts padding specification as input.

Padding specification consists of:

  • a single padding character,
  • one of padding direction specifiers:
    • < - aligns selection to left, adding padding to end,
    • [ - aligns selection to center, with overflow on end,
    • ] - aligns selection to center, with overflow on start,
    • > - aligns selection to right, adding padding to start,
  • optional number - target length.

If target length is omitted, then it is defaulted to length to longest selection. Center alignment might produce overflow - if required padding is odd number.

This command only processes selections that do not span multiple lines.

Examples:

Padding without length:

  • > Cursor Utils: Pad selections
  • .>

align cursors showcase

Padding with length:

  • > Cursor Utils: Pad selections
  • _[8

align cursors showcase

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