color coding for a custom language

13 views
Skip to first unread message

Aryeh Friedman

unread,
Oct 24, 2024, 8:31:40 AM (9 days ago) Oct 24
to v...@vim.org
I have created a language specifically designed for making logic
circuits but noticed vim has no idea how to color code it... how I
start to teach it?

--
Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org

Tristan Kapous

unread,
Oct 24, 2024, 8:57:42 AM (9 days ago) Oct 24
to vim...@googlegroups.com, v...@vim.org
> I have created a language specifically designed for making logic
> circuits but noticed vim has no idea how to color code it... how I
> start to teach it?
>
> Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org
>
Hi!

The mechanism for highlighting specific text is based on the `:match` command.

It requires a highlight group as first argument and a regex as second argument.
You can write a file with a `:match` per line, and source it for the appropriate filetype.

Help references:
`:h :match` / `:h ftdetect` / `:h :syntax`.

Tris'
Reply all
Reply to author
Forward
0 new messages