Merge pull request #2 from ricardoquesada/repeat
Merge PR #2, adds .repeat/.endrepeat syntax and indentation rules.
This commit is contained in:
commit
b5ee54137a
|
@ -16,7 +16,7 @@ setlocal autoindent " indentexpr isn't much help otherwise
|
||||||
|
|
||||||
setlocal indentexpr=GetAsmCA65Indent(v:lnum)
|
setlocal indentexpr=GetAsmCA65Indent(v:lnum)
|
||||||
"setlocal indentkeys+=<:>,=elif,=except
|
"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.
|
" Only define the function once.
|
||||||
if exists("*GetAsmCA65Indent")
|
if exists("*GetAsmCA65Indent")
|
||||||
|
@ -131,7 +131,7 @@ function GetAsmCA65Indent(lnum)
|
||||||
|
|
||||||
" If the previous line began with a block/scope-opening command, indent
|
" If the previous line began with a block/scope-opening command, indent
|
||||||
" this line
|
" this line
|
||||||
if pline =~ '^\s*\.\(if.*\|macro\|struct\|union\|scope\|proc\)\>'
|
if pline =~ '^\s*\.\(if.*\|macro\|struct\|union\|scope\|proc\|repeat\)\>'
|
||||||
return plindent + shiftwidth()
|
return plindent + shiftwidth()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -135,6 +135,8 @@ syn match asm_ca65Cond "\.ifnref\>"
|
||||||
syn match asm_ca65Cond "\.else\>"
|
syn match asm_ca65Cond "\.else\>"
|
||||||
syn match asm_ca65Cond "\.elseif\>"
|
syn match asm_ca65Cond "\.elseif\>"
|
||||||
syn match asm_ca65Cond "\.endif\>"
|
syn match asm_ca65Cond "\.endif\>"
|
||||||
|
syn match asm_ca65Cond "\.repeat\>"
|
||||||
|
syn match asm_ca65Cond "\.endrepeat\>"
|
||||||
" Macro stuff
|
" Macro stuff
|
||||||
syn match asm_ca65Macro "\.macro\s\+[a-z0-9_]*" contains=asm_ca65MacroName
|
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
|
syn match asm_ca65MacroName "\s[a-z_][a-z0-9_]*"hs=s+1 contained
|
||||||
|
|
Loading…
Reference in New Issue
Block a user