Sublime text YAML color highlighting when using vertical slash

This is actually not that much kirby related, but perhaps someone can help.

When I use the vertical slash symbol | in a YAML file in sublime text (3) I always get the text below that symbol highlighted in red until the bottom of the document, like this:

… I still haven’t figured out what causes it or how to stop it.

Can someone help ?


Are you using tabs or mixing tabs and spaces?

I use tabs.

I am also using .editorconfig file and plugin on my project’s root so all files have any possible spaces turned into tabs on save, for collaboration purposes.

You could try looking at the syntax theme for the editor and look for that color (if you something like Pigments installed it should be easy to spot). Its just css if i remember correctly. The name for that rule for that color might give you a clue for why its getting that color looks erroneous to me. What happens if you switch to another theme? Perhaps its a bug with that particular one. I use Predawn and never seen it do this.

I get it in predawn aswell and with every other theme and color scheme (as you know, different things).

If you use sublime, do you have any specific yaml syntax plugin ?

I may need to deactivate plugins one by one to see if one is causing the behaviour.


Could you post that whole blueprint, so i can have a look?

In yaml files, spaces should be used for indentation, not tabs.

See the specification:

Sure, thank you

title: Gallery
icon: question
	changeTitle: false
	changeStatus: false
	changeTemplate: false
	changeSlug: false
	delete: false
	duplicate: false

	- width: 1/2
				headline: Nikolaj
				type: files 
				layout: cards
				size: huge
				template: cat
				max: 1
				sortable: false
				headline: Logos
				type: files 
				layout: cards
				template: logo
				size: small
	- width: 1/2
				label: Address 
				type: textarea 
				buttons: false
				placeholder: |
					44, rue de Perez
					93003 Paris
				label: Opening times
				type: textarea
				buttons: false
				placeholder: |
					Wednesday - Saturday
					11 am - 7 pm
					and upon appointment
				label: Phone Numbers
				type: textarea
				buttons: false
				placeholder: | 
					Tel +33 (0) 953 56 49 56
					Mob +33 (0) 695 65 44 67
				label: Email 
				type: email 
				label: Social networks
				type: structure
						label: Name 
						type: text 
						label: URL
						type: url 
				label: Team 
				type: textarea 
				buttons: false
				placeholder: | 
					Nerina Ciaccia (director/owner)
					Yasmina Hatem (gallery manager)
					Antoine Levi (director/owner)
				label: Newsletter 
				type: url 
				label: Additional info 
				type: textarea 
				buttons: false  

Is that so ?

Well, that does actually fix the higlighting.

I see I see…

Well, that is a unexpected ending for the spaces vs tabs arguments !

Thank you

Oddly it doesnt happen with a clean install of Sublime and onlye Predawn installed, so as @texnixe says, its probably one of the custom settings you have causing it.

It does certainly seems to be the use of tabs instead of spaces what’s causing it, you perhaps can easily try that in this fresh installation, but it seems to be it. yes

Thank you both very much.

Nevertheless, you are better off sticking with the specification.

1 Like