Syntax highlighting #1

Closed
opened 2020-02-12 18:38:46 +01:00 by brechtcs · 2 comments
brechtcs commented 2020-02-12 18:38:46 +01:00 (Migrated from github.com)

Do you by any chance have some advice on which syntax highlighting scheme to use for Mold templates? There don't seem to be any dedicated ones (at least not for vim), and I can't find another templating language with a syntax that's similar enough to work.

Do you by any chance have some advice on which syntax highlighting scheme to use for Mold templates? There don't seem to be any dedicated ones (at least not for vim), and I can't find another templating language with a syntax that's similar enough to work.
marijnh commented 2020-02-13 07:53:04 +01:00 (Migrated from github.com)

Not really. I use HTML mode when editing these.

Not really. I use HTML mode when editing these.
brechtcs commented 2020-02-18 22:14:28 +01:00 (Migrated from github.com)

Right, on my machine the << and >> were being marked as syntax errors though, which was a bit annoying. For reference: I solved it by combining both answers to this stackoverflow answer, dropping the following in ~/.vim/after/syntax/html.vim:

syntax region moldTag start="<<" end=">>" containedin=ALLBUT,moldTag
highlight default link moldTag Special
Right, on my machine the `<<` and `>>` were being marked as syntax errors though, which was a bit annoying. For reference: I solved it by combining both answers to [this stackoverflow answer](https://stackoverflow.com/questions/10693207/how-can-i-disable-vims-html-error-highlighting), dropping the following in `~/.vim/after/syntax/html.vim`: ```vimscript syntax region moldTag start="<<" end=">>" containedin=ALLBUT,moldTag highlight default link moldTag Special ```
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
marijn/mold#1
No description provided.