From 69f73dd7793ca7c8245380d73b6355ab3d21609a Mon Sep 17 00:00:00 2001 From: Elektron72 <36974021+Elektron72@users.noreply.github.com> Date: Tue, 23 Mar 2021 18:12:52 -0400 Subject: [PATCH 1/3] Add void operator to Vim syntax file --- syntax-files/Vim/prog8.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syntax-files/Vim/prog8.vim b/syntax-files/Vim/prog8.vim index 58f4987da..911a6d819 100644 --- a/syntax-files/Vim/prog8.vim +++ b/syntax-files/Vim/prog8.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Prog8 " Maintainer: Elektron72 -" Latest Revision: 22 March 2021 +" Latest Revision: 23 March 2021 if exists("b:current_syntax") finish @@ -31,7 +31,7 @@ syn keyword prog8Conditional if_pl if_pos if_mi if_neg syn keyword prog8Conditional when syn keyword prog8Repeat for while in do until repeat syn match prog8Label "\<\w\+\>:" -syn keyword prog8Operator and or to downto as +syn keyword prog8Operator and or to downto as void syn match prog8Directive "\(^\|\s\)%\(target\|output\|launcher\|zeropage\)\>" syn match prog8Directive "\(^\|\s\)%\(zpreserved\|address\|import\|option\)\>" From 8092355acb572499aa5f6f73915c687dc61b9c6d Mon Sep 17 00:00:00 2001 From: Elektron72 <36974021+Elektron72@users.noreply.github.com> Date: Tue, 23 Mar 2021 19:41:34 -0400 Subject: [PATCH 2/3] Add syntax sync to Vim syntax file This will make the highlighting slightly slower, but will fix issues with assembly not being highlighted properly. --- syntax-files/Vim/prog8.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/syntax-files/Vim/prog8.vim b/syntax-files/Vim/prog8.vim index 911a6d819..d9a998dc3 100644 --- a/syntax-files/Vim/prog8.vim +++ b/syntax-files/Vim/prog8.vim @@ -58,6 +58,7 @@ syn region prog8Asm start="\(%asm\)\@16<=\s\+{{" end="}}" contains= \prog8AsmIdentifier, \prog8AsmStatement, \prog8AsmLabel +syn sync match prog8AsmSync groupthere prog8Asm "%asm\s\+{{" syn keyword prog8AsmIdentifier a x y contained From 2eb346a205424fc4cc9df5ddcca52a0577abbb29 Mon Sep 17 00:00:00 2001 From: Elektron72 <36974021+Elektron72@users.noreply.github.com> Date: Tue, 23 Mar 2021 19:53:20 -0400 Subject: [PATCH 3/3] Add support for built-ins to Vim syntax file This commit adds support for highlighting built-in functions and variables to the Vim syntax file. --- syntax-files/Vim/prog8.vim | 9 +- syntax-files/Vim/prog8_builtins.vim | 820 ++++++++++++++++++++++++++++ syntax-files/Vim/readme.txt | 10 +- 3 files changed, 837 insertions(+), 2 deletions(-) create mode 100644 syntax-files/Vim/prog8_builtins.vim diff --git a/syntax-files/Vim/prog8.vim b/syntax-files/Vim/prog8.vim index d9a998dc3..75fdb8774 100644 --- a/syntax-files/Vim/prog8.vim +++ b/syntax-files/Vim/prog8.vim @@ -51,13 +51,20 @@ syn region prog8Expression start="(" end=")" transparent syn region prog8Array start="\[" end="\]" transparent +if !exists("g:prog8_no_highlight_builtins") + runtime! syntax/prog8_builtins.vim +endif + + syn region prog8Asm start="\(%asm\)\@16<=\s\+{{" end="}}" contains= \prog8Comment, \prog8Character, \prog8Number, \prog8AsmIdentifier, \prog8AsmStatement, - \prog8AsmLabel + \prog8AsmLabel, + \prog8BuiltInVar, + \prog8BuiltInFunc syn sync match prog8AsmSync groupthere prog8Asm "%asm\s\+{{" syn keyword prog8AsmIdentifier a x y contained diff --git a/syntax-files/Vim/prog8_builtins.vim b/syntax-files/Vim/prog8_builtins.vim new file mode 100644 index 000000000..d737d5a75 --- /dev/null +++ b/syntax-files/Vim/prog8_builtins.vim @@ -0,0 +1,820 @@ +" Vim syntax file +" Language: Prog8 (built-in functions) +" Maintainer: Elektron72 +" Latest Revision: 23 March 2021 + + +" Built-in functions + +" Math functions +syn keyword prog8BuiltInFunc abs atan ceil cos cos8u cos8 cos16u cos16 deg floor +syn keyword prog8BuiltInFunc ln log2 rad round sin sgn sin8u sin8 sin16u sin16 +syn keyword prog8BuiltInFunc sqrt16 sqrt tan + +" Array functions +syn keyword prog8BuiltInFunc any all len max min reverse sum sort + +" Miscellaneous functions +syn keyword prog8BuiltInFunc cmp lsb msb mkword peek peekw poke pokew rnd rndw +syn keyword prog8BuiltInFunc rndf fastrnd8 rol rol2 ror ror2 sizeof offsetof +syn keyword prog8BuiltInFunc swap memory + + +" c64/floats.p8 +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" + + +" c64/graphics.p8 +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" + + +" c64/syslib.p8 +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" + + +" c64/textio.p8 +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" + + +" cx16/floats.p8 +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" + + +" cx16/gfx2.p8 +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" + + +" cx16/graphics.p8 +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" + + +" cx16/palette.p8 +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" + +" cx16/syslib.p8 +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" + + +" cx16/textio.p8 +syn match prog8BuiltInVar "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInVar "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" + + +" conv.p8 +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" + + +" cx16logo.p8 +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInVar "\" + + +" diskio.p8 +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" + + +" prog8_lib.p8 +syn match prog8BuiltInFunc "\" + + +" string.p8 +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" +syn match prog8BuiltInFunc "\" + + +" test_stack.p8 +syn match prog8BuiltInFunc "\" + + +hi def link prog8BuiltInVar Identifier +hi def link prog8BuiltInFunc Function diff --git a/syntax-files/Vim/readme.txt b/syntax-files/Vim/readme.txt index c66bc017b..2fcb7f4bc 100644 --- a/syntax-files/Vim/readme.txt +++ b/syntax-files/Vim/readme.txt @@ -1,5 +1,7 @@ To install: - Copy prog8.vim into ~/.vim/syntax/ + Copy prog8.vim and prog8_builtins.vim into ~/.vim/syntax/. If you will never + use highlighting for built-in functions and variables, you do not need to + copy prog8_builtins.vim. To enable: Type: @@ -8,3 +10,9 @@ To enable: like to enable syntax highlighting for all .p8 files, add the following line to your .vimrc: au BufRead,BufNewFile *.p8 setfiletype prog8 + + If you would like to disable highlighting for built-in functions and + variables without deleting or renaming the file, add the following line to + your .vimrc: + let g:prog8_no_highlight_builtins = 1 + (The value doesn't actually matter, only that the variable is defined.)