diff options
Diffstat (limited to 'runtime/syntax/lout.vim')
-rw-r--r-- | runtime/syntax/lout.vim | 81 |
1 files changed, 33 insertions, 48 deletions
diff --git a/runtime/syntax/lout.vim b/runtime/syntax/lout.vim index 9a34328ac..e7a1e1562 100644 --- a/runtime/syntax/lout.vim +++ b/runtime/syntax/lout.vim @@ -16,11 +16,8 @@ " See the discussion at http://thread.gmane.org/gmane.editors.vim.devel/32151 -" For version 5.x: Clear all syntax items -" For version 6.x: Quit when a syntax file was already loaded -if version < 600 - syntax clear -elseif exists("b:current_syntax") +" quit when a syntax file was already loaded +if exists("b:current_syntax") finish endif @@ -36,11 +33,7 @@ syn sync lines=1000 " Characters allowed in keywords " I don't know if 128-255 are allowed in ANS-FORHT -if version >= 600 - setlocal iskeyword=@,48-57,.,@-@,_,192-255 -else - set iskeyword=@,48-57,.,@-@,_,192-255 -endif +setlocal iskeyword=@,48-57,.,@-@,_,192-255 " Some special keywords syn keyword loutTodo contained TODO lout Lout LOUT @@ -106,44 +99,36 @@ syn region loutBoldItalic matchgroup=loutBIBraces start='@BI\s*{' matchgroup=lou syn region loutHeadings matchgroup=loutHeads start='@\(\(Title\)\|\(Caption\)\)\s*{' matchgroup=loutHeads end='}' contains=ALLBUT,loutBraceError " Define the default highlighting. -" For version 5.7 and earlier: only when not done already -" For version 5.8 and later: only when an item doesn't have highlighting yet -if version >= 508 || !exists("did_lout_syn_inits") - if version < 508 - let did_lout_syn_inits = 1 - command -nargs=+ HiLink hi link <args> - else - command -nargs=+ HiLink hi def link <args> - endif - - " The default methods for highlighting. Can be overrriden later. - HiLink loutTodo Todo - HiLink loutDefine Define - HiLink loutEOmlDef Define - HiLink loutFunction Function - HiLink loutBraceError Error - HiLink loutNULL Special - HiLink loutComment Comment - HiLink loutSpecial Special - HiLink loutSymbols Character - HiLink loutInclude Include - HiLink loutKeyword Keyword - HiLink loutTag Tag - HiLink loutMath Number - - " HiLink Not really needed here, but I think it is more consistent. - HiLink loutMBraces loutMath - hi loutItalic term=italic cterm=italic gui=italic - HiLink loutIBraces loutItalic - hi loutBold term=bold cterm=bold gui=bold - HiLink loutBBraces loutBold - hi loutBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic - HiLink loutBIBraces loutBoldItalic - hi loutHeadings term=bold cterm=bold guifg=indianred - HiLink loutHeads loutHeadings - - delcommand HiLink -endif +" Only when an item doesn't have highlighting yet +command -nargs=+ HiLink hi def link <args> + +" The default methods for highlighting. Can be overrriden later. +HiLink loutTodo Todo +HiLink loutDefine Define +HiLink loutEOmlDef Define +HiLink loutFunction Function +HiLink loutBraceError Error +HiLink loutNULL Special +HiLink loutComment Comment +HiLink loutSpecial Special +HiLink loutSymbols Character +HiLink loutInclude Include +HiLink loutKeyword Keyword +HiLink loutTag Tag +HiLink loutMath Number + +" HiLink Not really needed here, but I think it is more consistent. +HiLink loutMBraces loutMath +hi loutItalic term=italic cterm=italic gui=italic +HiLink loutIBraces loutItalic +hi loutBold term=bold cterm=bold gui=bold +HiLink loutBBraces loutBold +hi loutBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic +HiLink loutBIBraces loutBoldItalic +hi loutHeadings term=bold cterm=bold guifg=indianred +HiLink loutHeads loutHeadings + +delcommand HiLink let b:current_syntax = "lout" |