| 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}, "^#.*$"}, |