android-studiointellij-ideamultiple-cursor

Multiple cursors in Android Studio automatically at every text that matches?


I have been using multiple cursors with ALT + SHIFT. Sometimes I need like 20 cursors and I want them at the start of the same portion of text. This is tedious to do every time. Is there a shortcut for this? Like imagine there are 20 instance of the text "foo" in the file then I would like to just select one and ideally it should automatically insert a cursor for all the other instances in the same position.


Solution

  • Look for the Select Next Occurrence option.
    On Mac it's used by selecting a word and then ^ G, on Ubuntu the shortcut is ALT + J.

    Traverse through every item you wish to change by repeating the key combination.

    enter image description here