Short for custom surround sound with

Is there any shortcut to surround any choice with a "Surround With ..." template?

In this special case, I defined a circle with a parenthesis pattern ... It would be very useful to have such a shortcut.

Thanks for your help in advance.

+4
source share
2 answers

The only shortcut I know about surround patterns
(that is, for templates with the variable ${line_selection} in their definition)
was introduced in eclipse 3.2 (actually specified in eclipse3.2 M4 )

This is a Surround With Quick Fix mechanism.

alt text http://kano.net/write/eclipse-news-M4_files/surround_with_template.png

Assign a Quick-Fix shortcut (CTRL-1 by default), and if your choice is appropriate ((contains a string), all compatible templates will be displayed in the quick fix dialog.

Then you can select the appropriate environment template (for example, the one you defined).

+4
source

Reply from @VonC does not work on Eclipse Kepler . Use short cut to display surround sound with quick menus.

Select one or more lines in the java editor, press Alt + Shift + Z , after which you will get a popup menu context menu, as shown below (menu items differ depending on the selection area).

enter image description here

+2
source

All Articles