From 069df5ef0bcce8936a136243ae8d25d3d7258673 Mon Sep 17 00:00:00 2001 From: Clemens Korner Date: Thu, 1 Dec 2016 21:00:02 +0100 Subject: [PATCH] convert tex.micro to use micro's colorscheme feature --- runtime/syntax/README.md | 1 + runtime/syntax/tex.micro | 27 ++++++++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/runtime/syntax/README.md b/runtime/syntax/README.md index 3a6a5290..1e47add7 100644 --- a/runtime/syntax/README.md +++ b/runtime/syntax/README.md @@ -32,6 +32,7 @@ Here is a list of the files that have been converted to properly use colorscheme * ruby * sh * git +* tex # License diff --git a/runtime/syntax/tex.micro b/runtime/syntax/tex.micro index 8a580e57..4a1bc76d 100644 --- a/runtime/syntax/tex.micro +++ b/runtime/syntax/tex.micro @@ -1,8 +1,21 @@ -## Here is a short example for TeX files. -## +## TeX syntax "tex" "\.tex$" "bib" "\.bib$" "cls" "\.cls$" -color yellow "\$[^$]*\$" -green (i) "\\.|\\[A-Z]*" -color magenta "[{}]" -color blue "%.*" -color blue start="\\begin\{comment\}" end="\\end\{comment\}" + +## colorize the identifiers of {} and [] +color identifier start="\{" end="\}" +color identifier start="\[" end="\]" + +## numbers +color constant.number "\b[0-9]+(\.[0-9]+)?([[:space:]](pt|mm|cm|in|ex|em|bp|pc|dd|cc|nd|nc|sp))?\b" + +## let brackets have the default color again +color default "[{}\[\]]" + +color special "[&\\]" + +## macros +color statement "\\@?[a-zA-Z_]+" + +## commments +color comment "%.*" +color comment start="\\begin\{comment\}" end="\\end\{comment\}"