Просмотр исходного кода

Ticket #2126: DOS style INI files syntax

I am attaching a proposed syntax highlighting definition for
- gasp - DOS style INI files.

I'd love to set the

    option

part in

    option = value

to some other color, too, but didn't find the proper syntax
for that.

Karsten

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Karsten Hilbert 15 лет назад
Родитель
Сommit
1243fc6fd7
2 измененных файлов с 23 добавлено и 0 удалено
  1. 3 0
      misc/syntax/Syntax
  2. 20 0
      misc/syntax/ini.syntax

+ 3 - 0
misc/syntax/Syntax

@@ -175,6 +175,9 @@ include lua.syntax
 file ..\*\\.([iI][dD][lL])$ CORBA\sIDL
 file ..\*\\.([iI][dD][lL])$ CORBA\sIDL
 include idl.syntax
 include idl.syntax
 
 
+file ..\*\\.([iI][nN][iI])$ INI\sFile
+include ini.syntax
+
 file Don_t_match_me Mail\sfolder ^(From|Return-(P|p)ath:|From:|Date:)\s
 file Don_t_match_me Mail\sfolder ^(From|Return-(P|p)ath:|From:|Date:)\s
 include mail.syntax
 include mail.syntax
 
 

+ 20 - 0
misc/syntax/ini.syntax

@@ -0,0 +1,20 @@
+# DOS / Windows INI files
+
+context default
+
+    keyword = brightred
+    keyword $*$ brightgreen
+
+# options
+#context .* = cyan
+
+# groups
+context [ ] yellow
+
+# lists
+context exclusive $*$ $*$ green
+
+# comments:
+context # \n brown
+context ; \n brown
+