I have got the following as the code template for System.out.println
in Eclipse
System.out.println(${word_selection}${});${cursor}
I was under the impression that I could write a text, select it, enter ctrl+space
, and then write sop - and Eclipse will write the proper line for me. But this is not happening. Can anyone help me understand the way ${word_selection}
is supposed to work?
You need to select the text and press ctrl+space
twice. The first time you do it, "default proposals" are shown. The next time the applicable code templates are shown. Unfortunately you cannot type the name of the template since that will overwrite the selected text, but you can select it with arrow keys and press return.
It will look like this after the second ctrl+space
on an Eclipse with default templates:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With