Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>cursor-eraserNew to Visual Studio Code? Get it now.
cursor-eraser

cursor-eraser

awtnb

|
113 installs
| (0) | Free
Erase unnecessary cursors in multi-cursor mode.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

cursor-eraser README

Erase unnecessary cursors! Useful when executed after ctrl+shift+l.

If you want to unselect the cursor without erasing, use awtnb.filter-selections.

Features

Remove by regular expression

  • cursor-eraser.keep-match: remove cursors on lines that do not match the specified regular expression.
  • cursor-eraser.erase-match: remove cursors on lines that matches the specified regular expression.

configuration

  • Case-sensitivity is configurable in cursor-eraser.caseSensitive of setting.json (default: true).

  • Each command can take an argument for the regular expression to be used. For example, if you append the following to keybindings.json, you can remove the cursor on a blank line by pressing ctrl+alt+q.

    {
        "key": "ctrl+alt+q",
        "command": "cursor-eraser.erase-match",
        "args": "^$",
        "when": "editorTextFocus"
    }
    

Remove by position

  • cursor-eraser.erase-toBegin: remove cursor to begin of file.
  • cursor-eraser.erase-toEnd: remove cursor to end of file.

The starting point is the cursor position at the beginning of the multi-cursor mode.

Enjoy!

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