jayji pushed a commit to branch master.

http://git.enlightenment.org/editors/vim-configs.git/commit/?id=50932caff28acde7369abb93cfa5732ed64e1290

commit 50932caff28acde7369abb93cfa5732ed64e1290
Author: Jean Guyomarc'h <[email protected]>
Date:   Fri Aug 3 20:13:38 2018 +0200

    syntax: add support for textual EET representation
    
    Eet can be manipulated via a textual representation, which looks like the
    following:
    
      group "s_config" struct {
          value "version" uint: 0;
          value "font_size" uint: 12;
          value "font_name" string: "Mono";
          group "bg_color" struct {
              group "s_config_color" struct {
                  value "r" uchar: 0;
                  value "g" uchar: 0;
                  value "b" uchar: 0;
                  value "a" uchar: 255;
              }
          }
          value "use_bg_color" uchar: 0;
          value "mute_bell" uchar: 0;
      }
    
    These changes allow vim to properly colorize textual eet files. The 
associated
    file extension is ".eet".
---
 ftdetect/eet.vim |  2 ++
 syntax/eet.vim   | 28 ++++++++++++++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/ftdetect/eet.vim b/ftdetect/eet.vim
new file mode 100644
index 0000000..1263891
--- /dev/null
+++ b/ftdetect/eet.vim
@@ -0,0 +1,2 @@
+" Textual EET representation
+au BufRead,BufNewFile *.eet set filetype=eet
diff --git a/syntax/eet.vim b/syntax/eet.vim
new file mode 100644
index 0000000..046efa7
--- /dev/null
+++ b/syntax/eet.vim
@@ -0,0 +1,28 @@
+" Vim syntax file
+" Language: EET
+"
+" This syntax file supports the textual representation of eet files. That is,
+" the output of `eet -d` (conversely, the input of `eet -i` and `eet -e`).
+" This is convenient when `vieet` is used.
+
+if version < 600
+  syntax clear
+elseif exists("b:current_syntax")
+  finish
+endif
+
+syn keyword eetSection group value key count
+syn keyword eetType struct array var_array list hash uint string uchar char
+syn keyword eetType short int long_long float double ushort ulong_long
+syn keyword eetType inlined
+syn keyword eetNull null
+syn match eetNumber display "\d\+"
+syn region eetString start=+L\="+ end=+"+
+
+hi def link eetSection Label
+hi def link eetType Type
+hi def link eetNumber Number
+hi def link eetString String
+hi def link eetNull Constant
+
+let b:current_syntax = "eet"

-- 


Reply via email to