diff --git a/syntax/nimrod.vim b/syntax/nimrod.vim index 9f4a9d3..da8f80c 100644 --- a/syntax/nimrod.vim +++ b/syntax/nimrod.vim @@ -1,32 +1,3 @@ -" Vim syntax file -" Language: Nimrod -" Maintainer: Kearn Holliday (thekearnman at gmail dot com) -" Updated: 2009-05-15 -" -" Options to control nimrod syntax highlighting: -" -" For highlighted numbers: -" - let nimrod_highlight_numbers = 1 -" -" For highlighted builtin functions: -" - let nimrod_highlight_builtins = 1 -" -" For highlighted standard exceptions: -" - let nimrod_highlight_exceptions = 1 -" -" Highlight erroneous whitespace: -" - let nimrod_highlight_space_errors = 1 -" -" If you want all possible nimrod highlighting (the same as setting the -" preceding options): -" -" let nimrod_highlight_all = 1 -" - " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 @@ -35,43 +6,19 @@ elseif exists("b:current_syntax") finish endif -syn region nimrodBrackets contained extend keepend matchgroup=Bold start=+\(\\\)\@" - syn match nimrodNumber "\<\d\+[LljJ]\=\>" - syn match nimrodNumber "\.\d\+\([eE][+-]\=\d\+\)\=[jJ]\=\>" - syn match nimrodNumber "\<\d\+\.\([eE][+-]\=\d\+\)\=[jJ]\=\>" - syn match nimrodNumber "\<\d\+\.\d\+\([eE][+-]\=\d\+\)\=[jJ]\=\>" + syn match nimrodNumber "\<[0-9_]\+[LljJ]\=\>" + syn match nimrodNumber "\.[0-9_]\+\([eE][+-]\=[0-9_]\+\)\=[jJ]\=\>" + syn match nimrodNumber "\<[0-9_]\+\.\([eE][+-]\=[0-9_]\+\)\=[jJ]\=\>" + syn match nimrodNumber "\<[0-9_]\+\.[0-9_]\+\([eE][+-]\=[0-9_]\+\)\=[jJ]\=\>" endif if exists("nimrod_highlight_builtins") @@ -153,29 +146,34 @@ if version >= 508 || !exists("did_nimrod_syn_inits") endif " The default methods for highlighting. Can be overridden later - HiLink nimrodBrackets Operator - HiLink nimrodStatement Statement - HiLink nimrodFunction Function - HiLink nimrodConditional Conditional - HiLink nimrodRepeat Repeat - HiLink nimrodString String - HiLink nimrodRawString String - HiLink nimrodEscape Special - HiLink nimrodOperator Operator - HiLink nimrodPreCondit PreCondit - HiLink nimrodComment Comment - HiLink nimrodTodo Todo - HiLink nimrodDecorator Define - if exists("nimrod_highlight_numbers") + HiLink nimrodBrackets Operator + HiLink nimrodKeyword Keyword + HiLink nimrodFunction Function + HiLink nimrodConditional Conditional + HiLink nimrodRepeat Repeat + HiLink nimrodString String + HiLink nimrodRawString String + HiLink nimrodBoolean Boolean + HiLink nimrodEscape Special + HiLink nimrodOperator Operator + HiLink nimrodPreCondit PreCondit + HiLink nimrodComment Comment + HiLink nimrodTodo Todo + HiLink nimrodDecorator Define + + if nimrod_highlight_numbers == 1 HiLink nimrodNumber Number endif - if exists("nimrod_highlight_builtins") + + if nimrod_highlight_builtins == 1 HiLink nimrodBuiltin Number endif - if exists("nimrod_highlight_exceptions") + + if nimrod_highlight_exceptions == 1 HiLink nimrodException Exception endif - if exists("nimrod_highlight_space_errors") + + if nimrod_highlight_space_errors == 1 HiLink nimrodSpaceError Error endif