NetRexx syntax highlighting for Vim

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

NetRexx syntax highlighting for Vim

Jason Martin
Add these two sections to the rexx.vim for NetRexx highlighting.

I tested on large files but only NetRexx *.nrx files.

Happy user? Send to Thomas Geulig <[hidden email]> for testing / Inclusion

All lines under 80 characters for the Terminal users out there.

Each line contains NetRexx for greps


SECTION ONE - I added around Line 70  -- DO ADD THIS LINE




" Start - NetRexx Syntax additions 2012 Sep 20 Jason Martin <[hidden email]>

syn match NetRexxExternals "\<\(import\|package\)\>"

syn match NetRexxOptWords "\<\(binary\|nobinary\)\>"
syn match NetRexxOptWords "\<\(comments\|nocomments\)\>"
syn match NetRexxOptWords "\<\(compact\|nocompact\)\>"
syn match NetRexxOptWords "\<\(crossref\|nocrossref\)\>"
syn match NetRexxOptWords "\<\(decimal\|nodecimal\)\>"
syn match NetRexxOptWords "\<\(diag\|nodiag\)\>"
syn match NetRexxOptWords "\<\(explicit\|noexplicit\)\>"
syn match NetRexxOptWords "\<\(format\|noformat\)\>"
syn match NetRexxOptWords "\<\(java\|nojava\)\>"
syn match NetRexxOptWords "\<\(logo\|nologo\)\>"
syn match NetRexxOptWords "\<\(replace\|noreplace\)\>"
syn match NetRexxOptWords "\<\(sourcedir\|nosourcedir\)\>"
syn match NetRexxOptWords "\<\(strictargs\|nostrictargs\)\>"
syn match NetRexxOptWords "\<\(strictassign\|nostrictassign\)\>"
syn match NetRexxOptWords "\<\(strictcase\|nostrictcase\)\>"
syn match NetRexxOptWords "\<\(strictimport\|nostrictimport\)\>"
syn match NetRexxOptWords "\<\(strictprops\|nostrictprops\)\>"
syn match NetRexxOptWords "\<\(strictsignal\|nostrictsignal\)\>"
syn match NetRexxOptWords "\<\(symbols\|nosymbols\)\>"
syn match NetRexxOptWords "\<\(notrace\|trace1\|trace2\)\>"
syn match NetRexxOptWords "\<\(verbose\|verbose0\|verbose1\)\>"
syn match NetRexxOptWords "\<\(verbose2\|verbose3\|verbose4\|verbose5\)\>"
syn match NetRexxOptWords "\<\(utf8\|noutf8\)\>"

" Added rexx as a type for NetRexx
syn match NetRexxJavaPrimitives "\<\(boolean\|byte\|char\|double\)\>"
syn match NetRexxJavaPrimitives "\<\(float\|int\|long\|rexx\|short\)\>"

syn match NetRexxSpecialNames "\<\(ask\|length\|null\|source\|sourceline\)\>"
syn match NetRexxSpecialNames "\<\(super\|this\|version\)\>"

syn match NetRexxClassVisibility "\<\(inheritable\|private\|public\|shared\)\>"

syn match NetRexxClassModifiers "\<\(abstract\|adapter\|constant\|final\)\>"
syn match NetRexxClassModifiers "\<\(interface\|native\|static\|transient\)\>"
syn match NetRexxClassModifiers "\<\(volatile\|protect\|binary\|deprecated\)\>"
syn match NetRexxClassModifiers "\<\(returns\|signals\|extends\|uses\)\>"
syn match NetRexxClassModifiers "\<\(implements\|unused\)\>"

" Duplicate Needed for class\|method\|parse\| to get all with NetRexx
syn match NetRexxKeywords "\<\(class\|method\|parse\|properties\)\>"

syn match NetRexxSubKeywords "\<\(all\|case\|methods\|results\|var\)\>"

syn match NetRexxBuiltinFunction "\<\(abbrev\|abs\|b2x\|center\|centre\)\>"
syn match NetRexxBuiltinFunction "\<\(changestr\|compare\|copies\)\>"
syn match NetRexxBuiltinFunction "\<\(copyindexed\|countstr\|c2d\|c2x\)\>"
syn match NetRexxBuiltinFunction "\<\(datatype\|delstr\|delword\|d2c\|d2x\)\>"
syn match NetRexxBuiltinFunction "\<\(exists\|format\|insert\|lastpos\|left\)\>"
syn match NetRexxBuiltinFunction "\<\(lower\|max\|min\|overlay\|pos\|right\)\>"
syn match NetRexxBuiltinFunction "\<\(sequence\|sign\|space\|strip\|substr\)\>"
syn match NetRexxBuiltinFunction "\<\(subword\|translate\|trunc\|upper\)\>"
syn match NetRexxBuiltinFunction "\<\(verify\|word\|wordindex\|wordlength\)\>"
syn match NetRexxBuiltinFunction "\<\(wordpos\|words\|x2b\|x2c\|x2d\)\>"

" End - NetRexx Syntax additions




SECTION TWO - I added near end before    delcommand HiLink  -- DO ADD THIS LINE



" Start - NetRexx Syntax HiLink

  HiLink NetRexxExternals       Include
  HiLink NetRexxOptWords        PreCondit
  HiLink NetRexxJavaPrimitives  Type
  HiLink NetRexxSpecialNames    Special
  HiLink NetRexxClassVisibility StorageClass
  HiLink NetRexxClassModifiers  PreProc
  HiLink NetRexxKeywords        Statement
  HiLink NetRexxSubKeywords     Keyword
  HiLink NetRexxBuiltinFunction Function

" End - NetRexx Syntax HiLink





_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: NetRexx syntax highlighting for Vim

Jason Martin
-- Missing

savelog

and the new ecj stuff probably

-- Affected by rules already in rexx.vim

this
parent




_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/