summaryrefslogtreecommitdiffstats
path: root/runtime/syntax/wget.vim
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/syntax/wget.vim')
-rw-r--r--runtime/syntax/wget.vim294
1 files changed, 146 insertions, 148 deletions
diff --git a/runtime/syntax/wget.vim b/runtime/syntax/wget.vim
index 8178d02bad..93206c2005 100644
--- a/runtime/syntax/wget.vim
+++ b/runtime/syntax/wget.vim
@@ -1,7 +1,7 @@
" Vim syntax file
-" Language: Wget configuration file (/etc/wgetrc ~/.wgetrc)
+" Language: Wget configuration file (/etc/wgetrc ~/.wgetrc)
" Maintainer: Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2022 Apr 28
+" Last Change: 2023 Nov 05
" GNU Wget 1.21 built on linux-gnu.
@@ -12,7 +12,7 @@ endif
let s:cpo_save = &cpo
set cpo&vim
-syn match wgetComment "#.*$" contains=wgetTodo contained
+syn match wgetComment "#.*" contains=wgetTodo contained
syn keyword wgetTodo TODO NOTE FIXME XXX contained
@@ -21,208 +21,206 @@ syn region wgetString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline
syn case ignore
-syn keyword wgetBoolean on off yes no contained
-syn keyword wgetNumber inf contained
-
-syn match wgetNumber "\<\d\+>" contained
-syn match wgetQuota "\<\d\+[kmgt]\>" contained
-syn match wgetTime "\<\d\+[smhdw]\>" contained
+syn keyword wgetBoolean on off yes no contained
+syn keyword wgetNumber inf contained
+syn match wgetNumber "\<\d\+>" contained
+syn match wgetQuota "\<\d\+[kmgt]\>" contained
+syn match wgetTime "\<\d\+[smhdw]\>" contained
"{{{ Commands
let s:commands =<< trim EOL
accept
- accept_regex
- add_host_dir
- adjust_extension
- always_rest
- ask_password
- auth_no_challenge
+ accept-regex
+ add-host-dir
+ adjust-extension
+ always-rest
+ ask-password
+ auth-no-challenge
background
- backup_converted
+ backup-converted
backups
base
- bind_address
- bind_dns_address
- body_data
- body_file
- ca_certificate
- ca_directory
+ bind-address
+ bind-dns-address
+ body-data
+ body-file
+ ca-certificate
+ ca-directory
cache
certificate
- certificate_type
- check_certificate
- choose_config
+ certificate-type
+ check-certificate
+ choose-config
ciphers
compression
- connect_timeout
- content_disposition
- content_on_error
+ connect-timeout
+ content-disposition
+ content-on-error
continue
- convert_file_only
- convert_links
+ convert-file-only
+ convert-links
cookies
- crl_file
- cut_dirs
+ crl-file
+ cut-dirs
debug
- default_page
- delete_after
- dns_cache
- dns_servers
- dns_timeout
- dir_prefix
- dir_struct
+ default-page
+ delete-after
+ dns-cache
+ dns-servers
+ dns-timeout
+ dir-prefix
+ dir-struct
domains
- dot_bytes
- dots_in_line
- dot_spacing
- dot_style
- egd_file
- exclude_directories
- exclude_domains
- follow_ftp
- follow_tags
- force_html
- ftp_passwd
- ftp_password
- ftp_user
- ftp_proxy
- ftps_clear_data_connection
- ftps_fallback_to_ftp
- ftps_implicit
- ftps_resume_ssl
+ dot-bytes
+ dots-in-line
+ dot-spacing
+ dot-style
+ egd-file
+ exclude-directories
+ exclude-domains
+ follow-ftp
+ follow-tags
+ force-html
+ ftp-passwd
+ ftp-password
+ ftp-user
+ ftp-proxy
+ ftps-clear-data-connection
+ ftps-fallback-to-ftp
+ ftps-implicit
+ ftps-resume-ssl
hsts
- hsts_file
- ftp_stmlf
+ hsts-file
+ ftp-stmlf
glob
header
- html_extension
+ html-extension
htmlify
- http_keep_alive
- http_passwd
- http_password
- http_proxy
- https_proxy
- https_only
- http_user
- if_modified_since
- ignore_case
- ignore_length
- ignore_tags
- include_directories
- inet4_only
- inet6_only
+ http-keep-alive
+ http-passwd
+ http-password
+ http-proxy
+ https-proxy
+ https-only
+ http-user
+ if-modified-since
+ ignore-case
+ ignore-length
+ ignore-tags
+ include-directories
+ inet4-only
+ inet6-only
input
- input_meta_link
+ input-meta-link
iri
- keep_bad_hash
- keep_session_cookies
- kill_longer
- limit_rate
- load_cookies
+ keep-bad-hash
+ keep-session-cookies
+ kill-longer
+ limit-rate
+ load-cookies
locale
- local_encoding
+ local-encoding
logfile
login
- max_redirect
- metalink_index
- metalink_over_http
+ max-redirect
+ metalink-index
+ metalink-over-http
method
mirror
netrc
- no_clobber
- no_config
- no_parent
- no_proxy
+ no-clobber
+ no-config
+ no-parent
+ no-proxy
numtries
- output_document
- page_requisites
- passive_ftp
+ output-document
+ page-requisites
+ passive-ftp
passwd
password
- pinned_pubkey
- post_data
- post_file
- prefer_family
- preferred_location
- preserve_permissions
- private_key
- private_key_type
+ pinned-pubkey
+ post-data
+ post-file
+ prefer-family
+ preferred-location
+ preserve-permissions
+ private-key
+ private-key-type
progress
- protocol_directories
- proxy_passwd
- proxy_password
- proxy_user
+ protocol-directories
+ proxy-passwd
+ proxy-password
+ proxy-user
quiet
quota
- random_file
- random_wait
- read_timeout
- rec_level
+ random-file
+ random-wait
+ read-timeout
+ rec-level
recursive
referer
- regex_type
+ regex-type
reject
- rejected_log
- reject_regex
- relative_only
- remote_encoding
- remove_listing
- report_speed
- restrict_file_names
- retr_symlinks
- retry_connrefused
- retry_on_host_error
- retry_on_http_error
+ rejected-log
+ reject-regex
+ relative-only
+ remote-encoding
+ remove-listing
+ report-speed
+ restrict-file-names
+ retr-symlinks
+ retry-connrefused
+ retry-on-host-error
+ retry-on-http-error
robots
- save_cookies
- save_headers
- secure_protocol
- server_response
- show_all_dns_entries
- show_progress
- simple_host_check
- span_hosts
+ save-cookies
+ save-headers
+ secure-protocol
+ server-response
+ show-all-dns-entries
+ show-progress
+ simple-host-check
+ span-hosts
spider
- start_pos
- strict_comments
+ start-pos
+ strict-comments
sslcertfile
sslcertkey
timeout
timestamping
- use_server_timestamps
+ use-server-timestamps
tries
- trust_server_names
+ trust-server-names
unlink
- use_askpass
+ use-askpass
user
- use_proxy
- user_agent
+ use-proxy
+ user-agent
verbose
wait
- wait_retry
- warc_cdx
- warc_cdx_dedup
- warc_compression
- warc_digests
- warc_file
- warc_header
- warc_keep_log
- warc_max_size
- warc_temp_dir
+ wait-retry
+ warc-cdx
+ warc-cdx-dedup
+ warc-compression
+ warc-digests
+ warc-file
+ warc-header
+ warc-keep-log
+ warc-max-size
+ warc-temp-dir
wdebug
xattr
EOL
"}}}
-call map(s:commands, "substitute(v:val, '_', '[-_]\\\\=', 'g')")
-
for cmd in s:commands
- exe 'syn match wgetCommand "\<' . cmd . '\>" nextgroup=wgetAssignmentOperator skipwhite contained'
+ exe 'syn match wgetCommand "\<' .. substitute(cmd, '-', '[-_]\\=', "g") .. '\>" nextgroup=wgetAssignmentOperator skipwhite contained'
endfor
+unlet s:commands
syn case match
-syn match wgetStart "^" nextgroup=wgetCommand,wgetComment skipwhite
+syn match wgetLineStart "^" nextgroup=wgetCommand,wgetComment skipwhite
syn match wgetAssignmentOperator "=" nextgroup=wgetString,wgetBoolean,wgetNumber,wgetQuota,wgetTime skipwhite contained
hi def link wgetAssignmentOperator Special