tconf.h: troff refer database highlighting - 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 1a8863660ce138e8cff1feec0cb89598f4658de9
(DIR) parent 4c47c54d621fc83f9473c5c13a80a712c7ebcbdc
(HTM) Author: Ali Gholami Rudi <ali@rudi.ir>
Date: Sun, 18 Oct 2020 17:38:47 +0330
conf.h: troff refer database highlighting
Diffstat:
M conf.h | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
---
(DIR) diff --git a/conf.h b/conf.h
t@@ -15,6 +15,7 @@ static struct filetype {
{"mk", "Makefile$|makefile$|\\.mk$"}, /* makefile */
{"sh", "\\.sh$"}, /* shell script */
{"py", "\\.py$"}, /* python */
+ {"bib", "bib$"}, /* refer */
{"nm", "\\.nm$"}, /* neatmail */
};
t@@ -64,13 +65,23 @@ static struct highlight {
{"mk", {0, SYN_BD}, "([A-Za-z_%.]+):"},
/* shell script */
- {"sh", {5 | SYN_BD}, "\\<(break|case|continue|do|done|elif|else|esac|fi|for|if|in|then|until|while)\\>"},
- {"sh", {2 | SYN_IT}, "#.*$"},
+ {"sh", {5 | SYN_BD}, "\\<(break|case|continue|do|done|elif|else|esac|fi|for|if|in|then|until|while|return)\\>"},
{"sh", {4}, "\"([^\"\\]|\\\\.)*\""},
{"sh", {4}, "'[^']*'"},
- {"sh", {4}, "`([^`\\]|\\\\.)*`"},
- {"sh", {1}, "\\$(\\{[^}]+\\}|[a-zA-Z_0-9]+)"},
- {"sh", {0, SYN_BD}, "^([a-zA-Z_][a-zA-Z_0-9]*\\(\\)).*\\{"},
+ {"sh", {3}, "`([^`\\]|\\\\.)*`"},
+ {"sh", {1}, "\\$(\\{[^}]+\\}|[a-zA-Z_0-9]+|[!#$?*@-])"},
+ {"sh", {0, SYN_BD}, "^([a-zA-Z_][a-zA-Z_0-9]* *\\(\\)) *\\{"},
+ {"sh", {SYN_BD}, "^\\. .*$"},
+ {"sh", {2 | SYN_IT}, "#.*$"},
+
+ {"bib", {0, 8 | SYN_BD, SYN_BGMK(11) | SYN_BD}, "^(%L) +(.*)$", 1},
+ {"bib", {0, 8 | SYN_BD, 12 | SYN_BD}, "^(%A) (.*)$", 1},
+ {"bib", {0, 8 | SYN_BD, 5 | SYN_BD}, "^(%T) (.*)$", 1},
+ {"bib", {0, 8 | SYN_BD, 2 | SYN_BD}, "^(%[JB]) (.*)$", 1},
+ {"bib", {0, 8 | SYN_BD, 5 | SYN_BD}, "^(%D) (.*)$", 1},
+ {"bib", {0, 8 | SYN_BD, 7}, "^(%O) (.*)$", 1},
+ {"bib", {0, 8 | SYN_BD, 8 | SYN_BD}, "^(%[A-Z]) (.*)$", 1},
+ {"bib", {25}, "^#.*$", 1},
/* python */
{"py", {2}, "^#.*$"},