File: m_ruby.fte

package info (click to toggle)
fte 0.50.2b6-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,596 kB
  • ctags: 6,433
  • sloc: cpp: 47,985; ansic: 2,795; sh: 112; makefile: 105; perl: 29
file content (89 lines) | stat: -rw-r--r-- 3,121 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
colorize Ruby {

        SyntaxParser        = 'SIMPLE';

        color {
                { 'Normal',      'Editor_Default' },
                { 'Number',      'Lang_Number' },
                { 'Punctuation', 'Lang_Punctuation' },
                { 'String',      'Lang_String' },
                { 'Comment',     'Lang_Comment' },
                { 'Function',    'Lang_Function' },
                { 'Regexp',      'Lang_Regexp' },
        };

        keyword 'Editor_Keywords' {
                'if', 'else', 'elsif', 'while', 'case', 'when', 'unless',
                   'until', 'for', 'in', 'loop', 'then', 'do',
                'return', 'break', 'next', 'redo', 'retry', 'rescue', 'ensure',
                'def', 'begin', 'end', 'yield', 'proc', 'class', 'module',
                'nil', 'TRUE', 'true', 'FALSE', 'false', 'self', 'super',
                  '__LINE__', '__FILE__',
                'not', 'or', 'and',
                'defined', 'undef',
                'attr_reader', 'attr_writer', 'attr_accessor',
                'alias',
                'include', 'load', 'require'
        };

        h_state 0 { 'Normal' }
        h_trans { 5, '-s', 'a-zA-Z_', 'Normal' }
        h_trans { 1, '', '#', 'Comment' }
        h_trans { 1, '^', '=begin', 'Comment' }
#        h_trans { 1, '', '//', 'Comment' }
        h_trans { 3, '', '"', 'String' }
        h_trans { 4, '', '\'', 'String' }
        h_trans { 6, 's', '0-9', 'Number' }
        h_trans { 7, '', '/', 'String' }
        h_trans { 0, 'S', '_a-zA-Z0-9', 'Punctuation' }

        h_state 1 { 'Comment' }  # single line comment
        h_trans { 0, '$', '', 'Normal' }

        h_state 2 { 'Comment' }  # multiline comment
        h_trans { 0, '^', '=end', 'Comment' }

        h_state 3 { 'String' }   # Single quote
        h_trans { 0, '', '"', 'String' }
        h_trans { 0, '$', '', 'String' }
        h_trans { 4, 'Qq', '\\', 'String' }

        h_state 4 { 'String' }   # Double quote
        h_trans { 0, '', '\'', 'String' }
        h_trans { 0, '$', '', 'String' }

        h_state 5 { 'Normal' }
        h_trans { 0, '$', '', 'Normal' }
#        h_trans { 0, '', '[a-zA-Z_][a-zA-Z0-9_]*', 'Function' }
        h_wtype { 0, 0, 0, '', 'a-zA-Z0-9_' }

        h_state 6 { 'Number' }
        h_trans { 0, '-S', '0-9', 'Normal' }
        h_trans { 0, '$', '', 'Normal' }

        h_state 7 { 'Regexp' }  # Regular Expressions
        h_trans { 7, '', '\\/', 'Regexp' }
        h_trans { 0, 's', '/', 'String' }
}




mode Ruby: PLAIN {               # Ruby mode
        FileNameRx          = '\\.{rb}|{ruby}$';
        Colorizer           = 'Ruby';
        HilitOn             = 1;
        AutoIndent          = 1;
        IndentMode          = 'PLAIN';
        TabSize             = 8;
        SpaceTabs           = 1;
        MatchCase           = 1;
        Trim                = 1;
        MultiLineHilit      = 0;
        AutoHilitParen      = 1;
        RoutineRegexp       = /^\s*{def}\s/;
        SaveFolds           = 2;      # save fold info at end of line
        CommentStart        = ' #';
        CommentEnd          = '';
}