aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-01 19:40:15 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-06-01 19:40:15 +0100
commita8aa55e04bc9d1f1be1b64bb1121ebd90e5b59b2 (patch)
tree4caa2af9ece09a572d589f0e6d5d5dc43d09949c /vim
parentad01450025b239a1c9889e4d26c6178c84510fb7 (diff)
downloadpaludis-a8aa55e04bc9d1f1be1b64bb1121ebd90e5b59b2.tar.gz
paludis-a8aa55e04bc9d1f1be1b64bb1121ebd90e5b59b2.tar.xz
output.conf syntax
Diffstat (limited to 'vim')
-rw-r--r--vim/ftdetect/paludis.vim2
-rw-r--r--vim/syntax/Makefile.am1
-rw-r--r--vim/syntax/paludis-output-conf.vim76
3 files changed, 79 insertions, 0 deletions
diff --git a/vim/ftdetect/paludis.vim b/vim/ftdetect/paludis.vim
index 3db4bdd32..7427b7d51 100644
--- a/vim/ftdetect/paludis.vim
+++ b/vim/ftdetect/paludis.vim
@@ -80,3 +80,5 @@ au BufNewFile,BufRead **/repositories/*.conf
au BufNewFile,BufRead **/metadata/repository_mask.conf
\ set filetype=paludis-package-mask-conf
+au BufNewFile,BufRead output.conf
+ \ set filetype=paludis-output-conf
diff --git a/vim/syntax/Makefile.am b/vim/syntax/Makefile.am
index 22e2d9498..54ce904dd 100644
--- a/vim/syntax/Makefile.am
+++ b/vim/syntax/Makefile.am
@@ -9,6 +9,7 @@ vimscripts = \
paludis-keywords-conf.vim \
paludis-licenses-conf.vim \
paludis-mirrors-conf.vim \
+ paludis-output-conf.vim \
paludis-package-mask-conf.vim \
paludis-repositories-conf.vim \
paludis-use-conf.vim
diff --git a/vim/syntax/paludis-output-conf.vim b/vim/syntax/paludis-output-conf.vim
new file mode 100644
index 000000000..4f00f4879
--- /dev/null
+++ b/vim/syntax/paludis-output-conf.vim
@@ -0,0 +1,76 @@
+" Vim syntax file
+" Language: Paludis output.conf files
+" Author: Ciaran McCreesh
+" Copyright: Copyright (c) 2010 Ciaran McCreesh
+" Licence: You may redistribute this under the same terms as Vim itself
+"
+" Syntax highlighting for output.conf files.
+"
+
+if &compatible || v:version < 700
+ finish
+endif
+
+if exists("b:current_syntax")
+ finish
+endif
+
+syn region PaludisOutputConfComment start=/^\s*#/ end=/$/
+
+syn region PaludisOutputConfKey start=/^\(\s*[^#]\)\@=/ end=/=\@=/
+ \ contains=PaludisOutputConfKnownKey
+
+syn match PaludisOutputConfEquals /=/ skipwhite
+ \ nextgroup=PaludisOutputConfValue
+
+syn region PaludisOutputConfValue contained start=// end=/$/
+ \ contains=PaludisOutputConfString,PaludisOutputConfUnquoted,
+ \ PaludisOutputConfContinuation,PaludisOutputConfVariable,
+ \ PaludisOutputConfMacro,PaludisOutputConfKnownValue
+ \ skipwhite
+
+syn match PaludisOutputConfContinuation contained /\\$/
+ \ skipnl
+
+syn match PaludisOutputConfUnquoted contained /[^ \t$%"'\\]\+/ skipwhite
+
+syn region PaludisOutputConfString contained start=/"/ end=/"/
+ \ contains=PaludisOutputConfVariable,PaludisOutputConfMacro
+ \ skipwhite
+
+syn keyword PaludisOutputConfKnownKey contained
+ \ handler children messages_children type output_exclusivity
+ \ manager action ignore_unfetched if_success if_failure
+ \ child condition_variable if_true if_false if_unset
+ \ filename keep_on_empty keep_on_success summary_output_manager
+ \ format_debug format_info format_warn format_error format_log
+ \ summary_output_message
+
+syn keyword PaludisOutputConfKnownValue contained
+ \ buffer file format_messages forward_at_finish ipc tee standard
+
+syn match PaludisOutputConfVariable contained
+ \ /\$\({[^}]\+}\|[a-zA-Z0-9_]\+\)/ skipwhite
+
+syn match PaludisOutputConfMacro contained
+ \ /%\({[^}]*}\|[a-zA-Z0-9_]\*\)/ skipwhite
+
+syn region PaludisOutputConfSection start=/^\[/ end=/\]$/ skipwhite
+ \ contains=PaludisOutputConfSectionName
+
+syn keyword PaludisOutputConfSectionName contained
+ \ rule manager
+
+hi def link PaludisOutputConfKnownKey Keyword
+hi def link PaludisOutputConfKnownValue Special
+hi def link PaludisOutputConfString String
+hi def link PaludisOutputConfUnquoted Constant
+hi def link PaludisOutputConfVariable Identifier
+hi def link PaludisOutputConfMacro Macro
+hi def link PaludisOutputConfContinuation Preproc
+hi def link PaludisOutputConfComment Comment
+hi def link PaludisOutputConfSection Type
+hi def link PaludisOutputConfSectionName Special
+
+let b:current_syntax = "paludis-repositories-conf"
+