Mercurial > vim
annotate runtime/syntax/sshconfig.vim @ 7687:61354fabf8a2 v7.4.1142
commit https://github.com/vim/vim/commit/b8060fe862f684b591f9ac679eac5b2594d6c5a0
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 19 22:29:28 2016 +0100
patch 7.4.1142
Problem: Cannot define keyword characters for a syntax file.
Solution: Add the ":syn iskeyword" command. (Christian Brabandt)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 19 Jan 2016 22:30:07 +0100 |
parents | 3012eaddb6b2 |
children | 1bf1b88968a2 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
3224 | 2 " Language: OpenSSH client configuration file (ssh_config) |
3 " Author: David Necas (Yeti) | |
7384
aea5ebf352c4
commit https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b
Christian Brabandt <cb@256bit.org>
parents:
3410
diff
changeset
|
4 " Maintainer: Dominik Fischer <d dot f dot fischer at web dot de> |
7597
3012eaddb6b2
commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents:
7384
diff
changeset
|
5 " Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de> |
3012eaddb6b2
commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents:
7384
diff
changeset
|
6 " Contributor: Karsten Hopp <karsten@redhat.com> |
3012eaddb6b2
commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents:
7384
diff
changeset
|
7 " Last Change: 2016 Jan 15 |
3012eaddb6b2
commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents:
7384
diff
changeset
|
8 " SSH Version: 7.1 |
3224 | 9 " |
7 | 10 |
11 " Setup | |
12 if version >= 600 | |
2034 | 13 if exists("b:current_syntax") |
14 finish | |
15 endif | |
7 | 16 else |
2034 | 17 syntax clear |
7 | 18 endif |
19 | |
20 if version >= 600 | |
2034 | 21 setlocal iskeyword=_,-,a-z,A-Z,48-57 |
7 | 22 else |
2034 | 23 set iskeyword=_,-,a-z,A-Z,48-57 |
7 | 24 endif |
25 | |
3224 | 26 |
27 " case on | |
28 syn case match | |
29 | |
7 | 30 |
31 " Comments | |
3224 | 32 syn match sshconfigComment "^#.*$" contains=sshconfigTodo |
33 syn match sshconfigComment "\s#.*$" contains=sshconfigTodo | |
34 | |
35 syn keyword sshconfigTodo TODO FIXME NOTE contained | |
36 | |
7 | 37 |
38 " Constants | |
39 syn keyword sshconfigYesNo yes no ask | |
2034 | 40 syn keyword sshconfigYesNo any auto |
3224 | 41 syn keyword sshconfigYesNo force autoask none |
42 | |
43 syn keyword sshconfigCipher 3des blowfish | |
44 syn keyword sshconfigCiphers aes128-cbc 3des-cbc blowfish blowfish-cbc cast128-cbc | |
45 syn keyword sshconfigCiphers aes192-cbc aes256-cbc aes128-ctr aes192-ctr aes256-ctr | |
46 syn keyword sshconfigCiphers arcfour arcfour128 arcfour256 cast128-cbc | |
47 | |
7 | 48 syn keyword sshconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96 |
49 syn keyword sshconfigMAC hmac-md5-96 | |
3224 | 50 syn keyword sshconfigMAC hmac-sha2-256 hmac-sha2-256-96 hmac-sha2-512 |
51 syn keyword sshconfigMAC hmac-sha2-512-96 | |
52 syn match sshconfigMAC "\<umac-64@openssh\.com\>" | |
53 | |
7 | 54 syn keyword sshconfigHostKeyAlg ssh-rsa ssh-dss |
3224 | 55 syn match sshconfigHostKeyAlg "\<ecdsa-sha2-nistp256-cert-v01@openssh\.com\>" |
56 syn match sshconfigHostKeyAlg "\<ecdsa-sha2-nistp384-cert-v01@openssh\.com\>" | |
57 syn match sshconfigHostKeyAlg "\<ecdsa-sha2-nistp521-cert-v01@openssh\.com\>" | |
58 syn match sshconfigHostKeyAlg "\<ssh-rsa-cert-v01@openssh\.com\>" | |
59 syn match sshconfigHostKeyAlg "\<ssh-dss-cert-v01@openssh\.com\>" | |
60 syn match sshconfigHostKeyAlg "\<ssh-rsa-cert-v00@openssh\.com\>" | |
61 syn match sshconfigHostKeyAlg "\<ssh-dss-cert-v00@openssh\.com\>" | |
62 syn keyword sshconfigHostKeyAlg ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521 | |
63 | |
64 syn keyword sshconfigPreferredAuth hostbased publickey password gssapi-with-mic | |
7 | 65 syn keyword sshconfigPreferredAuth keyboard-interactive |
3224 | 66 |
7 | 67 syn keyword sshconfigLogLevel QUIET FATAL ERROR INFO VERBOSE |
68 syn keyword sshconfigLogLevel DEBUG DEBUG1 DEBUG2 DEBUG3 | |
2034 | 69 syn keyword sshconfigSysLogFacility DAEMON USER AUTH AUTHPRIV LOCAL0 LOCAL1 |
70 syn keyword sshconfigSysLogFacility LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7 | |
3224 | 71 syn keyword sshconfigAddressFamily inet inet6 |
72 | |
7597
3012eaddb6b2
commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents:
7384
diff
changeset
|
73 syn match sshconfigIPQoS "af1[123]" |
3012eaddb6b2
commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents:
7384
diff
changeset
|
74 syn match sshconfigIPQoS "af2[123]" |
3224 | 75 syn match sshconfigIPQoS "af3[123]" |
76 syn match sshconfigIPQoS "af4[123]" | |
77 syn match sshconfigIPQoS "cs[0-7]" | |
78 syn keyword sshconfigIPQoS ef lowdelay throughput reliability | |
79 syn keyword sshconfigKbdInteractive bsdauth pam skey | |
80 | |
81 syn keyword sshconfigKexAlgo ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 | |
82 syn keyword sshconfigKexAlgo diffie-hellman-group-exchange-sha256 | |
83 syn keyword sshconfigKexAlgo diffie-hellman-group-exchange-sha1 | |
84 syn keyword sshconfigKexAlgo diffie-hellman-group14-sha1 | |
85 syn keyword sshconfigKexAlgo diffie-hellman-group1-sha1 | |
86 | |
87 syn keyword sshconfigTunnel point-to-point ethernet | |
88 | |
89 syn match sshconfigVar "%[rhplLdun]\>" | |
7 | 90 syn match sshconfigSpecial "[*?]" |
91 syn match sshconfigNumber "\d\+" | |
92 syn match sshconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>" | |
93 syn match sshconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>" | |
94 syn match sshconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}[:/]\d\+\>" | |
3371 | 95 syn match sshconfigHostPort "\(Host \)\@<=.\+" |
96 syn match sshconfigHostPort "\(HostName \)\@<=.\+" | |
3224 | 97 |
98 " case off | |
99 syn case ignore | |
100 | |
101 | |
7 | 102 " Keywords |
103 syn keyword sshconfigHostSect Host | |
3224 | 104 |
7384
aea5ebf352c4
commit https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b
Christian Brabandt <cb@256bit.org>
parents:
3410
diff
changeset
|
105 syn keyword sshconfigMatch canonical exec host originalhost user localuser all |
aea5ebf352c4
commit https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b
Christian Brabandt <cb@256bit.org>
parents:
3410
diff
changeset
|
106 |
2034 | 107 syn keyword sshconfigKeyword AddressFamily |
3224 | 108 syn keyword sshconfigKeyword BatchMode |
109 syn keyword sshconfigKeyword BindAddress | |
7597
3012eaddb6b2
commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents:
7384
diff
changeset
|
110 syn keyword sshconfigKeyword CanonicalDomains |
3012eaddb6b2
commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents:
7384
diff
changeset
|
111 syn keyword sshconfigKeyword CanonicalizeFallbackLocal |
3012eaddb6b2
commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents:
7384
diff
changeset
|
112 syn keyword sshconfigKeyword CanonicalizeHostname |
3012eaddb6b2
commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents:
7384
diff
changeset
|
113 syn keyword sshconfigKeyword CanonicalizeMaxDots |
3224 | 114 syn keyword sshconfigKeyword ChallengeResponseAuthentication |
115 syn keyword sshconfigKeyword CheckHostIP | |
116 syn keyword sshconfigKeyword Cipher | |
117 syn keyword sshconfigKeyword Ciphers | |
118 syn keyword sshconfigKeyword ClearAllForwardings | |
119 syn keyword sshconfigKeyword Compression | |
120 syn keyword sshconfigKeyword CompressionLevel | |
121 syn keyword sshconfigKeyword ConnectTimeout | |
122 syn keyword sshconfigKeyword ConnectionAttempts | |
123 syn keyword sshconfigKeyword ControlMaster | |
124 syn keyword sshconfigKeyword ControlPath | |
125 syn keyword sshconfigKeyword ControlPersist | |
126 syn keyword sshconfigKeyword DynamicForward | |
127 syn keyword sshconfigKeyword EnableSSHKeysign | |
128 syn keyword sshconfigKeyword EscapeChar | |
129 syn keyword sshconfigKeyword ExitOnForwardFailure | |
130 syn keyword sshconfigKeyword ForwardAgent | |
131 syn keyword sshconfigKeyword ForwardX11 | |
132 syn keyword sshconfigKeyword ForwardX11Timeout | |
2034 | 133 syn keyword sshconfigKeyword ForwardX11Trusted |
134 syn keyword sshconfigKeyword GSSAPIAuthentication | |
3224 | 135 syn keyword sshconfigKeyword GSSAPIClientIdentity |
136 syn keyword sshconfigKeyword GSSAPIDelegateCredentials | |
137 syn keyword sshconfigKeyword GSSAPIKeyExchange | |
138 syn keyword sshconfigKeyword GSSAPIRenewalForcesRekey | |
139 syn keyword sshconfigKeyword GSSAPIServerIdentity | |
140 syn keyword sshconfigKeyword GSSAPITrustDNS | |
141 syn keyword sshconfigKeyword GSSAPITrustDns | |
142 syn keyword sshconfigKeyword GatewayPorts | |
2034 | 143 syn keyword sshconfigKeyword GlobalKnownHostsFile |
3224 | 144 syn keyword sshconfigKeyword HashKnownHosts |
145 syn keyword sshconfigKeyword HostKeyAlgorithms | |
146 syn keyword sshconfigKeyword HostKeyAlias | |
147 syn keyword sshconfigKeyword HostName | |
148 syn keyword sshconfigKeyword HostbasedAuthentication | |
7384
aea5ebf352c4
commit https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b
Christian Brabandt <cb@256bit.org>
parents:
3410
diff
changeset
|
149 syn keyword sshconfigKeyword HostbasedKeyTypes |
3224 | 150 syn keyword sshconfigKeyword IPQoS |
151 syn keyword sshconfigKeyword IdentitiesOnly | |
152 syn keyword sshconfigKeyword IdentityFile | |
7597
3012eaddb6b2
commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents:
7384
diff
changeset
|
153 syn keyword sshconfigKeyword IgnoreUnknown |
3012eaddb6b2
commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents:
7384
diff
changeset
|
154 syn keyword sshconfigKeyword IPQoS |
3224 | 155 syn keyword sshconfigKeyword KbdInteractiveAuthentication |
156 syn keyword sshconfigKeyword KbdInteractiveDevices | |
157 syn keyword sshconfigKeyword KexAlgorithms | |
158 syn keyword sshconfigKeyword LocalCommand | |
159 syn keyword sshconfigKeyword LocalForward | |
160 syn keyword sshconfigKeyword LogLevel | |
2034 | 161 syn keyword sshconfigKeyword MACs |
7384
aea5ebf352c4
commit https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b
Christian Brabandt <cb@256bit.org>
parents:
3410
diff
changeset
|
162 syn keyword sshconfigKeyword Match |
2034 | 163 syn keyword sshconfigKeyword NoHostAuthenticationForLocalhost |
164 syn keyword sshconfigKeyword NumberOfPasswordPrompts | |
3224 | 165 syn keyword sshconfigKeyword PKCS11Provider |
166 syn keyword sshconfigKeyword PasswordAuthentication | |
2034 | 167 syn keyword sshconfigKeyword PermitLocalCommand |
3224 | 168 syn keyword sshconfigKeyword Port |
169 syn keyword sshconfigKeyword PreferredAuthentications | |
170 syn keyword sshconfigKeyword Protocol | |
171 syn keyword sshconfigKeyword ProxyCommand | |
7384
aea5ebf352c4
commit https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b
Christian Brabandt <cb@256bit.org>
parents:
3410
diff
changeset
|
172 syn keyword sshconfigKeyword ProxyUseFDPass |
aea5ebf352c4
commit https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b
Christian Brabandt <cb@256bit.org>
parents:
3410
diff
changeset
|
173 syn keyword sshconfigKeyword PubkeyAcceptedKeyTypes |
3224 | 174 syn keyword sshconfigKeyword PubkeyAuthentication |
175 syn keyword sshconfigKeyword RSAAuthentication | |
176 syn keyword sshconfigKeyword RekeyLimit | |
177 syn keyword sshconfigKeyword RemoteForward | |
178 syn keyword sshconfigKeyword RequestTTY | |
2034 | 179 syn keyword sshconfigKeyword RhostsRSAAuthentication |
3224 | 180 syn keyword sshconfigKeyword SendEnv |
181 syn keyword sshconfigKeyword ServerAliveCountMax | |
182 syn keyword sshconfigKeyword ServerAliveInterval | |
183 syn keyword sshconfigKeyword SmartcardDevice | |
184 syn keyword sshconfigKeyword StrictHostKeyChecking | |
185 syn keyword sshconfigKeyword TCPKeepAlive | |
186 syn keyword sshconfigKeyword Tunnel | |
187 syn keyword sshconfigKeyword TunnelDevice | |
188 syn keyword sshconfigKeyword UseBlacklistedKeys | |
189 syn keyword sshconfigKeyword UsePrivilegedPort | |
190 syn keyword sshconfigKeyword User | |
2034 | 191 syn keyword sshconfigKeyword UserKnownHostsFile |
7597
3012eaddb6b2
commit https://github.com/vim/vim/commit/345efa013dc6d1754ba06e5596a26c48c9935937
Christian Brabandt <cb@256bit.org>
parents:
7384
diff
changeset
|
192 syn keyword sshconfigKeyword UseRoaming |
3224 | 193 syn keyword sshconfigKeyword VerifyHostKeyDNS |
194 syn keyword sshconfigKeyword VisualHostKey | |
2034 | 195 syn keyword sshconfigKeyword XAuthLocation |
7 | 196 |
197 " Define the default highlighting | |
198 if version >= 508 || !exists("did_sshconfig_syntax_inits") | |
2034 | 199 if version < 508 |
200 let did_sshconfig_syntax_inits = 1 | |
201 command -nargs=+ HiLink hi link <args> | |
202 else | |
203 command -nargs=+ HiLink hi def link <args> | |
204 endif | |
7 | 205 |
2034 | 206 HiLink sshconfigComment Comment |
207 HiLink sshconfigTodo Todo | |
208 HiLink sshconfigHostPort sshconfigConstant | |
209 HiLink sshconfigNumber sshconfigConstant | |
210 HiLink sshconfigConstant Constant | |
211 HiLink sshconfigYesNo sshconfigEnum | |
212 HiLink sshconfigCipher sshconfigEnum | |
3224 | 213 HiLink sshconfigCiphers sshconfigEnum |
2034 | 214 HiLink sshconfigMAC sshconfigEnum |
215 HiLink sshconfigHostKeyAlg sshconfigEnum | |
216 HiLink sshconfigLogLevel sshconfigEnum | |
217 HiLink sshconfigSysLogFacility sshconfigEnum | |
3224 | 218 HiLink sshconfigAddressFamily sshconfigEnum |
219 HiLink sshconfigIPQoS sshconfigEnum | |
220 HiLink sshconfigKbdInteractive sshconfigEnum | |
221 HiLink sshconfigKexAlgo sshconfigEnum | |
222 HiLink sshconfigTunnel sshconfigEnum | |
2034 | 223 HiLink sshconfigPreferredAuth sshconfigEnum |
224 HiLink sshconfigVar sshconfigEnum | |
225 HiLink sshconfigEnum Identifier | |
226 HiLink sshconfigSpecial Special | |
227 HiLink sshconfigKeyword Keyword | |
228 HiLink sshconfigHostSect Type | |
7384
aea5ebf352c4
commit https://github.com/vim/vim/commit/256972a9849b5d575b62a6a71be5b6934b5b0e8b
Christian Brabandt <cb@256bit.org>
parents:
3410
diff
changeset
|
229 HiLink sshconfigMatch Type |
2034 | 230 delcommand HiLink |
7 | 231 endif |
232 | |
233 let b:current_syntax = "sshconfig" | |
3224 | 234 |
235 " vim:set ts=8 sw=2 sts=2: |