I have some text, say:
<td id=asd >
Is there a shortcut in netbeans, where a selected text can be surrounded by quotes?
<td id="asd" >
I have some text, say:
<td id=asd >
Is there a shortcut in netbeans, where a selected text can be surrounded by quotes?
<td id="asd" >
If the macro is not there by default here is macro code that will accomplish what you want
caret-begin-word "'" caret-end-word "'"
or
caret-begin-word "\"" caret-end-word "\""
NOTE: This will only surround a WORD in quotes. Not your selection.
You can also highlight what you want and just hit ' or "
to surround the highlighted portion in quotes
Tested in NetBeans 7.2.1
As already suggested, there is a quote-word macro defined that will quote a single word.
To gain the ability to quote a selection:
Paste in the following macro:
copy-to-clipboard "\"" paste-from-clipboard "\""
Click [Set Shortcut ...], then press your desired shortcut combination (eg. shift+ctrl+q)
Go to
Tools->Options->Editor->Macros
and you will find a macro called quote-word
Just assign a shortcut to it and you can use it to surround a word with quotes.
As of NETBEANS IDE 8.2 :
//i tried this on linux (debian)
STEP 1: First select "highlight" the text you want to be surrounded by quotes.
STEP 2: Press Shift - "
// Shift key and double quotes key
Hope this helps!!