An Oracle blog about NetBeans for PHP

YAML Support Is Available in NetBeans PHP IDE

There have been a few requests to provide support for editing YAML Ain't Markup Language files. The support has already been written by Tor Norbye, but was available only for Ruby projects. After discussion with Tor I have moved the YAML support from Ruby to a more general location and from today's builds it is also available in NetBeans PHP distro and in PHP projects.

You can create a new YAML file through the New File Wizard, where you have to choose the Other category and EmptyYAML.yml template.

As you can see from the next screenshot, the support includes not only a template for creating new YAML file, but also features like code folding and coloring. The structure of the file is also reflected in the Navigator window.

Code completion is available in the editor, and a reference card for YAML is displayed in the popup documentation window.

Join the discussion

Comments ( 8 )
  • raymond Friday, September 12, 2008


    This is great to see but I have one quick question:

    Is it possible to change the syntax highlighting for files with unknown extensions? For example: I have a a php file called myclass.lib or myfile.txt but I would like to view the codes contained within these files as php syntax highlighting.

  • Petr Friday, September 12, 2008

    Hi Raymond,

    yes, if the file is not recognized by the IDE yet, then you can follow: http://blogs.sun.com/netbeansphp/entry/how_to_set_up_netbeans1 .

    In the case that the NetBeans already knows files like .txt files, then you can change the mimetype of the files in Tools->Options->Miscellaneous-> Files Tab. Select the extension (txt) and as associated mimetype select PHP 5 (text/x-php5).



  • raymond Tuesday, September 16, 2008

    Thanks Petr

  • Alex Thursday, December 18, 2008

    Hi there

    I'm new to netbeans. I'm testing v6.5

    Is there a way to change the default extension to the yaml-file when creating a new file.

    At the moment it's \*.yml. but the framework I'm using looks for \*.yaml and it's very annoying to go to the file system to create those files.

  • Petr Thursday, December 18, 2008

    Hi Alex,

    this is easy. Select a .yaml file in your project view. Inovke context menu and choose Save as Template ... . From this time there will be available new wizard for yaml files with .yaml extension. See more in these posts:





  • Vicky Wednesday, February 25, 2009

    Hello there. I am using NetBeans 6.5, Product Version: NetBeans IDE 6.5 (Build 200811100001). But i did not find YAML file formats in the location you specified. Is there some plugin that I might need to install or some patch?



  • Leszczu Saturday, March 7, 2009

    Has support for YAML been removed? I'm using nightly builds and suddenly whole support for YML is gone few days ago, including code completition, syntax highlight, even New File menu lost YAML option. What is happening?

  • Michael Tuesday, April 14, 2009

    I'm with Leszxzu, what happened to YAML support? I'm using 6.7M3 and there appears to be no more support, there was in 6.7M2.

    I develop with Symfony and use YAML a lot so if Netbeans is dropping YML support I will have to drop Netbeans.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.