diff --git a/README.md b/README.md index c30d00d..6923aa1 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,12 @@ link `ca65Label` (or `ca65Opcode`) to another class, eg: hi link ca65Label Typedef ``` +You can add syntax highlighting for your own assembler like this: +```vim +" in ~/.vim/ftplugin/ca65.vim +syn keyword ca65customMacros Macro1 Macro2 mul div macro3 +``` + ### Header/Source split function To use the source-header split function, map it and set your preferred assembly filetypes: ```vim diff --git a/syntax/ca65.vim b/syntax/ca65.vim index 861bf65..60643d9 100644 --- a/syntax/ca65.vim +++ b/syntax/ca65.vim @@ -23,9 +23,6 @@ syn clear syn case ignore syntax iskeyword @,48-57,192-255,$,_,.,* -" custom macros -syn keyword customMacros Import Export Print Strf div - " registers syn keyword ca65Reg x y a @@ -116,7 +113,7 @@ hi link ca65PseudoFunctions PreProc hi link ca65ControlCommands PreProc hi link ca65MacLongbranch PreProc hi link ca65MacGeneric PreProc -hi link customMacros PreProc +hi link ca65customMacros PreProc " INSTRUCTIONS hi link ca6502Opcode ca65Opcode hi link ca65C02Opcode ca65Opcode