I'm using Eclipse Kepler.
It takes too long to go from the start of the block of the code to the end so I can add opening and closing brackets. I'm using Ctrl+Shift and the arrow keys to select my blocks, but I don't have a hotkey or anything to wrap the selection with brackets. I'd love to have some command such as Ctrl+Shift+( or Ctrl+Shift+9 to do this, but I can't find the way to make them.
Templates can't help me here. Preferences > General > Keys can't bind anything in the editor. Yes, I know about the Home and End buttons; this question is not about them.
I made a template:
(${word_selection})${cursor}
This helps a bit. However, I have to use Ctrl+Space, then Up Arrow, then Enter, to use. It also only works for parentheses; if I wanted to try with, say, angle braces, it wouldn't work.
As far as I see, there is no way to bind this template with a shortcut, except making a plugin for eclipse.
Using ${line_selection}
I've made a template just like yours, and it works:
{
${line_selection}${cursor}
}
Also, I tried using <> instead of {} and it works.
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