vim-chip8
the version 1.0 release of Chip8 syntax and indentation rules comes with full support for the SuperChip and XO-Chip instruction sets, along with all of their keywords and constants.
Keywords
The following keywords are supported:
conditionals: begin
, else
, end
, if
, then
, while
constants: buzzer
, const
, delay
, key
functions: bcd
, jump
, jump0
, load
, save
, sprite
repeats: again
, loop
statements: :alias
, :breakpoint
, :next
, :unpack
, clear
, return
There is also syntax highlighting for named subroutines, integer/hex/binary values, and comments.
Indentation
Auto-indentation will trigger for the following cases
- indent one shiftwidth on lines following
loop
- indent one shiftwidth on lines following
while
- unindent to matching
loop
when ending it withagain
- indent one shiftwidth on lines following
if ... begin
andelse
- unindent to matching
if ... begin
when ending it withend
- indent to zero for new labels
- indent one shiftwidth on lines following new labels
- indent to zero when ending a subroutine with
;
SuperChip
An expanded set of keywords are supported for the SuperChip instruction set. These are not enabled by default, but are easy to turn on (see the README for details).
constants: bighex
functions: hires
, loadflags
, lores
, saveflags
, scroll-down
, scroll-left
, scroll-right
statements: exit
XO-Chip
Another set of keywords are available to support the XO-Chip instructions. These are also no enabled by default but the README has directions on how to include them.
constants: long
functions: plane
, scroll-up
statements: audio