IntelliJ Column Selection using Cursor Keys

假装没事ソ 提交于 2019-11-29 20:32:27
duffymo

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.

It is also possible to select holding middle mouse key.

Gibolt

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.

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

I think @Meo's answer is the most correct, but if your hand happens to be on the mouse, you can also accomplish this with Ctrl+Alt+Shift+Left Mouse Button Click. Or look for the Add Rectangular Selection on Mouse Drag in the keymap settings.

In Windows or Linux I press two times Ctrl

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! :)

On a mac (with default keyboard mappings):

8

For Mac cmd+shift+* didn't work for me. I changed the keymap to something else and now it works seamlessly.

Most convenient way is to hold Option+Shift and click with mouse.

I installed Idea VIM as one of the plugins which was stopping me doing what I wanted. I uninstalled that and all is fine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!