Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij-idea reverse paste into string (aka copy from string)?

In Intellij idea if you paste some text into a string literal (between double quotes) the java editor can automatically reformat the pasted text - ie to place necessary escaping characters for double quotes new lines etc.
I want to do reverse, ie when copying text from inside a string literal the editor to place the clean text in the clipboard without the escaping characters, double quotes and new lines separated by plus signs etc.

For example when a paste these XML lines

<?xml version="1.0" encoding="utf-8"?> <a></a> 

into a string literal in Intellij Java editor it becomes:

String str = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +              "<a></a>" 

I want when I copy from this string literal to have an option for storing the clean text in the clipboard as it was before pasting. Ie to have the original text back.

like image 613
George Avatar asked Jul 29 '15 11:07

George


1 Answers

Place cursor at value of the string and followed by Alt + Enter | Copy String Concatenation Text to the Clipboard

like image 53
Meo Avatar answered Sep 20 '22 18:09

Meo