It can be done with a GREP replace: search for
.+
and replace with
“$0”
In essence, it finds “everything” and then replaces this with the found text, surrounded by double quotes. But you have to remind yourself to make sure it uses “Selection” in the GREP replace dialog every time. Otherwise you will get double quotes around 'everything' (depending what on the search scope says).
A better way is to use a mini-javascript that first checks if you have a valid selection and only if so inserts the quotes for you. ( I went a little nuts here, loads of extra functionality :) )
//DESCRIPTION:Add Quotes around text selection
// Remove next line for CS3 or older!
app.doScript(function() {
if (app.documents.length != 0 && app.selection != 0 && app.selection[0].hasOwnProperty(“baseline”))
{
sel = app.selection[0];
sel.insertionPoints[0].contents = sel.insertionPoints[-1].contents = '”';
app.select (sel.characters[0],SelectionOptions.ADD_TO);
}
// Remove next line for CS3 or older!
}, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, 'Add Quotes');
You can save this script in your Scripts folder and then use the Keyboard Shortcut Editor to assign a hotkey combo to it.