5

I am using NetBeans 7.3 and I like its autocompletion features. However in this new 7.3 version, when I type <script src= it creates automatically two single quotes like this: <script src='|'. However I need these quotes to be double quotes: <script src="|".

I have looked everywhere in configs and did not find a way how to force NetBeans to use double quotes instead of single ones. Anybody knows any way or workaround ? Thanks in advance for any hints and help.

Frodik
  • 14,986
  • 23
  • 90
  • 141
  • Is it absolutely necessary that it generates double quotes though? – Pieter VDE May 03 '13 at 07:41
  • Well, it depends on what "absolutely necessary" means. All my life I was using double quotes in HTML and it is my programmatory custom. I know that single quotes are valid, but it makes my code little bit less comfortable for me to read and mix with old code with double quotes and I can give you more reasons, but I don't think they matter for cause of this question. There must be way how to set type of quotes used in Netbeans, that's the fact. – Frodik May 03 '13 at 10:06
  • 1
    With "absolutely necessary" I meant if it is for you. As you stated, it is valid. But I can understand - from a personal point of view - you'd rather like to have double quote completion. Anyways, one fix that you might try - if these single quotes are bugging you too much - is just disabling autocompleting quotes. You'll have to type the double quotes yourself, but at least these irritating single quotes won't show up anymore. – Pieter VDE May 03 '13 at 10:12
  • @Dreamonic Yeah, disabling autocompleting quotes is what I am using right now, but I kind of got used to comfort of quote completing and that's why I am asking this question :-) Thanks for your effort. – Frodik May 03 '13 at 12:00
  • 1
    I see. Unfortunately I'm not able to help you, but I'm sure other people will be. Good luck! – Pieter VDE May 03 '13 at 12:02

3 Answers3

13

I found the answer by playing with it a bit. From what I've seen the answer suggested on the bug tracker is not exactly correct. The replies there by flangefrog are mine.

Type something like <div class= now your cursor should be in between two quote or double quote characters. You can now type the other type of quote character and it will change your preference.

Michael Lawton
  • 1,460
  • 1
  • 14
  • 25
0

I'm not sure where is the problem because the autocomplete works out the <script src="|" for me with double quotes. Maybe it's an issue with your OS, which one are u using? I'm using Windows 7 atm.

Btw mine NetBeans are fresh install (7.3 version) - so maybe if u try reinstall it will work the same way as it works for me.

I would also check if u are really writing it there in new html file there not xhtml or something else.. even if I tried xhtml it still gives me the "" not single ones.

Hope this answer might help a little. If I could I would make it an comment...

Ms. Nobody
  • 1,219
  • 3
  • 14
  • 34
  • I have Linux and when I had 7.2 it used double quotes. But after update to 7.3 it now uses single quotes. I was hoping there is some way where I could set this as preference, but haven't found any. – Frodik Apr 30 '13 at 20:10
0

You can download and install the previous version, if 7.3 version does not crucially outshine the 7.2 version.)

https://netbeans.org/community/releases/72/

Also, consider checking the solution that one coder occasionally found when addressing a similar issue (Linux platform too).

https://netbeans.org/bugzilla/show_bug.cgi?id=228535 (see bottom of the screen)

Dmitry
  • 155
  • 3
  • OK, I observed that linked "solution" works, it is strange behaviour, however it works. You have to backspace the single quotes and type duoble quotes and after few times you do this Netbeans "learns" your preference and starts autocompleting duoble quotes again. Blows my mind. – Frodik May 05 '13 at 06:00
  • I have the same problem. It used to be double quotes before, until someday it became single quotes and never turns back... I tried backspace and type double quotes to correct this behavior a lot of times, without luck... – whuhacker May 10 '13 at 08:29