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

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -