" Vim syntax file " Language: Fvwm{1,2} configuration file " Maintainer: Haakon Riiser " Last Change: 2001 Apr 25 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if version < 600 syn clear elseif exists("b:current_syntax") finish endif " Fvwm configuration files are case insensitive syn case ignore if version >= 600 setlocal iskeyword=_,-,+,.,a-z,A-Z,48-57 else set iskeyword=_,-,+,.,a-z,A-Z,48-57 endif " Read system colors from the color database (rgb.txt) if exists("rgb_file") " We don't want any hit-return prompts, so we make sure that " &shortmess is set to `O' let __fvwm_oldshm = &shortmess set shortmess=O " And we set &report to a huge number, so that no hit-return prompts " will be given let __fvwm_oldreport = &report set report=10000 " Append the color database to the fvwm configuration, and read the " colors from this buffer let __fvwm_i = line("$") + 1 exe "$r" rgb_file let __fvwm_lastline = line("$") while __fvwm_i <= __fvwm_lastline let __fvwm_s = matchstr(getline(__fvwm_i), '^\s*\d\+\s\+\d\+\s\+\d\+\s\+\h.*$') if __fvwm_s != "" exe "syn keyword fvwmColors ".substitute(__fvwm_s, '^\s*\d\+\s\+\d\+\s\+\d\+\s\+\(\h.*\)$', '\1', "") endif let __fvwm_i = __fvwm_i + 1 endwhile " Remove the appended data undo " Goto first line again 1 " and restore the old values of the variables let &shortmess = __fvwm_oldshm let &report = __fvwm_oldreport unlet __fvwm_i __fvwm_s __fvwm_lastline __fvwm_oldshm __fvwm_oldreport endif " done reading colors syn match fvwmWhitespace "\s\+" contained syn match fvwmEnvVar "\$\w\+" syn match fvwmModConf "^\s*\*\a\+" contains=fvwmWhitespace syn match fvwmString '".\{-}"' syn match fvwmRGBValue "#\x\{3}" syn match fvwmRGBValue "#\x\{6}" syn match fvwmRGBValue "#\x\{9}" syn match fvwmRGBValue "#\x\{12}" syn match fvwmRGBValue "rgb:\x\{1,4}/\x\{1,4}/\x\{1,4}" syn match fvwmPath "\= 508 || !exists("did_fvwm_syntax_inits") if version < 508 let did_fvwm_syntax_inits = 1 command -nargs=+ HiLink hi link else command -nargs=+ HiLink hi def link endif HiLink fvwmComment Comment HiLink fvwmEnvVar Macro HiLink fvwmExec Function HiLink fvwmFunction Function HiLink fvwmIcon Comment HiLink fvwmKey Function HiLink fvwmKeyword Keyword HiLink fvwmMenuString String HiLink fvwmModConf Macro HiLink fvwmModule Function HiLink fvwmRGBValue Type HiLink fvwmShortcutKey SpecialChar HiLink fvwmString String if exists("rgb_file") HiLink fvwmColors Type endif delcommand HiLink endif let b:current_syntax = "fvwm" " vim: sts=4 sw=4 ts=8