2 " Language: ELinks configuration file (elinks.conf)
3 " Maintainer: Jonas Fonseca <fonseca@diku.dk>
4 " Last Change: Dec 12th 2002
5 " Description: This file covers elinks version 0.4pre15
8 " For version 5.x: Clear all syntax items
9 " For version 6.x: Quit when a syntax file was already loaded
12 elseif exists("b:current_syntax")
16 " Add keyword characters needed by elinksAction's.
24 syn match elinksComment /\s*#.*$/ contains=elinksTodo,elinksSyntax
25 syn keyword elinksTodo contained TODO NOTE NOT FIXME XXX
26 syn match elinksSyntax contained /[a-zA-Z-0-9\._-]\+\s\(<.*>\|\[.*|.*\]\)/
29 syn match elinksSet /^\s*set\s/ skipwhite nextgroup=elinksTreeOpt
31 " The '=' included in elinksTreeOpt controls highlighting of the tree options
32 syn match elinksTreeOpt /[a-zA-Z-0-9\*\._-]\+\s*=/ skipwhite contains=elinksAssign nextgroup=elinksNumber,elinksValue
33 syn match elinksAssign contained /=/
35 syn match elinksNumber /-\?\d\+[Mk]\?/ contains=elinksSize
36 syn match elinksSize contained /[Mk]/
38 syn region elinksValue start=+"+ms=e end=+"+ contains=elinksEmail,elinksURL,elinksColor,elinksEscape,elinksComArgs
39 syn match elinksEscape contained /\\"/
40 syn match elinksComArgs contained /%[hpstuv]/
41 syn match elinksColor contained /#\x\{6\}/
42 syn match elinksEmail contained "[a-zA-Z0-9.-]\+@[a-zA-Z0-9.-]\+"
43 syn match elinksURL contained "\(https\?\|ftp\)://\w\+[a-zA-Z0-9.-]*\(:[1-9]\d\{0,4\}\)\?"
46 syn match elinksBind /^\s*bind\s/ skipwhite nextgroup=elinksKeymap
47 syn match elinksKeymap /"\(main\|edit\|menu\)"/ skipwhite nextgroup=elinksKey
48 syn match elinksKey /"[^"]\+"/ skipwhite nextgroup=elinksActStr
50 syn match elinksActStr /=\s*"[^"]*"/ contains=elinksAssign,elinksAction
51 syn keyword elinksAction contained abort-connection add-bookmark add-bookmark-link
52 syn keyword elinksAction contained auto-complete auto-complete-unambiguous
53 syn keyword elinksAction contained back backspace bookmark-manager
54 syn keyword elinksAction contained cache-manager cancel cookie-manager
55 syn keyword elinksAction contained cookies-load copy-clipboard cut-clipboard
56 syn keyword elinksAction contained delete document-info down download download-image
57 syn keyword elinksAction contained download-manager
58 syn keyword elinksAction contained edit end enter enter-reload expand
59 syn keyword elinksAction contained file-menu find-next find-next-back follow-link forget-credentials
60 syn keyword elinksAction contained goto-url goto-url-current goto-url-current-link goto-url-home
61 syn keyword elinksAction contained header-info history-manager home jump-to-link
62 syn keyword elinksAction contained keybinding-manager kill-to-bol kill-to-eol
63 syn keyword elinksAction contained left link-menu lua-console
64 syn keyword elinksAction contained mark-item mark-set mark-goto menu next-frame none next-item
65 syn keyword elinksAction contained open-new-tab open-link-in-new-tab
66 syn keyword elinksAction contained open-link-in-new-window open-new-window options-manager
67 syn keyword elinksAction contained page-down page-up paste-clipboard previous-frame quit
68 syn keyword elinksAction contained really-quit redraw reload resume-download right
69 syn keyword elinksAction contained save-formatted scroll-down scroll-left
70 syn keyword elinksAction contained scroll-right scroll-up search search-back search-typeahead select
71 syn keyword elinksAction contained tab-close tab-next tab-prev toggle-display-images toggle-document-colors
72 syn keyword elinksAction contained toggle-numbered-links toggle-display-tables toggle-html-plain
73 syn keyword elinksAction contained unback unexpand up view-image zoom-frame
76 syn match elinksInclude /^\s*include\s/ skipwhite nextgroup=elinksValue
78 " Define the default highlighting.
79 " For version 5.7 and earlier: only when not done already
80 " For version 5.8 and later: only when an item doesn't have highlighting yet
81 if version >= 508 || !exists("did_elinks_syntax_inits")
83 let did_elinks_syntax_inits = 1
84 command -nargs=+ HiLink hi link <args>
86 command -nargs=+ HiLink hi def link <args>
88 HiLink elinksComment Comment
89 HiLink elinksTodo Todo
90 HiLink elinksSyntax SpecialComment
92 HiLink elinksSet Keyword
93 HiLink elinksTreeOpt Identifier
94 HiLink elinksAssign Operator
95 HiLink elinksValue String
96 HiLink elinksEscape SpecialChar
97 HiLink elinksComArgs SpecialChar
98 HiLink elinksColor Type
99 HiLink elinksEmail Type
100 HiLink elinksURL Type
101 HiLink elinksNumber Number
102 HiLink elinksSize Type
104 HiLink elinksBind Keyword
105 HiLink elinksKeymap Type
106 HiLink elinksKey Macro
107 HiLink elinksActStr String
108 HiLink elinksAction Identifier
110 HiLink elinksInclude Keyword
115 let b:current_syntax = "elinks"