In the code editor for IntelliJ 2019, I want to add a straight double-quote (QUOTATION MARK) to the currently-selected text to make it a string literal.
Is there some keystroke or menu item to make this happen?
In the code editor for IntelliJ 2019, I want to add a straight double-quote (QUOTATION MARK) to the currently-selected text to make it a string literal.
Is there some keystroke or menu item to make this happen?
Yes, it's under Settings > Editor > General > Smart Keys and is called Surround selection on typing quote or brace.
If activated, you can utilize this feature by simply selecting the relevant text and pressing the single or double quote key.
On my device (macOS) I also faced the same problem and struggled with (double) quoting my selection. I tried an another text editor like Sublime and faced the same issue. However, I found out that it needs to be used with ctrl-key.
For single quoting selected text: Hit ctrl + '
For double quoting selected text: Still haven't figured it out.
Note: It depends on which keyboard (globally) you are using for your macOS device. In my case I'm using the 'US International - PC'. For 'US' you don't need to hit the ctrl-key.