Reputation: 289
I was wondering if there is a way to print out highlighted text in eclipse by using shortcuts.
So say we had
int number = 2;
number //highlight number + some key combination to turn -> System.out.println(number);
Thanks in advance!
Upvotes: 1
Views: 98
Reputation: 34137
Select number
, hit Ctrl+Space, type syso
and hit Enter.
The trick is to trigger the content assist (Ctrl+Space) when something is selected and then type the beginning of the template (in this case syso
) and not the other way around (not syso
and then Ctrl+Space).
Upvotes: 1