tconf.h: reorder arrays and more keywords for c file type - neatvi - [fork] sim… | |
git clone git://src.adamsgaard.dk/neatvi | |
Log | |
Files | |
Refs | |
README | |
--- | |
commit ad5b762c322fa1b8512706f0b7967d4e93514164 | |
parent 9aa84224d74248ac35a733081d07d711b7b49fa7 | |
Author: Ali Gholami Rudi <[email protected]> | |
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(-) | |
--- | |
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|uni… | |
+ {"c", 5, 0, "\\<(signed|unsigned|char|short|int|long|float|double|void… | |
{"c", 5, 0, "\\<(static|extern|register)\\>"}, | |
{"c", 5, 0, "\\<(return|for|while|if|else|do|sizeof|goto|switch|case|d… | |
- {"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)$"}, | |
-}; |