aboutsummaryrefslogtreecommitdiff
path: root/vim
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-05-12 09:47:22 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-05-12 09:47:22 +0100
commit1a7ae61f7a12aeb10ff385bd3f30942016f87aec (patch)
tree9676be6947ff0e466fcef48971a4ad8321f27b87 /vim
parent458d13e0d8723bdf723d0406a41a8d30ab1aff01 (diff)
downloadpaludis-1a7ae61f7a12aeb10ff385bd3f30942016f87aec.tar.gz
paludis-1a7ae61f7a12aeb10ff385bd3f30942016f87aec.tar.xz
R^2, with no functionality
Diffstat (limited to 'vim')
-rw-r--r--vim/ftdetect/paludis.vim5
-rw-r--r--vim/syntax/paludis-repositories-conf.vim45
2 files changed, 34 insertions, 16 deletions
diff --git a/vim/ftdetect/paludis.vim b/vim/ftdetect/paludis.vim
index 56e0b8d36..9c430ff79 100644
--- a/vim/ftdetect/paludis.vim
+++ b/vim/ftdetect/paludis.vim
@@ -1,7 +1,7 @@
" Vim filetype detection file
" Language: Paludis Things
" Author: Ciaran McCreesh
-" Copyright: Copyright (c) 2007 Ciaran McCreesh
+" Copyright: Copyright (c) 2007, 2010 Ciaran McCreesh
" Licence: You may redistribute this under the same terms as Vim itself
"
" Filetype detection for Paludis things.
@@ -71,6 +71,9 @@ au BufNewFile,BufRead **/options.conf.d/*.conf
au BufNewFile,BufRead repository_defaults.conf
\ set filetype=paludis-repositories-conf
+au BufNewFile,BufRead repository.template
+ \ set filetype=paludis-repositories-conf
+
au BufNewFile,BufRead **/repositories/*.conf
\ set filetype=paludis-repositories-conf
diff --git a/vim/syntax/paludis-repositories-conf.vim b/vim/syntax/paludis-repositories-conf.vim
index 3626c6ac7..0cece02fb 100644
--- a/vim/syntax/paludis-repositories-conf.vim
+++ b/vim/syntax/paludis-repositories-conf.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: Paludis repositories/*.conf files
" Author: Ciaran McCreesh
-" Copyright: Copyright (c) 2007, 2008, 2009 Ciaran McCreesh
+" Copyright: Copyright (c) 2007, 2008, 2009, 2010 Ciaran McCreesh
" Licence: You may redistribute this under the same terms as Vim itself
"
" Syntax highlighting for Paludis repositories/*.conf files.
@@ -26,16 +26,18 @@ syn match PaludisRepositoriesConfEquals /=/ skipwhite
syn region PaludisRepositoriesConfValue contained start=// end=/$/
\ contains=PaludisRepositoriesConfString,PaludisRepositoriesConfUnquoted,
\ PaludisRepositoriesConfContinuation,PaludisRepositoriesConfVariable,
- \ PaludisRepositoriesConfKnownValue
+ \ PaludisRepositoriesConfBadTemplateVariable,PaludisRepositoriesConfMacro,
+ \ PaludisRepositoriesConfBadMacro,PaludisRepositoriesConfKnownValue
\ skipwhite
syn match PaludisRepositoriesConfContinuation contained /\\$/
\ skipnl
-syn match PaludisRepositoriesConfUnquoted contained /[^ \t$"'\\]\+/ skipwhite
+syn match PaludisRepositoriesConfUnquoted contained /[^ \t$%"'\\]\+/ skipwhite
syn region PaludisRepositoriesConfString contained start=/"/ end=/"/
- \ contains=PaludisRepositoriesConfVariable
+ \ contains=PaludisRepositoriesConfVariable,PaludisRepositoriesConfBadTemplateVariable,
+ \ PaludisRepositoriesConfMacro,PaludisRepositoriesConfBadMacro
\ skipwhite
syn keyword PaludisRepositoriesConfKnownKey contained
@@ -45,7 +47,7 @@ syn keyword PaludisRepositoriesConfKnownKey contained
\ provides_cache importance layout use_manifest
\ binary_uri_prefix binary_keywords binary_destination binary_distdir
\ eapi_when_unspecified eapi_when_unknown profile_eapi_when_unspecified
- \ name handler
+ \ name handler config_template config_filename
syn keyword PaludisRepositoriesConfBadKey contained
\ world
@@ -53,16 +55,29 @@ syn keyword PaludisRepositoriesConfBadKey contained
syn keyword PaludisRepositoriesConfKnownValue contained
\ use require ignore
-syn match PaludisRepositoriesConfVariable contained /\$\({[^}]\+}\|[a-zA-Z0-9_]\+\)/ skipwhite
-
-hi def link PaludisRepositoriesConfKnownKey Keyword
-hi def link PaludisRepositoriesConfBadKey Error
-hi def link PaludisRepositoriesConfKnownValue Keyword
-hi def link PaludisRepositoriesConfString String
-hi def link PaludisRepositoriesConfUnquoted Constant
-hi def link PaludisRepositoriesConfVariable Identifier
-hi def link PaludisRepositoriesConfContinuation Preproc
-hi def link PaludisRepositoriesConfComment Comment
+syn match PaludisRepositoriesConfVariable contained
+ \ /\$\({\(repository_template\)\@![^}]\+}\|\(repository_template\)\@![a-zA-Z0-9_]\+\)/ skipwhite
+
+syn match PaludisRepositoriesConfBadTemplateVariable contained
+ \ /\$\({repository_template[^}]*}\|repository_template[a-zA-Z0-9_]*\)/ skipwhite
+
+syn match PaludisRepositoriesConfMacro contained
+ \ /%\({repository_template[^}]*}\|repository_template[a-zA-Z0-9_]\*\)/ skipwhite
+
+syn match PaludisRepositoriesConfBadMacro contained
+ \ /%\({\(repository_template\)\@![^}]\+}\|\(repository_template\)\@![a-zA-Z0-9_]\+\)/ skipwhite
+
+hi def link PaludisRepositoriesConfKnownKey Keyword
+hi def link PaludisRepositoriesConfBadKey Error
+hi def link PaludisRepositoriesConfKnownValue Keyword
+hi def link PaludisRepositoriesConfString String
+hi def link PaludisRepositoriesConfUnquoted Constant
+hi def link PaludisRepositoriesConfVariable Identifier
+hi def link PaludisRepositoriesConfBadTemplateVariable Error
+hi def link PaludisRepositoriesConfMacro Macro
+hi def link PaludisRepositoriesConfBadMacro Error
+hi def link PaludisRepositoriesConfContinuation Preproc
+hi def link PaludisRepositoriesConfComment Comment
let b:current_syntax = "paludis-repositories-conf"