Style 'tags' are defined...where?

3 views
Skip to first unread message

Stephen Hansen

unread,
Nov 25, 2009, 1:11:58 PM11/25/09
to peppy-dev
Hi all.

I'm experimenting with Peppy, as I'm doing a lot more switching back
and forth between my Mac and Windows installations while working and
going from TextMate to blah-random-editor on Windows makes me sad. So,
I want a consistent editor across both environments.

In Edit->Text Styles, there's all kinds of style tags -- and a lot of
them I'm not precisely clear on *what* they are supposed to be
matching. But through some trial and error, I've found out some and
done a few 'fixes' (to my taste, of course) to work on getting a theme
that feels comfortable.

One problem I have is that 'self' appears to match 'keyword_style',
and that drives me batty. Self is a convention with enough momentum
behind it that it's *almost* a keyword, but I like the 'keyword'
colorings to be more control-flow and structure-ish... similarly, I
never like having 'print' colored as a keyword even though it *is*.

So! I dug around int he code and found the editra/style_specs.py file,
but I'm *really* hoping there's something more accessible then a big
ol' data file that I'm just missing :)

Thanks in advance.

--S

Rob McMullen

unread,
Nov 25, 2009, 10:02:13 PM11/25/09
to pepp...@googlegroups.com
On Wed, Nov 25, 2009 at 10:11 AM, Stephen Hansen <apt.s...@gmail.com> wrote:
> I'm experimenting with Peppy, as I'm doing a lot more switching back
> and forth between my Mac and Windows installations while working and
> going from TextMate to blah-random-editor on Windows makes me sad. So,
> I want a consistent editor across both environments.

That's what I'm talking about! That's why I keep hacking on peppy, so
I can use the same editor on multiple platforms.

> So! I dug around int he code and found the editra/style_specs.py file,
> but I'm *really* hoping there's something more accessible then a big
> ol' data file that I'm just missing :)

I'm borrowing all the styling stuff, including the dialog and the
style tags, from Editra. In the latest versions of peppy I'm
pre-compiling all that style stuff into a big python dict, which is
what you found. When I get over my food coma this weekend, I'll take
a look at the code and expose the keyword lists in the preferences
page so you can add and remove items to suit your tastes.

Rob

Rob McMullen

unread,
Nov 30, 2009, 6:58:49 PM11/30/09
to pepp...@googlegroups.com
On Wed, Nov 25, 2009 at 10:11 AM, Stephen Hansen <apt.s...@gmail.com> wrote:
> So! I dug around int he code and found the editra/style_specs.py file,
> but I'm *really* hoping there's something more accessible then a big
> ol' data file that I'm just missing :)

Took a bit longer than I thought it would (what doesn't!) but give
0.13.2 (or the current svn) a try. I've added keyword_set_* options
to the preferences.

It's still not marked in the user interface as to which keyword_set
goes with which style name, so I've got to supply that once I figure
out a way to make that work. The problem is that it's not consistent
in the way Scintilla defines the style numbers (using SetStyleSpec)
and the keyword sets (using SetKeyWords).

Rob

Stephen Hansen

unread,
Dec 1, 2009, 11:51:49 PM12/1/09
to pepp...@googlegroups.com
Nice. At some point it might be cool to expose more of the actual style details/style patterns -- as ultimately, it'd be cool to put self somewhere else less imposing as keyword colorings. But this is good enough for now :)

Now, if only I can find just where the ctags executable is set again in preferences, I seem to have lost it!

:)

--S 

Rob McMullen

unread,
Dec 2, 2009, 8:19:05 PM12/2/09
to pepp...@googlegroups.com
Sorry, meant to reply last night...

On Tue, Dec 1, 2009 at 8:51 PM, Stephen Hansen <apt.s...@gmail.com> wrote:
> Nice. At some point it might be cool to expose more of the actual style
> details/style patterns -- as ultimately, it'd be cool to put self somewhere
> else less imposing as keyword colorings. But this is good enough for now :)

It's somewhat limited by scintilla, so I haven't tried to do much
customization above what scintilla gives you for
styles/fonts/colors...

> Now, if only I can find just where the ctags executable is set again in
> preferences, I seem to have lost it!

It's in two places: either Edit -> Preferences... -> Plugins ->
Project Plugin, or alternatively the same interface is presented in
Project -> Project Settings... -> Global Project Settings.

Rob
Reply all
Reply to author
Forward
0 new messages