Vertical/Column text select in PyCharm?

26,937

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

Column Selection Mode

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++.

Share:
26,937
DharmaTurtle
Author by

DharmaTurtle

¿Hola, por qué estás aquí? (°-° )

Updated on July 09, 2022

Comments

  • DharmaTurtle
    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
    DharmaTurtle over 10 years
    Sorry, but that only enables column selection for mice. I'm trying to select with the keyboard.
  • Piotr Dobrogost
    Piotr Dobrogost over 10 years
    @DharmaTurtle Not true. Afterwards you can select text with keyboard as usually (by holding Shift pressed).
  • DharmaTurtle
    DharmaTurtle over 10 years
    Ohhh, 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
    Ozgur Ozturk over 7 years
    Thanks 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
    msarafzadeh about 5 years
    The mode switching only needs to be done once, it shouldn't be too awkward then.
  • Étienne
    Étienne about 4 years
    @Gulzar I was using it on Windows.
  • Filip Kubicz
    Filip Kubicz about 3 years
    Works on Linux. Very nice feature.
  • Rafael Gomes Francisco
    Rafael Gomes Francisco about 2 years
    On MacOS, replace ctrl for option
  • C0oo1D
    C0oo1D about 2 years
    @Étienne in another answer provided more comfortable way, without change selection mode - press and release ctrl, then ctrl+arrows.