From ce583c159cf0107846c60001c23e873ac04f5bdd Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Fri, 3 Jul 2015 19:57:12 -0700 Subject: [PATCH] adds repeat ... to syntax highlighting and indent --- indent/asm_ca65.vim | 4 ++-- syntax/asm_ca65.vim | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/indent/asm_ca65.vim b/indent/asm_ca65.vim index c634838..8e85800 100644 --- a/indent/asm_ca65.vim +++ b/indent/asm_ca65.vim @@ -16,7 +16,7 @@ setlocal autoindent " indentexpr isn't much help otherwise setlocal indentexpr=GetAsmCA65Indent(v:lnum) "setlocal indentkeys+=<:>,=elif,=except -setlocal indentkeys+=<:>,=.else,=.elseif,=.endif,.endmacro,.endstruct,.endunion,.endenum,.endscope,.endproc +setlocal indentkeys+=<:>,=.else,=.elseif,=.endif,.endmacro,.endstruct,.endunion,.endenum,.endscope,.endproc,.endrepeat " Only define the function once. if exists("*GetAsmCA65Indent") @@ -131,7 +131,7 @@ function GetAsmCA65Indent(lnum) " If the previous line began with a block/scope-opening command, indent " this line - if pline =~ '^\s*\.\(if.*\|macro\|struct\|union\|scope\|proc\)\>' + if pline =~ '^\s*\.\(if.*\|macro\|struct\|union\|scope\|proc\|repeat\)\>' return plindent + shiftwidth() endif diff --git a/syntax/asm_ca65.vim b/syntax/asm_ca65.vim index feead90..cb7bb3c 100644 --- a/syntax/asm_ca65.vim +++ b/syntax/asm_ca65.vim @@ -135,6 +135,8 @@ syn match asm_ca65Cond "\.ifnref\>" syn match asm_ca65Cond "\.else\>" syn match asm_ca65Cond "\.elseif\>" syn match asm_ca65Cond "\.endif\>" +syn match asm_ca65Cond "\.repeat\>" +syn match asm_ca65Cond "\.endrepeat\>" " Macro stuff syn match asm_ca65Macro "\.macro\s\+[a-z0-9_]*" contains=asm_ca65MacroName syn match asm_ca65MacroName "\s[a-z_][a-z0-9_]*"hs=s+1 contained