10

I am using the PHP framework Laravel, which is the best PHP Framework, however If I try to write two {{ then it does not work, netbeans won't let me!

How can I write {{ in netbeans?

I just notice that I can also not delete them If I copy paste them in! I can't even undo to remove it.

I am using the latest version of netbeans (8.2).

UPDATE #1:

After closing and reopening the file, it works again? I think I experienced a strange bug.

UPDATE #2:

Today the same bug happened and closing and reopening did not helped

UPDATE #3:

It is a bug: https://netbeans.org/bugzilla/show_bug.cgi?id=268719

Black
  • 18,150
  • 39
  • 158
  • 271

4 Answers4

5

Try disabling the Knockout JS and AngularJS editor support plugins and restarting.

I had the same issue and found this solution on the bug tracker.

edit: Follow the screenshots attached to disable the plugins. I couldn't figure out how to change the language of my Netbeans to english, so I hope the screenshots are easy to follow.

Step-by-step screenshots

WeidMaster
  • 547
  • 6
  • 8
  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/17284400) – EJoshuaS - Stand with Ukraine Sep 09 '17 at 22:42
  • @EJoshuaS The link doesn't say much more than this. Although a few more details can probably be added regarding how to disable plugins. – Bernhard Barker Sep 10 '17 at 00:40
  • Thanks for editing. I understand now that the answer must be here because the link can become invalid. I will edit the answer and provide the steps I did to disable the plugins. I will try to share screenshots too. – WeidMaster Sep 11 '17 at 18:05
  • 1
    Thanks, this answer really help me, I'm trying to fix this issue in netbeans for few day. <3 you – Tommy Tom Jul 25 '18 at 09:50
1

I ran into the same issue, and worse- unable do anything with double brackets or php tags. My suggestions:

Restart It's worked so far for me, but it's not a real solution.

External Editor You can try resolving any offending code in a basic text editor. But again, a bothersome workaround.

Autocomplete Options If you can recreate the problem, you can toy with disabling options under Tools > Options > Editor > Code Completion. (I would assume under PHP.) (I'll update if/when I run into it again.)

Different IDE: I love Netbeans, but support for Laravel just isn't there (yet?).

If you need a PHP Framework, Netbeans is equipped for quite a few. (You can see this under Tools > Options > PHP. You'll note Laravel is not listed.)

If you need Laravel, you may need a new IDE. This list is right off the top of Google, but it lists Netbeans, mostly due to the code completion add-on. https://www.dunebook.com/5-best-ide-laravel-ide-with-laravel-ide-helper/

DevBodin
  • 163
  • 7
1

I encounter this problem too, seems to be a bug on the NetBeans 8.2 as it never happened on my previous NetBeans versions.

A work around on this would be to

  1. open a single curly brace first e.g href="{foo/bar"
  2. close with two curly braces e.g href="{foo/bar}}"
  3. Then go back and add the second opening brace. e.g href="{{foo/bar}}"

Hope it works for you and hope the bug get's fixed asap.

Houdini
  • 11
  • 2
0

Sharing my quick workaround: start by typing:

{}
  1. select both braces
  2. drag the selected text (the two braces) with the mouse, so cursor will be between the two braces.
  3. press Ctrl (to copy instead of move)
  4. "drop" it (release the mouse).

you should now have:

{{}}
RoeeK
  • 1,112
  • 12
  • 23