blob: 26ae05d7e0f3be2a0747de1b638d3b435f13459a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
" Vim syntax file
" Language: Gentoo Eselect modules/libs
" Author: Ciaran McCreesh <ciaranm@gentoo.org>,
" Elfyn McBratney <beu@gentoo.org>
" Copyright: Copyright (c) 2004-2005 Ciaran McCreesh,
" Copyright (c) 2005 Elfyn McBratney
" Licence: You may redistribute this under the same terms as Vim itself
"
" Syntax highlighting for ebuilds and eclasses. Inherits from sh.vim and adds
" in Gentoo-specific highlights for certain keywords and functions. Requires
" vim 6.3 or later.
"
if &compatible || v:version < 603
finish
endif
if exists("b:current_syntax")
finish
endif
let is_bash=1
runtime! syntax/sh.vim
unlet b:current_syntax
"runtime syntax/gentoo-common.vim
" function names can contain more characters than sh.vim allows. Override
" this. See Gentoo bug 72469.
syn match bkshFunction "^\s*\<\h[0-9a-zA-Z_\-\.]*\>\s*()" skipwhite skipnl contains=bkshFunctionParen
" Core keywords
syn keyword EselectCoreKeyword die is_function has
" Config keywords
syn keyword EselectConfigKeyword store_config load_config add_config
" (String/misc) manipulation keywords
syn keyword EselectManipKeyword svn_date_to_version
" Multilib keywords
syn keyword EselectMultilibKeyword list_libdirs
" Output keywords
syn keyword EselectOutputKeywords write_error_msg write_list_start
syn keyword EselectOutputKeywords write_kv_list_entry write_numbered_list_entry
syn keyword EselectOutputKeywords write_numbered_list highlight
syn keyword EselectOutputKeywords highlight_warning space
" Test keywords
syn keyword EselectTestKeywords is_number
" clusters
syn cluster EselectThings contains=EselectCoreKeyword,EselectConfigKeyword
syn cluster EselectThings add=EselectManipKeyword,EselectMultilibKeyword,
syn cluster EselectThings add=EselectOutputKeywords,EselectTestKeywords
syn cluster shCommandSubList add=@EselectThings
hi def link EselectCoreKeyword Keyword
hi def link EselectConfigKeyword Identifier
hi def link EselectManipKeyword Identifier
hi def link EselectMultilibKeyword Identifier
hi def link EselectOutputKeyword Identifier
hi def link EselectTestKeyword Identifier
let b:current_syntax = "eselect"
" vim: sw=4 ts=4 et fdm=marker
|