7
|
1 " Vim syntax file
|
2034
|
2 " Language: OpenSSH client configuration file (ssh_config)
|
|
3 " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
|
|
4 " Last Change: 2009-07-09
|
7
|
5
|
|
6 " Setup
|
|
7 if version >= 600
|
2034
|
8 if exists("b:current_syntax")
|
|
9 finish
|
|
10 endif
|
7
|
11 else
|
2034
|
12 syntax clear
|
7
|
13 endif
|
|
14
|
|
15 if version >= 600
|
2034
|
16 setlocal iskeyword=_,-,a-z,A-Z,48-57
|
7
|
17 else
|
2034
|
18 set iskeyword=_,-,a-z,A-Z,48-57
|
7
|
19 endif
|
|
20
|
|
21 syn case ignore
|
|
22
|
|
23 " Comments
|
|
24 syn match sshconfigComment "#.*$" contains=sshconfigTodo
|
|
25 syn keyword sshconfigTodo TODO FIXME NOT contained
|
|
26
|
|
27 " Constants
|
|
28 syn keyword sshconfigYesNo yes no ask
|
2034
|
29 syn keyword sshconfigYesNo any auto
|
7
|
30 syn keyword sshconfigCipher aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
|
714
|
31 syn keyword sshconfigCipher aes192-cbc aes256-cbc aes128-ctr aes256-ctr
|
|
32 syn keyword sshconfigCipher arcfour arcfour128 arcfour256 cast128-cbc
|
7
|
33 syn keyword sshconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96
|
|
34 syn keyword sshconfigMAC hmac-md5-96
|
2034
|
35 syn match sshconfigMAC "\<umac-64@openssh\.com\>"
|
7
|
36 syn keyword sshconfigHostKeyAlg ssh-rsa ssh-dss
|
|
37 syn keyword sshconfigPreferredAuth hostbased publickey password
|
|
38 syn keyword sshconfigPreferredAuth keyboard-interactive
|
|
39 syn keyword sshconfigLogLevel QUIET FATAL ERROR INFO VERBOSE
|
|
40 syn keyword sshconfigLogLevel DEBUG DEBUG1 DEBUG2 DEBUG3
|
2034
|
41 syn keyword sshconfigSysLogFacility DAEMON USER AUTH AUTHPRIV LOCAL0 LOCAL1
|
|
42 syn keyword sshconfigSysLogFacility LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7
|
|
43 syn match sshconfigVar "%[rhpldun]\>"
|
7
|
44 syn match sshconfigSpecial "[*?]"
|
|
45 syn match sshconfigNumber "\d\+"
|
|
46 syn match sshconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>"
|
|
47 syn match sshconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>"
|
|
48 syn match sshconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}[:/]\d\+\>"
|
|
49
|
|
50 " Keywords
|
|
51 syn keyword sshconfigHostSect Host
|
2034
|
52 syn keyword sshconfigKeyword AddressFamily
|
|
53 syn keyword sshconfigKeyword BatchMode BindAddress
|
7
|
54 syn keyword sshconfigKeyword ChallengeResponseAuthentication CheckHostIP
|
714
|
55 syn keyword sshconfigKeyword Cipher Ciphers ClearAllForwardings
|
|
56 syn keyword sshconfigKeyword Compression CompressionLevel ConnectTimeout
|
|
57 syn keyword sshconfigKeyword ConnectionAttempts ControlMaster
|
2034
|
58 syn keyword sshconfigKeyword ControlPath DynamicForward
|
|
59 syn keyword sshconfigKeyword EnableSSHKeysign EscapeChar ExitOnForwardFailure
|
|
60 syn keyword sshconfigKeyword ForwardAgent ForwardX11
|
|
61 syn keyword sshconfigKeyword ForwardX11Trusted
|
|
62 syn keyword sshconfigKeyword GSSAPIAuthentication
|
714
|
63 syn keyword sshconfigKeyword GSSAPIDelegateCredentials GatewayPorts
|
2034
|
64 syn keyword sshconfigKeyword GlobalKnownHostsFile
|
|
65 syn keyword sshconfigKeyword HostKeyAlgorithms HashKnownHosts
|
714
|
66 syn keyword sshconfigKeyword HostKeyAlias HostName HostbasedAuthentication
|
2034
|
67 syn keyword sshconfigKeyword IdentitiesOnly IdentityFile
|
|
68 syn keyword sshconfigKeyword KbdInteractiveAuthentication KbdInteractiveDevices
|
|
69 syn keyword sshconfigKeyword LocalCommand LocalForward LogLevel
|
|
70 syn keyword sshconfigKeyword MACs
|
|
71 syn keyword sshconfigKeyword NoHostAuthenticationForLocalhost
|
|
72 syn keyword sshconfigKeyword NumberOfPasswordPrompts
|
|
73 syn keyword sshconfigKeyword PasswordAuthentication PermitLocalCommand
|
7
|
74 syn keyword sshconfigKeyword Port PreferredAuthentications Protocol
|
714
|
75 syn keyword sshconfigKeyword ProxyCommand PubkeyAuthentication
|
2034
|
76 syn keyword sshconfigKeyword PermitLocalCommand
|
|
77 syn keyword sshconfigKeyword RSAAuthentication RemoteForward RekeyLimit
|
|
78 syn keyword sshconfigKeyword RhostsRSAAuthentication
|
714
|
79 syn keyword sshconfigKeyword SendEnv ServerAliveCountMax ServerAliveInterval
|
|
80 syn keyword sshconfigKeyword SmartcardDevice StrictHostKeyChecking
|
2034
|
81 syn keyword sshconfigKeyword Tunnel TunnelDevice
|
714
|
82 syn keyword sshconfigKeyword TCPKeepAlive UsePrivilegedPort User
|
2034
|
83 syn keyword sshconfigKeyword UserKnownHostsFile
|
|
84 syn keyword sshconfigKeyword VerifyHostKeyDNS VisualHostKey
|
|
85 syn keyword sshconfigKeyword XAuthLocation
|
7
|
86
|
|
87 " Define the default highlighting
|
|
88 if version >= 508 || !exists("did_sshconfig_syntax_inits")
|
2034
|
89 if version < 508
|
|
90 let did_sshconfig_syntax_inits = 1
|
|
91 command -nargs=+ HiLink hi link <args>
|
|
92 else
|
|
93 command -nargs=+ HiLink hi def link <args>
|
|
94 endif
|
7
|
95
|
2034
|
96 HiLink sshconfigComment Comment
|
|
97 HiLink sshconfigTodo Todo
|
|
98 HiLink sshconfigHostPort sshconfigConstant
|
|
99 HiLink sshconfigNumber sshconfigConstant
|
|
100 HiLink sshconfigConstant Constant
|
|
101 HiLink sshconfigYesNo sshconfigEnum
|
|
102 HiLink sshconfigCipher sshconfigEnum
|
|
103 HiLink sshconfigMAC sshconfigEnum
|
|
104 HiLink sshconfigHostKeyAlg sshconfigEnum
|
|
105 HiLink sshconfigLogLevel sshconfigEnum
|
|
106 HiLink sshconfigSysLogFacility sshconfigEnum
|
|
107 HiLink sshconfigPreferredAuth sshconfigEnum
|
|
108 HiLink sshconfigVar sshconfigEnum
|
|
109 HiLink sshconfigEnum Identifier
|
|
110 HiLink sshconfigSpecial Special
|
|
111 HiLink sshconfigKeyword Keyword
|
|
112 HiLink sshconfigHostSect Type
|
|
113 delcommand HiLink
|
7
|
114 endif
|
|
115
|
|
116 let b:current_syntax = "sshconfig"
|