Problem with whitespace / wrapping in schemedef

Discussion Forums discussion Problem with whitespace / wrapping in schemedef

This topic contains 0 voices and has 3 replies.

Viewing 4 posts - 1 through 4 (of 4 total)
Author Posts
Author Posts
August 6, 2009 at 11:14 pm #662


I tried to make a schemedef for plain text files, to utilize the new XML API files. The point here is to be able to use auto-complete in regular *.txt files. But as soon as I pick this schemedef for *.txt files, the word wrapping gets all wrong, wrapping words arbitrary and keeping whitespace at the beginning of new lines. Example

Word wrapping like

 this is common.

Is there a quick fix?

Here’s my attempt at a schemedef file:

<?xml version=”1.0″ ?>



<keyword-class name=”test_keywords”>




<schemedef name=”test” title=”Test” version=”0.1″ casesensitive=”true” braces=”{[]}” >


<stringtype id=”0″ start=”"” end=”"” multiline=”false” />


<numbers start=”[0-9]” content=”[0-9,.]” />


<line start=”#” />

<block start=”===” end=”===” />


<lexer name=”test” />


<style name=”Default” key=”32″ />

<style name=”Line Comment” key=”1″ class=”comment” fore=”993333″ />

<style name=”Block Comment” key=”2″ class=”comment” underline=”true” fore=”000000″ />

<style name=”Number” key=”4″ class=”number” fore=”330000″ />

<style name=”Keywords” key=”5″ class=”keyword” fore=”003300″ />

<style name=”String” key=”10″ class=”string” back=”f9f9f9″ fore=”111111″ />



<keyword key=”0″ name=”Keywords” class=”test_keywords”/>




August 7, 2009 at 1:11 pm #16711

Key Master

Interesting, there’s a problem with this file and it seems to cause all sorts of knock-on issues in PN. I’ll have to take a look at why that happens, but for the mean time here’s the fix:

Change this:

<stringtype id="0" start=""" end=""" multiline="false" />

To this:

<stringtype id="0" start="&quot;" end="&quot;" multiline="false" />

The unescaped quotes were making the file invalid XML.

August 8, 2009 at 10:30 pm #16712


Thanks for the reply, but that did not fix my problem – that was actually the way my file was built. Pasting it into the field on this forum mangled it. But thanks for your time and effort.

August 11, 2009 at 10:43 am #16713

Key Master

Ok, if you e-mail me your actual file (or upload it to the issue tracker in a bug) I’ll take another look.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.