aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-17 02:58:56 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-17 02:58:56 +0000
commitb868007a6b39d08403075a0778d32f4b885ea2a2 (patch)
treed792adb08a2f53d7f5413d47109514550e407ca3
parent305b1695e05b9f013d4a09e47054d546afbc2207 (diff)
downloadpaludis-b868007a6b39d08403075a0778d32f4b885ea2a2.tar.gz
paludis-b868007a6b39d08403075a0778d32f4b885ea2a2.tar.xz
vim syntax for suggestions.conf
-rw-r--r--vim/ftdetect/paludis.vim6
-rw-r--r--vim/syntax/Makefile.am1
-rw-r--r--vim/syntax/paludis-suggestions-conf.vim43
3 files changed, 50 insertions, 0 deletions
diff --git a/vim/ftdetect/paludis.vim b/vim/ftdetect/paludis.vim
index 7427b7d..61ff2e0 100644
--- a/vim/ftdetect/paludis.vim
+++ b/vim/ftdetect/paludis.vim
@@ -38,6 +38,12 @@ au BufNewFile,BufRead licences.conf
au BufNewFile,BufRead **/licences.conf.d/*.conf
\ set filetype=paludis-licenses-conf
+au BufNewFile,BufRead suggestions.conf
+ \ set filetype=paludis-suggestions-conf
+
+au BufNewFile,BufRead **/suggestions.conf.d/*.conf
+ \ set filetype=paludis-suggestions-conf
+
au BufNewFile,BufRead mirrors.conf
\ set filetype=paludis-mirrors-conf
diff --git a/vim/syntax/Makefile.am b/vim/syntax/Makefile.am
index 54ce904..d80cf75 100644
--- a/vim/syntax/Makefile.am
+++ b/vim/syntax/Makefile.am
@@ -12,6 +12,7 @@ vimscripts = \
paludis-output-conf.vim \
paludis-package-mask-conf.vim \
paludis-repositories-conf.vim \
+ paludis-suggestions-conf.vim \
paludis-use-conf.vim
if HAVE_VIM
diff --git a/vim/syntax/paludis-suggestions-conf.vim b/vim/syntax/paludis-suggestions-conf.vim
new file mode 100644
index 0000000..e767160
--- /dev/null
+++ b/vim/syntax/paludis-suggestions-conf.vim
@@ -0,0 +1,43 @@
+" Vim syntax file
+" Language: Paludis syggestions.conf files
+" Author: Ciaran McCreesh
+" Copyright: Copyright (c) 2007, 2010 Ciaran McCreesh
+" Licence: You may redistribute this under the same terms as Vim itself
+"
+" Syntax highlighting for Paludis syggestions.conf files.
+"
+
+if &compatible || v:version < 700
+ finish
+endif
+
+if exists("b:current_syntax")
+ finish
+endif
+
+syn region PaludisSuggestionsConfComment start=/^\s*#/ end=/$/
+
+syn match PaludisSuggestionsConfPDS /^[^ \t#\/]\+\/[^ \t#\/]\+\s*/
+ \ nextgroup=PaludisSuggestionsConfName,PaludisSuggestionsConfStars,PaludisSuggestionsConfContinuation
+ \ contains=PaludisSuggestionsConfWildcard
+syn match PaludisSuggestionsConfWildcard contained /\(\*\/\@=\|\/\@<=\*\)/
+syn match PaludisSuggestionsConfSet /^[^ \t#\/]\+\S\@!/
+ \ nextgroup=PaludisSuggestionsConfName,PaludisSuggestionsConfStars,PaludisSuggestionsConfContinuation skipwhite
+syn match PaludisSuggestionsConfName contained /-\?[a-zA-Z0-9\-_]\+\/[a-zA-Z0-9\-_+]\+/
+ \ nextgroup=PaludisSuggestionsConfName,PaludisSuggestionsConfStars,PaludisSuggestionsConfContinuation skipwhite
+syn match PaludisSuggestionsConfStars contained /-\?\*\/\*/
+ \ nextgroup=PaludisSuggestionsConfName,PaludisSuggestionsConfStars,PaludisSuggestionsConfContinuation skipwhite
+syn match PaludisSuggestionsConfContinuation contained /\\$/
+ \ nextgroup=PaludisSuggestionsConfName,PaludisSuggestionsConfStars,PaludisSuggestionsConfContinuation skipwhite skipnl
+
+hi def link PaludisSuggestionsConfComment Comment
+hi def link PaludisSuggestionsConfPDS Identifier
+hi def link PaludisSuggestionsConfWildcard Special
+hi def link PaludisSuggestionsConfSet Special
+hi def link PaludisSuggestionsConfName Keyword
+hi def link PaludisSuggestionsConfStars Keyword
+hi def link PaludisSuggestionsConfContinuation Preproc
+
+let b:current_syntax = "paludis-suggestions-conf"
+
+