In Intellij IDEA how do I replace text with a new line?

前端 未结 10 1237
忘掉有多难
忘掉有多难 2020-12-24 00:00

Say I wanted to replace all commas with commas and a new line using Intellij IDEA\'s replace function. What do I put in the search box? In vim I\'d use &\\r

10条回答
  •  鱼传尺愫
    2020-12-24 00:23

    Use Multiline button, no Regex is needed.

    edit: the multiline button is missing since IntelliJ 15, but you can enable it by clicking into the textfield and pressing Alt+Enter or Ctrl+Shift+Enter

提交回复
热议问题