AAtsushi's Blog
Tools

Multi-Cursor String Selection in IntelliJ

→ 日本語版を読む

Overview

I looked into how to use multiple cursors in IntelliJ. Here I note the ones that seem particularly useful to remember.

Multi-Cursor Operations to Remember

  • Add a cursor above or below the current cursor using the keyboard

    • Hold Shift and press the up/down ↑↓ arrow keys
      • Then use Alt + Shift + G to move the caret to the end of the line
  • Select multiple words one by one

    • Alt + Shift + Double-click (then double-click additional words to add them to the selection)
  • Select all occurrences of the same string simultaneously

    • (With a string selected) Ctrl + Alt + Shift + J
  • Paste strings using multiple cursors

    • Copy normally with Ctrl + C, then with multiple cursors placed, press Ctrl + V to paste as separate lines

References

pleiades.io

blog.jetbrains.com

qiita.com