Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>select-n-linesNew to Visual Studio Code? Get it now.
select-n-lines

select-n-lines

aleks publishes

|
4 installs
| (0) | Free
Stackable line and character selection from cursor
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Select N Lines

Select N Lines is a lightweight, high-performance(relativly) VS Code extension that enables fast, stackable line and character selection — no Vim mode, no mode switching, just instant movement from your cursor. You can select n amount of lines(up, down) or characters(left, right)!

Features

  • Select line ranges upward using Ctrl+Alt+1–9
  • Select line ranges downward using Alt+Shift+1–9
  • Select characters to the left using Alt+1–9
  • Select characters to the right using Ctrl+Shift+1–9
  • All selections are based on the current cursor and extend logically
  • Efficient implementation with minimal overhead with build in tools.

Keybindings

Action Default Keys
Select N lines up Ctrl+Alt+1 to 9
Select N lines down Alt+Shift+1 to 9
Select N chars left Alt+1 to 9
Select N chars right Ctrl+Shift+1 to 9

Selections are stackable — pressing the same key multiple times extends the selection from the same anchor point. So if you want to select 20 lines up you can do ctrl+alt+5 4 times or any range of n from 1-9 to achive your goal!


Changing Keybindings

  1. Open the Command Palette (Ctrl+Shift+P)
  2. Select Preferences: Open Keyboard Shortcuts (JSON)
  3. Add or modify keybindings for the commands:
{
  "key": "ctrl+alt+3",
  "command": "selectNLines.stackingLine",
  "args": { "amount": 3, "direction": "up" },
  "when": "editorTextFocus"
},
{
  "key": "ctrl+shift+2",
  "command": "selectNLines.stackingChar",
  "args": { "amount": 2, "direction": "right" },
  "when": "editorTextFocus"
}

Available commands:

  • selectNLines.stackingLine
  • selectNLines.stackingChar

Purpose

This extension provides fast, precise control over text selections using keyboard-only navigation. It is ideal for users who prefer efficient workflows, including one-handed users and power editors.


Installation

To install manually:

  1. Download the .vsix file
  2. Open VS Code → Ctrl+Shift+P → “Install from VSIX”
  3. Select the file and restart if needed

To build from source:

npm install
npm run compile
vsce package
code --install-extension select-n-lines-<version>.vsix

Requirements

  • VS Code 1.100.0 or later
  • Node.js & npm for building (optional if using .vsix only)

License

MIT — use freely, modify as needed.


Author

Aleksander Todorov,

The extension was made with the help of AI!

I am not very well versed in the vs code extensions world, but wanted to have better selection than shift+arrow_keys so i made this extension, i wanted to be able to select lines by nuber like in Vim ex. 5j but i didnt want to have to learn the normal/insert mode style of editor so i opted to make this extension. It was made in a few hours could have realisticly be done quicker but it is what it is. OK NOW THAT YOU HAVE IT SELECT TO YOUR HEARTH'S CONTENT!!!

For any additional info contact me here: aleks.business.cs@abv.bg

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