Merge branch 'vim-with-runtime' into feat/quickfix-title
[vim_extended.git] / runtime / syntax / sshdconfig.vim
blob97ee8f8771fbb9a700860c3c67794615ce142297
1 " Vim syntax file
2 " Language: OpenSSH server configuration file (sshd_config)
3 " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz>
4 " Last Change: 2009-07-09
6 " Setup
7 if version >= 600
8   if exists("b:current_syntax")
9     finish
10   endif
11 else
12   syntax clear
13 endif
15 if version >= 600
16   setlocal iskeyword=_,-,a-z,A-Z,48-57
17 else
18   set iskeyword=_,-,a-z,A-Z,48-57
19 endif
21 syn case ignore
23 " Comments
24 syn match sshdconfigComment "#.*$" contains=sshdconfigTodo
25 syn keyword sshdconfigTodo TODO FIXME NOT contained
27 " Constants
28 syn keyword sshdconfigYesNo yes no none
29 syn keyword sshdconfigAddressFamily any inet inet6
30 syn keyword sshdconfigCipher aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
31 syn keyword sshdconfigCipher aes192-cbc aes256-cbc aes128-ctr aes256-ctr
32 syn keyword sshdconfigCipher arcfour arcfour128 arcfour256 cast128-cbc
33 syn keyword sshdconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96
34 syn keyword sshdconfigMAC hmac-md5-96
35 syn match sshdconfigMAC "\<umac-64@openssh\.com\>"
36 syn keyword sshdconfigRootLogin without-password forced-commands-only
37 syn keyword sshdconfigLogLevel QUIET FATAL ERROR INFO VERBOSE
38 syn keyword sshdconfigLogLevel DEBUG DEBUG1 DEBUG2 DEBUG3
39 syn keyword sshdconfigSysLogFacility DAEMON USER AUTH AUTHPRIV LOCAL0 LOCAL1
40 syn keyword sshdconfigSysLogFacility LOCAL2 LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7
41 syn match sshdconfigSpecial "[*?]"
42 syn match sshdconfigNumber "\d\+"
43 syn match sshdconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>"
44 syn match sshdconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>"
45 " FIXME: this matches quite a few things which are NOT valid IPv6 addresses
46 syn match sshdconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}:\d\+\>"
47 syn match sshdconfigTime "\<\(\d\+[sSmMhHdDwW]\)\+\>"
49 " Keywords
50 syn keyword sshdconfigMatch Host User Group Address
51 syn keyword sshdconfigKeyword AcceptEnv AddressFamily AllowAgentForwarding
52 syn keyword sshdconfigKeyword AllowGroups AllowTcpForwarding
53 syn keyword sshdconfigKeyword AllowUsers AuthorizedKeysFile
54 syn keyword sshdconfigKeyword Banner
55 syn keyword sshdconfigKeyword ChallengeResponseAuthentication ChrootDirectory
56 syn keyword sshdconfigKeyword Ciphers ClientAliveCountMax
57 syn keyword sshdconfigKeyword ClientAliveInterval Compression
58 syn keyword sshdconfigKeyword DenyGroups DenyUsers
59 syn keyword sshdconfigKeyword ForceCommand
60 syn keyword sshdconfigKeyword GatewayPorts GSSAPIAuthentication
61 syn keyword sshdconfigKeyword GSSAPICleanupCredentials
62 syn keyword sshdconfigKeyword HostbasedAuthentication HostKey
63 syn keyword sshdconfigKeyword IgnoreRhosts IgnoreUserKnownHosts
64 syn keyword sshdconfigKeyword KerberosAuthentication KerberosGetAFSToken
65 syn keyword sshdconfigKeyword KerberosOrLocalPasswd KerberosTicketCleanup
66 syn keyword sshdconfigKeyword KeyRegenerationInterval
67 syn keyword sshdconfigKeyword ListenAddress LoginGraceTime LogLevel
68 syn keyword sshdconfigKeyword MACs Match MaxAuthTries MaxSessions MaxStartups
69 syn keyword sshdconfigKeyword PasswordAuthentication PermitEmptyPasswords
70 syn keyword sshdconfigKeyword PermitRootLogin PermitOpen PermitTunnel
71 syn keyword sshdconfigKeyword PermitUserEnvironment PidFile Port
72 syn keyword sshdconfigKeyword PrintLastLog PrintMotd Protocol
73 syn keyword sshdconfigKeyword PubkeyAuthentication
74 syn keyword sshdconfigKeyword RhostsRSAAuthentication RSAAuthentication
75 syn keyword sshdconfigKeyword ServerKeyBits ShowPatchLevel StrictModes
76 syn keyword sshdconfigKeyword Subsystem SyslogFacility
77 syn keyword sshdconfigKeyword TCPKeepAlive
78 syn keyword sshdconfigKeyword UseDNS UseLogin UsePAM UsePrivilegeSeparation
79 syn keyword sshdconfigKeyword X11DisplayOffset X11Forwarding
80 syn keyword sshdconfigKeyword X11UseLocalhost XAuthLocation
82 " Define the default highlighting
83 if version >= 508 || !exists("did_sshdconfig_syntax_inits")
84   if version < 508
85     let did_sshdconfig_syntax_inits = 1
86     command -nargs=+ HiLink hi link <args>
87   else
88     command -nargs=+ HiLink hi def link <args>
89   endif
91   HiLink sshdconfigComment        Comment
92   HiLink sshdconfigTodo           Todo
93   HiLink sshdconfigHostPort       sshdconfigConstant
94   HiLink sshdconfigTime           sshdconfigConstant
95   HiLink sshdconfigNumber         sshdconfigConstant
96   HiLink sshdconfigConstant       Constant
97   HiLink sshdconfigYesNo          sshdconfigEnum
98   HiLink sshdconfigAddressFamily  sshdconfigEnum
99   HiLink sshdconfigCipher         sshdconfigEnum
100   HiLink sshdconfigMAC            sshdconfigEnum
101   HiLink sshdconfigRootLogin      sshdconfigEnum
102   HiLink sshdconfigLogLevel       sshdconfigEnum
103   HiLink sshdconfigSysLogFacility sshdconfigEnum
104   HiLink sshdconfigEnum           Function
105   HiLink sshdconfigSpecial        Special
106   HiLink sshdconfigKeyword        Keyword
107   HiLink sshdconfigMatch          Type
108   delcommand HiLink
109 endif
111 let b:current_syntax = "sshdconfig"