ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Notepad++ colour settings
Date: Sat, 3 Nov 2007 01:54:56 -0400 (EDT)	[thread overview]
Message-ID: <alpine.DEB.0.99.0711030142580.6340@adi-laptop> (raw)
In-Reply-To: <200711021434.38976.john@wexfordpress.com>

On Fri, 2 Nov 2007, John Culleton wrote:

> On Friday 02 November 2007 08:12:31 am richard.stephens@converteam.com wrote:
>> I have downloaded the latest Notepad++ and ConTeXt settings as suggested
>> by Professor Hamid and I'm enjoying the experience of using them!
>>
>> However, I do not really like the colour scheme and tried to alter the
>> background colours by editing "Application
>> Data/Notepad++/UserDefineLang.xml", shutting down Notepad++ and starting
>> up again (via Npp.bat), but no change.  I also tried editing the "tex"
>> entry in "Application Data/Notepad++/stylers.xml", but no joy.
>> I tried going to menu item Settings - Style Configurator, but Context
>> isn't in the list of languages.
>>
>> How can I alter the default colour settings for ConTeXt, please?
>>
>> Richard Stephens
>
> You might have more luck with Vim/Gvim which has an open-ended syntax
> highlighting scheme with almost 500 files named e.g., cobol.vim in the
> subdirectory syntax. It will do automatic sensing by suffix but you can
> manually select one too.  It even has one for Context.
>
> You can modify the syntax files if you like or create new ones but either
> task looks like an all-day project to me.

I would like to disagree here. I love vim, and use it for all my editing 
tasks, but it is not easy to write a syntax file for vim. Simple syntax is 
easy, but getting correct syntax highlighting for context is a hard thing. 
I have been writing one syntax file for almost a year now, but it is not 
perfect. The difficulty is doing context sensitive highlighting. For 
example, for

\setupwhatver[key=value]

I want setupwhatever to be blue, and key=value to be red. Now sometimes, 
value is be a series of context commands entered as key={value}. In that 
case, I want everything in brackets to be hightlighted as the default 
context hightlighting (rather than red), so that if I make a mistake in 
the long statement, the syntax highlighting can help me. This is ok, but 
things gets hard when you want to do

\setupwhatever[before={\setupsomething[key=value]}].

And now, the same problem for key=value setting in the nested setup 
command.

There are other things which are difficult. \type is one command which I 
can never get to work. It is easy to get things like \type|command| or 
\type+command+ or \type{command} to give the correct highlighting, but 
something like \type{\command{parameter}} is hard.

I could not find enough hooks in the vim syntax highlighting to get 
everything that I want. I have not really looked at how configurable the 
highlighting features of other languages are. But what I want to say here 
is that writing syntax highlighting for context is hard. And it is 
certainly not a one day project.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2007-11-03  5:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-02 12:12 richard.stephens
2007-11-02 13:44 ` Hans Hagen
2007-11-02 19:27   ` Idris Samawi Hamid
2007-11-02 13:54 ` Idris Samawi Hamid
2007-11-02 18:34 ` John Culleton
2007-11-03  5:54   ` Aditya Mahajan [this message]
2007-11-03 12:54     ` John Culleton
2007-11-05  9:31 richard.stephens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.0.99.0711030142580.6340@adi-laptop \
    --to=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).