tconf.h: syntax highlighting for tex - neatvi - [fork] simple vi-type editor with UTF-8 support
 (HTM) git clone git://src.adamsgaard.dk/neatvi
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
       ---
 (DIR) commit 4f07e5004a8b33bdafd6dd436612ba97ff016df6
 (DIR) parent ba371ba7ddd6c24a7b8fd605de5143a45486cb74
 (HTM) Author: Ali Gholami Rudi <ali@rudi.ir>
       Date:   Mon,  8 Jun 2015 18:50:55 +0430
       
       conf.h: syntax highlighting for tex
       
       Diffstat:
         M conf.h                              |       6 ++++++
       
       1 file changed, 6 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/conf.h b/conf.h
       t@@ -57,6 +57,7 @@ static struct filetype {
        } filetypes[] = {
                {"c", "\\.[hc]$"},
                {"tr", "\\.(ms|tr|roff|tmac)$"},
       +        {"tex", "\\.tex$"},
        };
        
        /* syntax highlighting patterns */
       t@@ -82,6 +83,11 @@ static struct highlight {
                {"tr", {3}, "\\\\{1,2}[*$fgkmns]([^[(]|\\(..|\\[[^]]*\\])"},
                {"tr", {3}, "\\\\([^[(*$fgkmns]|\\(..|\\[[^]]*\\])"},
                {"tr", {3}, "\\$[^$]+\\$"},
       +
       +        {"tex", {4 | SYN_BD, 0, 3, 0, 5},
       +                "\\\\[^[{ \t]+(\\[([^]]+)\\])?(\\{([^}]*)\\})?"},
       +        {"tex", {3}, "\\$[^$]+\\$"},
       +        {"tex", {2 | SYN_IT}, "%.*$"},
        };
        
        /* how to hightlight text in the reverse direction */