PyCharm: Turning selection to multiple cursors per line

后端 未结 8 1324
梦谈多话
梦谈多话 2020-12-13 01:53

Sublime Text has this functionality where you can select text and start editing each line with a (multiple) cursor:

相关标签:
8条回答
  • 2020-12-13 02:04

    Hold Alt and drag the mouse over the desired text.

    Source: https://www.jetbrains.com/help/pycharm/2016.1/selecting-text-in-the-editor.html

    0 讨论(0)
  • 2020-12-13 02:12

    Press SHIFT + DownArrow ( instead of mouse and drag) in pycharm for multi cursor editing

    0 讨论(0)
  • 2020-12-13 02:14

    You can use plugin Extra Actions.

    You must add a combination to this action:

    Split Selection into Lines

    No shortcuts are set by default.

    You can easily set them by going to

    Settings > Keymap > Plugins > Extra Actions

    Configuring keyboard shortcuts.

    0 讨论(0)
  • 2020-12-13 02:15

    Sublime like features for MacOS X in PyCharm:

    Select/Unselect the next occurrence with Ctrl+G / Shift+Ctrl+G

    Select all occurrences at once with Ctrl+Cmd+G

    Remove occurrences with ESC

    0 讨论(0)
  • 2020-12-13 02:24

    The simple way I think is to select the text and go on pressing Alt + J for Linux and Ctrl + G for Mac until you reach the last match.

    PyCharm blog

    0 讨论(0)
  • 2020-12-13 02:25

    From source:

    To add carets, do one of the following

    • Press Shift+Alt and click the LEFT mouse button at the location of the caret.

    • Double-click Ctrl and press up arrow or down arrow keys.

    On OSX it seems to be enough to press down the LEFT-ALT and add new carets with mouse LEFT CLICK, or press down SHIFT+ALT and paint the cursors with mouse.

    0 讨论(0)
提交回复
热议问题