[augeas-devel] augeas: master - Distribute and install vim syntax files

David Lutterkort lutter at fedoraproject.org
Mon Nov 30 16:55:44 UTC 2009


Gitweb:        http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=94bb57667fcf0d43713b5e24b15c6c8ab357db7a
Commit:        94bb57667fcf0d43713b5e24b15c6c8ab357db7a
Parent:        75c295c3083fcbec24625c9c9d3c8ca0e13cbbdd
Author:        David Lutterkort <lutter at redhat.com>
AuthorDate:    Mon Nov 30 08:54:33 2009 -0800
Committer:     David Lutterkort <lutter at redhat.com>
CommitterDate: Mon Nov 30 08:54:33 2009 -0800

Distribute and install vim syntax files

Fixes ticket #97
---
 augeas.spec.in          |    2 +
 doc/Makefile.am         |    5 ++-
 doc/augeas.vim          |  100 -----------------------------------------------
 doc/ftdetect/augeas.vim |    1 +
 doc/syntax/augeas.vim   |  100 +++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 107 insertions(+), 101 deletions(-)

diff --git a/augeas.spec.in b/augeas.spec.in
index a509d9e..9e6e97d 100644
--- a/augeas.spec.in
+++ b/augeas.spec.in
@@ -66,6 +66,8 @@ rm -rf $RPM_BUILD_ROOT
 %{_bindir}/augparse
 %{_bindir}/fadot
 %doc %{_mandir}/man1/*
+%{_datadir}/vim/vimfiles/syntax/augeas.vim
+%{_datadir}/vim/vimfiles/ftdetect/augeas.vim
 
 %files libs
 %defattr(-,root,root,-)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 83b77ab..b246464 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,7 +1,10 @@
 
 SUBDIRS = naturaldocs
 
-EXTRA_DIST = lenses.tex unambig.tex
+EXTRA_DIST = lenses.tex unambig.tex syntax/augeas.vim ftdetect/augeas.vim
+
+vimdir = $(datadir)/vim/vimfiles
+nobase_vim_DATA = syntax/augeas.vim ftdetect/augeas.vim
 
 # PDF targets
 PDFTARGETS=lenses.pdf unambig.pdf
diff --git a/doc/augeas.vim b/doc/augeas.vim
deleted file mode 100644
index 67bc10a..0000000
--- a/doc/augeas.vim
+++ /dev/null
@@ -1,100 +0,0 @@
-" Vim syntax file
-" Language:	Augeas
-" Version: 1.0
-" $Id$
-" Maintainer:  Bruno Cornec <bruno at project-builder.org>
-
-" 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
diff --git a/doc/ftdetect/augeas.vim b/doc/ftdetect/augeas.vim
new file mode 100644
index 0000000..2520eb8
--- /dev/null
+++ b/doc/ftdetect/augeas.vim
@@ -0,0 +1 @@
+au BufNewFile?,BufRead? *.aug set filetype=augeas
diff --git a/doc/syntax/augeas.vim b/doc/syntax/augeas.vim
new file mode 100644
index 0000000..67bc10a
--- /dev/null
+++ b/doc/syntax/augeas.vim
@@ -0,0 +1,100 @@
+" Vim syntax file
+" Language:	Augeas
+" Version: 1.0
+" $Id$
+" Maintainer:  Bruno Cornec <bruno at project-builder.org>
+
+" 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




More information about the augeas-devel mailing list