Vertical/Column text select in PyCharm?
Solution 1
Press Ctrl+Shift+A (Find Action feature) and type column. The first result is Column Selection Mode Alt+Shift+Insert. After that, select text with keyboard (by holding Shift)
Solution 2
First press ctrl (press and release), then press ctrl+arrows to do the vertical selection.
Solution 3
In Mac, Hold option + Shift - and use mouse to select the text vertically
Solution 4
In the free version of Pycharm this is called Column Selection Mode and it's enabled pressing Shift + Command + 8
Edit: Noticed Ozgur Ozturk beat me to this in his comment and as he points out this combo is for Macs only
Solution 5
Go to Settings > Keymap > Editor Actions > Add Rectangular Selection on Mouse Drag
and add Alt + Button1 Click
as a new action.
This will allow you to create rectangular selections across multiple rows and columns like you know it from Notepad++.
Comments
-
DharmaTurtle almost 2 years
Is it possible to select text vertically/in a column in PyCharm? You can do it in Visual Studio and Notepad++ by holding down alt+arrow keys.
The documentation describes how to do it with the mouse, but there's no mention of keyboard options.
http://www.jetbrains.com/pycharm/webhelp/selecting-text-in-the-editor.html#d306531e464
-
DharmaTurtle over 10 yearsSorry, but that only enables column selection for mice. I'm trying to select with the keyboard.
-
Piotr Dobrogost over 10 years@DharmaTurtle Not true. Afterwards you can select text with keyboard as usually (by holding
Shift
pressed). -
DharmaTurtle over 10 yearsOhhh, I was trying to hold down Shift+Alt as I did with all the other programs. This mode switching is a bit awkward, but I guess I can live with it. Thanks very much!
-
Ozgur Ozturk over 7 yearsThanks for mentioning find action. It is command+shift+A in Macs and I found the mac command for column select mode: command+shift+8.
-
msarafzadeh about 5 yearsThe mode switching only needs to be done once, it shouldn't be too awkward then.
-
Étienne about 4 years@Gulzar I was using it on Windows.
-
Filip Kubicz about 3 yearsWorks on Linux. Very nice feature.
-
Rafael Gomes Francisco about 2 yearsOn MacOS, replace
ctrl
foroption
-
C0oo1D about 2 years@Étienne in another answer provided more comfortable way, without change selection mode - press and release ctrl, then ctrl+arrows.