Ruby logo

The RubyMine Blog

The Ruby on Rails IDE

Early Access Program

What’s Mining: Multiple Cursors and Selection

Hello everyone,

If you, as me, often dream of being in several places at once you will like this new feature coming to RubyMine from IntelliJ platform side! Please welcome multiple cursors and selection that you can already try in the last EAP version:


It was the top voted editor feature in our tracker and we hope you will like it. Let me go through this short demo in more detail and show you all the tricks.

Set multiple cursors

Let’s start with the very beginning. Using Alt with the mouse click you can set the cursors in all places you need (please note that you may always change the shortcut in Settings -> Keymap -> Editor Actions -> Add or Remove Caret):



You can also use keyboard. Please go to Settings -> Keymap -> Editor Actions and set up the shortcuts for Clone Caret Above and Clone Caret Below actions:



To switch off the multiple cursors and get back to single one, please press ⎋/Escape.

Edit your code simultaneously

Now, when multiple cursors are set, you can make some changes. For example, select the first words with Move Caret to Next Word with Selection (⌥⇧→/Ctrl+Shift+Right) action and move them to the end of lines with Cut (⌘X/Ctrl+X), Move Caret to Line End (⌘→/End) and Paste (⌘V/Ctrl+V) actions:



Or you can go back to the beginning of lines with Move Caret to Line Start (⌘←/Home) and capitalise the first letters with Right with Selection (⇧→/Shift+Right) and Toggle Case (⌘⇧U/Ctrl+Shift+U) actions:



Use code completion in multiple places at once

We’ve added an opportunity to use autocompletion and live templates with multiple selection as well. The context is determined from primary cursor’s location, resulting changes are applied to all cursors:



Find code occurrences to change

You can also easily change any repeating code fragment with Select All Occurrences (⌃⌘G/Ctrl+Shift+Alt+J) and Select/Unselect Next Occurrence (⌃G and ⇧⌃G/Alt+J and Shift+Alt+J ) actions:



Multiple cursors and selection feature as cool as it is to use now, it still has a long way to go: its implementation remains to be refined, and some limitations need to be dealt with. So we would really appreciate your feedback about it. Share your thoughts in our discussion forum and submit bug reports to the issue tracker. Thanks!

Develop with pleasure!
JetBrains RubyMine Team

Comments below can no longer be edited.

