vile
[Top][All Lists]
Advanced

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

Re: [vile] Where are 'keywords' set for vilemode, keymode, etc.?


From: Eur Ing Chris Green
Subject: Re: [vile] Where are 'keywords' set for vilemode, keymode, etc.?
Date: Fri, 16 Feb 2007 12:04:40 +0000
User-agent: Mutt/1.4.1i

On Fri, Feb 16, 2007 at 06:32:58AM -0500, Thomas Dickey wrote:
> On Fri, 16 Feb 2007, Eur Ing Chris Green wrote:
> 
> >I have a small problem with syntax highlighting in certain cases.
> >
> >For example when I exit my .vilerc file the highlighting is correct on

That 'exit' should be 'edit' of course (well they are fairly close
together!).

> >most systems but on a couple of systems (the BSD one in particular I
> >have noticed it) a couple of the syntax colours are bright instead of
> >normal.  I.e. I'm getting BC5 instead of C5.
> 
> The actual colors are set in .vile.keywords (which one might expect would
> define keywords for vilemode)
> 
I have the same vile.keywords file on all my systems, I don't have any
'local' vile.keywords files, there's only the one in /xxx/vile/share.
Thus the highlighting *should* be the same on all systems, but it
isn't for some reason.

> >However this is only happening on some file types, cmode seems OK but
> >vilemode and keymode aren't.
> >
> >So, what xxx.keywords file is used when one is in (say) vilemode?
> 
> vilemode is a special case: if it's not built with external filters,
> vilemode uses vile's own symbol tables to get the keywords to highlight.
> (It could be improved, but I generally find the result usable).
> 
It's not very wrong, it's just that a couple of things get
bold/bright where they shouldn't.

For example, in the following snippet from my .vilerc file:-

    22 store-macro
        ~force execute-hypertext-command
        ~if &not $status
            ~force forward-character-to-eol
        ~endif
    ~endm

Vile comes up (as expected) in vilemode.  On the 'correct' systems
the '22' is red and the ~xxxxx are blue, however on the 'incorrect'
systems the '22' is bright red and the ~xxxxx are bright blue.  It's
only some file types where this is happening though.  On the
'incorrect' systems C code, for example, has all the highlighting
correct including some in blue and red (as opposed to bright blue
and bright red).

On both systems the "&not $status" is bright blue.

My vile.keywords is:-

    : $Id: vile.key,v 1.7 1999/03/08 11:50:25 tom Exp $
    : customize this file with the global default values for highlighting 
attributes
    .class Type:C4
    .class Action:BC5
    .class Comment:C2
    .class Ident:C0
    .class Ident2:BC0
    .class Keyword:BC4
    .class Keyword2:BC5
    .class Literal:C1
    .class Number:BC1
    .class Preproc:C5

That looks to me as if the 'incorrect' systems are actually 'correct'
as red is colour 1 so, presumably, "Number:BC1" means that numbers are
in bright red.  The question now is why some systems are showing that
number in ordinary red.  I think the blues are correct on the
'correct' system though, very confusing!

-- 
Chris Green




reply via email to

[Prev in Thread] Current Thread [Next in Thread]