[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [StrongED] background colour for tags in text

In message <f942174f57.jim@xxxxxxxxxxxxxxxx>
          Jim Nagel <stred@xxxxxxxxxxxxxxxx> wrote:

> I'm tweaking a modefile for displaying Impression DDF files, and have 
> managed to get style tags such as {"heading" on} and {"heading" off} to 
> display with a grey background.
> That grey deploys the usual StrongEd one for the likes of comments in 
> obeyfiles.
> How can I get my style tags -- which are not comments -- to take on my own 
> choice of background colour?  I want them to stand out more clearly than 
> mere coloured text (which is already used for other purposes in my mode).

There are two parts to this; the ModeFile and the Colours section of the
Mode Choices.

The SyntaxWords groups in the ModeFile are used to specify which parts
of a text get coloured using the colours for that group.

In the Colours section of the Mode Choices the colours, and font style,
can be set for each of the groups defined in the ModeFile.

For example if the ModeFile contains:

  SyntaxWords Group1 EndAlways NoCase
    Hello Hi

  SyntaxWords Group2 EndAlways NoCase
    Planet World

then 'hello' and 'hi' will be coloured using the settings for group 1,
and for 'planet' and 'world' will use the colours set for group 2.

To get your own style tags highlighted you'll need to add a SyntaxWords
group to the ModeFile that captures them, listing them explicitly is
one option.

If this is based on my original DDF mode then you'll probably have to
list all styles tags explicitly otherwise there will be a clash with
SyntaxGroup 1 (which needs to be removed).

Once that's done then you can set the colours using the Mode Choices.


StrongED Developer

To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxx
List archives and instructions at