tconf.h: reorder arrays and more keywords for c file type - 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 ad5b762c322fa1b8512706f0b7967d4e93514164
(DIR) parent 9aa84224d74248ac35a733081d07d711b7b49fa7
(HTM) Author: Ali Gholami Rudi <ali@rudi.ir>
Date: Fri, 22 May 2015 18:14:03 +0430
conf.h: reorder arrays and more keywords for c file type
Diffstat:
M conf.h | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
---
(DIR) diff --git a/conf.h b/conf.h
t@@ -3,9 +3,9 @@
/* the alternate keymap (^F and ^E in insert mode to switch) */
#define KMAPALT "fa"
-/* right-to-left characters (used only in dircontexts and dirmarks) */
+/* right-to-left characters (used only in dircontexts[] and dirmarks[]) */
#define CR2L "ءآأؤإئابةتثجحخدذرزسشصضطظعغـفقكلمنهوىييپچژکگی؛،»«؟ًٌٍَُِّْ"
-/* neutral characters (used only in dircontexts and dirmarks) */
+/* neutral characters (used only in dircontexts[] and dirmarks[]) */
#define CNEUT "-!\"#$%&'()*+,./:;<=>?@^_`{|}~ "
/* direction context patterns; specifies the direction of a whole line */
t@@ -50,6 +50,15 @@ static struct placeholder {
{"ّ", "ـّ", 1},
};
+/* map file names to file types */
+static struct filetype {
+ char *ft; /* file type */
+ char *pat; /* file name pattern */
+} filetypes[] = {
+ {"c", "\\.[hc]$"},
+ {"tr", "\\.(ms|tr|roff)$"},
+};
+
/* syntax highlighting patterns */
static struct highlight {
char *ft; /* the filetype of this pattern */
t@@ -57,11 +66,11 @@ static struct highlight {
int grp; /* regular expression subgroup to highlight */
char *pat; /* regular expression */
} highlights[] = {
- {"c", 5, 0, "\\<(char|short|int|long|float|double|void|struct|enum|union)\\>"},
+ {"c", 5, 0, "\\<(signed|unsigned|char|short|int|long|float|double|void|struct|enum|union|typedef)\\>"},
{"c", 5, 0, "\\<(static|extern|register)\\>"},
{"c", 5, 0, "\\<(return|for|while|if|else|do|sizeof|goto|switch|case|default|break|continue)\\>"},
- {"c", SYN_IT | 2, 0, "//.*$"},
- {"c", SYN_IT | 2, 0, "/\\*([^*]|\\*[^/])*\\*/"},
+ {"c", 2 | SYN_IT, 0, "//.*$"},
+ {"c", 2 | SYN_IT, 0, "/\\*([^*]|\\*[^/])*\\*/"},
{"c", 6, 0, "^#[ \t]*[a-zA-Z0-9_]+"},
{"c", SYN_BD, 1, "([a-zA-Z][a-zA-Z0-9_]+)\\("},
{"c", 4, 0, "\"([^\"]|\\\\\")*\""},
t@@ -70,12 +79,3 @@ static struct highlight {
{"tr", SYN_BD, 0, "^\\.SH.*$"},
{"tr", 4, 0, "^\\.[a-zA-Z0-9]{2}.*$"},
};
-
-/* map file names to file types */
-static struct filetype {
- char *ft; /* file type */
- char *pat; /* file name pattern */
-} filetypes[] = {
- {"c", "\\.[hc]$"},
- {"tr", "\\.(ms|tr|roff)$"},
-};