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.


Comments:

Hello,

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.

Posted by raymond on September 12, 2008 at 12:44 PM CEST #

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).

Regards,
Petr

Posted by Petr on September 12, 2008 at 01:52 PM CEST #

Thanks Petr

Posted by raymond on September 16, 2008 at 07:43 PM CEST #

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.

Posted by Alex on December 18, 2008 at 02:34 AM CET #

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:
http://blogs.sun.com/netbeansphp/entry/how_to_manage_templates_in
http://blogs.sun.com/netbeansphp/entry/how_to_manage_templates_in1

Regards,
Petr

Posted by Petr on December 18, 2008 at 05:31 AM CET #

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?

Thanks
Vikram

Posted by Vicky on February 26, 2009 at 12:11 AM CET #

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?

Posted by Leszczu on March 07, 2009 at 04:09 AM CET #

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.

Posted by Michael on April 14, 2009 at 08:00 AM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

This blogs is written by NetBeans developers who contribute to the PHP support mainly.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today