Search code examples
android-studiointellij-idea

IntelliJ IDEA - multiple carets?


Sometimes I have to write Java class where I need to define multiple fields of the same type. For example, I know that I will need to duplicate private final String on the next 4 lines.

Is it possible to spawn multiple carets in IntelliJ editor, so I can type on mutliple lines at the sime time?


Solution

  • I think "Column Selection Mode" could help you. You can enable it in the context menu in the editor. Then you can select multiple lines and type same text at once.