[PATCH]: define keyword to substitute colors in syntax files
Andrew V. Samoilov
sav at bcs.zp.ua
Tue Mar 4 16:57:13 UTC 2003
Pavel Roskin wrote:
> Hello, Andrew!
>
>
>>>defines.syntax:
>>>define comment brown black
>>>
>>>sh.syntax:
>>>context # \n comment
>>
>>It implemented too but requires "context default" line in the
>>defines.syntax. Attached patch must be used with today's syntax.c.
>>Also defines variable should be moved to WEdit structure.
>
>
> Please apply your patch. I see that you have applied some changes
> already, so it's better that you apply the rest.
Applied.
> It's important to get it right because some people have problems reading
> brown on blue. On the other hand, the highlighting used for Pascal is too
> bright for me. I'll be in a better position to change it to a more
> traditional color scheme if the color scheme is configurable.
Color themes...
> The defines that we need are (it's just the first approximation):
>
> define example in sh example in C
>
> comment # Comment /* Comment */
> comment_bold # FIXME /* FIXME */
> keyword for if
^^^^^^^^^
It can confuse us later if not only colors will be expanded.
Default context and ` ` in sh.syntax with a lot of repeated words are
good example. May be merging of convert() and subst_defines() is not so
bad idea.
> stdfunction find printf
> stdtype N/A char
> string "abc" "abc"
> string_verbatim 'abc' 'a'
> string_literal "\n" "%d"
> variable $abc N/A
> syntax_separator ; ;
> syntax_group { (
> syntax_operator + ==
> syntax_special ;; ->
>
> Colors specific to the programming language (e.g. EOF for shell, new_text
> for diff) should be defined at the beginning of the corresponding syntax
> files.
I agree.
--
Regards,
Andrew V. Samoilov
More information about the mc-devel
mailing list