Sublime Forum

Kickassembler Keywords Color change

#1

I’m working with the KickAssembler Package. I want to display the jump instructions (jsr, jmp, bne, etc.) in red. I’ve been scouring the internet for days but haven’t found a solution yet. Can I get help here, please.

0 Likes

#2

In general syntax highlighting is performed in 2 steps:

  1. text is parsed with rules, defined in a syntax definition (.sublime-syntax / .tmLanguage), which assignes scope names to tokens (keywords, constants, operators, …).
  2. color schemes (.sublime-color-scheme) assign colors to scope selectors. A scope selector is a query which applies to one or multiple scopes.

Kick Assembler package ships with KickAssembler (C64).tmLanguage, which assignes keyword.control scope to jsr, jmp, etc.

So what you most likely want, is to customize your color scheme to apply desired color.

  1. Run UI: Customize Color Scheme from Command Palette
  2. in the right view add required (syntax-specific?) rules
{
	"variables": {
	},
	"globals": {
	},
	"rules": [
		{
			"scope": "source.assembly.kickassembler keyword.control",
			"foreground": "red",
		},
	]
}

To learn more about related topics, refer to

0 Likes

#3

Thank you very much for your quick help. Very kind.

0 Likes