How does intellij idea paste strings without newlines?

intellij idea is sometimes a bit too intelligent. One of the common problems is that when pasting strings, idea will help us deal with the problem of line breaks on its own, which is very counterintuitive. I often have to delete the extra line breaks that idea added for me after pasting.

In fact, idea can also be pasted directly like other editors, and the method is introduced below.

method/step

This problem mainly occurs when concatenating long strings via +. Now we write simple 2 strings.

Select the content inside the a string, do not select the outermost 2 quotation marks

Ctrl+v paste it between the 2 quotation marks of the b string, the effect is like this.

In other editors, it can be pasted directly, but in idea, we did an extra step of processing, which led to this.

Now we press the right mouse button in the middle of the quotation marks, there is a paste simple 

The shortcut key is ctrl+shift+alt+v, so that it can be easily pasted.

If reprinted, please indicate the source: Open Source Byte   https://sourcebyte.vip/article/313.html

Guess you like

Origin blog.csdn.net/qq_35634154/article/details/130601618