[SVN] Naming convention

Mats Persson mats at imediatec.co.uk
Fri Apr 22 10:14:04 UTC 2005


OK, some of my thoughts, which may go slightly outside of the original 
scope of this thread:


1.	 The main themes being: Bright, Dark & Grey.  I think we should 
consider themes along these lines:
Bright vs Dark
Low vs Hi Contrast.
Sharp vs Subtle
Sunny vs Cloudy ( as in ambient room light )

Essentially trying to cater for people with different vision 
'problems', and also making things more easy to understand for new 
comers. A theme named 'Grey' is a bit "what the hell does that mean ?" 
for me. No offence Allan ;)


2.	In the naming structures, we should change the current 'White, Dark 
& Grey backgrounds' Settings Groups to:

<themeName> Common  or <themeName> General

In these Common/General Settings Groups we should define a standard 
group of items along the lines of the root items of each category 
group, sort of like this:

comments
strings
keywords
keywords.functions
constants
variables
etc. etc.

All other specific sub items,  should then be defined Language specific 
Settings files. So for instance, "keywords.functions.apache" would be 
defined in the PHP settings file, and so on.  The main aim here is to 
remove the constant updates to the general items of the highlighting 
scheme and keep a user's common definitions working even though we 
might add/change Language specific items.


I hope I make sense in the above points, as I hope it would make things 
easier for most people to use.  If I just want a basic styling I just 
enable the Common/General Settings group in a theme, but if want more 
specific highlighting for my language I would enable that Settings 
group as well.


Structured Naming conventions:  (added a few new ones as well)

declaration name
|-> declaration.classes class-inheritance
|-> declaration.classes class-name
|-> declaration.functions function-argument
|-> declaration.functions function-name


comments
|-> comments.line
|-> comments.block

constants
|-> constants.numeric
|-> constants.character-entities
|-> constants.*  (std/core-predefined)

keywords
|-> keywords.exceptions
|-> keywords.identifiers

|-> keywords.functions
	|-> keywords.functions.* (built-in / whatever)

|-> keywords.control
|-> keywords.constructs

|-> keywords.operators
	|-> keywords.operators.* (specifics like logical/comparisson/etc)

|-> keywords.markup
	|-> keywords.markup.elements
	|-> keywords.markup.attributes

|-> keywords.reserved
|-> keywords.objects
|-> keywords.properties
|-> keywords.event-handlers

strings
|-> strings.single-quoted
|-> strings.double-quoted
|-> strings.regexp

variables   (alt. =  keywords.variables )
|-> variables.complex
|-> variables.global

invalid
|-> invalid.trailing-whitespace
|-> invalid.bad-comma

meta


Just my 1/2 cent's worth ;-)


Kind regards,

Mats

----
"TextMate, coding with an incredible sense of joy and ease"
- www.macromates.com -




More information about the textmate-dev mailing list