Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ Column Selection using Cursor Keys

People also ask

How do I select a column in IntelliJ?

Press Alt+Shift+Insert . From the main menu, choose Edit | Column Selection Mode. From the context menu of the editor, choose Column Selection Mode.

How do I select lines in IntelliJ?

Simply hit ctrl+c.

What is caret in IntelliJ?

You can click the mouse in the editor to set the caret to the desired position and drag the mouse to select a continuous text block. By default, you can only set the caret at characters, whitespaces, and tabs in the current document.


You can do column editing using the Edit | Column Selection Mode.

The shortcut to turn it on/off is Alt+Shift+Insert. You navigate with arrow keys to select blocks of text.


Multiline Caret (without mouse)

Windows/Linux: CTRL + CTRL(Hold) + ↑ / ↓

Mac: + (Hold) + ↑ / ↓

ESC will end multiline mode.

Change Multi-caret Hotkey

To add a custom Keymap, CTRL+SHIFT+A, type keymap and click on the one with Settings as subtext. Search for Clone Caret Above and Clone Caret Below.

I mapped mine to ALT+SHIFT+↑ / ↓.

Bonus

Try holding combinations of CTRL, SHIFT, and arrows for improved selection power.


It is also possible to select holding middle mouse key.


Go to the Settings | Keymap and set a shortcut for Clone Caret Above and for Clone Caret Below


For me on Mac:

Press once 'option' key, release it, and press and hold it again. Now navigate with cursor to select desired code. Press 'Esc' to exit column mode! :)