Writing language definition files: Difference between revisions

From Bluefish Wiki
Jump to navigation Jump to search
(Created page with "= Bluefish language definition files = All syntax highlighting and autocompletion is defined in bluefish language definition files, saved in .bflang2 files. In the source cod...")
 
No edit summary
Line 13: Line 13:
It starts with a root tag <bflang>:
It starts with a root tag <bflang>:


<pre>
<bflang name="Shell" version="2.0" >
<bflang name="Shell" version="2.0" >
</bflang>
</bflang>
</pre>
Inside the root tag there are three sections
== The header section ==
<pre>
<header>
<mime type="application/x-shellscript"/>
<option name="show_in_menu" default="1"/>
<highlight name="value" style="value"  />
</header>
</pre>

Revision as of 21:58, 11 March 2014

Bluefish language definition files

All syntax highlighting and autocompletion is defined in bluefish language definition files, saved in .bflang2 files. In the source code they can be found in data/bflang/

On Linux they are installed in /usr/share/bluefish/bflang/

If you store a bflang2 file in your bluefish settings directory ~/.bluefish/ it has higher priority than the system wide installed files. So if you are going to change a bflang2 file, just copy it into ~/.bluefish/

The format of the file

The file format is XML.

It starts with a root tag <bflang>:

<bflang name="Shell" version="2.0" >
</bflang>

Inside the root tag there are three sections

The header section

<header>
	<mime type="application/x-shellscript"/>
	<option name="show_in_menu" default="1"/>
	<highlight name="value" style="value"  />
</header>