" Vim syntax file " Language: m4basic " Maintainer: Peter van Eerten " Last Change: September 20, 2014 if version < 600 syntax clear elseif exists("b:current_syntax") finish endif " m4basic keywords syn keyword basicStatement PRINT INPUT WHILE DO WEND REPEAT UNTIL FOR TO STEP NEXT LET SET BREAK syn keyword basicStatement DECLARE STRING INTEGER FLOAT END IF THEN ELIF ELSE ENDIF FI INCR DECR syn keyword basicStatement GOTO LABEL SYSTEM OPEN CLOSE READLN WRITELN REWIND SLEEP CONST FREE NL syn keyword basicStatement TYPE FORMAT AS READING READWRITE APPENDING WRITING POKE MEMTYPE SUB syn keyword basicStatement ENDSUB FUNC ENDFUNC RETURN DEFFN CONTINUE CALL FROM SEEK OFFSET CLEAR syn keyword basicStatement GOTOXY BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE COLOR RESET syn keyword basicStatement BACKGROUND FOREGROUND " m4basic functions syn keyword basicFunction ABS ADDRESS AND ASC CHR COS DEC ENDFILE EQUAL EVEN EXP HEX CONCAT RANDOM syn keyword basicFunction FILEEXISTS FLOOR INSTR INT ISFALSE ISTRUE LEFT LEN LOG MID MOD TELL VAL syn keyword basicFunction NOT ODD OR POW RIGHT ROUND SGN SIN SIZEOF SQR STR PEEK MEMORY GETENV " BACON constants syn keyword basicConstant TRUE FALSE PI RETVAL COLUMNS ROWS "integer number, or floating point number without a dot. syn match basicNumber "\<\d\+\>" "floating point number, with dot syn match basicNumber "\<\d\+\.\d*\>" "floating point number, starting with a dot syn match basicNumber "\.\d\+\>" " String and Character contstants syn match basicSpecial contained "\\\d\d\d\|\\." syn region basicString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=basicSpecial syn region basicComment start="REM" end="$" contains=basicTodo syn keyword basicTypeSpecifier int double float long char short void signed unsigned static const syn keyword basicTypeSpecifier FILEPTR syn match basicTypeSpecifier "[a-zA-Z0-9]"ms=s+1 syn match basicMathsOperator "-\|=\|[:<>+\*^/\\]" if version >= 508 || !exists("did_basic_syntax_inits") if version < 508 let did_basic_syntax_inits = 1 command -nargs=+ HiLink hi link else command -nargs=+ HiLink hi def link endif hi def link basicStatement Statement hi def link basicstrFunction Identifier hi def link basicFunction Identifier hi def link basicNumber Number hi def link basicString String hi def link basicComment Comment hi def link basicSpecial Special hi def link basicTodo Todo hi def link basicTypeSpecifier Type hi def link basicConstant Constant hi def link basicstrConstant Constant hi def link basicFilenumber basicTypeSpecifier hi basicMathsOperator term=bold cterm=bold gui=bold delcommand HiLink endif let b:current_syntax = "m4basic"