Question

To mitigate some of the headache of working with XML I've been experimenting with PXSL, an abbreviated syntax for any XML document with advanced macro capabilities. However, since it's so new, I haven't been able to find any text editors that know how to parse it for syntax highlighting.

Do you know of any editors or plug-ins that would enable this? Where would I start if I wanted to define syntax highlighting, say for Notepad++?

Thanks in advance.

Was it helpful?

Solution

You might check out the PApp syntax highlighting included in VIM.

The PApp syntax file handles .papp files and, to a lesser extend, .pxml and .pxsl files which are all a mixture of perl/xml/html/other using xml as the top-level file format. By default everything inside phtml or pxml sections is treated as a string with embedded preprocessor commands. If you set the variable:

:let papp_include_html=1

in your startup file it will try to syntax-hilight html code inside phtml sections, but this is relatively slow and much too colourful to be able to edit sensibly ;) (aka, pxsl is hard to parse)

The newest version of the papp.vim syntax file can usually be found at http://papp.plan9.de.

OTHER TIPS

I am not a Notepad++ user, but I can recommend you to use UltraEdit and its custom syntax highlighting feature.

It already supports several languages as stated below:

http://www.ultraedit.com/downloads/extras.html

And the best side is, you can build your own word file by taking a look at the examples.

The worst part on the other hand, UltraEdit is not free..

I'd recomend PSpad, suports a lot of languages syntax coloring and it's freeware. www.pspad.com

To enable syntax highlighting for PXSL .pxl (or any other atypical file extension) in Notepad++, you need to:

  1. install the XML Tools plugin
  2. tell Notepad++ that .pxl (and whatever other) file extensions should be highlighted as XML.

For (1), click "Plugins" -> "Plugin Manager" -> "Show Plugin Manager". Scroll down and check off XML Tools, then install.

Once you've restarted Notepad++, do (2):

  • click "Settings" -> "Styler Configurator..."
  • In the "Language" list, select "XML"
  • In the "User ext" text box, type in "pxl"

e.g., when I wanted my DITA source files to be highlighted as XML, I added "dita ditamap" in the User ext text box to highlight files with .dita or .ditamap extensions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top