java - Eclipse surround with quotes and other blocks -
i find myself wanting highlight string in eclipse , double or single quoting it. can't seem find shortcut it. in textmate example if highlight string , type either ' or " string surrounded them. same should work ) , } think well.
i've added code template doing doesn't ever appear in menu , there doesn't seem way create shortcuts either. note should entirely keyboard driven , not involve secondary menus, that's goal anyway.
go java > editor > templates , add new template, e.g. called quote, follows:
"${word_selection}"${cursor} then, in editor, write text want quote, highlight it, press ctrl + space, type quote , hit return. highlighted text should quoted now.
if don't template proposals when pressing ctrl + space, make sure have them checked in java > editor > content assist > advanced.
just tried , works me!
Comments
Post a Comment