29 Responses to What’s Mining: Multiple Cursors and Selection

  1. Avatar

    Fabio Scognamiglio says:

    March 19, 2014


    but i’m curious to know what will happen with vim plugin enabled

    who knows?!

  2. RubyMineでマルチカーソル/選択 | JetBrains ブログ says:

    March 20, 2014

    […] 原文 […]

  3. RubyMine Hinoki Goes Beta! | JetBrains RubyMine Blog says:

    March 20, 2014

    […] ← What’s Mining: Multiple Cursors and Selection […]

  4. Avatar

    Ron Elliott says:

    June 8, 2014

    I have been waiting for this feature for a while. Sadly it’s still not enough for me to move back from sublime text. The VERY simple key combos used it ST still make it king of this feature. Jetbrains needs to deemphasize the mouse and long key combos.

    • Avatar

      Shubham Waghe says:

      August 17, 2018

      Absolutely agree! Nothing beats Sublime’s Ctrl+D, Ctrl+K shortcut.

  5. Avatar

    Georg says:

    June 17, 2014

    Activating this dangerous feature by default was a completely stupid idea!

    • Tatiana Vasilyeva

      Tatiana Vasilyeva says:

      June 18, 2014

      What is wrong with the feature?

      • Avatar

        Matti Airas says:

        June 23, 2014

        It’s lovely already as it is – the feature I missed the most when I switched from ST to PyCharm. In a way I agree with Georg, however. Multiple cursors is a feature that needs to be learned – it’s not discoverable at all. Since the feature is a very advanced one, I’m not sure if you can do much about it. Maybe pop-up a non-modal dialog when it’s enabled for the first time?

        If you stumble upon it without knowing, I’m sure it’s easy to wreak a lot of havoc with it, so maybe it could be disabled by default. I think you could argue for either.

        • Avatar

          sean says:

          September 7, 2014

          Ctrl+Z … don’t be so dramatic.

          • Avatar

            Ejder Yurdakul says:

            July 1, 2015

            Gees, i cant disable this feature. It cuts my code like a samurai sword.

            • Tatiana Vasilyeva

              Tatiana Vasilyeva says:

              July 1, 2015

              You can change or even delete a shortcut I guess.

    • Avatar

      olol says:

      December 14, 2018

      You mean, in an environment where you’re supposed to use a VCS and commit often, using an editor that provides

      – autosave
      – ctrl + z
      – local history


  6. Avatar

    allbutone says:

    November 6, 2014

    In Sublime, I can select multiple lines and press “Ctrl + Shift + L” to split into lines, then edit them with “multiple select” fluently, but in IDEA, I can’t find the same feature. will this feature be added ?

    • Avatar

      Alexander Zolotov says:

      November 6, 2014

      It seems that RubyMine doesn’t have this feature. Feel free to file a feature request at

  7. Avatar

    allbutone says:

    November 6, 2014

    I know I can set shortcut for “unselect occurrence”, but I can’t skip this occurrence and select the occurrence next to it, In Sublime, I can simply press “Ctrl + K, D” to achieve that, will this feature be fixed ?

    • Avatar

      Alexander Zolotov says:

      November 6, 2014

      There is an action ‘Find Next / Move to Next Occurrence’ for that.

  8. WebStorm: IDE for Javascript | datajs says:

    May 28, 2015

    […] What’s Mining: Multiple Cursors and Selection […]

  9. Avatar

    Michael K. says:

    October 23, 2015

    Saw this in the new Tips and Tricks video just uploaded by jetbrains. I already used the syncedit plugin for a longer time and missed this feature for some time that the syncedit stopped working in IntelliJ very much. It’s good that the multiple cursor works in a similar way but it does not fully replace syncedit. I know that the plugins (there was a version 2 from a different author) are very old and not updated since years but the functionality is very good and unique and could maybe move into IntelliJ in this context.

    • Tatiana Vasilyeva

      Tatiana Vasilyeva says:

      October 23, 2015

      What is the most desired feature that syncedit has and RubyMine has not for you?

  10. Python:Is there multiple cursor-like functionality in PyCharm? – IT Sprite says:

    November 4, 2015

    […] Link to a blog post on usage for anyone interested:… […]

  11. Avatar

    Ben Creasy says:

    February 24, 2016

    The Sublime trick of multiple cursors over a selection with CMD+SHIFT+L is requested at so you can vote for it if you want it.

    • Avatar

      Boris says:

      July 13, 2016

      what about aligning multiple carets vertically with a shortcut?

      in order to go from here
      a |: 1,
      aaaa |: 2,
      aa |:3,
      aaaaaa |:4,

      to here:
      a |: 1
      aaaa |: 2
      aa |: 3
      aaaaaa|: 4

  12. Avatar

    Boris says:

    July 13, 2016

    is there a way aligning the multi cursor in one vertical line like in sublime?

    • Tatiana Vasilyeva

      Tatiana Vasilyeva says:

      July 13, 2016

      Could you please take a look at this issue. Is it the right one? If so, please watch/vote for it to get any news and updates on the topic.

  13. Avatar

    Umer farooq Mughal says:

    December 16, 2017

    Is there a way to increment numbers when using multiple cursors?

  14. Avatar

    David says:

    February 11, 2020


    How do you move the multi-caret over logical elements
    blah(“|One Word”, blah.toString());
    blah(“|Two Words Here”, blah);
    blah(“|Three Words are here”, blah);

    I can’t get the carets over the complete strings in quotes going from start position.
    Also can’t work back from end of line because of blah.toString() vs blah

    • Avatar

      Olga Kuvardina says:

      February 18, 2020

      Hello David,
      have you tried using Move Caret to Next Word shortcut?

Discover more