Gitweb:        
http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=d54e86db71f86d8a545500c97f5eedd8a5400a11
Commit:        d54e86db71f86d8a545500c97f5eedd8a5400a11
Parent:        52e78d699fb2b1ce78fa68506ca24ea24f9037ed
Author:        Bruno Cornec <[email protected]>
AuthorDate:    Tue Jul 14 11:32:02 2009 -0700
Committer:     David Lutterkort <[email protected]>
CommitterDate: Tue Jul 14 11:32:02 2009 -0700

* doc/augeas.vim: vi syntax highlighting for .aug files

---
 doc/augeas.vim |  101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 101 insertions(+), 0 deletions(-)

diff --git a/doc/augeas.vim b/doc/augeas.vim
new file mode 100644
index 0000000..3f0d83d
--- /dev/null
+++ b/doc/augeas.vim
@@ -0,0 +1,101 @@
+" Vim syntax file
+" Language:    Augeas
+" Version: 1.0
+" $Id$
+" Maintainer:  Bruno Cornec <[email protected]>
+
+" For version 5.x: Clear all syntax items
+" For version 6.x: Quit when a syntax file was already loaded
+if version < 600
+  syntax clear
+elseif exists("b:current_syntax")
+  finish
+endif
+
+
+syn case ignore
+syn sync lines=250
+
+syn keyword augeasStatement    module let incl transform autoload
+syn keyword augeasTodo contained       TODO FIXME XXX DEBUG NOTE
+
+if exists("augeas_symbol_operator")
+  syn match   augeasSymbolOperator      "[+\-/*=]"
+  syn match   augeasSymbolOperator      "[<>]=\="
+  syn match   augeasSymbolOperator      "<>"
+  syn match   augeasSymbolOperator      ":="
+  syn match   augeasSymbolOperator      "[()]"
+  syn match   augeasSymbolOperator      "\.\."
+  syn match   augeasSymbolOperator       "[\^.]"
+  syn match   augeasMatrixDelimiter    "[][]"
+  "if you prefer you can highlight the range
+  "syn match  augeasMatrixDelimiter    "[\d\+\.\.\d\+]"
+endif
+
+if exists("augeas_no_tabs")
+  syn match augeasShowTab "\t"
+endif
+
+syn region augeasComment       start="(\*\|{"  end="\*)\|}"
+contains=augeasTodo,augeasSpaceError
+
+
+if !exists("augeas_no_functions")
+  " functions
+  syn keyword augeasLabel      del key store label store
+  syn keyword augeasFunction   Util Build Rx Sep
+
+endif
+
+" Define the default highlighting.
+" For version 5.7 and earlier: only when not done already
+" For version 5.8 and later: only when an item doesn't have highlighting yet
+if version >= 508 || !exists("did_augeas_syn_inits")
+  if version < 508
+    let did_augeas_syn_inits = 1
+    command -nargs=+ HiLink hi link <args>
+  else
+    command -nargs=+ HiLink hi def link <args>
+  endif
+
+  HiLink augeasAcces           augeasStatement
+  HiLink augeasBoolean         Boolean
+  HiLink augeasComment         Comment
+  HiLink augeasConditional     Conditional
+  HiLink augeasConstant                Constant
+  HiLink augeasDelimiter       Identifier
+  HiLink augeasDirective       augeasStatement
+  HiLink augeasException       Exception
+  HiLink augeasFloat           Float
+  HiLink augeasFunction                Function
+  HiLink augeasLabel           Label
+  HiLink augeasMatrixDelimiter Identifier
+  HiLink augeasModifier                Type
+  HiLink augeasNumber          Number
+  HiLink augeasOperator                Operator
+  HiLink augeasPredefined      augeasStatement
+  HiLink augeasPreProc         PreProc
+  HiLink augeasRepeat          Repeat
+  HiLink augeasSpaceError      Error
+  HiLink augeasStatement       Statement
+  HiLink augeasString          String
+  HiLink augeasStringEscape    Special
+  HiLink augeasStringEscapeGPC Special
+  HiLink augeasStringError     Error
+  HiLink augeasStruct          augeasStatement
+  HiLink augeasSymbolOperator  augeasOperator
+  HiLink augeasTodo            Todo
+  HiLink augeasType            Type
+  HiLink augeasUnclassified    augeasStatement
+  "  HiLink augeasAsm          Assembler
+  HiLink augeasError           Error
+  HiLink augeasAsmKey          augeasStatement
+  HiLink augeasShowTab         Error
+
+  delcommand HiLink
+endif
+
+
+let b:current_syntax = "augeas"
+
+" vim: ts=8 sw=2

_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to