From 1243fc6fd79fe8d97f633a947f902196cc593f94 Mon Sep 17 00:00:00 2001 From: Karsten Hilbert Date: Mon, 19 Apr 2010 10:46:11 +0200 Subject: [PATCH 1/2] 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 --- misc/syntax/Syntax | 3 +++ misc/syntax/ini.syntax | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 misc/syntax/ini.syntax diff --git a/misc/syntax/Syntax b/misc/syntax/Syntax index 0d0c5a23f..d9dea5483 100644 --- a/misc/syntax/Syntax +++ b/misc/syntax/Syntax @@ -175,6 +175,9 @@ include lua.syntax file ..\*\\.([iI][dD][lL])$ CORBA\sIDL 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 include mail.syntax diff --git a/misc/syntax/ini.syntax b/misc/syntax/ini.syntax new file mode 100644 index 000000000..629da177a --- /dev/null +++ b/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 + From 1eba5407abe1b7f8457c4f4bb27cb419bcbfe396 Mon Sep 17 00:00:00 2001 From: Slava Zanko Date: Tue, 4 May 2010 14:55:02 +0300 Subject: [PATCH 2/2] Some fixies of ini.syntax (added default color) also, misc/syntax/Makefile.am changed for install ini.syntax into system Signed-off-by: Slava Zanko --- misc/syntax/Makefile.am | 1 + misc/syntax/ini.syntax | 18 ++++++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/misc/syntax/Makefile.am b/misc/syntax/Makefile.am index 368d342f7..9b9f686cb 100644 --- a/misc/syntax/Makefile.am +++ b/misc/syntax/Makefile.am @@ -26,6 +26,7 @@ SYNTAXFILES = \ haskell.syntax \ html.syntax \ idl.syntax \ + ini.syntax \ j.syntax \ java.syntax \ js.syntax \ diff --git a/misc/syntax/ini.syntax b/misc/syntax/ini.syntax index 629da177a..d6c79c30e 100644 --- a/misc/syntax/ini.syntax +++ b/misc/syntax/ini.syntax @@ -1,20 +1,18 @@ # DOS / Windows INI files -context default - +context default cyan keyword = brightred - keyword $*$ brightgreen - -# options -#context .* = cyan # groups context [ ] yellow -# lists -context exclusive $*$ $*$ green - # comments: context # \n brown -context ; \n brown + spellcheck + +context ; \n brown + spellcheck + +context exclusive = \n brightcyan +