DELAPARRA
Index
Color
NL
Category: Keyboard shortcuts

Add Cursor Above / Below

Explained by Updated

What is Add Cursor Above / Below?

Add Cursor Above / Below: Stack extra cursors on the lines above or below to type the same thing on many lines. Most editors let you add extra cursors on the lines above or below the current one. In VS Code it is Ctrl+Alt+Up/Down on Windows and Linux, or Option+Cmd+Up/Down on a Mac. JetBrains editors use a double tap of Ctrl or Option followed by the arrow keys.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Add Cursor Above / Below

How is Add Cursor Above / Below used in practice?

Everything you type then happens on every line at once. It is perfect for aligned blocks of similar code, such as adding a comma to ten array entries or renaming a prefix in a column of config keys.

What should you keep in mind with Add Cursor Above / Below?

It works best when the lines have the same shape. For changes spread across a file, use find and replace, or select the next occurrence of a word with Ctrl+D. Multiple cursors are a small skill, but once you have them in your fingers, many tedious edits take seconds instead of minutes.

At a glance

CategoryKeyboard shortcuts
Explained by
Updated

More Keyboard shortcuts terms

All terms starting with A

Skills

Manuals

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.