home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / fte0827.zip / config / m_siod.fte < prev    next >
Text File  |  1999-05-16  |  6KB  |  182 lines

  1. # From: Keith Humphreys <keith@ViaThe.Net>
  2. #
  3. # FTE is wonderful.
  4. # Several months ago I was looking at SIOD, and I hacked a "fte config" file
  5. # which is 98% accurate. :-)  
  6. # Anyway, as it might be of use, here it is:
  7.  
  8. # ! colors probably need fixing --Mark
  9.  
  10. colorize SIOD {
  11.     SyntaxParser       = 'SIMPLE';
  12.     #   0, 8 - black
  13.     #   1, 9 - blue
  14.     #   2, A - green
  15.     #   3, B - cyan
  16.     #   4, C - red
  17.     #   5, D - magenta
  18.     #   6, E - orange
  19.     #   7, F - white
  20.  
  21.  
  22.     # Hmmm, it appears that exit and quit aren't even recommended!
  23.     keyword 'yellow:bg' { #Scheme's essential procedures:.
  24.         'abs', 'alarm', 'and', 'append', 'apply',
  25.         'ass', 'assoc', 'assq', 'assv',   
  26.         'base64decode', 'base64encode', 'begin',    
  27.         'caaar', 'caadr', 'caar', 'cadar', 'caddr', 'cadr', 'car',
  28.         'cdaar', 'cdadr', 'cdar', 'cddar', 'cdddr', 'cddr', 'cdr',
  29.         'cond', 'cons-array', 'define',
  30.         'eq?', 'equal?', 'eqv?', 'eval', 'exec', 'exit',
  31.         'fclose',  'fopen',
  32.         'if',
  33.         'lambda', 'length', 'let', 'let*', 'letrec', 'list', 'load',
  34.         'max', 'min',
  35.         'member', 'memq', 'memv',
  36.         'nil', 'not', 'null?', 'number?', 'number->string',
  37.         'or',
  38.         'pair?',
  39.         'quit',  'quote',
  40.         'set!', 'set-car!', 'set-cdr!',
  41.         'string->number', 'string-length',  'string?', 'string-append',
  42.          'substring',
  43.         'symbol?',
  44.         'read', 'reverse',
  45.     };
  46.  
  47.     keyword  'brown:bg' { #These are recommended by the standard.
  48.         'acos', 'asin', 'atan', 'cos', 'exp', 'log', 'sin',  'tan',
  49.         'sqrt',
  50.  
  51.     };
  52.  
  53.     #note: varables t, nil have been removed from the standard,
  54.     #      but are here.
  55.     keyword 'white:bg' { #These are siod extras.
  56. '%%%memref', '%%closure', '%%closure-code', '%%closure-env', '%%stack-limit',
  57. '*after-gc*', '*args*', '*catch', '*env*', '*eval-history-ptr*', '*pi*',
  58. '*plists*', '*throw', '*traced*',
  59. 'F_GETLK', 'F_SETLK', 'F_SETLKW',
  60. 'access-problem?',  'allocate-heap', 'apropos',
  61. 'aref', 'array->hexstr', 'aset', 'ash',  'atan2',
  62. 'benchmark-eval', 'benchmark-funcall1', 'benchmark-funcall2',
  63. 'bit-and', 'bit-not', 'bit-or', 'bit-xor', 'butlast', 'bytes-append',
  64. 'chdir', 'chmod', 'chown', 'closedir',  'copy-list',
  65. 'cpu-usage-limits', 'crypt', 'current-resource-usage',
  66. 'datlength', 'datref', 'decode-file-mode', 'delete-file', 'delq',
  67. 'encode-file-mode', 'encode-open-flags', 'endpwent', 'env-lookup', 'eof-val',
  68. 'errobj', 'error', 
  69. 'fast-load', 'fast-print', 'fast-read', 'fast-save', 'fchmod',
  70. 'fflush', 'file-times', 'first', 'fmod', 'fnmatch', 'fork',
  71. 'fread', 'fseek', 'fstat', 'ftell', 'fwrite',
  72. 'gc', 'gc-info', 'gc-status', 'get', 'getc', 'getcwd', 'getenv', 'getgid',
  73. 'getgrgid', 'getpass', 'getpgrp', 'getpid', 'getppid', 'getpwent',
  74. 'getpwnam', 'getpwuid', 'gets', 'getuid', 'gmtime', 'hexstr->bytes',
  75. 'href', 'hset', 'html-encode',
  76. 'intern',
  77. 'kill',
  78. 'larg-default', 'last', 'last-c-error', 'lchown',
  79. 'link', 'lkey-default', 'load-so',
  80. 'localtime', 'lref-default', 'lstat',
  81. 'make-list', 'mapcar',  'md5-final', 'md5-init', 'md5-update',
  82. 'mkdatref', 'mkdir', 'mktime',
  83. 'nconc', 'nice',  'nreverse', 'nth',
  84. 'opendir',  'os-classification',
  85. 'parse-number', 'pclose', 'popen', 'pow',
  86. 'prin1', 'print', 'print-to-string', 'prog1',
  87. 'putc', 'putenv', 'putprop', 'puts',
  88. 'qsort',
  89. 'rand', 'random',
  90. 'read-from-string', 'readdir', 'readline', 'readlink',
  91. 'realtime', 'rename', 'require', 'require-so', 'rest',
  92. 'rld-pathnames', 'rmdir', 'runtime',
  93. 'save-forms', 'sdatref', 'set-eval-history',
  94. 'set-symbol-value!', 'setprop', 'setpwent', 'setuid',
  95. 'siod-lib', 'sleep', 'so-ext', 'srand', 'srandom', 'stat',
  96. 'strbreakup', 'strcat', 'strcmp', 'strcpy', 'strcspn', 'strftime',
  97. 'string-dimension', 'string-downcase',
  98. 'string-lessp', 'string-search', 'string-trim',
  99. 'string-trim-left', 'string-trim-right', 'string-upcase',
  100. 'strptime', 'strspn', 'subset', 'substring-equal?',
  101. 'swrite', 'sxhash', 'symbol-bound?', 'symbol-value', 
  102. 'symbolconc', 'symlink', 'system',
  103. 't', 'the-environment', 'trace', 'trunc', 'typeof',
  104. 'unbreakupstr', 'ungetc', 'unix-ctime', 'unix-time', 'unix-time->strtime',
  105. 'unlink', 'untrace', 'url-decode', 'url-encode', 'utime',
  106. 'verbose',
  107. 'wait', 'while', 'writes', 
  108.     };
  109.  
  110.     color {
  111.         { 'Normal',      'Editor_Default' },
  112.         { 'Number',      'Lang_DecimalNumber' },
  113.         { 'HexNumber',   'Lang_HexNumber' },
  114.         { 'Punctuation', 'Lang_Punctuation' },
  115.         { 'String',      'Lang_String' },
  116.         { 'Symbol',      'Lang_Command' },
  117.         { 'Comment',     'Lang_Comment' },
  118.         { 'Special',     'Lang_Control' },
  119.     };
  120.     
  121.     h_state 0 { 'Normal' }
  122.     h_trans { 1, '-s', 'A-Za-z_%*', 'Normal' }  #Keyword starters.
  123.     h_trans { 2, '<', ';', 'Comment' }
  124.     h_trans { 3, '>', '\'', 'Symbol' }
  125.     h_trans { 4, '>', '0x', 'HexNumber' }
  126.     h_trans { 5, '>s', '0-9', 'Number' }
  127.     h_trans { 6, '>', '"', 'String' }
  128.     h_trans { 0, 's', '()', 'Special' }
  129. #    h_trans { 0, '', ',', 'Punctuation' }
  130.  
  131.     h_state 1 { 'Normal' }
  132.     h_trans { 0, '$', '', 'Normal' }
  133.     h_trans { 2, '<', ';', 'Comment'}
  134.     h_wtype { 0, 0, 0, '', '-a-zA-Z0-9_*%:?!>' }  #Keyword internals
  135.  
  136.     h_state 2 { 'Comment' }
  137.     h_trans { 0, '$', '', 'Comment' }
  138.  
  139.     h_state 3 { 'Symbol' }
  140.     h_trans { 2, '<', ';', 'Comment'}
  141.     h_trans { 0, '>', ' ', 'Normal' }
  142.     h_trans { 0, '$', '', 'Normal' }
  143.     h_trans { 0, '>s', '()', 'Special' }
  144.     
  145.     h_state 4 { 'HexNumber' }
  146.     h_trans { 0, '-S', '0-9A-Fa-f', 'Normal' }
  147.     h_trans { 0, '$', '', 'Normal' }
  148.  
  149.     h_state 5 { 'Number' }
  150.     h_trans { 0, '-S', '0-9', 'Normal' }
  151.     h_trans { 0, '$', '', 'Normal' }
  152.  
  153.     h_state 6 { 'String' }
  154.     h_trans { 0, '<', '"', 'String' }
  155.     h_trans { 6, 'q', '\\', 'String' } # 'q' "igores" next char.
  156.  
  157. }
  158.  
  159. mode SIOD: PLAIN {      # siod Mode
  160.     FileNameRx          = /\.\cscm$/;
  161.     HilitOn             = 1;
  162.     Colorizer           = 'SIOD';
  163.     AutoIndent          = 1;
  164.     IndentMode          = 'PLAIN';
  165.     TabSize             = 2;
  166.     SpaceTabs           = 1;
  167.     MatchCase           = 0;  #scheme is case insensitive.
  168.     Trim                = 1;
  169.     MultiLineHilit      = 1;
  170.     AutoHilitParen      = 1;
  171.  
  172.     SaveFolds           = 2;      # save fold info at end of line
  173.     CommentStart        = ' ;';
  174.     CommentEnd          = '';
  175.  
  176.     WordChars           = '-A-Za-z0-9*%:?!>';  #first noticed in m_plain.fte
  177.  
  178. #    RoutineRegexp       = '(';
  179. }
  180.  
  181.