153 lines · 6.5 KB · Text
RawDownload
" Vim ABAP syntax file"    Language: SAP - ABAP/R4"    Revision: 1.0"  Maintainer: Marius Piedallu van Wyk <marius@e.co.za>" Last Change: 2006 Apr 13 " For version  < 6.0: Clear all syntax items" For version >= 6.0: Quit when a syntax file was already loadedif version < 600  syntax clearelseif exists("b:current_syntax")  finishendif " Always ignore casesyn case ignore " Symbol Operatorssyn match   abapSymbolOperator  "[+\-/=<>$]"syn match   abapSymbolOperator  "\*"syn match   abapSymbolOperator  "[<>]="syn match   abapSymbolOperator  "<>"syn match   abapSymbolOperator  "\*\*"syn match   abapSymbolOperator  "[()]"syn match   abapSymbolOperator  "[:,\.]" " Literalssyn region  abapString matchgroup=abapString start="'" end="'" contains=abapStringEscapesyn match   abapStringEscape contained "''" syn match   abapNumber  "-\=\<\d\+\>"syn region  abapHex     matchgroup=abapHex start="X'" end="'" if version >= 600  setlocal iskeyword=-,48-57,_,A-Z,a-zelse  set iskeyword=-,48-57,_,A-Z,a-zendif " ABAP statementssyn keyword abapStatement ADD ADD-CORRESPONDING ASSIGN AT AUTHORITY-CHECKsyn keyword abapStatement BACK BREAK-POINTsyn keyword abapStatement CALL CASE CHECK CLEAR CLOSE CNT COLLECT COMMIT COMMUNICATION COMPUTE CONCATENATE CONDENSE CONSTANTS CONTINUE CONTROLS CONVERT CREATE CURRENCYsyn keyword abapStatement DATA DEFINE DELETE DESCRIBE DETAIL DIVIDE DIVIDE-CORRESPONDING DOsyn keyword abapStatement EDITOR-CALL ELSE ELSEIF END-OF-DEFINITION END-OF-PAGE END-OF-SELECTION ENDAT ENDCASE ENDDO ENDEXEC ENDFORM ENDFUNCTION ENDIF ENDIFEND ENDLOOP ENDMODULE ENDON ENDPROVIDE ENDSELECT ENDWHILE EXEC EXPORT EXPORTING EXTRACTsyn keyword abapStatement FETCH FIELD-GROUPS FIELD-SYMBOLS FIELDS FORM FORMAT FREE FUNCTION FUNCTION-POOLsyn keyword abapStatement GENERATE GETsyn keyword abapStatement HIDEsyn keyword abapStatement IF IMPORT IMPORTING INDEX INFOTYPES INITIALIZATION INPUT INSERTsyn keyword abapStatement LEAVE LIKE LOAD LOCAL LOOPsyn keyword abapStatement MESSAGE MODIFY MODULE MOVE MOVE-CORRESPONDING MULTIPLY MULTIPLY-CORRESPONDINGsyn keyword abapStatement NEW-LINE NEW-PAGE NEW-SECTIONsyn keyword abapStatement ON OVERLAYsyn keyword abapStatement PACK PARAMETERS PERFORM POSITION PRINT-CONTROL PROGRAM PROVIDE PUTsyn keyword abapStatement RAISE RANGES READ RECEIVE REFRESH REJECT REPLACE REPORT RESERVE RESTORE ROLLBACK RP-PROVIDE-FROM-LASTsyn keyword abapStatement SCAN SCROLL SEARCH SELECT SELECT-OPTIONS SELECTION-SCREEN SET SHIFT SKIP SORT SPLIT START-OF-SELECTION STATICS STOP SUBMIT SUBTRACT SUBTRACT-CORRESPONDING SUM SUMMARY SUPPRESS SYNTAX-CHECK SYNTAX-TRACEsyn keyword abapStatement TABLES TOP-OF-PAGE TRANSFER TRANSLATE TYPE TYPE-POOL TYPE-POOLS TYPESsyn keyword abapStatement UNPACK UPDATEsyn keyword abapStatement WHEN WHILE WINDOW WRITE " More statemetssyn keyword abapStatement OCCURS STRUCTURE OBJECT PROPERTYsyn keyword abapStatement CASTING APPEND RAISING VALUE COLORsyn keyword abapStatement LINE-SIZE LINE-COUNT MESSAGE-IDsyn keyword abapStatement CHANGING EXCEPTIONS DEFAULT CHECKBOX COMMENTsyn keyword abapStatement ID NUMBER FOR DISPLAY-MODE TITLE OUTPUT " More multi-word statementssyn match   abapStatement "\(\W\|^\)\(WITH\W\+\(HEADER\W\+LINE\|FRAME\|KEY\)\|WITH\)\(\W\|$\)"ms=s+1,me=e-1syn match   abapStatement "\(\W\|^\)NO\W\+STANDARD\W\+PAGE\W\+HEADING\(\W\|$\)"ms=s+1,me=e-1syn match   abapStatement "\(\W\|^\)\(EXIT\W\+FROM\W\+STEP\W\+LOOP\|EXIT\)\(\W\|$\)"ms=s+1,me=e-1syn match   abapStatement "\(\W\|^\)\(BEGIN\W\+OF\W\+\(BLOCK\|LINE\)\|BEGIN\W\+OF\)\(\W\|$\)"ms=s+1,me=e-1syn match   abapStatement "\(\W\|^\)\(END\W\+OF\W\+\(BLOCK\|LINE\)\|END\W\+OF\)\(\W\|$\)"ms=s+1,me=e-1syn match   abapStatement "\(\W\|^\)IS\W\+INITIAL\(\W\|$\)"ms=s+1,me=e-1syn match   abapStatement "\(\W\|^\)NO\W\+INTERVALS\(\W\|$\)"ms=s+1,me=e-1syn match   abapStatement "\(\W\|^\)SEPARATED\W\+BY\(\W\|$\)"ms=s+1,me=e-1syn match   abapStatement "\(\W\|^\)\(USING\W\+\(EDIT\W\+MASK\)\|USING\)\(\W\|$\)"ms=s+1,me=e-1syn match   abapStatement "\(\W\|^\)\(WHERE\W\+\(LINE\)\)\(\W\|$\)"ms=s+1,me=e-1syn match   abapStatement "\(\W\|^\)RADIOBUTTON\W\+GROUP\(\W\|$\)"ms=s+1,me=e-1syn match   abapStatement "\(\W\|^\)REF\W\+TO\(\W\|$\)"ms=s+1,me=e-1 " Special ABAP specific tables:syn match   abapSpecial       "\(\W\|^\)\(sy\|\(p\|pa\)\d\d\d\d\|t\d\d\d.\|innnn\)\(\W\|$\)"ms=s+1,me=e-1syn match   abapSpecialTables "\(sy\|\(p\|pa\)\d\d\d\d\|t\d\d\d.\|innnn\)-"me=e-1 containedsyn match   abapSpecial       "\(\W\|^\)\w\+-\(\w\+-\w\+\|\w\+\)"ms=s+1 contains=abapSpecialTables " Pointersyn match   abapSpecial  "<\w\+>" " Abap constants:syn keyword abapSpecial  TRUE FALSE NULL SPACE " Includessyn region abapInclude   start="include" end="." contains=abapComment " Typessyn keyword abapTypes    c n i p f d t x " Atritmitic operatorssyn keyword abapOperator abs sign ceil floor trunc frac acos asin atan cos sin tansyn keyword abapOperator cosh sinh tanh exp log log10 sqrt " String operatorssyn keyword abapOperator strlen xstrlen charlen numofchar dbmaxlen " Table operatorssyn keyword abapOperator lines " Table operators (SELECT operators)syn keyword abapOperator INTO FROM WHERE GROUP BY HAVING ORDER BY SINGLEsyn keyword abapOperator APPENDING CORRESPONDING FIELDS OF TABLEsyn keyword abapOperator LEFT RIGHT OUTER INNER JOIN AS CLIENT SPECIFIED BYPASSING BUFFER UP TO ROWS CONNECTINGsyn keyword abapOperator EQ NE LT LE GT GE NOT AND OR XOR IN LIKE BETWEEN " An error? Not strictly... but cannot think of reason this is intended.syn match   abapError    "\.\." " Commentssyn region  abapComment  start="^\*" end="$" contains=abapTodosyn match   abapComment  "\".*" contains=abapTodosyn keyword abapTodo     contained TODO NOTE " 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 yetif version >= 508 || !exists("did_abap_syntax_inits")  if version < 508    let did_abap_syntax_inits = 1    command -nargs=+ HiLink hi link <args>  else    command -nargs=+ HiLink hi def link <args>  endif   HiLink abapError          Error  HiLink abapComment        Comment  HiLink abapInclude        Include  HiLink abapSpecial        Special  HiLink abapSpecialTables  PreProc  HiLink abapSymbolOperator abapOperator  HiLink abapOperator       Operator  HiLink abapStatement      Statement  HiLink abapString         String  HiLink abapFloat          Float  HiLink abapNumber         Number  HiLink abapHex            Number   delcommand HiLinkendif let b:current_syntax = "abap" " vim: ts=8 sw=2