Configuring Ruby Styles

The following section describes the color settings related to the Ruby language. These settings are available from the File Types tab of the Settings dialog by selecting the "Ruby" category shown in the dialog below.

 

       

 

The following table describes the list of lexer settings that may be configured for the Ruby language type.

 

Lexer Setting

Description

Brace Highlighting

The Brace Highlighting category occurs when the cursor is adjacent to an opening brace that is matched by a closing brace or vice versa. Brace matching occurs on the following set of braces:

 

( and)

{ and }

[ and ]

 

The following example demonstrates this category:

 

    

 

In this case the opening ( of the print statement and its closing ) match and are categorized under brace highlighting and highlighted in the color and font specified by the user (red in this case).

 

Class Names

The Class Names category applies to any class definitions declared in a Python file. It does not apply to class instantiations.

 

The following example demonstrates the highlighting of the class 'image':

 

    

 

In this case the class name image is categorized as a class name and is highlighted in the color and font specified by the user (purple in this case).

 

Comments

The Comments category applies to single line Python comments that begin with the # operator.

 

The following example demonstrates this category:

 

    

 

In this case the comments are categorized as such and highlighted in the color and font specified by the user (green in this case).

 

Default

The Default category really only applies to virtual space that is not occupied by characters or whitespace. In this case both the foreground color and the font settings have no purpose, only the background color is used. It is provided to allow the user to maintain a consistent color across all styles when changing the background color.

 

The following example demonstrates this category:

 

    

 

In this case all virtual space that is not occupied by characters or whitespace is categorized as the "Default" category and highlighted in the color and font specified by the user (grey in this case).

 

Method Names

The Method Names category is similar to the Class Names category but applies to any function definitions declared in a Python file. It does not apply to instantiations of those function calls.

 

The following example demonstrates the highlighting of two python functions:

 

    

 

In this case the methods drawLine and create are categorized as a method names and are highlighted in the color and font specified by the user (red in this case).

 

Identifiers

The Identifiers category applies to such things as variable names, function instantiations, function arguments, etc.

 

The following example demonstrates this category:

 

    

 

In this case the member variables width and height are categorized as identifiers and highlighted in the color and font specified by the user (red in this case).

 

Indent Guides

The Indent Guides category applies to the indent guides if they are displayed. Note that the font size does not apply. For more information please refer to the indent guides topic.

 

The following example demonstrates the this category:

 

    

 

In this case the indent guides are displayed and highlighted in the color and font specified by the user (red in this case).

 

Keywords

The Keywords category applies to the Python keywords that form part of the language standard. These directives are user configurable and may be specified by selecting the Keywords tab for the Python language type.

 

The following example demonstrates this category:

 

    

 

In this case the words def, and print are categorized as keywords and are highlighted in the color and font specified by the user (red in this case).

 

Line Numbers

The Line Numbers category applies to the line numbers displayed in the left hand column.

 

The following example demonstrates this category:

 

    

 

In this case the line numbers are highlighted in the color and font specified by the user (silver in this case).

 

Mismatched Brace

The Mismatched Brace category occurs when an opening brace has no closing brace or vice versa. This will only be displayed if the cursor currently located adjacent to the brace. Brace matching occurs on the following sets of braces:

 

( and)

{ and }

[ and ]

 

The following example demonstrates this category:

 

    

 

In this case the opening( in the method prototype list has no closing bracket so it is categorized as a mismatched and highlighted in the color and font specified by the user (red in this case).

 

Numbers

The Numbers category applies to any numbers contained in the file. Line numbers are categorized separately.

 

The following example demonstrates this category:

 

    

 

In this case both instances of the number 0 are categorized as numbers and are highlighted in the color and font specified by the user. (red in this case).

 

Open Strings

The Open Strings category applies to both single and double quoted strings that have not been closed by a corresponding closing single or double quote.

 

The following example demonstrates this category:

 

    

 

In this case the color"#0000FF is categorized as an open string because there is no closing quote at the end of the string. It is highlighted in the color and font specified by the user (red in this case).

 

Operators

The Operators category applies to any operators contained in the file such as +, -, ++, <, >, etc. Note that braces are highlighted in an alternate color if the cursor is adjacent. Refer to the Brace Highlight and Bad Brace categories for more information.

 

The following example demonstrates this category:

 

    

 

In this case the operators (, ), :, == and ; are categorized as operators and are highlighted in the color and font specified by the user. (red in this case).

 

Strings

The Strings category applies to strings that are enclosed in double or single quotes.

 

The following example demonstrates an example of this category:

 

   

 

In this case the strings enclosed in double quotes are categorized as such and highlighted in the color and font specified by the user (red in this case).

 

Whitespace and Control Characters

The Whitespace and Control characters category applies to any whitespace and control characters that are displayed.

 

The following example demonstrates this category:

 

    

 

In this case, any spaces, tabs or control characters are categorized as whitespace or control characters and highlighted in the color and font specified by the user (underlined red in this case).