annotate runtime/syntax/fish.vim @ 32732:257ab4ee8e4a v9.0.1686

patch 9.0.1686: undotree() only works for the current buffer Commit: https://github.com/vim/vim/commit/5fee11114975b7405b7ccd3ee8758e54bf559760 Author: Devin J. Pohly <djpohly@gmail.com> Date: Sun Apr 23 20:26:59 2023 -0500 patch 9.0.1686: undotree() only works for the current buffer Problem: undotree() only works for the current buffer Solution: Add an optional "buffer number" parameter to undotree(). If omitted, use the current buffer for backwards compatibility. closes: #4001 closes: #12292 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Devin J. Pohly <djpohly@gmail.com>
author Christian Brabandt <cb@256bit.org>
date Fri, 11 Aug 2023 23:00:05 +0200
parents a9b5ffbc0428
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
32004
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Language: fish
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 " Maintainer: Nicholas Boyle (github.com/nickeb96)
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 " Repository: https://github.com/nickeb96/fish.vim
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 " Last Change: February 1, 2023
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 if exists("b:current_syntax")
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 finish
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 endif
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 let s:cpo_save = &cpo
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 set cpo&vim
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 " Statements
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 syn cluster fishStatement contains=fishKeywordAndOr,fishNot,fishSelectStatement,fishKeyword,fishKeywordIf,fishCommand,fishVariable
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 syn keyword fishKeywordAndOr and or nextgroup=fishNot,fishSelectStatement,fishKeyword,fishKeywordIf,fishCommand
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 hi def link fishKeywordAndOr fishOperator
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21 syn keyword fishNot not skipwhite nextgroup=fishSelectStatement,fishKeyword,fishKeywordIf,fishCommand
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 syn match fishNot /!/ skipwhite nextgroup=fishSelectStatement,fishKeyword,fishKeywordIf,fishCommand
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 hi def link fishNot fishOperator
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 syn keyword fishSelectStatement command builtin skipwhite nextgroup=fishKeyword,fishKeywordIf,fishCommand,fishOption
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 hi def link fishSelectStatement fishKeyword
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 syn keyword fishKeyword end skipwhite nextgroup=@fishTerminator
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 syn keyword fishKeywordIf if skipwhite nextgroup=@fishStatement
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 syn keyword fishKeyword else skipwhite nextgroup=fishKeywordIf,fishSemicolon
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 hi def link fishKeywordIf fishKeyword
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 syn keyword fishKeyword switch skipwhite nextgroup=@fishArgument
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 syn keyword fishKeyword case skipwhite nextgroup=@fishArgument
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 syn keyword fishKeyword while skipwhite nextgroup=@fishStatement
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 syn keyword fishKeyword for skipwhite nextgroup=fishForVariable
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 syn match fishForVariable /[[:alnum:]_]\+/ contained skipwhite nextgroup=fishKeywordIn
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 syn keyword fishKeywordIn in contained skipwhite nextgroup=@fishArgument
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 hi def link fishForVariable fishParameter
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 hi def link fishKeywordIn fishKeyword
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 syn keyword fishKeyword _ abbr argparse begin bg bind block break breakpoint cd commandline
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 \ complete continue count disown echo emit eval exec exit false fg function functions
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 \ history jobs math printf pwd random read realpath return set set_color source status
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 \ string test time true type ulimit wait
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 \ skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 syn match fishKeyword /\<contains\>/ skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 syn match fishCommand /[[:alnum:]_\/[][[:alnum:]+._-]*/ skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 " Internally Nested Arguments
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57 syn cluster fishSubscriptArgs contains=fishInnerVariable,fishIndexNum,fishIndexRange,fishInnerCommandSub
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59 syn match fishInnerVariable /\$\+[[:alnum:]_]\+/ contained
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 syn match fishInnerVariable /\$\+[[:alnum:]_]\+\[/me=e-1,he=e-1 contained nextgroup=fishInnerSubscript
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61 hi def link fishInnerVariable fishVariable
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
63 syn region fishInnerSubscript matchgroup=fishVariable start=/\[/ end=/]/ contained
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
64 \ keepend contains=@fishSubscriptArgs
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
65 hi def link fishInnerSubscript fishSubscript
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
66
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
67 syn match fishIndexNum /[+-]?[[:digit:]]\+/ contained
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
68 hi def link fishIndexNum fishParameter
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
69
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
70 syn match fishIndexRange /\.\./ contained
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
71 hi def link fishIndexRange fishParameter
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
72
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
73 syn region fishInnerCommandSub matchgroup=fishOperator start=/(/ start=/\$(/ end=/)/ contained
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
74 \ contains=@fishStatement
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
75 hi def link fishInnerCommandSub fishCommandSub
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
76
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
77 syn region fishQuotedCommandSub matchgroup=fishOperator start=/\$(/ end=/)/ contained
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
78 \ contains=@fishStatement
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
79 hi def link fishQuotedCommandSub fishCommandSub
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
80
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
81 syn match fishBraceExpansionComma /,/ contained
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
82 hi def link fishBraceExpansionComma fishOperator
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
83
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
84 syn match fishBracedParameter '[[:alnum:]\u5b\u5d@:=+.%/!_-]\+' contained contains=fishInnerPathGlob
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
85 hi def link fishBracedParameter fishParameter
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
86
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
87 syn region fishBracedQuote start=/'/ skip=/\\'/ end=/'/ contained
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
88 \ contains=fishEscapedEscape,fishEscapedSQuote
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
89 syn region fishBracedQuote start=/"/ skip=/\\"/ end=/"/ contained
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
90 \ contains=fishEscapedEscape,fishEscapedDQuote,fishEscapedDollar,fishInnerVariable,fishInnerCommandSub
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
91 hi def link fishBracedQuote fishQuote
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
92
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
93
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
94 " Arguments
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
95
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
96 syn cluster fishArgument contains=fishParameter,fishOption,fishVariable,fishPathGlob,fishBraceExpansion,fishQuote,fishCharacter,fishCommandSub,fishRedirection,fishSelfPid
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
97
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
98 syn match fishParameter '[[:alnum:]\u5b\u5d@:=+.,%/!_-]\+' contained skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
99
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
100 syn match fishOption /-[[:alnum:]=_-]*/ contained skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
101
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
102 syn match fishPathGlob /\(\~\|*\|?\)/ contained skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
103
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
104 syn region fishBraceExpansion matchgroup=fishOperator start=/{/ end=/}/ contained
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
105 \ contains=fishBraceExpansionComma,fishInnerVariable,fishInnerCommandSub,fishBracedParameter,fishBracedQuote
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
106 \ skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
107
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
108 syn match fishVariable /\$\+[[:alnum:]_]\+/ skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
109 syn match fishVariable /\$\+[[:alnum:]_]\+\[/me=e-1,he=e-1 nextgroup=fishSubscript
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
110
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
111 syn region fishSubscript matchgroup=fishVariable start=/\[/ end=/]/ contained
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
112 \ keepend contains=@fishSubscriptArgs
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
113 \ skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
114
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
115 syn region fishCommandSub matchgroup=fishOperator start=/(/ start=/\$(/ end=/)/ contained
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
116 \ contains=@fishStatement
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
117 \ skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
118
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
119 syn region fishQuote start=/'/ skip=/\\'/ end=/'/ contained
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
120 \ contains=fishEscapedEscape,fishEscapedSQuote
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
121 \ skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
122 syn region fishQuote start=/"/ skip=/\\"/ end=/"/ contained
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
123 \ contains=fishEscapedEscape,fishEscapedDQuote,fishEscapedDollar,fishInnerVariable,fishQuotedCommandSub
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
124 \ skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
125
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
126 syn match fishEscapedEscape /\\\\/ contained
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
127 syn match fishEscapedSQuote /\\'/ contained
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
128 syn match fishEscapedDQuote /\\"/ contained
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
129 syn match fishEscapedDollar /\\\$/ contained
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
130 hi def link fishEscapedEscape fishCharacter
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
131 hi def link fishEscapedSQuote fishCharacter
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
132 hi def link fishEscapedDQuote fishCharacter
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
133 hi def link fishEscapedDollar fishCharacter
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
134
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
135 syn match fishCharacter /\\[0-7]\{1,3}/ contained skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
136 syn match fishCharacter /\\u[0-9a-fA-F]\{4}/ contained skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
137 syn match fishCharacter /\\U[0-9a-fA-F]\{8}/ contained skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
138 syn match fishCharacter /\\x[0-7][0-9a-fA-F]\|\\x[0-9a-fA-F]/ contained skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
139 syn match fishCharacter /\\X[0-9a-fA-F]\{1,2}/ contained skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
140 syn match fishCharacter /\\[abcefnrtv[\](){}<>\\*?~%#$|&;'" ]/ contained skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
141
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
142 syn match fishRedirection /</ contained skipwhite nextgroup=fishRedirectionTarget
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
143 syn match fishRedirection /[0-9&]\?>[>?]\?/ contained skipwhite nextgroup=fishRedirectionTarget
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
144 syn match fishRedirection /[0-9&]\?>&[0-9-]/ contained skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
145
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
146 syn match fishRedirectionTarget /[[:alnum:]$~*?{,}"'\/._-]\+/ contained contains=fishInnerVariable skipwhite nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
147 hi def link fishRedirectionTarget fishRedirection
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
148
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
149 syn match fishSelfPid /%self\>/ contained nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
150 hi def link fishSelfPid fishOperator
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
151
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
152
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
153 " Terminators
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
154
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
155 syn cluster fishTerminator contains=fishPipe,fishBackgroundJob,fishSemicolon,fishSymbolicAndOr
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
156
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
157 syn match fishPipe /\(1>\|2>\|&\)\?|/ contained skipwhite nextgroup=@fishStatement
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
158 hi def link fishPipe fishEnd
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
159
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
160 syn match fishBackgroundJob /&$/ contained skipwhite nextgroup=@fishStatement
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
161 syn match fishBackgroundJob /&[^<>&|]/me=s+1,he=s+1 contained skipwhite nextgroup=@fishStatement
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
162 hi def link fishBackgroundJob fishEnd
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
163
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
164 syn match fishSemicolon /;/ skipwhite nextgroup=@fishStatement
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
165 hi def link fishSemicolon fishEnd
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
166
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
167 syn match fishSymbolicAndOr /\(&&\|||\)/ contained skipwhite skipempty nextgroup=@fishStatement
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
168 hi def link fishSymbolicAndOr fishOperator
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
169
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
170
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
171 " Other
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
172
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
173 syn cluster fishNext contains=fishEscapedNl,@fishArgument,@fishTerminator
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
174
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
175 syn match fishEscapedNl /\\$/ skipnl skipwhite contained nextgroup=@fishNext
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
176
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
177 syn match fishComment /#.*/ contains=fishTodo,@Spell
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
178
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
179 syn keyword fishTodo TODO contained
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
180
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
181
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
182
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
183 syn sync minlines=200
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
184 syn sync maxlines=300
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
185
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
186
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
187 " Intermediate highlight groups matching $fish_color_* variables
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
188
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
189 hi def link fishCommand fish_color_command
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
190 hi def link fishComment fish_color_comment
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
191 hi def link fishEnd fish_color_end
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
192 hi def link fishCharacter fish_color_escape
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
193 hi def link fishKeyword fish_color_keyword
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
194 hi def link fishEscapedNl fish_color_normal
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
195 hi def link fishOperator fish_color_operator
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
196 hi def link fishVariable fish_color_operator
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
197 hi def link fishInnerVariable fish_color_operator
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
198 hi def link fishPathGlob fish_color_operator
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
199 hi def link fishOption fish_color_option
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
200 hi def link fishParameter fish_color_param
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
201 hi def link fishQuote fish_color_quote
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
202 hi def link fishRedirection fish_color_redirection
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
203
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
204
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
205 " Default highlight groups
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
206
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
207 hi def link fish_color_param Normal
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
208 hi def link fish_color_normal Normal
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
209 hi def link fish_color_option Normal
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
210 hi def link fish_color_command Function
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
211 hi def link fish_color_keyword Keyword
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
212 hi def link fish_color_end Delimiter
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
213 hi def link fish_color_operator Operator
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
214 hi def link fish_color_redirection Type
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
215 hi def link fish_color_quote String
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
216 hi def link fish_color_escape Character
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
217 hi def link fish_color_comment Comment
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
218
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
219 hi def link fishTodo Todo
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
220
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
221
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
222 let b:current_syntax = 'fish'
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
223
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
224 let &cpo = s:cpo_save
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
225 unlet s:cpo_save