Feature Spotlight: Multiple Selections in PyCharm

Today I’d like to highlight one of the most top voted features that appeared in PyCharm 3.4 some time ago – Multiple Selections. Since then a lot of people have been using it and enjoying the increased productivity while editing.

With this feature you can:

  • Set multiple cursors in the editor area: Alt + Mouse Click (Option + Mouse Click for Mac OS X). Note that on some systems you also have to use Shift with the shortcuts mentioned.
  • Select/unselect the next occurrence: Alt + J / Shift + Alt + J (Ctrl + G / Shift + Ctrl +G for Mac OS X)
  • Select all occurrences: Shift + Ctrl + Alt + J (Ctrl + Cmd + G for Mac OS X)
  • Clone caret above/below (the shortcuts are not mapped yet)
  • Remove all selections: Esc

You can redefine these shortcuts in Settings -> Keymap -> Editor Actions if necessary.

Multiple selections work nicely together with other PyCharm features like Code completion, Select word at caret, Join lines, Copy/paste, and the others. This feature also works with all languages supported by PyCharm such as Python, HTML, JavaScript, CSS and more.

Here’s a short demo on how Multiple Cursors work in PyCharm:

Hope you’ll enjoy this handy feature!


About Dmitry Filippov

Product Marketing Manager at JetBrains
This entry was posted in Cool Feature. Bookmark the permalink.

8 Responses to Feature Spotlight: Multiple Selections in PyCharm

  1. TM says:

    What’s really missing is an option to skip an occurrence when using ALT+J. Someone in the bugtracker mentioned that F3 does this, but F3 uses the current search term. ALT+J doesn’t – it uses whatever the cursor is currently on / whatever is currently selected (which is useful).

  2. Ralph says:

    Hi Dmitry,

    very nice post – feel free to write more of those little tips 😉 It’s a good and crisp way to learn more about those awesome PyCharm features.


  3. Steve Piercy says:

    Set multiple cursors in the editor area: Alt + Mouse click.

    On Mac, I found that Option+Shift+Click works, but not just Option+Click.

    Also there is no ALT on Mac, but it usually maps to Option.

    • Dmitry Filippov says:

      Hi Steve,

      ok, “Option+Shift+Click” which version of PyCharm are you using? We’ve been changing the shortcut from Option + Click to Option + Shift + Click and back.

  4. Nik Molnar says:

    It seems to be Shift + Alt + Click (not just Alt + Click) to set multiple cursors for me on Windows. I am at 3.4.1 and haven’t changed any of the default key bindings.

  5. Jason Ansel says:

    Too bad this feature broke vim bindings. Great vim bindings are the #1 reason I use pycharm. I downgraded pycharm to get rid of this feature and fix vim bindings.


  6. E-MMOP says:

    when you searched with spotlight on maverick, you can do a ALT+CLICK to search in finder where is file. But in Yosemite this function is out …
    Have you a tips for it ?

  7. Ev says:

    For some reason I cannot get the Alt+Button Click to work. It is set in my Keymap and it worked like once before, but now I can’t get it to work. Any ideas about how to fix this?

Leave a Reply

Your email address will not be published. Required fields are marked *