How to surround text with quotes in netbeans IDE

I have a text, say:

<td id=asd >

Is there a shortcut in netbeans where the selected text can be surrounded by quotation marks?

 <td id="asd" >
+5
source share
4 answers

If there is no macro by default, here is the macro code that will do what you want

caret-begin-word "'" caret-end-word "'"

or

caret-begin-word "\"" caret-end-word "\""

NOTE. This will only cover WORD in quotation marks. Not your choice.

You can also select what you want and just click ' or "to surround the selected part with quotes

Tested in NetBeans 7.2.1

+5
source

Switch to

Tools->Options->Editor->Macros

and you will find a macro named quote-word

Just assign a shortcut to it, and you can use it to surround the word with quotation marks.

+3
source

, , .

:

  • - > - > - >
  • Click [Create] to create a new macro. Call it a quote of choice or something for you best.
  • Insert the following macro:

    copy-to-clipboard "\"" paste-from-clipboard "\""
    
  • Click [Set shortcut ...], then press the desired key combination (for example, shift + ctrl + q)

+3
source

how NETBEANS IDE 8.2 :

//i tried this on linux (debian)  

STEP 1: First select β€œhighlight” the text you want to surround with quotation marks.
STEP 2: ClickShift - "

// Shift key and double quotes key 

Hope this helps!

0
source

All Articles