diff options
Diffstat (limited to 'runtime/syntax')
130 files changed, 6482 insertions, 1939 deletions
diff --git a/runtime/syntax/2html.vim b/runtime/syntax/2html.vim index ce6797deaa..5fbdad90f3 100644 --- a/runtime/syntax/2html.vim +++ b/runtime/syntax/2html.vim @@ -1,6 +1,6 @@ " Vim syntax support file " Maintainer: Ben Fritz <fritzophrenic@gmail.com> -" Last Change: 2022 Dec 26 +" Last Change: 2023 Sep 05 " " Additional contributors: " @@ -32,9 +32,9 @@ let s:end=line('$') " Font if exists("g:html_font") if type(g:html_font) == type([]) - let s:htmlfont = "'". join(g:html_font,"','") . "', monospace" + let s:htmlfont = "'".. join(g:html_font,"','") .. "', monospace" else - let s:htmlfont = "'". g:html_font . "', monospace" + let s:htmlfont = "'".. g:html_font .. "', monospace" endif else let s:htmlfont = "monospace" @@ -221,8 +221,8 @@ else endif " Find out the background and foreground color for use later -let s:fgc = s:HtmlColor(synIDattr(hlID("Normal"), "fg#", s:whatterm)) -let s:bgc = s:HtmlColor(synIDattr(hlID("Normal"), "bg#", s:whatterm)) +let s:fgc = s:HtmlColor(synIDattr(hlID("Normal")->synIDtrans(), "fg#", s:whatterm)) +let s:bgc = s:HtmlColor(synIDattr(hlID("Normal")->synIDtrans(), "bg#", s:whatterm)) if s:fgc == "" let s:fgc = ( &background == "dark" ? "#ffffff" : "#000000" ) endif @@ -234,41 +234,43 @@ if !s:settings.use_css " Return opening HTML tag for given highlight id function! s:HtmlOpening(id, extra_attrs) let a = "" - if synIDattr(a:id, "inverse") + let translated_ID = synIDtrans(a:id) + if synIDattr(translated_ID, "inverse") " For inverse, we always must set both colors (and exchange them) - let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm)) - let a = a . '<span '.a:extra_attrs.'style="background-color: ' . ( x != "" ? x : s:fgc ) . '">' - let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm)) - let a = a . '<font color="' . ( x != "" ? x : s:bgc ) . '">' + let x = s:HtmlColor(synIDattr(translated_ID, "fg#", s:whatterm)) + let a = a .. '<span '..a:extra_attrs..'style="background-color: ' .. ( x != "" ? x : s:fgc ) .. '">' + let x = s:HtmlColor(synIDattr(translated_ID, "bg#", s:whatterm)) + let a = a .. '<font color="' .. ( x != "" ? x : s:bgc ) .. '">' else - let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm)) + let x = s:HtmlColor(synIDattr(translated_ID, "bg#", s:whatterm)) if x != "" - let a = a . '<span '.a:extra_attrs.'style="background-color: ' . x . '">' + let a = a .. '<span '..a:extra_attrs..'style="background-color: ' .. x .. '">' elseif !empty(a:extra_attrs) - let a = a . '<span '.a:extra_attrs.'>' + let a = a .. '<span '..a:extra_attrs..'>' endif - let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm)) - if x != "" | let a = a . '<font color="' . x . '">' | endif + let x = s:HtmlColor(synIDattr(translated_ID, "fg#", s:whatterm)) + if x != "" | let a = a .. '<font color="' .. x .. '">' | endif endif - if synIDattr(a:id, "bold") | let a = a . "<b>" | endif - if synIDattr(a:id, "italic") | let a = a . "<i>" | endif - if synIDattr(a:id, "underline") | let a = a . "<u>" | endif + if synIDattr(translated_ID, "bold") | let a = a .. "<b>" | endif + if synIDattr(translated_ID, "italic") | let a = a .. "<i>" | endif + if synIDattr(translated_ID, "underline") | let a = a .. "<u>" | endif return a endfun " Return closing HTML tag for given highlight id function! s:HtmlClosing(id, has_extra_attrs) let a = "" - if synIDattr(a:id, "underline") | let a = a . "</u>" | endif - if synIDattr(a:id, "italic") | let a = a . "</i>" | endif - if synIDattr(a:id, "bold") | let a = a . "</b>" | endif - if synIDattr(a:id, "inverse") - let a = a . '</font></span>' + let translated_ID = synIDtrans(a:id) + if synIDattr(translated_ID, "underline") | let a = a .. "</u>" | endif + if synIDattr(translated_ID, "italic") | let a = a .. "</i>" | endif + if synIDattr(translated_ID, "bold") | let a = a .. "</b>" | endif + if synIDattr(translated_ID, "inverse") + let a = a .. '</font></span>' else - let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm)) - if x != "" | let a = a . '</font>' | endif - let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm)) - if x != "" || a:has_extra_attrs | let a = a . '</span>' | endif + let x = s:HtmlColor(synIDattr(translated_ID, "fg#", s:whatterm)) + if x != "" | let a = a .. '</font>' | endif + let x = s:HtmlColor(synIDattr(translated_ID, "bg#", s:whatterm)) + if x != "" || a:has_extra_attrs | let a = a .. '</span>' | endif endif return a endfun @@ -286,84 +288,102 @@ if s:settings.use_css " save CSS to a list of rules to add to the output at the end of processing " first, get the style names we need - let wrapperfunc_lines = [ - \ 'function! s:BuildStyleWrapper(style_id, diff_style_id, extra_attrs, text, make_unselectable, unformatted)', - \ '', - \ ' let l:style_name = synIDattr(a:style_id, "name", s:whatterm)' - \ ] + let s:wrapperfunc_lines = [] + call add(s:wrapperfunc_lines, []) + let s:wrapperfunc_lines[-1] =<< trim ENDLET + function! s:BuildStyleWrapper(style_id, diff_style_id, extra_attrs, text, make_unselectable, unformatted) + + let l:style_name = synIDattr(a:style_id, "name", s:whatterm) + ENDLET if &diff - let wrapperfunc_lines += [ - \ ' let l:diff_style_name = synIDattr(a:diff_style_id, "name", s:whatterm)'] - - " Add normal groups and diff groups to separate lists so we can order them to - " allow diff highlight to override normal highlight - - " if primary style IS a diff style, grab it from the diff cache instead - " (always succeeds because we pre-populate it) - let wrapperfunc_lines += [ - \ '', - \ ' if a:style_id == s:DIFF_D_ID || a:style_id == s:DIFF_A_ID ||'. - \ ' a:style_id == s:DIFF_C_ID || a:style_id == s:DIFF_T_ID', - \ ' let l:saved_style = get(s:diffstylelist,a:style_id)', - \ ' else' - \ ] + call add(s:wrapperfunc_lines, []) + let s:wrapperfunc_lines[-1] =<< trim ENDLET + let l:diff_style_name = synIDattr(a:diff_style_id, "name", s:whatterm) + ENDLET + + " Add normal groups and diff groups to separate lists so we can order them to + " allow diff highlight to override normal highlight + + " if primary style IS a diff style, grab it from the diff cache instead + " (always succeeds because we pre-populate it) + call add(s:wrapperfunc_lines, []) + let s:wrapperfunc_lines[-1] =<< trim ENDLET + + if a:style_id == s:DIFF_D_ID || a:style_id == s:DIFF_A_ID || a:style_id == s:DIFF_C_ID || a:style_id == s:DIFF_T_ID + let l:saved_style = get(s:diffstylelist,a:style_id) + else + ENDLET endif " get primary style info from cache or build it on the fly if not found - let wrapperfunc_lines += [ - \ ' let l:saved_style = get(s:stylelist,a:style_id)', - \ ' if type(l:saved_style) == type(0)', - \ ' unlet l:saved_style', - \ ' let l:saved_style = s:CSS1(a:style_id)', - \ ' if l:saved_style != ""', - \ ' let l:saved_style = "." . l:style_name . " { " . l:saved_style . "}"', - \ ' endif', - \ ' let s:stylelist[a:style_id]= l:saved_style', - \ ' endif' - \ ] + call add(s:wrapperfunc_lines, []) + let s:wrapperfunc_lines[-1] =<< trim ENDLET + let l:saved_style = get(s:stylelist,a:style_id) + if type(l:saved_style) == type(0) + unlet l:saved_style + let l:saved_style = s:CSS1(a:style_id) + if l:saved_style != "" + let l:saved_style = "." .. l:style_name .. " { " .. l:saved_style .. "}" + endif + let s:stylelist[a:style_id] = l:saved_style + endif + ENDLET if &diff - let wrapperfunc_lines += [ ' endif' ] + call add(s:wrapperfunc_lines, []) + let s:wrapperfunc_lines[-1] =<< trim ENDLET + endif + ENDLET endif +" Ignore this comment, just bypassing a highlighting issue: if " Build the wrapper tags around the text. It turns out that caching these " gives pretty much zero performance gain and adds a lot of logic. - let wrapperfunc_lines += [ - \ '', - \ ' if l:saved_style == "" && empty(a:extra_attrs)' - \ ] + call add(s:wrapperfunc_lines, []) + let s:wrapperfunc_lines[-1] =<< trim ENDLET + + if l:saved_style == "" && empty(a:extra_attrs) + ENDLET if &diff - let wrapperfunc_lines += [ - \ ' if a:diff_style_id <= 0' - \ ] + call add(s:wrapperfunc_lines, []) + let s:wrapperfunc_lines[-1] =<< trim ENDLET + if a:diff_style_id <= 0 + ENDLET endif " no surroundings if neither primary nor diff style has any info - let wrapperfunc_lines += [ - \ ' return a:text' - \ ] + call add(s:wrapperfunc_lines, []) + let s:wrapperfunc_lines[-1] =<< trim ENDLET + return a:text + ENDLET if &diff " no primary style, but diff style - let wrapperfunc_lines += [ - \ ' else', - \ ' return "<span class=\"" .l:diff_style_name . "\">".a:text."</span>"', - \ ' endif' - \ ] + call add(s:wrapperfunc_lines, []) + let s:wrapperfunc_lines[-1] =<< trim ENDLET + else + return '<span class="' ..l:diff_style_name .. '">'..a:text.."</span>" + endif + ENDLET endif + " Ignore this comment, just bypassing a highlighting issue: if + " open tag for non-empty primary style - let wrapperfunc_lines += [ - \ ' else'] + call add(s:wrapperfunc_lines, []) + let s:wrapperfunc_lines[-1] =<< trim ENDLET + else + ENDLET " non-empty primary style. handle either empty or non-empty diff style. " " separate the two classes by a space to apply them both if there is a diff " style name, unless the primary style is empty, then just use the diff style " name - let diffstyle = - \ (&diff ? '(a:diff_style_id <= 0 ? "" : " ". l:diff_style_name) .' - \ : "") + let s:diffstyle = + \ (&diff ? '(a:diff_style_id <= 0 ? "" : " " .. l:diff_style_name)..' + \ : '') if s:settings.prevent_copy == "" - let wrapperfunc_lines += [ - \ ' return "<span ".a:extra_attrs."class=\"" . l:style_name .'.diffstyle.'"\">".a:text."</span>"' - \ ] + call add(s:wrapperfunc_lines, []) + let s:wrapperfunc_lines[-1] =<< trim eval ENDLET + return "<span "..a:extra_attrs..'class="' .. l:style_name ..{s:diffstyle}'">'..a:text.."</span>" + ENDLET else " New method: use generated content in the CSS. The only thing needed here @@ -388,59 +408,76 @@ if s:settings.use_css " Note, if maxlength property needs to be added in the future, it will need " to use strchars(), because HTML specifies that the maxlength parameter " uses the number of unique codepoints for its limit. - let wrapperfunc_lines += [ - \ ' if a:make_unselectable', - \ ' return "<span ".a:extra_attrs."class=\"" . l:style_name .'.diffstyle.'"\"' - \ ] + call add(s:wrapperfunc_lines, []) + let s:wrapperfunc_lines[-1] =<< trim eval ENDLET + if a:make_unselectable + let return_span = "<span "..a:extra_attrs..'class="' .. l:style_name ..{s:diffstyle}'"' + ENDLET if s:settings.use_input_for_pc !=# 'all' - let wrapperfunc_lines[-1] .= ' " . "data-" . l:style_name . "-content=\"".a:text."\"' + call add(s:wrapperfunc_lines, []) + let s:wrapperfunc_lines[-1] =<< trim ENDLET + let return_span ..= " data-" .. l:style_name .. '-content="'..a:text..'"' + ENDLET endif - let wrapperfunc_lines[-1] .= '>' + call add(s:wrapperfunc_lines, []) + let s:wrapperfunc_lines[-1] =<< trim ENDLET + let return_span ..= '>' + ENDLET if s:settings.use_input_for_pc !=# 'none' - let wrapperfunc_lines[-1] .= - \ '<input'.s:unselInputType.' class=\"" . l:style_name .'.diffstyle.'"\"'. - \ ' value=\"".substitute(a:unformatted,''\s\+$'',"","")."\"'. - \ ' onselect=''this.blur(); return false;'''. - \ ' onmousedown=''this.blur(); return false;'''. - \ ' onclick=''this.blur(); return false;'''. - \ ' readonly=''readonly'''. - \ ' size=\"".strwidth(a:unformatted)."\"'. - \ (s:settings.use_xhtml ? '/' : '').'>' + call add(s:wrapperfunc_lines, []) + let s:wrapperfunc_lines[-1] =<< trim eval ENDLET + let return_span ..= '<input'..s:unselInputType..' class="' .. l:style_name ..{s:diffstyle}'"' + let return_span ..= ' value="'..substitute(a:unformatted,'\s\+$',"","")..'"' + let return_span ..= " onselect='this.blur(); return false;'" + let return_span ..= " onmousedown='this.blur(); return false;'" + let return_span ..= " onclick='this.blur(); return false;'" + let return_span ..= " readonly='readonly'" + let return_span ..= ' size="'..strwidth(a:unformatted)..'"' + let return_span ..= (s:settings.use_xhtml ? '/>' : '>') + ENDLET endif - let wrapperfunc_lines[-1] .= '</span>"' - let wrapperfunc_lines += [ - \ ' else', - \ ' return "<span ".a:extra_attrs."class=\"" . l:style_name .'. diffstyle .'"\">".a:text."</span>"' - \ ] + call add(s:wrapperfunc_lines, []) + let s:wrapperfunc_lines[-1] =<< trim eval ENDLET + return return_span..'</span>' + else + return "<span "..a:extra_attrs..'class="' .. l:style_name .. {s:diffstyle}'">'..a:text.."</span>" + endif + ENDLET endif - let wrapperfunc_lines += [ - \ ' endif', - \ 'endfun' - \ ] + call add(s:wrapperfunc_lines, []) + let s:wrapperfunc_lines[-1] =<< trim ENDLET + endif + endfun + ENDLET else " Non-CSS method just needs the wrapper. " " Functions used to get opening/closing automatically return null strings if " no styles exist. if &diff - let wrapperfunc_lines = [ - \ 'function! s:BuildStyleWrapper(style_id, diff_style_id, extra_attrs, text, unusedarg, unusedarg2)', - \ ' return s:HtmlOpening(a:style_id, a:extra_attrs).(a:diff_style_id <= 0 ? "" :'. - \ 's:HtmlOpening(a:diff_style_id, "")).a:text.'. - \ '(a:diff_style_id <= 0 ? "" : s:HtmlClosing(a:diff_style_id, 0)).s:HtmlClosing(a:style_id, !empty(a:extra_attrs))', - \ 'endfun' - \ ] + let s:wrapperfunc_lines =<< trim ENDLET + function! s:BuildStyleWrapper(style_id, diff_style_id, extra_attrs, text, unusedarg, unusedarg2) + if a:diff_style_id <= 0 + let l:diff_opening = s:HtmlOpening(a:diff_style_id, "") + let l:diff_closing = s:HtmlClosing(a:diff_style_id, 0) + else + let l:diff_opening = "" + let l:diff_closing = "" + endif + return s:HtmlOpening(a:style_id, a:extra_attrs)..l:diff_opening..a:text..l:diff_closing..s:HtmlClosing(a:style_id, !empty(a:extra_attrs)) + endfun + ENDLET else - let wrapperfunc_lines = [ - \ 'function! s:BuildStyleWrapper(style_id, diff_style_id, extra_attrs, text, unusedarg, unusedarg2)', - \ ' return s:HtmlOpening(a:style_id, a:extra_attrs).a:text.s:HtmlClosing(a:style_id, !empty(a:extra_attrs))', - \ 'endfun' - \ ] + let s:wrapperfunc_lines =<< trim ENDLET + function! s:BuildStyleWrapper(style_id, diff_style_id, extra_attrs, text, unusedarg, unusedarg2) + return s:HtmlOpening(a:style_id, a:extra_attrs)..a:text..s:HtmlClosing(a:style_id, !empty(a:extra_attrs)) + endfun + ENDLET endif endif " create the function we built line by line above -exec join(wrapperfunc_lines, "\n") +exec join(flatten(s:wrapperfunc_lines), "\n") let s:diff_mode = &diff @@ -471,7 +508,7 @@ function! s:HtmlFormat(text, style_id, diff_style_id, extra_attrs, make_unselect " Replace double spaces, leading spaces, and trailing spaces if needed if ' ' != s:HtmlSpace - let formatted = substitute(formatted, ' ', s:HtmlSpace . s:HtmlSpace, 'g') + let formatted = substitute(formatted, ' ', s:HtmlSpace .. s:HtmlSpace, 'g') let formatted = substitute(formatted, '^ ', s:HtmlSpace, 'g') let formatted = substitute(formatted, ' \+$', s:HtmlSpace, 'g') endif @@ -487,7 +524,7 @@ if s:settings.prevent_copy =~# 'n' if s:settings.line_ids function! s:HtmlFormat_n(text, style_id, diff_style_id, lnr) if a:lnr > 0 - return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 'id="'.(exists('g:html_diff_win_num') ? 'W'.g:html_diff_win_num : "").'L'.a:lnr.s:settings.id_suffix.'" ', 1) + return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 'id="'..(exists('g:html_diff_win_num') ? 'W'..g:html_diff_win_num : "")..'L'..a:lnr..s:settings.id_suffix..'" ', 1) else return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 1) endif @@ -503,14 +540,14 @@ if s:settings.prevent_copy =~# 'n' " always be non-zero, however we don't want to use the <input> because that " won't work as nice for empty text function! s:HtmlFormat_n(text, style_id, diff_style_id, lnr) - return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 'id="'.(exists('g:html_diff_win_num') ? 'W'.g:html_diff_win_num : "").'L'.a:lnr.s:settings.id_suffix.'" ', 0) + return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 'id="'..(exists('g:html_diff_win_num') ? 'W'..g:html_diff_win_num : "")..'L'..a:lnr..s:settings.id_suffix..'" ', 0) endfun endif else if s:settings.line_ids function! s:HtmlFormat_n(text, style_id, diff_style_id, lnr) if a:lnr > 0 - return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 'id="'.(exists('g:html_diff_win_num') ? 'W'.g:html_diff_win_num : "").'L'.a:lnr.s:settings.id_suffix.'" ', 0) + return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, 'id="'..(exists('g:html_diff_win_num') ? 'W'..g:html_diff_win_num : "")..'L'..a:lnr..s:settings.id_suffix..'" ', 0) else return s:HtmlFormat(a:text, a:style_id, a:diff_style_id, "", 0) endif @@ -535,8 +572,8 @@ if s:settings.prevent_copy =~# 'f' " Simply space-pad to the desired width inside the generated content (note " that the FoldColumn definition includes a whitespace:pre rule) function! s:FoldColumn_build(char, len, numfill, char2, class, click) - return "<a href='#' class='".a:class."' onclick='".a:click."' data-FoldColumn-content='". - \ repeat(a:char, a:len).a:char2.repeat(' ', a:numfill). + return "<a href='#' class='"..a:class.."' onclick='"..a:click.."' data-FoldColumn-content='". + \ repeat(a:char, a:len)..a:char2..repeat(' ', a:numfill). \ "'></a>" endfun function! s:FoldColumn_fill() @@ -554,35 +591,38 @@ if s:settings.prevent_copy =~# 'f' " " Note, 'exec' commands do not recognize line continuations, so must " concatenate lines rather than continue them. - let build_fun_lines = [ - \ 'function! s:FoldColumn_build(char, len, numfill, char2, class, click)', - \ ' let l:input_open = "<input readonly=''readonly''".s:unselInputType.'. - \ ' " onselect=''this.blur(); return false;''".'. - \ ' " onmousedown=''this.blur(); ".a:click." return false;''".'. - \ ' " onclick=''return false;'' size=''".'. - \ ' string(a:len + (empty(a:char2) ? 0 : 1) + a:numfill) .'. - \ ' "'' "', - \ ' let l:common_attrs = "class=''FoldColumn'' value=''"', - \ ' let l:input_close = (s:settings.use_xhtml ? "'' />" : "''>")' - \ ] + let s:build_fun_lines = [] + call add(s:build_fun_lines, []) + let s:build_fun_lines[-1] =<< trim ENDLET + function! s:FoldColumn_build(char, len, numfill, char2, class, click) + let l:input_open = "<input readonly='readonly'"..s:unselInputType + let l:input_open ..= " onselect='this.blur(); return false;'" + let l:input_open ..= " onmousedown='this.blur(); "..a:click.." return false;'" + let l:input_open ..= " onclick='return false;' size='" + let l:input_open ..= string(a:len + (empty(a:char2) ? 0 : 1) + a:numfill) .. "' " + let l:common_attrs = "class='FoldColumn' value='" + let l:input_close = (s:settings.use_xhtml ? "' />" : "'>") + let l:return_span = "<span class='"..a:class.."'>" + let l:return_span ..= l:input_open..l:common_attrs..repeat(a:char, a:len)..(a:char2) + let l:return_span ..= l:input_close + ENDLET if s:settings.use_input_for_pc ==# 'fallback' - let build_fun_lines += [ - \ ' let l:gen_content_link ='. - \ ' "<a href=''#'' class=''FoldColumn'' onclick=''".a:click."'' data-FoldColumn-content=''".'. - \ ' repeat(a:char, a:len).a:char2.repeat('' '', a:numfill).'. - \ ' "''></a>"' - \ ] + call add(s:build_fun_lines, []) + let s:build_fun_lines[-1] =<< trim ENDLET + let l:return_span ..= "<a href='#' class='FoldColumn' onclick='"..a:click.."'" + let l:return_span ..= " data-FoldColumn-content='" + let l:return_span ..= repeat(a:char, a:len)..a:char2..repeat(' ', a:numfill) + let l:return_span ..= "'></a>" + ENDLET endif - let build_fun_lines += [ - \ ' return "<span class=''".a:class."''>".'. - \ ' l:input_open.l:common_attrs.repeat(a:char, a:len).(a:char2).'. - \ ' l:input_close.'. - \ (s:settings.use_input_for_pc ==# 'fallback' ? 'l:gen_content_link.' : ""). - \ ' "</span>"', - \ 'endfun' - \ ] + call add(s:build_fun_lines, []) + let s:build_fun_lines[-1] =<< trim ENDLET + let l:return_span ..= "</span>" + return l:return_span + endfun + ENDLET " create the function we built line by line above - exec join(build_fun_lines, "\n") + exec join(flatten(s:build_fun_lines), "\n") function! s:FoldColumn_fill() return s:FoldColumn_build(' ', s:foldcolumn, 0, '', 'FoldColumn', '') @@ -592,8 +632,8 @@ else " For normal fold columns, simply space-pad to the desired width (note that " the FoldColumn definition includes a whitespace:pre rule) function! s:FoldColumn_build(char, len, numfill, char2, class, click) - return "<a href='#' class='".a:class."' onclick='".a:click."'>". - \ repeat(a:char, a:len).a:char2.repeat(' ', a:numfill). + return "<a href='#' class='"..a:class.."' onclick='"..a:click.."'>". + \ repeat(a:char, a:len)..a:char2..repeat(' ', a:numfill). \ "</a>" endfun function! s:FoldColumn_fill() @@ -625,29 +665,30 @@ endif " Return CSS style describing given highlight id (can be empty) function! s:CSS1(id) let a = "" - if synIDattr(a:id, "inverse") + let translated_ID = synIDtrans(a:id) + if synIDattr(translated_ID, "inverse") " For inverse, we always must set both colors (and exchange them) - let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm)) - let a = a . "color: " . ( x != "" ? x : s:bgc ) . "; " - let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm)) - let a = a . "background-color: " . ( x != "" ? x : s:fgc ) . "; " + let x = s:HtmlColor(synIDattr(translated_ID, "bg#", s:whatterm)) + let a = a .. "color: " .. ( x != "" ? x : s:bgc ) .. "; " + let x = s:HtmlColor(synIDattr(translated_ID, "fg#", s:whatterm)) + let a = a .. "background-color: " .. ( x != "" ? x : s:fgc ) .. "; " else - let x = s:HtmlColor(synIDattr(a:id, "fg#", s:whatterm)) - if x != "" | let a = a . "color: " . x . "; " | endif - let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm)) + let x = s:HtmlColor(synIDattr(translated_ID, "fg#", s:whatterm)) + if x != "" | let a = a .. "color: " .. x .. "; " | endif + let x = s:HtmlColor(synIDattr(translated_ID, "bg#", s:whatterm)) if x != "" - let a = a . "background-color: " . x . "; " + let a = a .. "background-color: " .. x .. "; " " stupid hack because almost every browser seems to have at least one font " which shows 1px gaps between lines which have background - let a = a . "padding-bottom: 1px; " - elseif (a:id == s:FOLDED_ID || a:id == s:LINENR_ID || a:id == s:FOLD_C_ID) && !empty(s:settings.prevent_copy) + let a = a .. "padding-bottom: 1px; " + elseif (translated_ID == s:FOLDED_ID || translated_ID == s:LINENR_ID || translated_ID == s:FOLD_C_ID) && !empty(s:settings.prevent_copy) " input elements default to a different color than the rest of the page - let a = a . "background-color: " . s:bgc . "; " + let a = a .. "background-color: " .. s:bgc .. "; " endif endif - if synIDattr(a:id, "bold") | let a = a . "font-weight: bold; " | endif - if synIDattr(a:id, "italic") | let a = a . "font-style: italic; " | endif - if synIDattr(a:id, "underline") | let a = a . "text-decoration: underline; " | endif + if synIDattr(translated_ID, "bold") | let a = a .. "font-weight: bold; " | endif + if synIDattr(translated_ID, "italic") | let a = a .. "font-style: italic; " | endif + if synIDattr(translated_ID, "underline") | let a = a .. "text-decoration: underline; " | endif return a endfun @@ -720,7 +761,7 @@ if exists("g:loaded_2html_plugin") let s:pluginversion = g:loaded_2html_plugin else if !exists("g:unloaded_tohtml_plugin") - let s:main_plugin_path = expand("<sfile>:p:h:h")."/plugin/tohtml.vim" + let s:main_plugin_path = expand("<sfile>:p:h:h").."/plugin/tohtml.vim" if filereadable(s:main_plugin_path) let s:lines = readfile(s:main_plugin_path, "", 20) call filter(s:lines, 'v:val =~ "loaded_2html_plugin = "') @@ -743,12 +784,12 @@ let s:orgbufnr = winbufnr(0) let s:origwin_stl = &l:stl if expand("%") == "" if exists('g:html_diff_win_num') - exec 'new Untitled_win'.g:html_diff_win_num.'.'.(s:settings.use_xhtml ? 'x' : '').'html' + exec 'new Untitled_win'..g:html_diff_win_num..'.'.(s:settings.use_xhtml ? 'xhtml' : 'html') else - exec 'new Untitled.'.(s:settings.use_xhtml ? 'x' : '').'html' + exec 'new Untitled.'..(s:settings.use_xhtml ? 'xhtml' : 'html') endif else - exec 'new %.'.(s:settings.use_xhtml ? 'x' : '').'html' + exec 'new %.'..(s:settings.use_xhtml ? 'xhtml' : 'html') endif " Resize the new window to very small in order to make it draw faster @@ -795,7 +836,7 @@ let s:lines = [] if s:settings.use_xhtml if s:settings.encoding != "" - call add(s:lines, "<?xml version=\"1.0\" encoding=\"" . s:settings.encoding . "\"?>") + call add(s:lines, "<?xml version=\"1.0\" encoding=\"" .. s:settings.encoding .. "\"?>") else call add(s:lines, "<?xml version=\"1.0\"?>") endif @@ -808,9 +849,9 @@ let s:HtmlSpace = ' ' let s:LeadingSpace = ' ' let s:HtmlEndline = '' if s:settings.no_pre - let s:HtmlEndline = '<br' . s:tag_close + let s:HtmlEndline = '<br' .. s:tag_close let s:LeadingSpace = s:settings.use_xhtml ? ' ' : ' ' - let s:HtmlSpace = '\' . s:LeadingSpace + let s:HtmlSpace = '\' .. s:LeadingSpace endif " HTML header, with the title and generator ;-). Left free space for the CSS, @@ -823,30 +864,30 @@ if !s:settings.no_doc " contained in XML information (to avoid haggling over content type) if s:settings.encoding != "" && !s:settings.use_xhtml if s:html5 - call add(s:lines, '<meta charset="' . s:settings.encoding . '"' . s:tag_close) + call add(s:lines, '<meta charset="' .. s:settings.encoding .. '"' .. s:tag_close) else - call add(s:lines, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:settings.encoding . '"' . s:tag_close) + call add(s:lines, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" .. s:settings.encoding .. '"' .. s:tag_close) endif endif call extend(s:lines, [ - \ ("<title>".expand("%:p:~")."</title>"), - \ ("<meta name=\"Generator\" content=\"Vim/".v:version/100.".".v:version%100.'"'.s:tag_close), - \ ("<meta name=\"plugin-version\" content=\"".s:pluginversion.'"'.s:tag_close) + \ ("<title>"..expand("%:p:~").."</title>"), + \ ("<meta name=\"Generator\" content=\"Vim/"..v:version/100.."."..v:version%100..'"'..s:tag_close), + \ ("<meta name=\"plugin-version\" content=\""..s:pluginversion..'"'..s:tag_close) \ ]) - call add(s:lines, '<meta name="syntax" content="'.s:current_syntax.'"'.s:tag_close) - call add(s:lines, '<meta name="settings" content="'. - \ join(filter(keys(s:settings),'s:settings[v:val]'),','). - \ ',prevent_copy='.s:settings.prevent_copy. - \ ',use_input_for_pc='.s:settings.use_input_for_pc. - \ '"'.s:tag_close) - call add(s:lines, '<meta name="colorscheme" content="'. + call add(s:lines, '<meta name="syntax" content="'..s:current_syntax..'"'..s:tag_close) + call add(s:lines, '<meta name="settings" content="'.. + \ join(filter(keys(s:settings),'s:settings[v:val]'),',').. + \ ',prevent_copy='..s:settings.prevent_copy.. + \ ',use_input_for_pc='..s:settings.use_input_for_pc.. + \ '"'..s:tag_close) + call add(s:lines, '<meta name="colorscheme" content="'.. \ (exists('g:colors_name') \ ? g:colors_name - \ : 'none'). '"'.s:tag_close) + \ : 'none').. '"'..s:tag_close) if s:settings.use_css call extend(s:lines, [ - \ "<style" . (s:html5 ? "" : " type=\"text/css\"") . ">", + \ "<style" .. (s:html5 ? "" : " type=\"text/css\"") .. ">", \ s:settings.use_xhtml ? "" : "<!--"]) let s:ieonly = [] if s:settings.dynamic_folds @@ -921,7 +962,7 @@ if !s:settings.no_doc if s:uses_script call extend(s:lines, [ \ "", - \ "<script" . (s:html5 ? "" : " type='text/javascript'") . ">", + \ "<script" .. (s:html5 ? "" : " type='text/javascript'") .. ">", \ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"]) endif @@ -968,7 +1009,7 @@ if !s:settings.no_doc \ "", \ " /* navigate upwards in the DOM tree to open all folds containing the line */", \ " var node = lineElem;", - \ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')", + \ " while (node && node.id != 'vimCodeElement"..s:settings.id_suffix.."')", \ " {", \ " if (node.className == 'closed-fold')", \ " {", @@ -1003,7 +1044,7 @@ if !s:settings.no_doc endif call extend(s:lines, ["</head>", - \ "<body".(s:settings.line_ids ? " onload='JumpToLine();'" : "").">"]) + \ "<body"..(s:settings.line_ids ? " onload='JumpToLine();'" : "")..">"]) endif if s:settings.no_pre @@ -1015,20 +1056,20 @@ else call extend(s:lines, ["<pre id='vimCodeElement" .. s:settings.id_suffix .. "'>"]) endif -exe s:orgwin . "wincmd w" +exe s:orgwin .. "wincmd w" " caches of style data " initialize to include line numbers if using them if s:settings.number_lines - let s:stylelist = { s:LINENR_ID : ".LineNr { " . s:CSS1( s:LINENR_ID ) . "}" } + let s:stylelist = { s:LINENR_ID : ".LineNr { " .. s:CSS1( s:LINENR_ID ) .. "}" } else let s:stylelist = {} endif let s:diffstylelist = { - \ s:DIFF_A_ID : ".DiffAdd { " . s:CSS1( s:DIFF_A_ID ) . "}", - \ s:DIFF_C_ID : ".DiffChange { " . s:CSS1( s:DIFF_C_ID ) . "}", - \ s:DIFF_D_ID : ".DiffDelete { " . s:CSS1( s:DIFF_D_ID ) . "}", - \ s:DIFF_T_ID : ".DiffText { " . s:CSS1( s:DIFF_T_ID ) . "}" + \ s:DIFF_A_ID : ".DiffAdd { " .. s:CSS1( s:DIFF_A_ID ) .. "}", + \ s:DIFF_C_ID : ".DiffChange { " .. s:CSS1( s:DIFF_C_ID ) .. "}", + \ s:DIFF_D_ID : ".DiffDelete { " .. s:CSS1( s:DIFF_D_ID ) .. "}", + \ s:DIFF_T_ID : ".DiffText { " .. s:CSS1( s:DIFF_T_ID ) .. "}" \ } " set up progress bar in the status line @@ -1046,17 +1087,17 @@ if !s:settings.no_progress \ g:colors_name != s:last_colors_name let s:last_colors_name = exists("g:colors_name") ? g:colors_name : "none" - let l:diffatr = synIDattr(hlID("DiffDelete"), "reverse", s:whatterm) ? "fg#" : "bg#" - let l:stlatr = synIDattr(hlID("StatusLine"), "reverse", s:whatterm) ? "fg#" : "bg#" + let l:diffatr = synIDattr(hlID("DiffDelete")->synIDtrans(), "reverse", s:whatterm) ? "fg#" : "bg#" + let l:stlatr = synIDattr(hlID("StatusLine")->synIDtrans(), "reverse", s:whatterm) ? "fg#" : "bg#" - let l:progbar_color = synIDattr(hlID("DiffDelete"), l:diffatr, s:whatterm) - let l:stl_color = synIDattr(hlID("StatusLine"), l:stlatr, s:whatterm) + let l:progbar_color = synIDattr(hlID("DiffDelete")->synIDtrans(), l:diffatr, s:whatterm) + let l:stl_color = synIDattr(hlID("StatusLine")->synIDtrans(), l:stlatr, s:whatterm) if "" == l:progbar_color - let l:progbar_color = synIDattr(hlID("DiffDelete"), "reverse", s:whatterm) ? s:fgc : s:bgc + let l:progbar_color = synIDattr(hlID("DiffDelete")->synIDtrans(), "reverse", s:whatterm) ? s:fgc : s:bgc endif if "" == l:stl_color - let l:stl_color = synIDattr(hlID("StatusLine"), "reverse", s:whatterm) ? s:fgc : s:bgc + let l:stl_color = synIDattr(hlID("StatusLine")->synIDtrans(), "reverse", s:whatterm) ? s:fgc : s:bgc endif if l:progbar_color == l:stl_color @@ -1086,13 +1127,13 @@ if !s:settings.no_progress endif echomsg "diff detected progbar color set to" l:progbar_color endif - exe "hi TOhtmlProgress_auto" s:whatterm."bg=".l:progbar_color + exe "hi TOhtmlProgress_auto" s:whatterm.."bg="..l:progbar_color endif endfun func! s:ProgressBar(title, max_value, winnr) let pgb=copy(s:progressbar) - let pgb.title = a:title.' ' + let pgb.title = a:title..' ' let pgb.max_value = a:max_value let pgb.winnr = a:winnr let pgb.cur_value = 0 @@ -1194,6 +1235,66 @@ if !s:settings.no_progress call s:SetProgbarColor() endif +let s:build_fun_lines = [] +call add(s:build_fun_lines, []) +let s:build_fun_lines[-1] =<< trim ENDLET + func! s:Add_diff_fill(lnum) + let l:filler = diff_filler(a:lnum) + if l:filler > 0 + let l:to_insert = l:filler + while l:to_insert > 0 + let l:new = repeat(s:difffillchar, 3) + + if l:to_insert > 2 && l:to_insert < l:filler && !s:settings.whole_filler + let l:new = l:new .. " " .. l:filler .. " inserted lines " + let l:to_insert = 2 + endif +ENDLET +call add(s:build_fun_lines, []) +if !s:settings.no_pre + let s:build_fun_lines[-1] =<< trim ENDLET + " HTML line wrapping is off--go ahead and fill to the margin + " TODO: what about when CSS wrapping is turned on? + let l:new = l:new .. repeat(s:difffillchar, &columns - strlen(l:new) - s:margin) + ENDLET +else + let s:build_fun_lines[-1] =<< trim ENDLET + let l:new = l:new .. repeat(s:difffillchar, 3) + ENDLET +endif +call add(s:build_fun_lines, []) +let s:build_fun_lines[-1] =<< trim ENDLET + let l:new = s:HtmlFormat_d(l:new, s:DIFF_D_ID, 0) +ENDLET +if s:settings.number_lines + call add(s:build_fun_lines, []) + let s:build_fun_lines[-1] =<< trim ENDLET + " Indent if line numbering is on. Indent gets style of line number + " column. + let l:new = s:HtmlFormat_n(repeat(' ', s:margin), s:LINENR_ID, 0, 0) .. l:new + ENDLET +endif +if s:settings.dynamic_folds && !s:settings.no_foldcolumn + call add(s:build_fun_lines, []) + let s:build_fun_lines[-1] =<< trim ENDLET + if s:foldcolumn > 0 + " Indent for foldcolumn if there is one. Assume it's empty, there should + " not be a fold for deleted lines in diff mode. + let l:new = s:FoldColumn_fill() .. l:new + endif + ENDLET +endif +" Ignore this comment, just bypassing a highlighting issue: if +call add(s:build_fun_lines, []) +let s:build_fun_lines[-1] =<< trim ENDLET + call add(s:lines, l:new..s:HtmlEndline) + let l:to_insert = l:to_insert - 1 + endwhile + endif + endfun +ENDLET +exec join(flatten(s:build_fun_lines), "\n") + " First do some preprocessing for dynamic folding. Do this for the entire file " so we don't accidentally start within a closed fold or something. let s:allfolds = [] @@ -1220,7 +1321,7 @@ if s:settings.dynamic_folds let s:newfold = {'firstline': s:lnum, 'lastline': foldclosedend(s:lnum), 'level': s:level,'type': "closed-fold"} call add(s:allfolds, s:newfold) " open the fold so we can find any contained folds - execute s:lnum."foldopen" + execute s:lnum.."foldopen" else if !s:settings.no_progress call s:pgb.incr() @@ -1252,7 +1353,7 @@ if s:settings.dynamic_folds call add(s:allfolds, s:newfold) endif " open the fold so we can find any contained folds - execute s:lnum."foldopen" + execute s:lnum.."foldopen" else if !s:settings.no_progress call s:pgb.incr() @@ -1339,7 +1440,7 @@ if s:settings.dynamic_folds " Note that only when a start and an end line is specified will a fold " containing the current range ever be removed. while leveladjust > 0 - exe g:html_start_line."foldopen" + exe g:html_start_line.."foldopen" let leveladjust -= 1 endwhile endif @@ -1399,47 +1500,11 @@ endif while s:lnum <= s:end " If there are filler lines for diff mode, show these above the line. - let s:filler = diff_filler(s:lnum) - if s:filler > 0 - let s:n = s:filler - while s:n > 0 - let s:new = repeat(s:difffillchar, 3) - - if s:n > 2 && s:n < s:filler && !s:settings.whole_filler - let s:new = s:new . " " . s:filler . " inserted lines " - let s:n = 2 - endif - - if !s:settings.no_pre - " HTML line wrapping is off--go ahead and fill to the margin - " TODO: what about when CSS wrapping is turned on? - let s:new = s:new . repeat(s:difffillchar, &columns - strlen(s:new) - s:margin) - else - let s:new = s:new . repeat(s:difffillchar, 3) - endif - - let s:new = s:HtmlFormat_d(s:new, s:DIFF_D_ID, 0) - if s:settings.number_lines - " Indent if line numbering is on. Indent gets style of line number - " column. - let s:new = s:HtmlFormat_n(repeat(' ', s:margin), s:LINENR_ID, 0, 0) . s:new - endif - if s:settings.dynamic_folds && !s:settings.no_foldcolumn && s:foldcolumn > 0 - " Indent for foldcolumn if there is one. Assume it's empty, there should - " not be a fold for deleted lines in diff mode. - let s:new = s:FoldColumn_fill() . s:new - endif - call add(s:lines, s:new.s:HtmlEndline) - - let s:n = s:n - 1 - endwhile - unlet s:n - endif - unlet s:filler + call s:Add_diff_fill(s:lnum) " Start the line with the line number. if s:settings.number_lines - let s:numcol = repeat(' ', s:margin - 1 - strlen(s:lnum)) . s:lnum . ' ' + let s:numcol = repeat(' ', s:margin - 1 - strlen(s:lnum)) .. s:lnum .. ' ' endif let s:new = "" @@ -1450,11 +1515,11 @@ while s:lnum <= s:end let s:new = foldtextresult(s:lnum) if !s:settings.no_pre " HTML line wrapping is off--go ahead and fill to the margin - let s:new = s:new . repeat(s:foldfillchar, &columns - strlen(s:new)) + let s:new = s:new .. repeat(s:foldfillchar, &columns - strlen(s:new)) endif " put numcol in a separate group for sake of unselectable text - let s:new = (s:settings.number_lines ? s:HtmlFormat_n(s:numcol, s:FOLDED_ID, 0, s:lnum): "") . s:HtmlFormat_t(s:new, s:FOLDED_ID, 0) + let s:new = (s:settings.number_lines ? s:HtmlFormat_n(s:numcol, s:FOLDED_ID, 0, s:lnum): "") .. s:HtmlFormat_t(s:new, s:FOLDED_ID, 0) " Skip to the end of the fold let s:new_lnum = foldclosedend(s:lnum) @@ -1475,7 +1540,7 @@ while s:lnum <= s:end if s:settings.dynamic_folds " First insert a closing for any open folds that end on this line while !empty(s:foldstack) && get(s:foldstack,0).lastline == s:lnum-1 - let s:new = s:new."</span></span>" + let s:new = s:new.."</span></span>" call remove(s:foldstack, 0) endwhile @@ -1483,9 +1548,9 @@ while s:lnum <= s:end let s:firstfold = 1 while !empty(s:allfolds) && get(s:allfolds,0).firstline == s:lnum let s:foldId = s:foldId + 1 - let s:new .= "<span id='" - let s:new .= (exists('g:html_diff_win_num') ? "win".g:html_diff_win_num : "") - let s:new .= "fold".s:foldId.s:settings.id_suffix."' class='".s:allfolds[0].type."'>" + let s:new ..= "<span id='" + let s:new ..= (exists('g:html_diff_win_num') ? "win"..g:html_diff_win_num : "") + let s:new ..= "fold"..s:foldId..s:settings.id_suffix.."' class='"..s:allfolds[0].type.."'>" " Unless disabled, add a fold column for the opening line of a fold. @@ -1496,20 +1561,20 @@ while s:lnum <= s:end if !s:settings.no_foldcolumn " add fold column that can open the new fold if s:allfolds[0].level > 1 && s:firstfold - let s:new = s:new . s:FoldColumn_build('|', s:allfolds[0].level - 1, 0, "", - \ 'toggle-open FoldColumn','javascript:toggleFold("fold'.s:foldstack[0].id.s:settings.id_suffix.'");') + let s:new = s:new .. s:FoldColumn_build('|', s:allfolds[0].level - 1, 0, "", + \ 'toggle-open FoldColumn','javascript:toggleFold("fold'..s:foldstack[0].id..s:settings.id_suffix..'");') endif " add the filler spaces separately from the '+' char so that it can be " shown/hidden separately during a hover unfold - let s:new = s:new . s:FoldColumn_build("+", 1, 0, "", - \ 'toggle-open FoldColumn', 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");') + let s:new = s:new .. s:FoldColumn_build("+", 1, 0, "", + \ 'toggle-open FoldColumn', 'javascript:toggleFold("fold'..s:foldId..s:settings.id_suffix..'");') " If this is not the last fold we're opening on this line, we need " to keep the filler spaces hidden if the fold is opened by mouse " hover. If it is the last fold to open in the line, we shouldn't hide " them, so don't apply the toggle-filler class. - let s:new = s:new . s:FoldColumn_build(" ", 1, s:foldcolumn - s:allfolds[0].level - 1, "", - \ 'toggle-open FoldColumn'. (get(s:allfolds, 1, {'firstline': 0}).firstline == s:lnum ?" toggle-filler" :""), - \ 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");') + let s:new = s:new .. s:FoldColumn_build(" ", 1, s:foldcolumn - s:allfolds[0].level - 1, "", + \ 'toggle-open FoldColumn'.. (get(s:allfolds, 1, {'firstline': 0}).firstline == s:lnum ?" toggle-filler" :""), + \ 'javascript:toggleFold("fold'..s:foldId..s:settings.id_suffix..'");') " add fold column that can close the new fold " only add extra blank space if we aren't opening another fold on the @@ -1522,12 +1587,12 @@ while s:lnum <= s:end if s:firstfold " the first fold in a line has '|' characters from folds opened in " previous lines, before the '-' for this fold - let s:new .= s:FoldColumn_build('|', s:allfolds[0].level - 1, s:extra_space, '-', - \ 'toggle-closed FoldColumn', 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");') + let s:new ..= s:FoldColumn_build('|', s:allfolds[0].level - 1, s:extra_space, '-', + \ 'toggle-closed FoldColumn', 'javascript:toggleFold("fold'..s:foldId..s:settings.id_suffix..'");') else " any subsequent folds in the line only add a single '-' - let s:new = s:new . s:FoldColumn_build("-", 1, s:extra_space, "", - \ 'toggle-closed FoldColumn', 'javascript:toggleFold("fold'.s:foldId.s:settings.id_suffix.'");') + let s:new = s:new .. s:FoldColumn_build("-", 1, s:extra_space, "", + \ 'toggle-closed FoldColumn', 'javascript:toggleFold("fold'..s:foldId..s:settings.id_suffix..'");') endif let s:firstfold = 0 endif @@ -1535,12 +1600,12 @@ while s:lnum <= s:end " Add fold text, moving the span ending to the next line so collapsing " of folds works correctly. " Put numcol in a separate group for sake of unselectable text. - let s:new = s:new . (s:settings.number_lines ? s:HtmlFormat_n(s:numcol, s:FOLDED_ID, 0, 0) : "") . substitute(s:HtmlFormat_t(foldtextresult(s:lnum), s:FOLDED_ID, 0), '</span>', s:HtmlEndline.'\n\0', '') - let s:new = s:new . "<span class='fulltext'>" + let s:new = s:new .. (s:settings.number_lines ? s:HtmlFormat_n(s:numcol, s:FOLDED_ID, 0, 0) : "") .. substitute(s:HtmlFormat_t(foldtextresult(s:lnum), s:FOLDED_ID, 0), '</span>', s:HtmlEndline..'\n\0', '') + let s:new = s:new .. "<span class='fulltext'>" " open the fold now that we have the fold text to allow retrieval of " fold text for subsequent folds - execute s:lnum."foldopen" + execute s:lnum.."foldopen" call insert(s:foldstack, remove(s:allfolds,0)) let s:foldstack[0].id = s:foldId endwhile @@ -1555,13 +1620,13 @@ while s:lnum <= s:end " add the empty foldcolumn for unfolded lines if there is a fold " column at all if s:foldcolumn > 0 - let s:new = s:new . s:FoldColumn_fill() + let s:new = s:new .. s:FoldColumn_fill() endif else " add the fold column for folds not on the opening line if get(s:foldstack, 0).firstline < s:lnum - let s:new = s:new . s:FoldColumn_build('|', s:foldstack[0].level, s:foldcolumn - s:foldstack[0].level, "", - \ 'FoldColumn', 'javascript:toggleFold("fold'.s:foldstack[0].id.s:settings.id_suffix.'");') + let s:new = s:new .. s:FoldColumn_build('|', s:foldstack[0].level, s:foldcolumn - s:foldstack[0].level, "", + \ 'FoldColumn', 'javascript:toggleFold("fold'..s:foldstack[0].id..s:settings.id_suffix..'");') endif endif endif @@ -1569,9 +1634,9 @@ while s:lnum <= s:end " Now continue with the unfolded line text if s:settings.number_lines - let s:new = s:new . s:HtmlFormat_n(s:numcol, s:LINENR_ID, 0, s:lnum) + let s:new = s:new .. s:HtmlFormat_n(s:numcol, s:LINENR_ID, 0, s:lnum) elseif s:settings.line_ids - let s:new = s:new . s:HtmlFormat_n("", s:LINENR_ID, 0, s:lnum) + let s:new = s:new .. s:HtmlFormat_n("", s:LINENR_ID, 0, s:lnum) endif " Get the diff attribute, if any. @@ -1611,7 +1676,7 @@ while s:lnum <= s:end if s:len < &columns && !s:settings.no_pre " Add spaces at the end of the raw text line to extend the changed " line to the full width. - let s:line = s:line . repeat(' ', &columns - virtcol([s:lnum, s:len]) - s:margin) + let s:line = s:line .. repeat(' ', &columns - virtcol([s:lnum, s:len]) - s:margin) let s:len = &columns endif else @@ -1649,11 +1714,11 @@ while s:lnum <= s:end " if the found tab is the first character in the text being " processed, we need to get the character prior to the text, " given by startcol. - let s:prevc = matchstr(s:line, '.\%' . (s:startcol + s:offset) . 'c') + let s:prevc = matchstr(s:line, '.\%' .. (s:startcol + s:offset) .. 'c') else " Otherwise, the byte index of the tab into s:expandedtab is " given by s:idx. - let s:prevc = matchstr(s:expandedtab, '.\%' . (s:idx + 1) . 'c') + let s:prevc = matchstr(s:expandedtab, '.\%' .. (s:idx + 1) .. 'c') endif let s:vcol = virtcol([s:lnum, s:startcol + s:idx + s:offset - len(s:prevc)]) @@ -1689,12 +1754,12 @@ while s:lnum <= s:end " Output the text with the same synID, with class set to the highlight ID " name, unless it has been concealed completely. if strlen(s:expandedtab) > 0 - let s:new = s:new . s:HtmlFormat(s:expandedtab, s:id, s:diff_id, "", 0) + let s:new = s:new .. s:HtmlFormat(s:expandedtab, s:id, s:diff_id, "", 0) endif endwhile endif - call extend(s:lines, split(s:new.s:HtmlEndline, '\n', 1)) + call extend(s:lines, split(s:new..s:HtmlEndline, '\n', 1)) if !s:settings.no_progress && s:pgb.needs_redraw redrawstatus let s:pgb.needs_redraw = 0 @@ -1706,17 +1771,21 @@ while s:lnum <= s:end endif endwhile +" Diff filler is returned based on what needs inserting *before* the given line. +" So to get diff filler at the end of the buffer, we need to use last line + 1 +call s:Add_diff_fill(s:end+1) + if s:settings.dynamic_folds " finish off any open folds while !empty(s:foldstack) - let s:lines[-1].="</span></span>" + let s:lines[-1]..="</span></span>" call remove(s:foldstack, 0) endwhile " add fold column to the style list if not already there let s:id = s:FOLD_C_ID if !has_key(s:stylelist, s:id) - let s:stylelist[s:id] = '.FoldColumn { ' . s:CSS1(s:id) . '}' + let s:stylelist[s:id] = '.FoldColumn { ' .. s:CSS1(s:id) .. '}' endif endif @@ -1734,7 +1803,7 @@ if !s:settings.no_doc call extend(s:lines, ["</body>", "</html>"]) endif -exe s:newwin . "wincmd w" +exe s:newwin .. "wincmd w" call setline(1, s:lines) unlet s:lines @@ -1757,17 +1826,17 @@ if s:settings.use_css && !s:settings.no_doc " Normal/global attributes if s:settings.no_pre - call append('.', "body { color: " . s:fgc . "; background-color: " . s:bgc . "; font-family: ". s:htmlfont ."; }") + call append('.', "body { color: " .. s:fgc .. "; background-color: " .. s:bgc .. "; font-family: ".. s:htmlfont .."; }") + else - call append('.', "pre { " . s:whitespace . "font-family: ". s:htmlfont ."; color: " . s:fgc . "; background-color: " . s:bgc . "; }") + call append('.', "pre { " .. s:whitespace .. "font-family: ".. s:htmlfont .."; color: " .. s:fgc .. "; background-color: " .. s:bgc .. "; }") + yank put execute "normal! ^cwbody\e" " body should not have the wrap formatting, only the pre section if s:whitespace != '' - exec 's#'.s:whitespace + exec 's#'..s:whitespace endif endif " fix browser inconsistencies (sometimes within the same browser) of different @@ -1778,13 +1847,13 @@ if s:settings.use_css && !s:settings.no_doc " like normal text if !empty(s:settings.prevent_copy) if s:settings.use_input_for_pc !=# "none" - call append('.', 'input { border: none; margin: 0; padding: 0; font-family: '.s:htmlfont.'; }') + call append('.', 'input { border: none; margin: 0; padding: 0; font-family: '..s:htmlfont..'; }') + " ch units for browsers which support them, em units for a somewhat " reasonable fallback. for w in range(1, 20, 1) call append('.', [ - \ "input[size='".w."'] { width: ".w."em; width: ".w."ch; }" + \ "input[size='"..w.."'] { width: "..w.."em; width: "..w.."ch; }" \ ]) + endfor @@ -1828,14 +1897,15 @@ if s:settings.use_css && !s:settings.no_doc endif for s:style_name in s:unselectable_styles call append('.', [ - \ ' .'.s:style_name.' { user-select: none; }', - \ ' [data-'.s:style_name.'-content]::before { content: attr(data-'.s:style_name.'-content); }', - \ ' [data-'.s:style_name.'-content]::before { padding-bottom: 1px; display: inline-block; /* match the 1-px padding of standard items with background */ }', - \ ' span[data-'.s:style_name.'-content]::before { cursor: default; }', + \ ' .'..s:style_name..' { user-select: none; }', + \ ' [data-'..s:style_name..'-content]::before { content: attr(data-'..s:style_name..'-content); }', + \ ' [data-'..s:style_name..'-content]::before { padding-bottom: 1px; display: inline-block; /* match the 1-px padding of standard items with background */ }', + \ ' span[data-'..s:style_name..'-content]::before { cursor: default; }', \ ]) +4 endfor if s:settings.use_input_for_pc !=# 'none' + " Note, the extra '}' is to match the "@supports" above call append('.', [ \ ' input { display: none; }', \ '}' @@ -1851,12 +1921,12 @@ if s:settings.use_css && !s:settings.no_doc " Make the cursor show active fold columns as active areas, and empty fold " columns as not interactive. call append('.', ['input.FoldColumn { cursor: pointer; }', - \ 'input.FoldColumn[value="'.repeat(' ', s:foldcolumn).'"] { cursor: default; }' + \ 'input.FoldColumn[value="'..repeat(' ', s:foldcolumn)..'"] { cursor: default; }' \ ]) +2 if s:settings.use_input_for_pc !=# 'all' call append('.', [ - \ 'a[data-FoldColumn-content="'.repeat(' ', s:foldcolumn).'"] { cursor: default; }' + \ 'a[data-FoldColumn-content="'..repeat(' ', s:foldcolumn)..'"] { cursor: default; }' \ ]) +1 end @@ -1884,7 +1954,7 @@ endif if !s:settings.use_css && !s:settings.no_doc " For Netscape 4, set <body> attributes too, though, strictly speaking, it's " incorrect. - execute '%s:<body\([^>]*\):<body bgcolor="' . s:bgc . '" text="' . s:fgc . '"\1>\r<font face="'. s:htmlfont .'"' + execute '%s:<body\([^>]*\):<body bgcolor="' .. s:bgc .. '" text="' .. s:fgc .. '"\1>\r<font face="'.. s:htmlfont ..'"' endif " Gather attributes for all other classes. Do diff first so that normal @@ -1935,7 +2005,7 @@ let @/ = s:old_search let &more = s:old_more " switch to original window to restore those settings -exe s:orgwin . "wincmd w" +exe s:orgwin .. "wincmd w" if !s:settings.expand_tabs let &l:isprint = s:old_isprint @@ -1945,7 +2015,7 @@ let &l:et = s:old_et let &l:scrollbind = s:old_bind " and back to the new window again to end there -exe s:newwin . "wincmd w" +exe s:newwin .. "wincmd w" let &l:stl = s:newwin_stl exec 'resize' s:old_winheight @@ -1982,10 +2052,13 @@ if !v:profiling delfunc s:progressbar.incr unlet s:pgb s:progressbar endif + + delfunc s:Add_diff_fill endif -unlet! s:new_lnum s:diffattr s:difffillchar s:foldfillchar s:HtmlSpace +unlet! s:new_lnum s:diffattr s:difffillchar s:foldfillchar s:HtmlSpace s:diffstyle unlet! s:LeadingSpace s:HtmlEndline s:firstfold s:numcol s:foldcolumn +unlet! s:wrapperfunc_lines s:build_fun_lines unlet s:foldstack s:allfolds s:foldId s:settings let &cpo = s:cpo_sav diff --git a/runtime/syntax/8th.vim b/runtime/syntax/8th.vim index ce27d10a44..643c9cb095 100644 --- a/runtime/syntax/8th.vim +++ b/runtime/syntax/8th.vim @@ -363,7 +363,7 @@ syn region eighthComment start="\zs\\" end="$" contains=eighthTodo if !exists("did_eighth_syntax_inits") let did_eighth_syntax_inits=1 - " The default methods for highlighting. Can be overriden later. + " The default methods for highlighting. Can be overridden later. hi def link eighthTodo Todo hi def link eighthOperators Operator hi def link eighthMath Number diff --git a/runtime/syntax/README.txt b/runtime/syntax/README.txt index d6a86e5ca9..756ae41587 100644 --- a/runtime/syntax/README.txt +++ b/runtime/syntax/README.txt @@ -28,14 +28,16 @@ whitespace.vim View Tabs and Spaces. If you want to write a syntax file, read the docs at ":help usr_44.txt". If you make a new syntax file which would be useful for others, please send it -to Bram@vim.org. Include instructions for detecting the file type for this -language, by file name extension or by checking a few lines in the file. -And please write the file in a portable way, see ":help 44.12". +to the vim-dev mailing list <vim-dev@vim.org>. Include instructions for +detecting the file type for this language, by file name extension or by +checking a few lines in the file. And please write the file in a portable way, +see ":help 44.12". If you have remarks about an existing file, send them to the maintainer of -that file. Only when you get no response send a message to Bram@vim.org. +that file. Only when you get no response send a message to the vim-dev +mailing list: <vim-dev@vim.org>. If you are the maintainer of a syntax file and make improvements, send the new -version to Bram@vim.org. +version to the vim-dev mailing list: <vim-dev@vim.org> For further info see ":help syntax" in Vim. diff --git a/runtime/syntax/a65.vim b/runtime/syntax/a65.vim index b232e826cd..6445b9438b 100644 --- a/runtime/syntax/a65.vim +++ b/runtime/syntax/a65.vim @@ -118,7 +118,7 @@ syn match a65Section "\(^\|\s\)\.)\($\|\s\)" " Strings syn match a65String "\".*\"" -" Programm Counter +" Program Counter syn region a65PC start="\*=" end="\>" keepend " HI/LO Byte diff --git a/runtime/syntax/aap.vim b/runtime/syntax/aap.vim index 8399a4d224..87cedab30f 100644 --- a/runtime/syntax/aap.vim +++ b/runtime/syntax/aap.vim @@ -1,7 +1,8 @@ " Vim syntax file " Language: A-A-P recipe -" Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2004 Jun 13 +" Maintainer: The Vim Project <https://github.com/vim/vim> +" Last Change: 2023 Aug 10 +" Former Maintainer: Bram Moolenaar <Bram@vim.org> " Quit when a syntax file was already loaded if exists("b:current_syntax") diff --git a/runtime/syntax/abap.vim b/runtime/syntax/abap.vim index e48dfc3603..627e51504a 100644 --- a/runtime/syntax/abap.vim +++ b/runtime/syntax/abap.vim @@ -122,7 +122,7 @@ syn keyword abapStatement TABLES TIMES TRANSFER TRANSLATE TRY TYPE TYPES syn keyword abapStatement UNASSIGN ULINE UNPACK UPDATE syn keyword abapStatement WHEN WHILE WINDOW WRITE -" More statemets +" More statements syn keyword abapStatement LINES syn keyword abapStatement INTO GROUP BY HAVING ORDER BY SINGLE syn keyword abapStatement APPENDING CORRESPONDING FIELDS OF TABLE diff --git a/runtime/syntax/asm68k.vim b/runtime/syntax/asm68k.vim index 1607507909..104887d026 100644 --- a/runtime/syntax/asm68k.vim +++ b/runtime/syntax/asm68k.vim @@ -4,7 +4,7 @@ " Last change: 2001 May 01 " " This is incomplete. In particular, support for 68020 and -" up and 68851/68881 co-processors is partial or non-existant. +" up and 68851/68881 co-processors is partial or non-existent. " Feel free to contribute... " diff --git a/runtime/syntax/automake.vim b/runtime/syntax/automake.vim index 8a7db7c27b..2f1ad982c6 100644 --- a/runtime/syntax/automake.vim +++ b/runtime/syntax/automake.vim @@ -2,8 +2,8 @@ " Language: automake Makefile.am " Maintainer: Debian Vim Maintainers " Former Maintainer: John Williams <jrw@pobox.com> -" Last Change: 2018 Dec 27 -" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/automake.vim +" Last Change: 2023 Jan 16 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/automake.vim " " XXX This file is in need of a new maintainer, Debian VIM Maintainers maintain " it only because patches have been submitted for it by Debian users and the diff --git a/runtime/syntax/bash.vim b/runtime/syntax/bash.vim index 75ab99938e..1e565c3022 100644 --- a/runtime/syntax/bash.vim +++ b/runtime/syntax/bash.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: bash -" Maintainer: Bram -" Last Change: 2019 Sep 27 +" Maintainer: The Vim Project <https://github.com/vim/vim> +" Last Change: 2023 Aug 13 " quit when a syntax file was already loaded if exists("b:current_syntax") diff --git a/runtime/syntax/bindzone.vim b/runtime/syntax/bindzone.vim index bb790bb75c..dce9974903 100644 --- a/runtime/syntax/bindzone.vim +++ b/runtime/syntax/bindzone.vim @@ -33,7 +33,7 @@ syn match zoneDomain contained /[^[:space:]!"#$%&'()*+,\/:;<=>?@[\]\ syn match zoneSpecial contained /^[@*.]\s/ syn match zoneTTL contained /\s\@<=\d[0-9WwDdHhMmSs]*\(\s\|$\)\@=/ nextgroup=zoneClass,zoneRRType skipwhite syn keyword zoneClass contained IN CHAOS CH HS HESIOD nextgroup=zoneRRType,zoneTTL skipwhite -syn keyword zoneRRType contained A AAAA CERT CNAME DNAME DNSKEY DS HINFO LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RP RRSIG SSHFP SOA SPF SRV TLSA TXT nextgroup=zoneRData skipwhite +syn keyword zoneRRType contained A AAAA APL CAA CERT CNAME DNAME DNSKEY DS HINFO LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM OPENPGPKEY PTR RP RRSIG SMIMEA SOA SPF SRV SSHFP TLSA TXT nextgroup=zoneRData skipwhite syn match zoneRData contained /[^;]*/ contains=zoneDomain,zoneIPAddr,zoneIP6Addr,zoneText,zoneNumber,zoneParen,zoneUnknown syn match zoneIPAddr contained /\<[0-9]\{1,3}\(\.[0-9]\{1,3}\)\{,3}\>/ @@ -60,7 +60,7 @@ syn match zoneIP6Addr contained /\<\(\x\{1,4}:\)\{1,7}:\(\s\|;\|$\)\@= syn match zoneText contained /"\([^"\\]\|\\.\)*"\(\s\|;\|$\)\@=/ syn match zoneNumber contained /\<[0-9]\+\(\s\|;\|$\)\@=/ -syn match zoneSerial contained /\<[0-9]\{9,10}\(\s\|;\|$\)\@=/ +syn match zoneSerial contained /\<[0-9]\{1,10}\(\s\|;\|$\)\@=/ syn match zoneErrParen /)/ syn region zoneParen contained start="(" end=")" contains=zoneSerial,zoneTTL,zoneNumber,zoneComment diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim index 50878a78ea..5ed8fdc847 100644 --- a/runtime/syntax/c.vim +++ b/runtime/syntax/c.vim @@ -1,7 +1,8 @@ " Vim syntax file " Language: C -" Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2022 Oct 05 +" Maintainer: The Vim Project <https://github.com/vim/vim> +" Last Change: 2023 Aug 10 +" Former Maintainer: Bram Moolenaar <Bram@vim.org> " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -348,7 +349,10 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu") syn keyword cConstant SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT SIGSEGV syn keyword cConstant SIGSTOP SIGTERM SIGTRAP SIGTSTP SIGTTIN SIGTTOU SIGUSR1 SIGUSR2 syn keyword cConstant _IOFBF _IOLBF _IONBF BUFSIZ EOF WEOF FOPEN_MAX FILENAME_MAX L_tmpnam - syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET TMP_MAX stderr stdin stdout EXIT_FAILURE EXIT_SUCCESS RAND_MAX + syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET TMP_MAX EXIT_FAILURE EXIT_SUCCESS RAND_MAX + syn keyword cConstant stdin stdout stderr + " POSIX 2001, in unistd.h + syn keyword cConstant STDIN_FILENO STDOUT_FILENO STDERR_FILENO " used in assert.h syn keyword cConstant NDEBUG " POSIX 2001 diff --git a/runtime/syntax/chaiscript.vim b/runtime/syntax/chaiscript.vim index 5a64bdb556..9925ba5138 100644 --- a/runtime/syntax/chaiscript.vim +++ b/runtime/syntax/chaiscript.vim @@ -61,7 +61,7 @@ syn region chaiscriptFunc matchgroup=chaiscriptFunc start="`" end="`" " Intentionally leaving out all of the normal, well known operators syn match chaiscriptOperator "\.\." -" Guard seperator as an operator +" Guard separator as an operator syn match chaiscriptOperator ":" " Comments diff --git a/runtime/syntax/checkhealth.vim b/runtime/syntax/checkhealth.vim index 4b0ce75a54..2fd0aed601 100644 --- a/runtime/syntax/checkhealth.vim +++ b/runtime/syntax/checkhealth.vim @@ -11,15 +11,10 @@ unlet! b:current_syntax syn case match -syn keyword healthError ERROR[:] -syn keyword healthWarning WARNING[:] -syn keyword healthSuccess OK[:] +syn keyword DiagnosticError ERROR[:] +syn keyword DiagnosticWarn WARNING[:] +syn keyword DiagnosticOk OK[:] syn match helpSectionDelim "^======*\n.*$" syn match healthHeadingChar "=" conceal cchar=─ contained containedin=helpSectionDelim -hi def link healthError Error -hi def link healthWarning WarningMsg -hi def healthSuccess guibg=#5fff00 guifg=#080808 ctermbg=82 ctermfg=232 -hi def link healthHelp Identifier - let b:current_syntax = "checkhealth" diff --git a/runtime/syntax/cmake.vim b/runtime/syntax/cmake.vim index f7616e4c6d..7340ac238e 100644 --- a/runtime/syntax/cmake.vim +++ b/runtime/syntax/cmake.vim @@ -335,7 +335,7 @@ syn keyword cmakeGeneratorExpressions contained syn case ignore syn keyword cmakeCommand - \ add_compile_options add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_host_system_information cmake_minimum_required cmake_parse_arguments cmake_policy configure_file continue create_test_sourcelist ctest_build ctest_configure ctest_coverage ctest_empty_binary_directory ctest_memcheck ctest_read_custom_files ctest_run_script ctest_sleep ctest_start ctest_submit ctest_test ctest_update ctest_upload define_property enable_language enable_testing endfunction endmacro execute_process export file find_file find_library find_package find_path find_program fltk_wrap_ui function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property include include_directories include_external_msproject include_guard include_regular_expression install link_directories list load_cache load_command macro mark_as_advanced math message option project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_compile_definitions target_compile_features target_compile_options target_include_directories target_link_libraries target_sources try_compile try_run unset variable_watch + \ add_compile_options add_compile_definitions add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_host_system_information cmake_minimum_required cmake_parse_arguments cmake_policy configure_file continue create_test_sourcelist ctest_build ctest_configure ctest_coverage ctest_empty_binary_directory ctest_memcheck ctest_read_custom_files ctest_run_script ctest_sleep ctest_start ctest_submit ctest_test ctest_update ctest_upload define_property enable_language enable_testing endfunction endmacro execute_process export file find_file find_library find_package find_path find_program fltk_wrap_ui function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property include include_directories include_external_msproject include_guard include_regular_expression install link_directories list load_cache load_command macro mark_as_advanced math message option project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_compile_definitions target_compile_features target_compile_options target_include_directories target_link_libraries target_sources try_compile try_run unset variable_watch \ nextgroup=cmakeArguments syn keyword cmakeCommandConditional diff --git a/runtime/syntax/colortest.vim b/runtime/syntax/colortest.vim index 58de7aaf13..1dd860c1d3 100644 --- a/runtime/syntax/colortest.vim +++ b/runtime/syntax/colortest.vim @@ -1,7 +1,8 @@ " Vim script for testing colors -" Maintainer: Bram Moolenaar <Bram@vim.org> +" Maintainer: The Vim Project <https://github.com/vim/vim> " Contributors: Rafael Garcia-Suarez, Charles Campbell -" Last Change: 2008 Jun 04 +" Last Change: 2023 Aug 10 +" Former Maintainer: Bram Moolenaar <Bram@vim.org> " edit this file, then do ":source %", and check if the colors match diff --git a/runtime/syntax/conf.vim b/runtime/syntax/conf.vim index 6a78ef8c6e..15a1fffab3 100644 --- a/runtime/syntax/conf.vim +++ b/runtime/syntax/conf.vim @@ -1,7 +1,8 @@ " Vim syntax file " Language: generic configure file -" Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2021 May 01 +" Maintainer: The Vim Project <https://github.com/vim/vim> +" Last Change: 2023 Aug 10 +" Former Maintainer: Bram Moolenaar <Bram@vim.org> " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") diff --git a/runtime/syntax/crontab.vim b/runtime/syntax/crontab.vim index 5e38ffaafe..12daa9b7b8 100644 --- a/runtime/syntax/crontab.vim +++ b/runtime/syntax/crontab.vim @@ -5,7 +5,7 @@ " License: This file can be redistribued and/or modified under the same terms " as Vim itself. " Filenames: /tmp/crontab.* used by "crontab -e" -" Last Change: 2015-01-20 +" Last Change: 2022-09-22 " " crontab line format: " Minutes Hours Days Months Days_of_Week Commands # comments @@ -15,20 +15,20 @@ if exists("b:current_syntax") finish endif -syntax match crontabNick "^\s*@\(reboot\|yearly\|annually\|monthly\|weekly\|daily\|midnight\|hourly\)\>" nextgroup=crontabCmd skipwhite +syntax match crontabNick "^\s*@\(reboot\|yearly\|annually\|monthly\|weekly\|daily\|midnight\|hourly\|every_minute\|every_second\)\>" nextgroup=crontabCmd skipwhite syntax match crontabVar "^\s*\k\w*\s*="me=e-1 syntax case ignore -syntax match crontabMin "^\s*[-0-9/,.*]\+" nextgroup=crontabHr skipwhite -syntax match crontabHr "\s[-0-9/,.*]\+" nextgroup=crontabDay skipwhite contained -syntax match crontabDay "\s[-0-9/,.*]\+" nextgroup=crontabMnth skipwhite contained +syntax match crontabMin "^\s*[-~0-9/,.*]\+" nextgroup=crontabHr skipwhite +syntax match crontabHr "\s[-~0-9/,.*]\+" nextgroup=crontabDay skipwhite contained +syntax match crontabDay "\s[-~0-9/,.*]\+" nextgroup=crontabMnth skipwhite contained -syntax match crontabMnth "\s[-a-z0-9/,.*]\+" nextgroup=crontabDow skipwhite contained +syntax match crontabMnth "\s[-~a-z0-9/,.*]\+" nextgroup=crontabDow skipwhite contained syntax keyword crontabMnth12 contained jan feb mar apr may jun jul aug sep oct nov dec -syntax match crontabDow "\s[-a-z0-9/,.*]\+" nextgroup=crontabCmd skipwhite contained +syntax match crontabDow "\s[-~a-z0-9/,.*]\+" nextgroup=crontabCmd skipwhite contained syntax keyword crontabDow7 contained sun mon tue wed thu fri sat syntax region crontabCmd start="\S" end="$" skipwhite contained keepend contains=crontabPercent diff --git a/runtime/syntax/css.vim b/runtime/syntax/css.vim index 564dc151bc..f8104ea2c5 100644 --- a/runtime/syntax/css.vim +++ b/runtime/syntax/css.vim @@ -452,12 +452,12 @@ syn match cssAttrComma "," " Pseudo class " https://www.w3.org/TR/selectors-4/ syn match cssPseudoClass ":[A-Za-z0-9_-]*" contains=cssNoise,cssPseudoClassId,cssUnicodeEscape,cssVendor,cssPseudoClassFn -syn keyword cssPseudoClassId contained link visited active hover before after left right -syn keyword cssPseudoClassId contained root empty target enabled disabled checked invalid +syn keyword cssPseudoClassId contained link visited active hover before after left right any-link +syn keyword cssPseudoClassId contained root empty target enabled disabled checked invalid default defined autofill fullscreen host indeterminate in-range modal optional out-of-range picture-in-picture placeholder-shown paused playing read-only read-write required scope syn match cssPseudoClassId contained "\<first-\(line\|letter\)\>" syn match cssPseudoClassId contained "\<\(first\|last\|only\)-\(of-type\|child\)\>" syn match cssPseudoClassId contained "\<focus\(-within\|-visible\)\=\>" -syn region cssPseudoClassFn contained matchgroup=cssFunctionName start="\<\(not\|is\|lang\|\(nth\|nth-last\)-\(of-type\|child\)\)(" end=")" contains=cssStringQ,cssStringQQ,cssTagName,cssAttributeSelector,cssClassName,cssIdentifier +syn region cssPseudoClassFn contained matchgroup=cssFunctionName start="\<\(where\|has\|host\|not\|is\|lang\|\(nth\|nth-last\)-\(of-type\|child\)\)(" end=")" contains=cssStringQ,cssStringQQ,cssTagName,cssAttributeSelector,cssClassName,cssIdentifier " ------------------------------------ " Vendor specific properties syn match cssPseudoClassId contained "\<selection\>" diff --git a/runtime/syntax/ctrlh.vim b/runtime/syntax/ctrlh.vim index b4bf3477e6..b34f335785 100644 --- a/runtime/syntax/ctrlh.vim +++ b/runtime/syntax/ctrlh.vim @@ -1,7 +1,8 @@ " Vim syntax file " Language: CTRL-H (e.g., ASCII manpages) -" Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2005 Jun 20 +" Maintainer: The Vim Project <https://github.com/vim/vim> +" Last Change: 2023 Aug 10 +" Former Maintainer: Bram Moolenaar <Bram@vim.org> " Existing syntax is kept, this file can be used as an addition diff --git a/runtime/syntax/deb822sources.vim b/runtime/syntax/deb822sources.vim new file mode 100644 index 0000000000..81113610e8 --- /dev/null +++ b/runtime/syntax/deb822sources.vim @@ -0,0 +1,63 @@ +" Vim syntax file +" Language: Debian deb822-format source list file +" Maintainer: Debian Vim Maintainers +" Last Change: 2023 May 25 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/deb822sources.vim + +" Standard syntax initialization +if exists('b:current_syntax') + finish +endif + +" case insensitive +syn case ignore + +" Comments are matched from the first character of a line to the end-of-line +syn region deb822sourcesComment start="^#" end="$" + +" A bunch of useful keywords +syn match deb822sourcesType /\(deb-src\|deb\)/ +syn match deb822sourcesFreeComponent /\(main\|universe\)/ +syn match deb822sourcesNonFreeComponent /\(contrib\|non-free-firmware\|non-free\|restricted\|multiverse\)/ + +" Include Debian versioning information +runtime! syntax/shared/debversions.vim + +exe 'syn match deb822sourcesSupportedSuites contained + *\([[:alnum:]_./]*\)\<\('. join(g:debSharedSupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\)+' +exe 'syn match deb822sourcesUnsupportedSuites contained + *\([[:alnum:]_./]*\)\<\('. join(g:debSharedUnsupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\)+' + +unlet g:debSharedSupportedVersions +unlet g:debSharedUnsupportedVersions + +syn region deb822sourcesSuites start="\(^Suites: *\)\@<=" end="$" contains=deb822sourcesSupportedSuites,deb822sourcesUnsupportedSuites oneline + +syn keyword deb822sourcesForce contained force +syn keyword deb822sourcesYesNo contained yes no + +" Match uri's +syn match deb822sourcesUri '\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\+' + +syn match deb822sourcesEntryField "^\%(Types\|URIs\|Suites\|Components\): *" +syn match deb822sourcesOptionField "^\%(Signed-By\|Check-Valid-Until\|Valid-Until-Min\|Valid-Until-Max\|Date-Max-Future\|InRelease-Path\): *" +syn match deb822sourcesMultiValueOptionField "^\%(Architectures\|Languages\|Targets\)\%(-Add\|-Remove\)\?: *" + +syn region deb822sourcesStrictField matchgroup=deb822sourcesBooleanOptionField start="^\%(PDiffs\|Allow-Insecure\|Allow-Weak\|Allow-Downgrade-To-Insecure\|Trusted\|Check-Date\): *" end="$" contains=deb822sourcesYesNo oneline +syn region deb822sourcesStrictField matchgroup=deb822sourcesForceBooleanOptionField start="^\%(By-Hash\): *" end="$" contains=deb822sourcesForce,deb822sourcesYesNo oneline + +hi def link deb822sourcesComment Comment +hi def link deb822sourcesEntryField Keyword +hi def link deb822sourcesOptionField Special +hi def link deb822sourcesMultiValueOptionField Special +hi def link deb822sourcesBooleanOptionField Special +hi def link deb822sourcesForceBooleanOptionField Special +hi def link deb822sourcesStrictField Error +hi def link deb822sourcesType Identifier +hi def link deb822sourcesFreeComponent Identifier +hi def link deb822sourcesNonFreeComponent Identifier +hi def link deb822sourcesForce Identifier +hi def link deb822sourcesYesNo Identifier +hi def link deb822sourcesUri Constant +hi def link deb822sourcesSupportedSuites Type +hi def link deb822sourcesUnsupportedSuites WarningMsg + +let b:current_syntax = 'deb822sources' diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim index 691c3778c1..da35a6a10b 100644 --- a/runtime/syntax/debchangelog.vim +++ b/runtime/syntax/debchangelog.vim @@ -3,8 +3,8 @@ " Maintainer: Debian Vim Maintainers " Former Maintainers: Gerfried Fuchs <alfie@ist.org> " Wichert Akkerman <wakkerma@debian.org> -" Last Change: 2022 Oct 29 -" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim +" Last Change: 2023 Oct 11 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debchangelog.vim " Standard syntax initialization if exists('b:current_syntax') @@ -17,34 +17,19 @@ syn case ignore let s:urgency='urgency=\(low\|medium\|high\|emergency\|critical\)\( [^[:space:],][^,]*\)\=' let s:binNMU='binary-only=yes' -let s:cpo = &cpo -set cpo-=C -let s:supported = [ - \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', 'sid', 'rc-buggy', - \ 'buster', 'bullseye', 'bookworm', 'trixie', 'forky', - \ - \ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'kinetic', 'lunar', - \ 'devel' - \ ] -let s:unsupported = [ - \ 'frozen', 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', - \ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy', - \ 'jessie', 'stretch', - \ - \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty', - \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid', - \ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy', - \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic', - \ 'disco', 'eoan', 'hirsute', 'impish', 'groovy' - \ ] -let &cpo=s:cpo +" Include Debian versioning information +runtime! syntax/shared/debversions.vim + +exe 'syn match debchangelogTarget contained "\%( \%('.join(g:debSharedSupportedVersions, '\|').'\)\>[-[:alnum:]]*\)\+"' +exe 'syn match debchangelogUnsupportedTarget contained "\%( \%('.join(g:debSharedUnsupportedVersions, '\|').'\)\>[-[:alnum:]]*\)\+"' + +unlet g:debSharedSupportedVersions +unlet g:debSharedUnsupportedVersions " Define some common expressions we can use later on syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ " exe 'syn match debchangelogFirstKV contained "; \('.s:urgency.'\|'.s:binNMU.'\)"' exe 'syn match debchangelogOtherKV contained ", \('.s:urgency.'\|'.s:binNMU.'\)"' -exe 'syn match debchangelogTarget contained "\%( \%('.join(s:supported, '\|').'\)\>[-[:alnum:]]*\)\+"' -exe 'syn match debchangelogUnsupportedTarget contained "\%( \%('.join(s:unsupported, '\|').'\)\>[-[:alnum:]]*\)\+"' syn match debchangelogUnreleased contained / UNRELEASED/ syn match debchangelogVersion contained "(.\{-})" syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*" @@ -58,19 +43,19 @@ syn region debchangelogFooter start="^ [^ ]" end="$" contains=debchangelogEmail syn region debchangelogEntry start="^ " end="$" contains=debchangelogCloses,debchangelogLP oneline " Associate our matches and regions with pretty colours -hi def link debchangelogHeader Error -hi def link debchangelogFooter Identifier -hi def link debchangelogEntry Normal -hi def link debchangelogCloses Statement -hi def link debchangelogLP Statement -hi def link debchangelogFirstKV Identifier -hi def link debchangelogOtherKV Identifier -hi def link debchangelogName Comment -hi def link debchangelogVersion Identifier -hi def link debchangelogTarget Identifier -hi def link debchangelogUnsupportedTarget Identifier +hi def link debchangelogHeader Error +hi def link debchangelogFooter Identifier +hi def link debchangelogEntry Normal +hi def link debchangelogCloses Statement +hi def link debchangelogLP Statement +hi def link debchangelogFirstKV Identifier +hi def link debchangelogOtherKV Identifier +hi def link debchangelogName Comment +hi def link debchangelogVersion Identifier hi def link debchangelogUnreleased WarningMsg -hi def link debchangelogEmail Special +hi def link debchangelogEmail Special +hi def link debchangelogTarget Identifier +hi def link debchangelogUnsupportedTarget Identifier let b:current_syntax = 'debchangelog' diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim index 4c7fb5dd63..af78ebc3ae 100644 --- a/runtime/syntax/debcontrol.vim +++ b/runtime/syntax/debcontrol.vim @@ -3,8 +3,8 @@ " Maintainer: Debian Vim Maintainers " Former Maintainers: Gerfried Fuchs <alfie@ist.org> " Wichert Akkerman <wakkerma@debian.org> -" Last Change: 2022 May 11 -" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcontrol.vim +" Last Change: 2023 Jan 16 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debcontrol.vim " Standard syntax initialization if exists('b:current_syntax') @@ -22,7 +22,7 @@ syn iskeyword @,48-57,- " Everything that is not explicitly matched by the rules below syn match debcontrolElse "^.*$" -" Common seperators +" Common separators syn match debControlComma ",[ \t]*" syn match debControlSpace "[ \t]" diff --git a/runtime/syntax/debcopyright.vim b/runtime/syntax/debcopyright.vim index c87b876eea..6f76b5c868 100644 --- a/runtime/syntax/debcopyright.vim +++ b/runtime/syntax/debcopyright.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Debian copyright file " Maintainer: Debian Vim Maintainers -" Last Change: 2019 Sep 07 -" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcopyright.vim +" Last Change: 2023 Jan 16 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debcopyright.vim " Standard syntax initialization if exists('b:current_syntax') diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim index 9b75797b54..9846cfdef0 100644 --- a/runtime/syntax/debsources.vim +++ b/runtime/syntax/debsources.vim @@ -2,8 +2,8 @@ " Language: Debian sources.list " Maintainer: Debian Vim Maintainers " Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl> -" Last Change: 2022 Oct 29 -" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim +" Last Change: 2023 Oct 11 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/debsources.vim " Standard syntax initialization if exists('b:current_syntax') @@ -14,44 +14,34 @@ endif syn case match " A bunch of useful keywords -syn match debsourcesKeyword /\(deb-src\|deb\|main\|contrib\|non-free\|restricted\|universe\|multiverse\)/ +syn match debsourcesType /\(deb-src\|deb\)/ +syn match debsourcesFreeComponent /\(main\|universe\)/ +syn match debsourcesNonFreeComponent /\(contrib\|non-free-firmware\|non-free\|restricted\|multiverse\)/ " Match comments syn match debsourcesComment /#.*/ contains=@Spell -let s:cpo = &cpo -set cpo-=C -let s:supported = [ - \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', 'sid', 'rc-buggy', - \ 'buster', 'bullseye', 'bookworm', 'trixie', 'forky', - \ - \ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'kinetic', 'lunar', - \ 'devel' - \ ] -let s:unsupported = [ - \ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', - \ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy', - \ 'jessie', 'stretch', - \ - \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty', - \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid', - \ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy', - \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic', - \ 'disco', 'eoan', 'hirsute', 'impish', 'groovy' - \ ] -let &cpo=s:cpo +" Include Debian versioning information +runtime! syntax/shared/debversions.vim + +exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(g:debSharedSupportedVersions, '\|'). '\)\>\([-[:alnum:]_./]*\)+' +exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(g:debSharedUnsupportedVersions, '\|') .'\)\>\([-[:alnum:]_./]*\)+' + +unlet g:debSharedSupportedVersions +unlet g:debSharedUnsupportedVersions " Match uri's syn match debsourcesUri '\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\+' -exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:supported, '\|'). '\)\>\([-[:alnum:]_./]*\)+' -exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:unsupported, '\|') .'\)\>\([-[:alnum:]_./]*\)+' +syn region debsourcesLine start="^" end="$" contains=debsourcesType,debsourcesFreeComponent,debsourcesNonFreeComponent,debsourcesComment,debsourcesUri,debsourcesDistrKeyword,debsourcesUnsupportedDistrKeyword oneline + " Associate our matches and regions with pretty colours -hi def link debsourcesLine Error -hi def link debsourcesKeyword Statement -hi def link debsourcesDistrKeyword Type -hi def link debsourcesUnsupportedDistrKeyword WarningMsg +hi def link debsourcesType Statement +hi def link debsourcesFreeComponent Statement +hi def link debsourcesNonFreeComponent Statement hi def link debsourcesComment Comment hi def link debsourcesUri Constant +hi def link debsourcesDistrKeyword Type +hi def link debsourcesUnsupportedDistrKeyword WarningMsg let b:current_syntax = 'debsources' diff --git a/runtime/syntax/dep3patch.vim b/runtime/syntax/dep3patch.vim index cb0eda8931..c00bddfde2 100644 --- a/runtime/syntax/dep3patch.vim +++ b/runtime/syntax/dep3patch.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Debian DEP3 Patch headers " Maintainer: Gabriel Filion <gabster@lelutin.ca> -" Last Change: 2022 Apr 06 -" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/dep3patch.vim +" Last Change: 2023 Jan 16 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/dep3patch.vim " " Specification of the DEP3 patch header format is available at: " https://dep-team.pages.debian.net/deps/dep3/ diff --git a/runtime/syntax/diff.vim b/runtime/syntax/diff.vim index 408556ac13..4cadf5dae8 100644 --- a/runtime/syntax/diff.vim +++ b/runtime/syntax/diff.vim @@ -1,8 +1,9 @@ " Vim syntax file " Language: Diff (context or unified) -" Maintainer: Bram Moolenaar <Bram@vim.org> -" Translations by Jakson Alves de Aquino. -" Last Change: 2020 Dec 30 +" Maintainer: The Vim Project <https://github.com/vim/vim> +" Translations by Jakson Alves de Aquino. +" Last Change: 2023 Aug 10 +" Former Maintainer: Bram Moolenaar <Bram@vim.org> " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") diff --git a/runtime/syntax/dosbatch.vim b/runtime/syntax/dosbatch.vim index f003a65909..a75771bd2d 100644 --- a/runtime/syntax/dosbatch.vim +++ b/runtime/syntax/dosbatch.vim @@ -1,12 +1,12 @@ " Vim syntax file -" Language: MS-DOS batch file (with NT command extensions) -" Maintainer: Mike Williams <mrw@eandem.co.uk> +" Language: MS-DOS/Windows batch file (with NT command extensions) +" Maintainer: Mike Williams <mrmrdubya@gmail.com> " Filenames: *.bat -" Last Change: 6th September 2009 -" Web Page: http://www.eandem.co.uk/mrw/vim +" Last Change: 12th February 2023 " " Options Flags: " dosbatch_cmdextversion - 1 = Windows NT, 2 = Windows 2000 [default] +" dosbatch_colons_comment - any value to treat :: as comment line " " quit when a syntax file was already loaded @@ -92,7 +92,11 @@ syn match dosbatchComment "^rem\($\|\s.*$\)"lc=3 contains=dosbatchTodo,dosbatchS syn match dosbatchComment "^@rem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell syn match dosbatchComment "\srem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell syn match dosbatchComment "\s@rem\($\|\s.*$\)"lc=5 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell -syn match dosbatchComment "\s*:\s*:.*$" contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell +if exists("dosbatch_colons_comment") + syn match dosbatchComment "\s*:\s*:.*$" contains=dosbatchTodo,dosbatchSpecialChar,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell +else + syn match dosbatchError "\s*:\s*:.*$" +endif " Comments in ()'s - still to handle spaces before rem syn match dosbatchComment "(rem\([^)]\|\^\@<=)\)*"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument,@Spell @@ -110,34 +114,35 @@ syn keyword dosbatchImplicit vol xcopy " Define the default highlighting. " Only when an item doesn't have highlighting yet -hi def link dosbatchTodo Todo +hi def link dosbatchTodo Todo +hi def link dosbatchError Error hi def link dosbatchStatement Statement hi def link dosbatchCommands dosbatchStatement -hi def link dosbatchLabel Label +hi def link dosbatchLabel Label hi def link dosbatchConditional Conditional -hi def link dosbatchRepeat Repeat +hi def link dosbatchRepeat Repeat -hi def link dosbatchOperator Operator -hi def link dosbatchEchoOperator dosbatchOperator -hi def link dosbatchIfOperator dosbatchOperator +hi def link dosbatchOperator Operator +hi def link dosbatchEchoOperator dosbatchOperator +hi def link dosbatchIfOperator dosbatchOperator hi def link dosbatchArgument Identifier -hi def link dosbatchIdentifier Identifier +hi def link dosbatchIdentifier Identifier hi def link dosbatchVariable dosbatchIdentifier hi def link dosbatchSpecialChar SpecialChar -hi def link dosbatchString String -hi def link dosbatchNumber Number +hi def link dosbatchString String +hi def link dosbatchNumber Number hi def link dosbatchInteger dosbatchNumber hi def link dosbatchHex dosbatchNumber -hi def link dosbatchBinary dosbatchNumber -hi def link dosbatchOctal dosbatchNumber +hi def link dosbatchBinary dosbatchNumber +hi def link dosbatchOctal dosbatchNumber hi def link dosbatchComment Comment hi def link dosbatchImplicit Function -hi def link dosbatchSwitch Special +hi def link dosbatchSwitch Special hi def link dosbatchCmd PreProc diff --git a/runtime/syntax/dosini.vim b/runtime/syntax/dosini.vim index cf42819bcd..66e17ec9af 100644 --- a/runtime/syntax/dosini.vim +++ b/runtime/syntax/dosini.vim @@ -1,12 +1,12 @@ " Vim syntax file " Language: Configuration File (ini file) for MSDOS/MS Windows -" Version: 2.2 +" Version: 2.3 " Original Author: Sean M. McKee <mckee@misslink.net> " Previous Maintainer: Nima Talebi <nima@it.net.au> " Current Maintainer: Hong Xu <hong@topbug.net> " Homepage: http://www.vim.org/scripts/script.php?script_id=3747 " Repository: https://github.com/xuhdev/syntax-dosini.vim -" Last Change: 2018 Sep 11 +" Last Change: 2023 Aug 20 " quit when a syntax file was already loaded @@ -14,6 +14,10 @@ if exists("b:current_syntax") finish endif +" using of line-continuation requires cpo&vim +let s:cpo_save = &cpo +set cpo&vim + " shut case off syn case ignore @@ -24,6 +28,8 @@ syn match dosiniNumber "=\zs\s*\d*\.\d\+\s*$" syn match dosiniNumber "=\zs\s*\d\+e[+-]\=\d\+\s*$" syn region dosiniHeader start="^\s*\[" end="\]" syn match dosiniComment "^[#;].*$" +syn region dosiniSection start="\s*\[.*\]" end="\ze\s*\[.*\]" fold + \ contains=dosiniLabel,dosiniValue,dosiniNumber,dosiniHeader,dosiniComment " Define the default highlighting. " Only when an item doesn't have highlighting yet @@ -37,4 +43,7 @@ hi def link dosiniValue String let b:current_syntax = "dosini" +let &cpo = s:cpo_save +unlet s:cpo_save + " vim: sts=2 sw=2 et diff --git a/runtime/syntax/dts.vim b/runtime/syntax/dts.vim index be51ab5b10..bb7eff7be1 100644 --- a/runtime/syntax/dts.vim +++ b/runtime/syntax/dts.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: dts/dtsi (device tree files) " Maintainer: Daniel Mack <vim@zonque.org> -" Last Change: 2022 Jun 14 +" Last Change: 2023 Apr 28 if exists("b:current_syntax") finish @@ -10,9 +10,10 @@ let b:current_syntax = 'dts' syntax region dtsComment start="/\*" end="\*/" syntax match dtsReference "&[[:alpha:][:digit:]_]\+" +syntax match dtsReference "&{[[:alpha:][:digit:]@_/-]\+}" syntax region dtsBinaryProperty start="\[" end="\]" syntax match dtsStringProperty "\".*\"" -syntax match dtsKeyword "/.\{-1,\}/" +syntax match dtsKeyword "/[[:alpha:][:digit:]-]\+/\([[:space:]]\|;\)"he=e-1 syntax match dtsLabel "^[[:space:]]*[[:alpha:][:digit:]_]\+:" syntax match dtsNode /[[:alpha:][:digit:]-_]\+\(@[0-9a-fA-F]\+\|\)[[:space:]]*{/he=e-1 syntax region dtsCellProperty start="<" end=">" contains=dtsReference,dtsBinaryProperty,dtsStringProperty,dtsComment diff --git a/runtime/syntax/editorconfig.vim b/runtime/syntax/editorconfig.vim index 4392d2b2d5..74a0e56131 100644 --- a/runtime/syntax/editorconfig.vim +++ b/runtime/syntax/editorconfig.vim @@ -1,15 +1,18 @@ +" Nvim syntax file +" Language: EditorConfig +" Last Change: 2023-07-20 +" +" This file is intentionally _not_ copied from Vim. + runtime! syntax/dosini.vim unlet! b:current_syntax -syntax match editorconfigUnknownProperty "^\s*\zs\w\+\ze\s*=" +syntax match editorconfigUnknownProperty "^\s*\zs[a-zA-Z0-9_-]\+\ze\s*=" syntax keyword editorconfigProperty root lua<< -local props = {} -for k in pairs(require('editorconfig').properties) do - props[#props + 1] = k -end -vim.cmd(string.format('syntax keyword editorconfigProperty %s', table.concat(props, ' '))) +local props = vim.tbl_keys(require('editorconfig').properties) +vim.cmd.syntax { 'keyword', 'editorconfigProperty', unpack(props) } . hi def link editorconfigProperty dosiniLabel diff --git a/runtime/syntax/euphoria4.vim b/runtime/syntax/euphoria4.vim index 5e668a7d67..baa0e8e7b9 100644 --- a/runtime/syntax/euphoria4.vim +++ b/runtime/syntax/euphoria4.vim @@ -27,7 +27,7 @@ syn keyword euphoria4Debug includes inline warning define " Keywords for conditional compilation - from $EUDIR/include/euphoria/keywords.e: syn keyword euphoria4PreProc elsedef elsifdef ifdef -" Keywords (Statments) - from $EUDIR/include/euphoria/keywords.e: +" Keywords (Statements) - from $EUDIR/include/euphoria/keywords.e: syn keyword euphoria4Keyword and as break by case constant continue do else syn keyword euphoria4Keyword elsif end entry enum exit export syn keyword euphoria4Keyword fallthru for function global goto if include diff --git a/runtime/syntax/fish.vim b/runtime/syntax/fish.vim new file mode 100644 index 0000000000..266878bbdc --- /dev/null +++ b/runtime/syntax/fish.vim @@ -0,0 +1,225 @@ +" Vim syntax file +" Language: fish +" Maintainer: Nicholas Boyle (github.com/nickeb96) +" Repository: https://github.com/nickeb96/fish.vim +" Last Change: February 1, 2023 + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + + +" Statements +syn cluster fishStatement contains=fishKeywordAndOr,fishNot,fishSelectStatement,fishKeyword,fishKeywordIf,fishCommand,fishVariable + +syn keyword fishKeywordAndOr and or nextgroup=fishNot,fishSelectStatement,fishKeyword,fishKeywordIf,fishCommand +hi def link fishKeywordAndOr fishOperator + +syn keyword fishNot not skipwhite nextgroup=fishSelectStatement,fishKeyword,fishKeywordIf,fishCommand +syn match fishNot /!/ skipwhite nextgroup=fishSelectStatement,fishKeyword,fishKeywordIf,fishCommand +hi def link fishNot fishOperator + +syn keyword fishSelectStatement command builtin skipwhite nextgroup=fishKeyword,fishKeywordIf,fishCommand,fishOption +hi def link fishSelectStatement fishKeyword + +syn keyword fishKeyword end skipwhite nextgroup=@fishTerminator + +syn keyword fishKeywordIf if skipwhite nextgroup=@fishStatement +syn keyword fishKeyword else skipwhite nextgroup=fishKeywordIf,fishSemicolon +hi def link fishKeywordIf fishKeyword + +syn keyword fishKeyword switch skipwhite nextgroup=@fishArgument +syn keyword fishKeyword case skipwhite nextgroup=@fishArgument + +syn keyword fishKeyword while skipwhite nextgroup=@fishStatement + +syn keyword fishKeyword for skipwhite nextgroup=fishForVariable +syn match fishForVariable /[[:alnum:]_]\+/ contained skipwhite nextgroup=fishKeywordIn +syn keyword fishKeywordIn in contained skipwhite nextgroup=@fishArgument +hi def link fishForVariable fishParameter +hi def link fishKeywordIn fishKeyword + +syn keyword fishKeyword _ abbr argparse begin bg bind block break breakpoint cd commandline + \ complete continue count disown echo emit eval exec exit false fg function functions + \ history jobs math printf pwd random read realpath return set set_color source status + \ string test time true type ulimit wait + \ skipwhite nextgroup=@fishNext +syn match fishKeyword /\<contains\>/ skipwhite nextgroup=@fishNext + +syn match fishCommand /[[:alnum:]_\/[][[:alnum:]+._-]*/ skipwhite nextgroup=@fishNext + + +" Internally Nested Arguments + +syn cluster fishSubscriptArgs contains=fishInnerVariable,fishIndexNum,fishIndexRange,fishInnerCommandSub + +syn match fishInnerVariable /\$\+[[:alnum:]_]\+/ contained +syn match fishInnerVariable /\$\+[[:alnum:]_]\+\[/me=e-1,he=e-1 contained nextgroup=fishInnerSubscript +hi def link fishInnerVariable fishVariable + +syn region fishInnerSubscript matchgroup=fishVariable start=/\[/ end=/]/ contained + \ keepend contains=@fishSubscriptArgs +hi def link fishInnerSubscript fishSubscript + +syn match fishIndexNum /[+-]?[[:digit:]]\+/ contained +hi def link fishIndexNum fishParameter + +syn match fishIndexRange /\.\./ contained +hi def link fishIndexRange fishParameter + +syn region fishInnerCommandSub matchgroup=fishOperator start=/(/ start=/\$(/ end=/)/ contained + \ contains=@fishStatement +hi def link fishInnerCommandSub fishCommandSub + +syn region fishQuotedCommandSub matchgroup=fishOperator start=/\$(/ end=/)/ contained + \ contains=@fishStatement +hi def link fishQuotedCommandSub fishCommandSub + +syn match fishBraceExpansionComma /,/ contained +hi def link fishBraceExpansionComma fishOperator + +syn match fishBracedParameter '[[:alnum:]\u5b\u5d@:=+.%/!_-]\+' contained contains=fishInnerPathGlob +hi def link fishBracedParameter fishParameter + +syn region fishBracedQuote start=/'/ skip=/\\'/ end=/'/ contained + \ contains=fishEscapedEscape,fishEscapedSQuote +syn region fishBracedQuote start=/"/ skip=/\\"/ end=/"/ contained + \ contains=fishEscapedEscape,fishEscapedDQuote,fishEscapedDollar,fishInnerVariable,fishInnerCommandSub +hi def link fishBracedQuote fishQuote + + +" Arguments + +syn cluster fishArgument contains=fishParameter,fishOption,fishVariable,fishPathGlob,fishBraceExpansion,fishQuote,fishCharacter,fishCommandSub,fishRedirection,fishSelfPid + +syn match fishParameter '[[:alnum:]\u5b\u5d@:=+.,%/!_-]\+' contained skipwhite nextgroup=@fishNext + +syn match fishOption /-[[:alnum:]=_-]*/ contained skipwhite nextgroup=@fishNext + +syn match fishPathGlob /\(\~\|*\|?\)/ contained skipwhite nextgroup=@fishNext + +syn region fishBraceExpansion matchgroup=fishOperator start=/{/ end=/}/ contained + \ contains=fishBraceExpansionComma,fishInnerVariable,fishInnerCommandSub,fishBracedParameter,fishBracedQuote + \ skipwhite nextgroup=@fishNext + +syn match fishVariable /\$\+[[:alnum:]_]\+/ skipwhite nextgroup=@fishNext +syn match fishVariable /\$\+[[:alnum:]_]\+\[/me=e-1,he=e-1 nextgroup=fishSubscript + +syn region fishSubscript matchgroup=fishVariable start=/\[/ end=/]/ contained + \ keepend contains=@fishSubscriptArgs + \ skipwhite nextgroup=@fishNext + +syn region fishCommandSub matchgroup=fishOperator start=/(/ start=/\$(/ end=/)/ contained + \ contains=@fishStatement + \ skipwhite nextgroup=@fishNext + +syn region fishQuote start=/'/ skip=/\\'/ end=/'/ contained + \ contains=fishEscapedEscape,fishEscapedSQuote + \ skipwhite nextgroup=@fishNext +syn region fishQuote start=/"/ skip=/\\"/ end=/"/ contained + \ contains=fishEscapedEscape,fishEscapedDQuote,fishEscapedDollar,fishInnerVariable,fishQuotedCommandSub + \ skipwhite nextgroup=@fishNext + +syn match fishEscapedEscape /\\\\/ contained +syn match fishEscapedSQuote /\\'/ contained +syn match fishEscapedDQuote /\\"/ contained +syn match fishEscapedDollar /\\\$/ contained +hi def link fishEscapedEscape fishCharacter +hi def link fishEscapedSQuote fishCharacter +hi def link fishEscapedDQuote fishCharacter +hi def link fishEscapedDollar fishCharacter + +syn match fishCharacter /\\[0-7]\{1,3}/ contained skipwhite nextgroup=@fishNext +syn match fishCharacter /\\u[0-9a-fA-F]\{4}/ contained skipwhite nextgroup=@fishNext +syn match fishCharacter /\\U[0-9a-fA-F]\{8}/ contained skipwhite nextgroup=@fishNext +syn match fishCharacter /\\x[0-7][0-9a-fA-F]\|\\x[0-9a-fA-F]/ contained skipwhite nextgroup=@fishNext +syn match fishCharacter /\\X[0-9a-fA-F]\{1,2}/ contained skipwhite nextgroup=@fishNext +syn match fishCharacter /\\[abcefnrtv[\](){}<>\\*?~%#$|&;'" ]/ contained skipwhite nextgroup=@fishNext + +syn match fishRedirection /</ contained skipwhite nextgroup=fishRedirectionTarget +syn match fishRedirection /[0-9&]\?>[>?]\?/ contained skipwhite nextgroup=fishRedirectionTarget +syn match fishRedirection /[0-9&]\?>&[0-9-]/ contained skipwhite nextgroup=@fishNext + +syn match fishRedirectionTarget /[[:alnum:]$~*?{,}"'\/._-]\+/ contained contains=fishInnerVariable skipwhite nextgroup=@fishNext +hi def link fishRedirectionTarget fishRedirection + +syn match fishSelfPid /%self\>/ contained nextgroup=@fishNext +hi def link fishSelfPid fishOperator + + +" Terminators + +syn cluster fishTerminator contains=fishPipe,fishBackgroundJob,fishSemicolon,fishSymbolicAndOr + +syn match fishPipe /\(1>\|2>\|&\)\?|/ contained skipwhite nextgroup=@fishStatement +hi def link fishPipe fishEnd + +syn match fishBackgroundJob /&$/ contained skipwhite nextgroup=@fishStatement +syn match fishBackgroundJob /&[^<>&|]/me=s+1,he=s+1 contained skipwhite nextgroup=@fishStatement +hi def link fishBackgroundJob fishEnd + +syn match fishSemicolon /;/ skipwhite nextgroup=@fishStatement +hi def link fishSemicolon fishEnd + +syn match fishSymbolicAndOr /\(&&\|||\)/ contained skipwhite skipempty nextgroup=@fishStatement +hi def link fishSymbolicAndOr fishOperator + + +" Other + +syn cluster fishNext contains=fishEscapedNl,@fishArgument,@fishTerminator + +syn match fishEscapedNl /\\$/ skipnl skipwhite contained nextgroup=@fishNext + +syn match fishComment /#.*/ contains=fishTodo,@Spell + +syn keyword fishTodo TODO contained + + + +syn sync minlines=200 +syn sync maxlines=300 + + +" Intermediate highlight groups matching $fish_color_* variables + +hi def link fishCommand fish_color_command +hi def link fishComment fish_color_comment +hi def link fishEnd fish_color_end +hi def link fishCharacter fish_color_escape +hi def link fishKeyword fish_color_keyword +hi def link fishEscapedNl fish_color_normal +hi def link fishOperator fish_color_operator +hi def link fishVariable fish_color_operator +hi def link fishInnerVariable fish_color_operator +hi def link fishPathGlob fish_color_operator +hi def link fishOption fish_color_option +hi def link fishParameter fish_color_param +hi def link fishQuote fish_color_quote +hi def link fishRedirection fish_color_redirection + + +" Default highlight groups + +hi def link fish_color_param Normal +hi def link fish_color_normal Normal +hi def link fish_color_option Normal +hi def link fish_color_command Function +hi def link fish_color_keyword Keyword +hi def link fish_color_end Delimiter +hi def link fish_color_operator Operator +hi def link fish_color_redirection Type +hi def link fish_color_quote String +hi def link fish_color_escape Character +hi def link fish_color_comment Comment + +hi def link fishTodo Todo + + +let b:current_syntax = 'fish' + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/flexwiki.vim b/runtime/syntax/flexwiki.vim index 6b15ab2d90..3b5f7ff573 100644 --- a/runtime/syntax/flexwiki.vim +++ b/runtime/syntax/flexwiki.vim @@ -67,10 +67,10 @@ syntax match flexwikiEmoticons /\((.)\|:[()|$@]\|:-[DOPS()\]|$@]\|;)\|:'(\) " Aggregate all the regular text highlighting into flexwikiText syntax cluster flexwikiText contains=flexwikiItalic,flexwikiBold,flexwikiCode,flexwikiDeEmphasis,flexwikiDelText,flexwikiInsText,flexwikiSuperScript,flexwikiSubScript,flexwikiCitation,flexwikiLink,flexwikiWord,flexwikiEmoticons -" single-line WikiPropertys +" single-line WikiProperties syntax match flexwikiSingleLineProperty /^:\?[A-Z_][_a-zA-Z0-9]\+:/ -" TODO: multi-line WikiPropertys +" TODO: multi-line WikiProperties " Header levels, 1-6 syntax match flexwikiH1 /^!.*$/ diff --git a/runtime/syntax/forth.vim b/runtime/syntax/forth.vim index 721bceb367..252116a187 100644 --- a/runtime/syntax/forth.vim +++ b/runtime/syntax/forth.vim @@ -1,10 +1,20 @@ " Vim syntax file -" Language: FORTH -" Current Maintainer: Johan Kotlinski <kotlinski@gmail.com> -" Previous Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de> -" Last Change: 2018-03-29 -" Filenames: *.fs,*.ft -" URL: https://github.com/jkotlinski/forth.vim +" Language: Forth +" Maintainer: Johan Kotlinski <kotlinski@gmail.com> +" Previous Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de> +" Last Change: 2023 Aug 13 +" Filenames: *.f,*.fs,*.ft,*.fth,*.4th +" URL: https://github.com/jkotlinski/forth.vim + +" Supports the Forth-2012 Standard. +" +" Removed words from the earlier Forth-79, Forth-83 and Forth-94 standards are +" also included. +" +" These have been organised according to the version in which they were +" initially included and the version in which they were removed (obsolescent +" status is ignored). Words with "experimental" or "uncontrolled" status are +" not included unless they were later standardised. " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -15,20 +25,15 @@ let s:cpo_save = &cpo set cpo&vim " Synchronization method -syn sync ccomment -syn sync maxlines=200 +exe "syn sync minlines=" .. get(g:, "forth_minlines", 50) -" I use gforth, so I set this to case ignore syn case ignore -" Some special, non-FORTH keywords -syn keyword forthTodo contained TODO FIXME XXX -syn match forthTodo contained 'Copyright\(\s([Cc])\)\=\(\s[0-9]\{2,4}\)\=' - " Characters allowed in keywords " I don't know if 128-255 are allowed in ANS-FORTH -setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 +syn iskeyword 33-126,128-255 +" Space errors {{{1 " when wanted, highlight trailing white space if exists("forth_space_errors") if !exists("forth_no_trail_space_error") @@ -39,184 +44,369 @@ if exists("forth_space_errors") endif endif -" Keywords - -" basic mathematical and logical operators -syn keyword forthOperators + - * / MOD /MOD NEGATE ABS MIN MAX -syn keyword forthOperators AND OR XOR NOT LSHIFT RSHIFT INVERT 2* 2/ 1+ -syn keyword forthOperators 1- 2+ 2- 8* UNDER+ -syn keyword forthOperators M+ */ */MOD M* UM* M*/ UM/MOD FM/MOD SM/REM -syn keyword forthOperators D+ D- DNEGATE DABS DMIN DMAX D2* D2/ -syn keyword forthOperators F+ F- F* F/ FNEGATE FABS FMAX FMIN FLOOR FROUND -syn keyword forthOperators F** FSQRT FEXP FEXPM1 FLN FLNP1 FLOG FALOG FSIN -syn keyword forthOperators FCOS FSINCOS FTAN FASIN FACOS FATAN FATAN2 FSINH -syn keyword forthOperators FCOSH FTANH FASINH FACOSH FATANH F2* F2/ 1/F -syn keyword forthOperators F~REL F~ABS F~ -syn keyword forthOperators 0< 0<= 0<> 0= 0> 0>= < <= <> = > >= U< U<= -syn keyword forthOperators U> U>= D0< D0<= D0<> D0= D0> D0>= D< D<= D<> -syn keyword forthOperators D= D> D>= DU< DU<= DU> DU>= WITHIN ?NEGATE -syn keyword forthOperators ?DNEGATE TRUE FALSE - -" various words that take an input and do something with it -syn keyword forthFunction . U. .R U.R - -" stack manipulations -syn keyword forthStack DROP NIP DUP OVER TUCK SWAP ROT -ROT ?DUP PICK ROLL -syn keyword forthStack 2DROP 2NIP 2DUP 2OVER 2TUCK 2SWAP 2ROT 2-ROT -syn keyword forthStack 3DUP 4DUP 5DUP 3DROP 4DROP 5DROP 8DROP 4SWAP 4ROT -syn keyword forthStack 4-ROT 4TUCK 8SWAP 8DUP -syn keyword forthRStack >R R> R@ RDROP 2>R 2R> 2R@ 2RDROP -syn keyword forthRstack 4>R 4R> 4R@ 4RDROP -syn keyword forthFStack FDROP FNIP FDUP FOVER FTUCK FSWAP FROT - -" stack pointer manipulations -syn keyword forthSP SP@ SP! FP@ FP! RP@ RP! LP@ LP! DEPTH - -" address operations -syn keyword forthMemory @ ! +! C@ C! 2@ 2! F@ F! SF@ SF! DF@ DF! -syn keyword forthAdrArith CHARS CHAR+ CELLS CELL+ CELL ALIGN ALIGNED FLOATS -syn keyword forthAdrArith FLOAT+ FLOAT FALIGN FALIGNED SFLOATS SFLOAT+ -syn keyword forthAdrArith SFALIGN SFALIGNED DFLOATS DFLOAT+ DFALIGN DFALIGNED -syn keyword forthAdrArith MAXALIGN MAXALIGNED CFALIGN CFALIGNED -syn keyword forthAdrArith ADDRESS-UNIT-BITS ALLOT ALLOCATE HERE -syn keyword forthMemBlks MOVE ERASE CMOVE CMOVE> FILL BLANK UNUSED - -" conditionals -syn keyword forthCond IF ELSE ENDIF THEN CASE OF ENDOF ENDCASE ?DUP-IF -syn keyword forthCond ?DUP-0=-IF AHEAD CS-PICK CS-ROLL CATCH THROW WITHIN - -" iterations -syn keyword forthLoop BEGIN WHILE REPEAT UNTIL AGAIN -syn keyword forthLoop ?DO LOOP I J K +DO U+DO -DO U-DO DO +LOOP -LOOP -syn keyword forthLoop UNLOOP LEAVE ?LEAVE EXIT DONE FOR NEXT RECURSE - -" new words -syn match forthClassDef '\<:class\s*[^ \t]\+\>' -syn match forthObjectDef '\<:object\s*[^ \t]\+\>' -syn match forthColonDef '\<:m\?\s*[^ \t]\+\>' -syn keyword forthEndOfColonDef ; ;M ;m -syn keyword forthEndOfClassDef ;class -syn keyword forthEndOfObjectDef ;object -syn keyword forthDefine CONSTANT 2CONSTANT FCONSTANT VARIABLE 2VARIABLE -syn keyword forthDefine FVARIABLE CREATE USER VALUE TO DEFER IS DOES> IMMEDIATE -syn keyword forthDefine COMPILE-ONLY COMPILE RESTRICT INTERPRET POSTPONE EXECUTE -syn keyword forthDefine LITERAL CREATE-INTERPRET/COMPILE INTERPRETATION> -syn keyword forthDefine <INTERPRETATION COMPILATION> <COMPILATION ] LASTXT -syn keyword forthDefine COMP' POSTPONE, FIND-NAME NAME>INT NAME?INT NAME>COMP -syn keyword forthDefine NAME>STRING STATE C; CVARIABLE BUFFER: MARKER -syn keyword forthDefine , 2, F, C, COMPILE, -syn match forthDefine "\[IFDEF]" -syn match forthDefine "\[IFUNDEF]" -syn match forthDefine "\[THEN]" -syn match forthDefine "\[ENDIF]" -syn match forthDefine "\[ELSE]" -syn match forthDefine "\[?DO]" -syn match forthDefine "\[DO]" -syn match forthDefine "\[LOOP]" -syn match forthDefine "\[+LOOP]" -syn match forthDefine "\[NEXT]" -syn match forthDefine "\[BEGIN]" -syn match forthDefine "\[UNTIL]" -syn match forthDefine "\[AGAIN]" -syn match forthDefine "\[WHILE]" -syn match forthDefine "\[REPEAT]" -syn match forthDefine "\[COMP']" -syn match forthDefine "'" -syn match forthDefine '\<\[\>' -syn match forthDefine "\[']" -syn match forthDefine '\[COMPILE]' -syn match forthDefine '\[CHAR]' - -" debugging -syn keyword forthDebug PRINTDEBUGDATA PRINTDEBUGLINE -syn match forthDebug "\<\~\~\>" - -" Assembler -syn keyword forthAssembler ASSEMBLER CODE END-CODE ;CODE FLUSH-ICACHE C, - -" basic character operations -syn keyword forthCharOps (.) CHAR EXPECT FIND WORD TYPE -TRAILING EMIT KEY -syn keyword forthCharOps KEY? TIB CR BL COUNT SPACE SPACES -" recognize 'char (' or '[char] (' correctly, so it doesn't +" Core words {{{1 + +" basic mathematical and logical operators {{{2 +syn keyword forthOperators * */ */MOD + - / /MOD 0< 0= 1+ 1- 2* 2/ < = > ABS +syn keyword forthOperators AND FM/MOD INVERT LSHIFT M* MAX MIN MOD NEGATE OR +syn keyword forthOperators RSHIFT SM/REM U< UM* UM/MOD XOR + " extension words +syn keyword forthOperators 0<> 0> <> U> WITHIN + " Forth-79 +syn keyword forthOperators U* U/ U/MOD + " Forth-79, Forth-83 +syn keyword forthOperators NOT + " Forth-83 +syn keyword forthOperators 2+ 2- + +" non-standard basic mathematical and logical operators +syn keyword forthOperators 0<= 0>= 8* <= >= ?DNEGATE ?NEGATE U<= U>= UNDER+ + +" various words that take an input and do something with it {{{2 +syn keyword forthFunction . U. + " extension words +syn keyword forthFunction .R U.R + +" stack manipulations {{{2 +syn keyword forthStack 2DROP 2DUP 2OVER 2SWAP >R ?DUP DROP DUP OVER R> R@ ROT +syn keyword forthStack SWAP + " extension words +syn keyword forthStack NIP PICK ROLL TUCK +syn keyword forthRStack 2>R 2R> 2R@ + +" non-standard stack manipulations +syn keyword forthStack -ROT 3DROP 3DUP 4-ROT 4DROP 4DUP 4ROT 4SWAP 4TUCK +syn keyword forthStack 5DROP 5DUP 8DROP 8DUP 8SWAP +syn keyword forthRStack 4>R 4R> 4R@ 4RDROP RDROP + +" stack pointer manipulations {{{2 +syn keyword forthSP DEPTH + +" non-standard stack pointer manipulations +syn keyword forthSP FP! FP@ LP! LP@ RP! RP@ SP! SP@ + +" address operations {{{2 +syn keyword forthMemory ! +! 2! 2@ @ C! C@ +syn keyword forthAdrArith ALIGN ALIGNED ALLOT CELL+ CELLS CHAR+ CHARS +syn keyword forthMemBlks FILL MOVE + " extension words +syn keyword forthMemBlks ERASE UNUSED + +" non-standard address operations +syn keyword forthAdrArith ADDRESS-UNIT-BITS CELL CFALIGN CFALIGNED FLOAT +syn keyword forthAdrArith MAXALIGN MAXALIGNED + +" conditionals {{{2 +syn keyword forthCond ELSE IF THEN + " extension words +syn keyword forthCond CASE ENDCASE ENDOF OF + +" non-standard conditionals +syn keyword forthCond ?DUP-0=-IF ?DUP-IF ENDIF + +" iterations {{{2 +syn keyword forthLoop +LOOP BEGIN DO EXIT I J LEAVE LOOP RECURSE REPEAT UNLOOP +syn keyword forthLoop UNTIL WHILE + " extension words +syn keyword forthLoop ?DO AGAIN + +" non-standard iterations +syn keyword forthLoop +DO -DO -LOOP ?LEAVE DONE FOR K NEXT U+DO U-DO + +" new words {{{2 +syn match forthColonDef "\<:\s*[^ \t]\+\>" +syn keyword forthEndOfColonDef ; +syn keyword forthDefine ' , C, CONSTANT CREATE DOES> EXECUTE IMMEDIATE LITERAL +syn keyword forthDefine POSTPONE STATE VARIABLE ] +syn match forthDefine "\<\[']\>" +syn match forthDefine "\<\[\>" + " extension words +syn keyword forthColonDef :NONAME +syn keyword forthDefine BUFFER: COMPILE, DEFER IS MARKER TO VALUE +syn match forthDefine "\<\[COMPILE]\>" + " Forth-79, Forth-83 +syn keyword forthDefine COMPILE + +" non-standard new words +syn match forthClassDef "\<:CLASS\s*[^ \t]\+\>" +syn keyword forthEndOfClassDef ;CLASS +syn match forthObjectDef "\<:OBJECT\s*[^ \t]\+\>" +syn keyword forthEndOfObjectDef ;OBJECT +syn match forthColonDef "\<:M\s*[^ \t]\+\>" +syn keyword forthEndOfColonDef ;M +syn keyword forthDefine 2, <BUILDS <COMPILATION <INTERPRETATION C; COMP' +syn keyword forthDefine COMPILATION> COMPILE-ONLY CREATE-INTERPRET/COMPILE +syn keyword forthDefine CVARIABLE F, FIND-NAME INTERPRET INTERPRETATION> +syn keyword forthDefine LASTXT NAME>COMP NAME>INT NAME?INT POSTPONE, RESTRICT +syn keyword forthDefine USER +syn match forthDefine "\<\[COMP']\>" + +" basic character operations {{{2 +syn keyword forthCharOps BL COUNT CR EMIT FIND KEY SPACE SPACES TYPE WORD +" recognize 'char (' or '[CHAR] (' correctly, so it doesn't " highlight everything after the paren as a comment till a closing ')' -syn match forthCharOps '\<char\s\S\s' -syn match forthCharOps '\<\[char\]\s\S\s' -syn region forthCharOps start=+."\s+ skip=+\\"+ end=+"+ - -" char-number conversion -syn keyword forthConversion <<# <# # #> #>> #S (NUMBER) (NUMBER?) CONVERT D>F -syn keyword forthConversion D>S DIGIT DPL F>D HLD HOLD NUMBER S>D SIGN >NUMBER -syn keyword forthConversion F>S S>F HOLDS - -" interpreter, wordbook, compiler -syn keyword forthForth (LOCAL) BYE COLD ABORT >BODY >NEXT >LINK CFA >VIEW HERE -syn keyword forthForth PAD WORDS VIEW VIEW> N>LINK NAME> LINK> L>NAME FORGET -syn keyword forthForth BODY> ASSERT( ASSERT0( ASSERT1( ASSERT2( ASSERT3( ) -syn keyword forthForth >IN ACCEPT ENVIRONMENT? EVALUATE QUIT SOURCE ACTION-OF -syn keyword forthForth DEFER! DEFER@ PARSE PARSE-NAME REFILL RESTORE-INPUT -syn keyword forthForth SAVE-INPUT SOURCE-ID -syn region forthForth start=+ABORT"\s+ skip=+\\"+ end=+"+ - -" vocabularies -syn keyword forthVocs ONLY FORTH ALSO ROOT SEAL VOCS ORDER CONTEXT #VOCS -syn keyword forthVocs VOCABULARY DEFINITIONS - -" File keywords -syn keyword forthFileMode R/O R/W W/O BIN -syn keyword forthFileWords OPEN-FILE CREATE-FILE CLOSE-FILE DELETE-FILE -syn keyword forthFileWords RENAME-FILE READ-FILE READ-LINE KEY-FILE -syn keyword forthFileWords KEY?-FILE WRITE-FILE WRITE-LINE EMIT-FILE -syn keyword forthFileWords FLUSH-FILE FILE-STATUS FILE-POSITION -syn keyword forthFileWords REPOSITION-FILE FILE-SIZE RESIZE-FILE -syn keyword forthFileWords SLURP-FILE SLURP-FID STDIN STDOUT STDERR -syn keyword forthFileWords INCLUDE-FILE INCLUDED REQUIRED -syn keyword forthBlocks OPEN-BLOCKS USE LOAD --> BLOCK-OFFSET -syn keyword forthBlocks GET-BLOCK-FID BLOCK-POSITION LIST SCR BLOCK -syn keyword forthBlocks BUFER EMPTY-BUFFERS EMPTY-BUFFER UPDATE UPDATED? -syn keyword forthBlocks SAVE-BUFFERS SAVE-BUFFER FLUSH THRU +LOAD +THRU -syn keyword forthBlocks BLOCK-INCLUDED BLK +syn match forthCharOps '\<CHAR\s\S\s' +syn match forthCharOps '\<\[CHAR]\s\S\s' + " Forth-83, Forth-94 +syn keyword forthCharOps EXPECT #TIB TIB + +" non-standard basic character operations +syn keyword forthCharOps (.) + +" char-number conversion {{{2 +syn keyword forthConversion # #> #S <# >NUMBER HOLD S>D SIGN + " extension words +syn keyword forthConversion HOLDS + " Forth-79, Forth-83, Forth-93 +syn keyword forthConversion CONVERT + +" non-standard char-number conversion +syn keyword forthConversion #>> (NUMBER) (NUMBER?) <<# DIGIT DPL HLD NUMBER + +" interpreter, wordbook, compiler {{{2 +syn keyword forthForth >BODY >IN ACCEPT ENVIRONMENT? EVALUATE HERE QUIT SOURCE + " extension words +syn keyword forthForth ACTION-OF DEFER! DEFER@ PAD PARSE PARSE-NAME REFILL +syn keyword forthForth RESTORE-INPUT SAVE-INPUT SOURCE-ID + " Forth-79 +syn keyword forthForth 79-STANDARD + " Forth-83 +syn keyword forthForth <MARK <RESOLVE >MARK >RESOLVE ?BRANCH BRANCH FORTH-83 + " Forth-79, Forth-83, Forth-94 +syn keyword forthForth QUERY + " Forth-83, Forth-94 +syn keyword forthForth SPAN + +" non-standard interpreter, wordbook, compiler +syn keyword forthForth ) >LINK >NEXT >VIEW ASSERT( ASSERT0( ASSERT1( ASSERT2( +syn keyword forthForth ASSERT3( BODY> CFA COLD L>NAME LINK> N>LINK NAME> VIEW +syn keyword forthForth VIEW> + +" booleans {{{2 + " extension words +syn match forthBoolean "\<\%(TRUE\|FALSE\)\>" + +" numbers {{{2 +syn keyword forthMath BASE DECIMAL + " extension words +syn keyword forthMath HEX +syn match forthInteger '\<-\=\d\+\.\=\>' +syn match forthInteger '\<#-\=\d\+\.\=\>' +syn match forthInteger '\<\$-\=\x\+\.\=\>' +syn match forthInteger '\<%-\=[01]\+\.\=\>' + +" characters {{{2 +syn match forthCharacter "'\k'" + +" strings {{{2 + +" Words that end with " are assumed to start string parsing. +" This includes standard words: S" ." +syn region forthString matchgroup=forthString start=+\<\S\+"\s+ end=+"+ end=+$+ contains=@Spell + " extension words +syn region forthString matchgroup=forthString start=+\<C"\s+ end=+"+ end=+$+ contains=@Spell +" Matches S\" +syn region forthString matchgroup=forthString start=+\<S\\"\s+ end=+"+ end=+$+ contains=@Spell,forthEscape + +syn match forthEscape +\C\\[abeflmnqrtvz"\\]+ contained +syn match forthEscape "\C\\x\x\x" contained + +" comments {{{2 -" numbers -syn keyword forthMath DECIMAL HEX BASE -syn match forthInteger '\<-\=[0-9]\+.\=\>' -syn match forthInteger '\<&-\=[0-9]\+.\=\>' -" recognize hex and binary numbers, the '$' and '%' notation is for gforth -syn match forthInteger '\<\$\x*\x\+\>' " *1* --- don't mess -syn match forthInteger '\<\x*\d\x*\>' " *2* --- this order! -syn match forthInteger '\<%[0-1]*[0-1]\+\>' -syn match forthFloat '\<-\=\d*[.]\=\d\+[DdEe]\d\+\>' -syn match forthFloat '\<-\=\d*[.]\=\d\+[DdEe][-+]\d\+\>' - -" XXX If you find this overkill you can remove it. this has to come after the -" highlighting for numbers otherwise it has no effect. -syn region forthComment start='0 \[if\]' end='\[endif\]' end='\[then\]' contains=forthTodo - -" Strings -syn region forthString start=+\.*\"+ end=+"+ end=+$+ -" XXX -syn region forthString start=+s\"+ end=+"+ end=+$+ -syn region forthString start=+s\\\"+ end=+"+ end=+$+ -syn region forthString start=+c\"+ end=+"+ end=+$+ - -" Comments -syn match forthComment '\\\s.*$' contains=forthTodo,forthSpaceError -syn region forthComment start='\\S\s' end='.*' contains=forthTodo,forthSpaceError -syn match forthComment '\.(\s[^)]*)' contains=forthTodo,forthSpaceError -syn region forthComment start='\(^\|\s\)\zs(\s' skip='\\)' end=')' contains=forthTodo,forthSpaceError -syn region forthComment start='/\*' end='\*/' contains=forthTodo,forthSpaceError - -" Include files -syn match forthInclude '^INCLUDE\s\+\k\+' -syn match forthInclude '^REQUIRE\s\+\k\+' +syn keyword forthTodo contained TODO FIXME XXX + +" Some special, non-FORTH keywords +syn match forthTodo contained "\<\%(TODO\|FIXME\|XXX\)\%(\>\|:\@=\)" + +" XXX If you find this overkill you can remove it. This has to come after the +" highlighting for numbers and booleans otherwise it has no effect. +syn region forthComment start='\<\%(0\|FALSE\)\s\+\[IF]' end='\<\[ENDIF]' end='\<\[THEN]' contains=forthTodo + +if get(g:, "forth_no_comment_fold", 0) + syn region forthComment start='\<(\>' end=')' contains=@Spell,forthTodo,forthSpaceError + " extension words + syn match forthComment '\<\\\>.*$' contains=@Spell,forthTodo,forthSpaceError +else + syn region forthComment start='\<(\>' end=')' contains=@Spell,forthTodo,forthSpaceError fold + " extension words + syn match forthComment '\<\\\>.*$' contains=@Spell,forthTodo,forthSpaceError + syn region forthMultilineComment start="^\s*\\\>" end="\n\%(\s*\\\>\)\@!" contains=forthComment transparent fold +endif + + " extension words +syn region forthComment start='\<\.(\>' end=')' end='$' contains=@Spell,forthTodo,forthSpaceError + +" ABORT {{{2 +syn keyword forthForth ABORT +syn region forthForth start=+\<ABORT"\s+ end=+"\>+ end=+$+ + +" The optional Block word set {{{1 +" Handled as Core words - REFILL +syn keyword forthBlocks BLK BLOCK BUFFER FLUSH LOAD SAVE-BUFFERS UPDATE + " extension words +syn keyword forthBlocks EMPTY-BUFFERS LIST SCR THRU + +" Non-standard Block words +syn keyword forthBlocks +LOAD +THRU --> BLOCK-INCLUDED BLOCK-OFFSET +syn keyword forthBlocks BLOCK-POSITION EMPTY-BUFFER GET-BLOCK-FID OPEN-BLOCKS +syn keyword forthBlocks SAVE-BUFFER UPDATED? USE + +" The optional Double-Number word set {{{1 +syn keyword forthConversion D>S +syn keyword forthDefine 2CONSTANT 2LITERAL 2VARIABLE +syn keyword forthFunction D. D.R +syn keyword forthOperators D+ D- D0= D2* D2/ D= DABS DMAX DMIN DNEGATE +syn keyword forthOperators D0< D< M+ M*/ + " extension words +syn keyword forthDefine 2VALUE +syn keyword forthOperators DU< +syn keyword forthStack 2ROT + +" Non-standard Double-Number words +syn keyword forthOperators D0<= D0<> D0> D0>= D<= D<> D> D>= DU<= DU> DU>= +syn keyword forthStack 2-ROT 2NIP 2RDROP 2TUCK + +" The optional Exception word set {{{1 +" Handled as Core words - ABORT ABORT" +syn keyword forthCond CATCH THROW + +" The optional Facility word set {{{1 +syn keyword forthCharOps AT-XY KEY? PAGE + " extension words +syn keyword forthCharOps EKEY EKEY>CHAR EKEY>FKEY EKEY? EMIT? K-ALT-MASK +syn keyword forthCharOps K-CTRL-MASK K-DELETE K-DOWN K-END K-F1 K-F10 K-F11 +syn keyword forthCharOps K-F12 K-F2 K-F3 K-F4 K-F5 K-F6 K-F7 K-F8 K-F9 K-HOME +syn keyword forthCharOps K-INSERT K-LEFT K-NEXT K-PRIOR K-RIGHT K-SHIFT-MASK +syn keyword forthCharOps K-UP +syn keyword forthDefine +FIELD BEGIN-STRUCTURE CFIELD: END-STRUCTURE FIELD: +syn keyword forthForth MS TIME&DATE + +" The optional File-Access word set {{{1 +" Handled as Core words - REFILL SOURCE-ID S\" S" ( +syn keyword forthFileMode BIN R/O R/W W/O +syn keyword forthFileWords CLOSE-FILE CREATE-FILE DELETE-FILE FILE-POSITION +syn keyword forthFileWords FILE-SIZE INCLUDE-FILE INCLUDED OPEN-FILE READ-FILE +syn keyword forthFileWords READ-LINE REPOSITION-FILE RESIZE-FILE WRITE-FILE +syn keyword forthFileWords WRITE-LINE + " extension words +syn keyword forthFileWords FILE-STATUS FLUSH-FILE RENAME-FILE REQUIRED +syn match forthInclude '\<INCLUDE\s\+\k\+' +syn match forthInclude '\<REQUIRE\s\+\k\+' + +" Non-standard File-Access words +syn keyword forthFileWords EMIT-FILE KEY-FILE KEY?-FILE SLURP-FID SLURP-FILE +syn keyword forthFileWords STDERR STDIN STDOUT syn match forthInclude '^FLOAD\s\+' syn match forthInclude '^NEEDS\s\+' -" Locals definitions -syn region forthLocals start='{\s' start='{$' end='\s}' end='^}' -syn match forthLocals '{ }' " otherwise, at least two spaces between -syn region forthDeprecated start='locals|' end='|' +" The optional Floating-Point word set {{{1 -" Define the default highlighting. +" numbers +syn match forthFloat '\<[+-]\=\d\+\.\=\d*[DdEe][+-]\=\d*\>' + +syn keyword forthConversion >FLOAT D>F F>D +syn keyword forthAdrArith FALIGN FALIGNED FLOAT+ FLOATS +syn keyword forthDefine FCONSTANT FLITERAL FVARIABLE +syn keyword forthFStack FDROP FDUP FOVER FROT FSWAP +syn keyword forthFunction REPRESENT +syn keyword forthMemory F! F@ +syn keyword forthOperators F* F+ F- F/ F0< F0= F< FLOOR FMAX FMIN FNEGATE +syn keyword forthOperators FROUND +syn keyword forthSP FDEPTH + " extension words +syn keyword forthConversion F>S S>F +syn keyword forthAdrArith DFALIGN DFALIGNED DFLOAT+ DFLOATS SFALIGN +syn keyword forthAdrArith SFALIGNED SFLOAT+ SFLOATS +syn keyword forthDefine DFFIELD: FFIELD: FVALUE SFFIELD: +syn keyword forthFunction F. FE. FS. PRECISION SET-PRECISION +syn keyword forthMemory DF! DF@ SF! SF@ +syn keyword forthOperators F** FABS FACOS FACOSH FALOG FASIN FASINH FATAN +syn keyword forthOperators FATAN2 FATANH FCOS FCOSH FEXP FEXPM1 FLN FLNP1 +syn keyword forthOperators FLOG FSIN FSINCOS FSINH FSQRT FTAN FTANH FTRUNC F~ + +" Non-standard Floating-Point words +syn keyword forthOperators 1/F F2* F2/ F~ABS F~REL +syn keyword forthFStack FNIP FTUCK + +" The optional Locals word set {{{1 +syn keyword forthForth (LOCAL) + " extension words +syn region forthLocals start="\<{:\>" end="\<:}\>" +syn region forthLocals start="\<LOCALS|\>" end="\<|\>" + +" Non-standard Locals words +syn region forthLocals start="\<{\>" end="\<}\>" + +" The optional Memory-Allocation word set {{{1 +syn keyword forthMemory ALLOCATE FREE RESIZE + +" The optional Programming-Tools wordset {{{1 +syn keyword forthDebug .S ? DUMP SEE WORDS + " extension words +syn keyword forthAssembler ;CODE ASSEMBLER CODE END-CODE +syn keyword forthCond AHEAD CS-PICK CS-ROLL +syn keyword forthDefine NAME>COMPILE NAME>INTERPRET NAME>STRING SYNONYM +syn keyword forthDefine TRAVERSE-WORDLIST +syn match forthDefine "\<\[DEFINED]\>" +syn match forthDefine "\<\[ELSE]\>" +syn match forthDefine "\<\[IF]\>" +syn match forthDefine "\<\[THEN]\>" +syn match forthDefine "\<\[UNDEFINED]\>" +syn keyword forthForth BYE FORGET +syn keyword forthStack N>R NR> +syn keyword forthVocs EDITOR + +" Non-standard Programming-Tools words +syn keyword forthAssembler FLUSH-ICACHE +syn keyword forthDebug PRINTDEBUGDATA PRINTDEBUGLINE +syn match forthDebug "\<\~\~\>" +syn match forthDefine "\<\[+LOOP]\>" +syn match forthDefine "\<\[?DO]\>" +syn match forthDefine "\<\[AGAIN]\>" +syn match forthDefine "\<\[BEGIN]\>" +syn match forthDefine "\<\[DO]\>" +syn match forthDefine "\<\[ENDIF]\>" +syn match forthDefine "\<\[IFDEF]\>" +syn match forthDefine "\<\[IFUNDEF]\>" +syn match forthDefine "\<\[LOOP]\>" +syn match forthDefine "\<\[NEXT]\>" +syn match forthDefine "\<\[REPEAT]\>" +syn match forthDefine "\<\[UNTIL]\>" +syn match forthDefine "\<\[WHILE]\>" + +" The optional Search-Order word set {{{1 +" Handled as Core words - FIND +syn keyword forthVocs DEFINITIONS FORTH-WORDLIST GET-CURRENT GET-ORDER +syn keyword forthVocs SEARCH-WORDLIST SET-CURRENT SET-ORDER WORDLIST + " extension words +syn keyword forthVocs ALSO FORTH ONLY ORDER PREVIOUS + " Forth-79, Forth-83 +syn keyword forthVocs CONTEXT CURRENT VOCABULARY + +" Non-standard Search-Order words +syn keyword forthVocs #VOCS ROOT SEAL VOCS + +" The optional String word set {{{1 +syn keyword forthFunction -TRAILING /STRING BLANK CMOVE CMOVE> COMPARE SEARCH +syn keyword forthFunction SLITERAL + " extension words +syn keyword forthFunction REPLACES SUBSTITUTE UNESCAPE + +" The optional Extended-Character word set {{{1 +" Handled as Core words - [CHAR] CHAR and PARSE +syn keyword forthAdrArith XCHAR+ +syn keyword forthCharOps X-SIZE XC-SIZE XEMIT XKEY XKEY? +syn keyword forthDefine XC, +syn keyword forthMemory XC!+ XC!+? XC@+ + " extension words +syn keyword forthAdrArith XCHAR- +X/STRING X\\STRING- +syn keyword forthCharOps EKEY>XCHAR X-WIDTH XC-WIDTH +syn keyword forthConversion XHOLD +syn keyword forthString -TRAILING-GARBAGE + +" Define the default highlighting {{{1 +hi def link forthBoolean Boolean +hi def link forthCharacter Character hi def link forthTodo Todo hi def link forthOperators Operator hi def link forthMath Number @@ -240,6 +430,7 @@ hi def link forthCharOps Character hi def link forthConversion String hi def link forthForth Statement hi def link forthVocs Statement +hi def link forthEscape Special hi def link forthString String hi def link forthComment Comment hi def link forthClassDef Define @@ -248,15 +439,17 @@ hi def link forthObjectDef Define hi def link forthEndOfObjectDef Define hi def link forthInclude Include hi def link forthLocals Type " nothing else uses type and locals must stand out -hi def link forthDeprecated Error " if you must, change to Type hi def link forthFileMode Function hi def link forthFunction Function hi def link forthFileWords Statement hi def link forthBlocks Statement hi def link forthSpaceError Error +"}}} let b:current_syntax = "forth" let &cpo = s:cpo_save unlet s:cpo_save -" vim:ts=8:sw=4:nocindent:smartindent: + +" vim:ts=8:sw=4:nocindent:smartindent:fdm=marker:tw=78 + diff --git a/runtime/syntax/fortran.vim b/runtime/syntax/fortran.vim index b5c9b1ef8d..fc6c82b480 100644 --- a/runtime/syntax/fortran.vim +++ b/runtime/syntax/fortran.vim @@ -1,6 +1,6 @@ " Vim syntax file " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77) -" Version: (v104) 2021 April 06 +" Version: (v105) 2023 August 14 " Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/> " Usage: For instructions, do :help fortran-syntax from Vim " Credits: @@ -11,7 +11,7 @@ " Walter Dieudonne, Alexander Wagner, Roman Bertle, Charles Rendleman, " Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann, " Stefano Zaghi, Vishnu V. Krishnan, Judicael Grasset, Takuma Yoshida, -" Eisuke Kawashima, Andre Chalella, and Fritz Reese. +" Eisuke Kawashima, Andre Chalella, Fritz Reese, and Karl D. Hammond. if exists("b:current_syntax") finish @@ -95,16 +95,14 @@ if exists("fortran_more_precise") syn match fortranConstructName "\(\<end\s*do\s\+\)\@11<=\a\w*" syn match fortranConstructName "\(\<end\s*if\s\+\)\@11<=\a\w*" syn match fortranConstructName "\(\<end\s*select\s\+\)\@15<=\a\w*" + syn match fortranConstructName "\(\<\%(exit\|cycle\)\s\+\)\@11<=\a\w*" endif syn match fortranUnitHeader "\<end\>" -syn match fortranType "\<character\>" -syn match fortranType "\<complex\>" -syn match fortranType "\<integer\>" -syn match fortranType "\<real\>" -syn match fortranType "\<logical\>" +syn match fortranType "\<character\((\s*kind\s*=\w\+)\)\?\>" +syn match fortranType "\<complex\((\s*kind\s*=\w\+)\)\?\>" syn keyword fortranType intrinsic -syn match fortranType "\<implicit\>" +syn match fortranType "\<implicit\>\s\+\(none\)\?" syn keyword fortranStructure dimension syn keyword fortranStorageClass parameter save syn match fortranUnitHeader "\<subroutine\>" @@ -131,7 +129,8 @@ syn match fortranTypeOb "\<character\s*\*" syn match fortranBoolean "\.\s*\(true\|false\)\s*\." -syn keyword fortranReadWrite backspace close endfile inquire open print read rewind write +syn keyword fortranReadWrite print +syn match fortranReadWrite '\<\(backspace\|close\|endfile\|inquire\|open\|read\|rewind\|write\)\ze\s*(' "If tabs are allowed then the left margin checks do not work if exists("fortran_have_tabs") @@ -140,7 +139,7 @@ else syn match fortranTab "\t" endif -syn keyword fortranIO access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit +syn match fortranIO '\%(\((\|,\|, *&\n\)\s*\)\@<=\(access\|blank\|direct\|exist\|file\|fmt\|form\|formatted\|iostat\|name\|named\|nextrec\|number\|opened\|rec\|recl\|sequential\|status\|unformatted\|unit\)\ze\s*=' syn keyword fortranIntrinsicR alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl @@ -151,8 +150,9 @@ syn keyword fortranIntrinsic abs acos aimag aint anint asin atan atan2 char cmpl syn match fortranIntrinsic "\<len\s*[(,]"me=s+3 syn match fortranIntrinsic "\<real\s*("me=s+4 syn match fortranIntrinsic "\<logical\s*("me=s+7 -syn match fortranType "\<implicit\s\+real\>" -syn match fortranType "\<implicit\s\+logical\>" +syn match fortranType "\<type\>\(\s\+is\>\)\?" +syn match fortranType "^\s*\(type\s\+\(is\)\? \)\?\s*\(real\|integer\|logical\|complex\|character\)\>" +syn match fortranType "^\s*\(implicit \)\?\s*\(real\|integer\|logical\|complex\|character\)\>" "Numbers of various sorts " Integers @@ -206,9 +206,6 @@ syn region fortranStringR start=+'+ end=+'+ contains=fortranContinueMark,fortran syn keyword fortranIntrinsicR dim lge lgt lle llt mod syn keyword fortranKeywordDel assign pause -syn match fortranType "\<type\>" -syn keyword fortranType none - syn keyword fortranStructure private public intent optional syn keyword fortranStructure pointer target allocatable syn keyword fortranStorageClass in out @@ -222,7 +219,8 @@ syn keyword fortranUnitHeader result operator assignment syn match fortranUnitHeader "\<interface\>" syn keyword fortranKeyword allocate deallocate nullify cycle exit syn match fortranConditional "\<select\>" -syn keyword fortranConditional case default where elsewhere +syn match fortranConditional "\<case\s\+default\>" +syn keyword fortranConditional where elsewhere syn match fortranOperator "\(\(>\|<\)=\=\|==\|/=\|=\)" syn match fortranOperator "=>" @@ -231,8 +229,7 @@ syn region fortranString start=+"+ end=+"+ contains=fortranLeftMargin,fortranCon syn keyword fortranIO pad position action delim readwrite syn keyword fortranIO eor advance nml -syn keyword fortranIntrinsic adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack precision present product radix random_number random_seed range repeat reshape rrspacing -syn keyword fortranIntrinsic scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify +syn match fortranIntrinsic '\<\(adjustl\|adjustr\|all\|allocated\|any\|associated\|bit_size\|btest\|ceiling\|count\|cshift\|date_and_time\|digits\|dot_product\|eoshift\|epsilon\|exponent\|floor\|fraction\|huge\|iand\|ibclr\|ibits\|ibset\|ieor\|ior\|ishft\|ishftc\|lbound\|len_trim\|matmul\|maxexponent\|maxloc\|maxval\|merge\|minexponent\|minloc\|minval\|modulo\|mvbits\|nearest\|pack\|precision\|present\|product\|radix\|random_number\|random_seed\|range\|repeat\|reshape\|rrspacing\|scale\|scan\|selected_int_kind\|selected_real_kind\|set_exponent\|shape\|size\|spacing\|spread\|sum\|system_clock\|tiny\|transpose\|trim\|ubound\|unpack\|verify\)\>\ze\s*(' syn match fortranIntrinsic "\<not\>\(\s*\.\)\@!"me=s+3 syn match fortranIntrinsic "\<kind\>\s*[(,]"me=s+4 @@ -306,9 +303,9 @@ if b:fortran_dialect == "f08" syn match fortranType "\<end\s*associate" syn match fortranType "\<enum\s*,\s*bind\s*(\s*c\s*)" syn match fortranType "\<end\s*enum" - syn match fortranConditional "\<select\s*type" - syn match fortranConditional "\<type\s*is\>" + syn match fortranConditional "\<select\s*type" syn match fortranConditional "\<class\s*is\>" + syn match fortranConditional "\<class\s*default\>" syn match fortranUnitHeader "\<abstract\s*interface\>" syn match fortranOperator "\([\|]\)" @@ -525,11 +522,6 @@ else hi! def link fortranConditionalR fortranConditional endif -" CUDA -hi def link fortranIntrinsicCUDA fortranIntrinsic -hi def link fortranTypeCUDA fortranType -hi def link fortranStringCUDA fortranString - hi def link fortranFormatSpec Identifier hi def link fortranFloat Float hi def link fortranPreCondit PreCondit @@ -543,8 +535,15 @@ hi def link fortranComment Comment hi def link fortranSerialNumber Todo hi def link fortranTab Error -" Uncomment the next line if you use extra intrinsics provided by vendors -"hi def link fortranExtraIntrinsic Function +if exists("fortran_CUDA") + hi def link fortranIntrinsicCUDA fortranIntrinsic + hi def link fortranTypeCUDA fortranType + hi def link fortranStringCUDA fortranString +endif + +if exists("fortran_vendor_intrinsics") + hi def link fortranExtraIntrinsic Function +endif let b:current_syntax = "fortran" diff --git a/runtime/syntax/freebasic.vim b/runtime/syntax/freebasic.vim index 7549d02555..5c43289c16 100644 --- a/runtime/syntax/freebasic.vim +++ b/runtime/syntax/freebasic.vim @@ -2,7 +2,7 @@ " Language: FreeBASIC " Maintainer: Doug Kearns <dougkearns@gmail.com> " Previous Maintainer: Mark Manning <markem@sim1.us> -" Last Change: 2022 Jun 26 +" Last Change: 2023 Aug 14 " " Description: " @@ -338,13 +338,13 @@ syn keyword freebasicPredefined __FB_64BIT__ __FB_ARGC__ __FB_ARG_COUNT__ __FB_ syn keyword freebasicPredefined __FB_ARG_RIGHTOF__ __FB_ARGV__ __FB_ARM__ __FB_ASM__ __FB_BACKEND__ syn keyword freebasicPredefined __FB_BIGENDIAN__ __FB_BUILD_DATE__ __FB_BUILD_DATE_ISO__ __FB_BUILD_SHA1__ syn keyword freebasicPredefined __FB_CYGWIN__ __FB_DARWIN__ __FB_DEBUG__ __FB_DOS__ __FB_ERR__ __FB_EVAL__ -syn keyword freebasicPredefined __FB_FPMODE__ __FB_FPU__ __FB_FREEBSD__ __FB_GCC__ __FB_GUI__ __FB_JOIN__ +syn keyword freebasicPredefined __FB_FPMODE__ __FB_FPU__ __FB_FREEBSD__ __FB_GCC__ __FB_GUI__ __FB_IIF__ __FB_JOIN__ syn keyword freebasicPredefined __FB_LANG__ __FB_LINUX__ __FB_MAIN__ __FB_MIN_VERSION__ __FB_MT__ __FB_NETBSD__ syn keyword freebasicPredefined __FB_OPENBSD__ __FB_OPTIMIZE__ __FB_OPTION_BYVAL__ __FB_OPTION_DYNAMIC__ syn keyword freebasicPredefined __FB_OPTION_ESCAPE__ __FB_OPTION_EXPLICIT__ __FB_OPTION_GOSUB__ syn keyword freebasicPredefined __FB_OPTION_PRIVATE__ __FB_OUT_DLL__ __FB_OUT_EXE__ __FB_OUT_LIB__ __FB_OUT_OBJ__ -syn keyword freebasicPredefined __FB_PCOS__ __FB_PPC__ __FB_QUOTE__ __FB_SIGNATURE__ __FB_SSE__ __FB_UNIQUEID__ -syn keyword freebasicPredefined __FB_UNIQUEID_POP__ __FB_UNIQUEID_PUSH__ __FB_UNIX__ __FB_UNQUOTE__ +syn keyword freebasicPredefined __FB_PCOS__ __FB_PPC__ __FB_QUERY_SYMBOL__ __FB_QUOTE__ __FB_SIGNATURE__ __FB_SSE__ +syn keyword freebasicPredefined __FB_UNIQUEID__ __FB_UNIQUEID_POP__ __FB_UNIQUEID_PUSH__ __FB_UNIX__ __FB_UNQUOTE__ syn keyword freebasicPredefined __FB_VECTORIZE__ __FB_VER_MAJOR__ __FB_VER_MINOR__ __FB_VER_PATCH__ __FB_VERSION__ syn keyword freebasicPredefined __FB_WIN32__ __FB_X86__ __FB_XBOX__ syn keyword freebasicPredefined __FILE__ __FILE_NQ__ __FUNCTION__ __FUNCTION_NQ__ diff --git a/runtime/syntax/fstab.vim b/runtime/syntax/fstab.vim index 7e18c267f7..91150bc37b 100644 --- a/runtime/syntax/fstab.vim +++ b/runtime/syntax/fstab.vim @@ -2,8 +2,8 @@ " Language: fstab file " Maintainer: Radu Dineiu <radu.dineiu@gmail.com> " URL: https://raw.github.com/rid9/vim-fstab/master/syntax/fstab.vim -" Last Change: 2022 Dec 11 -" Version: 1.6.2 +" Last Change: 2023 Feb 19 +" Version: 1.6.3 " " Credits: " David Necas (Yeti) <yeti@physics.muni.cz> @@ -389,7 +389,7 @@ syn match fsFreqPassNumber /\d\+\s\+[012]\s*/ contained syn match fsDevice /^\s*\zs.\{-1,}\s/me=e-1 nextgroup=fsMountPoint contains=@fsDeviceCluster,@fsGeneralCluster syn match fsMountPoint /\s\+.\{-}\s/me=e-1 nextgroup=fsType contains=@fsMountPointCluster,@fsGeneralCluster contained syn match fsType /\s\+.\{-}\s/me=e-1 nextgroup=fsOptions contains=@fsTypeCluster,@fsGeneralCluster contained -syn match fsOptions /\s\+.\{-}\s/me=e-1 nextgroup=fsFreqPass contains=@fsOptionsCluster,@fsGeneralCluster contained +syn match fsOptions /\s\+.\{-}\%(\s\|$\)/ nextgroup=fsFreqPass contains=@fsOptionsCluster,@fsGeneralCluster contained syn match fsFreqPass /\s\+.\{-}$/ contains=@fsFreqPassCluster,@fsGeneralCluster contained " Whole line comments @@ -491,4 +491,4 @@ let b:current_syntax = "fstab" let &cpo = s:cpo_save unlet s:cpo_save -" vim: ts=8 ft=vim +" vim: ts=8 noet ft=vim diff --git a/runtime/syntax/gdb.vim b/runtime/syntax/gdb.vim index c820ba40a9..c15b96de6f 100644 --- a/runtime/syntax/gdb.vim +++ b/runtime/syntax/gdb.vim @@ -30,7 +30,7 @@ syn keyword gdbStatement contained search section set sharedlibrary shell show s syn keyword gdbStatement contained stop target tbreak tdump tfind thbreak thread tp trace tstart tstatus tstop syn keyword gdbStatement contained tty und[isplay] unset until up watch whatis where while ws x syn match gdbFuncDef "\<define\>.*" -syn match gdbStatmentContainer "^\s*\S\+" contains=gdbStatement,gdbFuncDef +syn match gdbStatementContainer "^\s*\S\+" contains=gdbStatement,gdbFuncDef syn match gdbStatement "^\s*info" nextgroup=gdbInfo skipwhite skipempty " some commonly used abbreviations diff --git a/runtime/syntax/go.vim b/runtime/syntax/go.vim index 904c8ad7f2..4272e807f3 100644 --- a/runtime/syntax/go.vim +++ b/runtime/syntax/go.vim @@ -5,7 +5,7 @@ " go.vim: Vim syntax file for Go. " Language: Go " Maintainer: Billie Cleek <bhcleek@gmail.com> -" Latest Revision: 2022-11-17 +" Latest Revision: 2023-08-21 " License: BSD-style. See LICENSE file in source repository. " Repository: https://github.com/fatih/vim-go @@ -130,14 +130,17 @@ hi def link goFloats Type hi def link goComplexes Type " Predefined functions and values -syn keyword goBuiltins append cap close complex copy delete imag len -syn keyword goBuiltins make new panic print println real recover +syn keyword goBuiltins append cap clear close complex copy delete imag len +syn keyword goBuiltins make max min new panic print println real recover syn keyword goBoolean true false syn keyword goPredefinedIdentifiers nil iota hi def link goBuiltins Identifier +hi def link goPredefinedIdentifiers Constant +" Boolean links to Constant by default by vim: goBoolean and goPredefinedIdentifiers +" will be highlighted the same, but having the separate groups allows users to +" have separate highlighting for them if they desire. hi def link goBoolean Boolean -hi def link goPredefinedIdentifiers goBoolean " Comments; their contents syn keyword goTodo contained TODO FIXME XXX BUG diff --git a/runtime/syntax/gp.vim b/runtime/syntax/gp.vim index aecf7df48b..89f2d3f0ff 100644 --- a/runtime/syntax/gp.vim +++ b/runtime/syntax/gp.vim @@ -1,7 +1,7 @@ " Vim syntax file -" Language: gp (version 2.5) +" Language: gp (version 2.15) " Maintainer: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr> -" Last change: 2012 Jan 08 +" Last change: 2023 Aug 22 " URL: http://pari.math.u-bordeaux.fr " quit when a syntax file was already loaded @@ -14,23 +14,29 @@ set cpo&vim " control statements syntax keyword gpStatement break return next -syntax keyword gpConditional if -syntax keyword gpRepeat until while for fordiv forell forprime -syntax keyword gpRepeat forsubgroup forstep forvec +syntax keyword gpConditional if iferr +syntax keyword gpRepeat until while for forcomposite fordiv +syntax keyword gpRepeat fordivfactored foreach forell forfactored +syntax keyword gpRepeat forpart forperm forprime forprimestep forqfvec +syntax keyword gpRepeat forsquarefree forstep forsubgroup forsubset +syntax keyword gpRepeat forvec +syntax keyword gpRepeat parfor parforeach parforprime parforprimestep +syntax keyword gpRepeat parforvec " storage class -syntax keyword gpScope my local global +syntax keyword gpScope my local global export exportall " defaults syntax keyword gpInterfaceKey breakloop colors compatible -syntax keyword gpInterfaceKey datadir debug debugfiles debugmem -syntax keyword gpInterfaceKey echo factor_add_primes factor_proven format +syntax keyword gpInterfaceKey datadir debug debugfiles debugmem +syntax keyword gpInterfaceKey echo factor_add_primes factor_proven format syntax keyword gpInterfaceKey graphcolormap graphcolors -syntax keyword gpInterfaceKey help histfile histsize -syntax keyword gpInterfaceKey lines linewrap log logfile new_galois_format -syntax keyword gpInterfaceKey output parisize path prettyprinter primelimit -syntax keyword gpInterfaceKey prompt prompt_cont psfile -syntax keyword gpInterfaceKey readline realprecision recover -syntax keyword gpInterfaceKey secure seriesprecision simplify strictmatch -syntax keyword gpInterfaceKey TeXstyle timer +syntax keyword gpInterfaceKey help histfile histsize +syntax keyword gpInterfaceKey lines linewrap log logfile nbthreads +syntax keyword gpInterfaceKey new_galois_format output parisize parisizemax +syntax keyword gpInterfaceKey path plothsizes prettyprinter primelimit prompt +syntax keyword gpInterfaceKey prompt_cont psfile readline realbitprecision +syntax keyword gpInterfaceKey realprecision recover secure seriesprecision +syntax keyword gpInterfaceKey simplify sopath strictmatch TeXstyle +syntax keyword gpInterfaceKey threadsize threadsizemax timer syntax match gpInterface "^\s*\\[a-z].*" syntax keyword gpInterface default @@ -58,24 +64,23 @@ syntax region gpParen transparent start='(' end=')' contains=ALLBUT,gpParenErro syntax match gpParenError ")" syntax match gpInParen contained "[{}]" - -hi def link gpConditional Conditional +hi def link gpConditional Conditional hi def link gpRepeat Repeat hi def link gpError Error -hi def link gpParenError gpError +hi def link gpParenError gpError hi def link gpInParen gpError hi def link gpStatement Statement hi def link gpString String hi def link gpComment Comment hi def link gpInterface Type hi def link gpInput Type -hi def link gpInterfaceKey Statement +hi def link gpInterfaceKey Statement hi def link gpFunction Function hi def link gpScope Type " contained ones hi def link gpSpecial Special -hi def link gpTodo Todo -hi def link gpArgs Type +hi def link gpTodo Todo +hi def link gpArgs Type let b:current_syntax = "gp" let &cpo = s:cpo_save diff --git a/runtime/syntax/gpg.vim b/runtime/syntax/gpg.vim index 46e2099994..c7f3584ff0 100644 --- a/runtime/syntax/gpg.vim +++ b/runtime/syntax/gpg.vim @@ -1,7 +1,9 @@ " Vim syntax file -" Language: gpg(1) configuration file -" Previous Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2010-10-14 +" Language: gpg(1) configuration file +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2010-10-14 +" Updated: 2023-01-23 @ObserverOfTime: added a couple of keywords +" 2023-03-21 Todd Zullinger <tmz@pobox.com>: sync with gnupg-2.4.0 if exists("b:current_syntax") finish @@ -12,92 +14,165 @@ set cpo&vim setlocal iskeyword+=- -syn keyword gpgTodo contained FIXME TODO XXX NOTE +syn keyword gpgTodo contained FIXME TODO XXX NOTE -syn region gpgComment contained display oneline start='#' end='$' - \ contains=gpgTodo,gpgID,@Spell +syn region gpgComment contained display oneline start='#' end='$' + \ contains=gpgTodo,gpgID,@Spell -syn match gpgID contained display '\<\(0x\)\=\x\{8,}\>' +syn match gpgID contained display '\<\(0x\)\=\x\{8,}\>' -syn match gpgBegin display '^' skipwhite nextgroup=gpgComment,gpgOption,gpgCommand +syn match gpgBegin display '^' skipwhite nextgroup=gpgComment,gpgOption,gpgCommand -syn keyword gpgCommand contained skipwhite nextgroup=gpgArg - \ check-sigs decrypt decrypt-files delete-key - \ delete-secret-and-public-key delete-secret-key - \ edit-key encrypt-files export export-all - \ export-ownertrust export-secret-keys - \ export-secret-subkeys fast-import fingerprint - \ gen-prime gen-random import import-ownertrust - \ list-keys list-public-keys list-secret-keys - \ list-sigs lsign-key nrsign-key print-md print-mds - \ recv-keys search-keys send-keys sign-key verify - \ verify-files -syn keyword gpgCommand contained skipwhite nextgroup=gpgArgError - \ check-trustdb clearsign desig-revoke detach-sign - \ encrypt gen-key gen-revoke help list-packets - \ rebuild-keydb-caches sign store symmetric - \ update-trustdb version warranty +syn keyword gpgCommand contained skipwhite nextgroup=gpgArg + \ change-passphrase check-sig check-signatures + \ check-sigs delete-keys delete-secret-and-public-keys + \ delete-secret-keys desig-revoke export + \ export-secret-keys export-secret-ssh-key + \ export-secret-subkeys export-ssh-key list-key + \ list-keys list-packets list-public-keys + \ list-secret-keys list-sig list-signatures list-sigs + \ passwd send-keys fetch-keys + \ generate-designated-revocation generate-revocation + \ gen-prime gen-random gen-revoke locate-external-keys + \ locate-keys lsign-key options print-md quick-add-key + \ quick-addkey quick-add-uid quick-adduid + \ quick-generate-key quick-gen-key quick-lsign-key + \ quick-revoke-sig quick-revoke-uid quick-revuid + \ quick-set-expire quick-set-primary-uid quick-sign-key + \ quick-update-pref receive-keys recv-keys refresh-keys + \ search-keys show-key show-keys sign-key tofu-policy +syn keyword gpgCommand contained skipwhite nextgroup=gpgArgError + \ card-edit card-status change-pin check-trustdb + \ clear-sign clearsign dearmor dearmour decrypt + \ decrypt-files detach-sign encrypt encrypt-files + \ edit-card edit-key enarmor enarmour export-ownertrust + \ fast-import import import-ownertrust key-edit + \ fingerprint fix-trustdb full-generate-key + \ full-gen-key generate-key gen-key gpgconf-list + \ gpgconf-test list-config list-gcrypt-config + \ list-trustdb no-options print-mds + \ rebuild-keydb-caches server sign store symmetric + \ update-trustdb verify verify-files -syn keyword gpgOption contained skipwhite nextgroup=gpgArg - \ attribute-fd cert-digest-algo charset cipher-algo - \ command-fd comment completes-needed compress - \ compress-algo debug default-cert-check-level - \ default-key default-preference-list - \ default-recipient digest-algo disable-cipher-algo - \ disable-pubkey-algo encrypt-to exec-path - \ export-options group homedir import-options - \ keyring keyserver keyserver-options load-extension - \ local-user logger-fd marginals-needed max-cert-depth - \ notation-data options output override-session-key - \ passphrase-fd personal-cipher-preferences - \ personal-compress-preferences - \ personal-digest-preferences photo-viewer - \ recipient s2k-cipher-algo s2k-digest-algo s2k-mode - \ secret-keyring set-filename set-policy-url status-fd - \ trusted-key verify-options keyid-format list-options -syn keyword gpgOption contained skipwhite nextgroup=gpgArgError - \ allow-freeform-uid allow-non-selfsigned-uid - \ allow-secret-key-import always-trust - \ armor ask-cert-expire ask-sig-expire - \ auto-check-trustdb batch debug-all default-comment - \ default-recipient-self dry-run emit-version - \ emulate-md-encode-bug enable-special-filenames - \ escape-from-lines expert fast-list-mode - \ fixed-list-mode for-your-eyes-only - \ force-mdc force-v3-sigs force-v4-certs - \ gpg-agent-info ignore-crc-error ignore-mdc-error - \ ignore-time-conflict ignore-valid-from interactive - \ list-only lock-multiple lock-never lock-once - \ merge-only no no-allow-non-selfsigned-uid - \ no-armor no-ask-cert-expire no-ask-sig-expire - \ no-auto-check-trustdb no-batch no-comment - \ no-default-keyring no-default-recipient - \ no-encrypt-to no-expensive-trust-checks - \ no-expert no-for-your-eyes-only no-force-v3-sigs - \ no-force-v4-certs no-greeting no-literal - \ no-mdc-warning no-options no-permission-warning - \ no-pgp2 no-pgp6 no-pgp7 no-random-seed-file - \ no-secmem-warning no-show-notation no-show-photos - \ no-show-policy-url no-sig-cache no-sig-create-check - \ no-sk-comments no-tty no-utf8-strings no-verbose - \ no-version not-dash-escaped openpgp pgp2 - \ pgp6 pgp7 preserve-permissions quiet rfc1991 - \ set-filesize show-keyring show-notation show-photos - \ show-policy-url show-session-key simple-sk-checksum - \ sk-comments skip-verify textmode throw-keyid - \ try-all-secrets use-agent use-embedded-filename - \ utf8-strings verbose with-colons with-fingerprint - \ with-key-data yes +syn keyword gpgOption contained skipwhite nextgroup=gpgArg + \ aead-algo agent-program attribute-fd attribute-file + \ auto-key-locate bzip2-compress-level cert-digest-algo + \ cert-notation cert-policy-url charset chuid + \ chunk-size cipher-algo command-fd command-file + \ comment compatibility-flags completes-needed + \ compliance compress-algo compression-algo + \ compress-level ctapi-driver debug + \ debug-allow-large-chunks debug-level + \ debug-set-iobuf-size default-cert-check-level + \ default-cert-expire default-cert-level default-key + \ default-keyserver-url default-new-key-algo + \ default-preference-list default-recipient + \ default-sig-expire digest-algo dirmngr-program + \ disable-cipher-algo disable-pubkey-algo display + \ display-charset encrypt-to exec-path export-filter + \ export-options faked-system-time force-ownertrust + \ gpg-agent-info group hidden-encrypt-to + \ hidden-recipient hidden-recipient-file homedir + \ import-filter import-options input-size-hint + \ keyboxd-program keyid-format key-origin keyring + \ keyserver keyserver-options known-notation lc-ctype + \ lc-messages limit-card-insert-tries list-filter + \ list-options local-user log-file logger-fd + \ logger-file marginals-needed max-cert-depth + \ max-output min-cert-level min-rsa-length output + \ override-session-key override-session-key-fd + \ passphrase passphrase-fd passphrase-file + \ passphrase-repeat pcsc-driver + \ personal-aead-preferences personal-cipher-preferences + \ personal-cipher-prefs personal-compress-preferences + \ personal-compress-prefs personal-digest-preferences + \ photo-viewer pinentry-mode primary-keyring + \ reader-port recipient recipient-file remote-user + \ request-origin s2k-cipher-algo s2k-count + \ s2k-digest-algo s2k-mode secret-keyring sender + \ set-filename set-filesize set-notation set-policy-url + \ sig-keyserver-url sig-notation sign-with + \ sig-policy-url status-fd status-file temp-directory + \ tofu-db-format tofu-default-policy trustdb-name + \ trusted-key trust-model try-secret-key ttyname + \ ttytype ungroup user verify-options weak-digest + \ xauthority +syn keyword gpgOption contained skipwhite nextgroup=gpgArgError + \ allow-freeform-uid allow-multiple-messages + \ allow-multisig-verification allow-non-selfsigned-uid + \ allow-old-cipher-algos allow-secret-key-import + \ allow-weak-digest-algos allow-weak-key-signatures + \ always-trust armor armour ask-cert-expire + \ ask-cert-level ask-sig-expire auto-check-trustdb + \ auto-key-import auto-key-retrieve batch + \ bzip2-decompress-lowmem compress-keys compress-sigs + \ debug-all debug-iolbf debug-quick-random + \ default-comment default-recipient-self disable-ccid + \ disable-dirmngr disable-dsa2 disable-large-rsa + \ disable-mdc disable-signer-uid dry-run dump-options + \ dump-option-table emit-version enable-dsa2 + \ enable-large-rsa enable-progress-filter + \ enable-special-filenames encrypt-to-default-key + \ escape-from-lines exit-on-status-write-error expert + \ fast-list-mode file-is-digest fixed-list-mode + \ forbid-gen-key force-aead force-mdc force-ocb + \ force-sign-key force-v3-sigs force-v4-certs + \ for-your-eyes-only full-timestrings gnupg help + \ honor-http-proxy ignore-crc-error ignore-mdc-error + \ ignore-time-conflict ignore-valid-from + \ include-key-block interactive legacy-list-mode + \ list-only lock-multiple lock-never lock-once + \ mangle-dos-filenames merge-only mimemode multifile no + \ no-allow-freeform-uid no-allow-multiple-messages + \ no-allow-non-selfsigned-uid no-armor no-armour + \ no-ask-cert-expire no-ask-cert-level + \ no-ask-sig-expire no-auto-check-trustdb + \ no-auto-key-import no-auto-key-locate + \ no-auto-key-retrieve no-autostart + \ no-auto-trust-new-key no-batch no-comments + \ no-default-keyring no-default-recipient + \ no-disable-mdc no-emit-version no-encrypt-to + \ no-escape-from-lines no-expensive-trust-checks + \ no-expert no-force-mdc no-force-v3-sigs + \ no-force-v4-certs no-for-your-eyes-only no-greeting + \ no-groups no-include-key-block no-keyring no-literal + \ no-mangle-dos-filenames no-mdc-warning + \ no-permission-warning no-pgp2 no-pgp6 no-pgp7 no-pgp8 + \ no-random-seed-file no-require-backsigs + \ no-require-cross-certification no-require-secmem + \ no-rfc2440-text no-secmem-warning no-show-notation + \ no-show-photos no-show-policy-url no-sig-cache + \ no-sk-comments no-skip-hidden-recipients + \ no-symkey-cache not-dash-escaped no-textmode + \ no-throw-keyids no-tty no-use-agent + \ no-use-embedded-filename no-utf8-strings no-verbose + \ no-version only-sign-text-ids openpgp + \ override-compliance-check pgp6 pgp7 pgp8 + \ preserve-permissions print-dane-records quiet + \ require-backsigs require-compliance + \ require-cross-certification require-secmem rfc2440 + \ rfc2440-text rfc4880 rfc4880bis show-keyring + \ show-notation show-photos show-policy-url + \ show-session-key sk-comments skip-hidden-recipients + \ skip-verify textmode throw-keyids try-all-secrets + \ unwrap use-agent use-embedded-filename use-keyboxd + \ use-only-openpgp-card utf8-strings verbose version + \ warranty with-colons with-fingerprint + \ with-icao-spelling with-key-data with-keygrip + \ with-key-origin with-key-screening with-secret + \ with-sig-check with-sig-list with-subkey-fingerprint + \ with-subkey-fingerprints with-tofu-info with-wkd-hash + \ yes -syn match gpgArg contained display '\S\+\(\s\+\S\+\)*' contains=gpgID +syn match gpgArg contained display '\S\+\(\s\+\S\+\)*' contains=gpgID syn match gpgArgError contained display '\S\+\(\s\+\S\+\)*' -hi def link gpgComment Comment -hi def link gpgTodo Todo -hi def link gpgID Number -hi def link gpgOption Keyword -hi def link gpgCommand Error -hi def link gpgArgError Error +hi def link gpgComment Comment +hi def link gpgTodo Todo +hi def link gpgID Number +hi def link gpgOption Keyword +hi def link gpgCommand Error +hi def link gpgArgError Error let b:current_syntax = "gpg" diff --git a/runtime/syntax/groovy.vim b/runtime/syntax/groovy.vim index 41495e6682..e48279bd1a 100644 --- a/runtime/syntax/groovy.vim +++ b/runtime/syntax/groovy.vim @@ -362,7 +362,7 @@ exec "syn sync ccomment groovyComment minlines=" . groovy_minlines " Mark these as operators -" Hightlight brackets +" Highlight brackets " syn match groovyBraces "[{}]" " syn match groovyBraces "[\[\]]" " syn match groovyBraces "[\|]" diff --git a/runtime/syntax/haskell.vim b/runtime/syntax/haskell.vim index 1b70b9344a..b48b278084 100644 --- a/runtime/syntax/haskell.vim +++ b/runtime/syntax/haskell.vim @@ -108,6 +108,8 @@ syn match hsLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$" contain syn region hsBlockComment start="{-" end="-}" contains=hsBlockComment,@Spell syn region hsPragma start="{-#" end="#-}" +syn keyword hsTodo contained FIXME TODO XXX NOTE + " C Preprocessor directives. Shamelessly ripped from c.vim and trimmed " First, see whether to flag directive-like lines or not if (!exists("hs_allow_hash_operator")) diff --git a/runtime/syntax/help.vim b/runtime/syntax/help.vim index 8b469d7242..f1e650b2fb 100644 --- a/runtime/syntax/help.vim +++ b/runtime/syntax/help.vim @@ -1,7 +1,8 @@ " Vim syntax file " Language: Vim help file -" Maintainer: Bram Moolenaar (Bram@vim.org) -" Last Change: 2022 Nov 13 +" Maintainer: The Vim Project <https://github.com/vim/vim> +" Last Change: 2023 Aug 10 +" Former Maintainer: Bram Moolenaar <Bram@vim.org> " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") diff --git a/runtime/syntax/hollywood.vim b/runtime/syntax/hollywood.vim index fcd03a68f0..7846d5230f 100644 --- a/runtime/syntax/hollywood.vim +++ b/runtime/syntax/hollywood.vim @@ -1,8 +1,8 @@ " Vim syntax file -" Language: Hollywood 9.1 +" Language: Hollywood 10.0 " Maintainer: Ola Söder <rolfkopman@gmail.com> " First Author: Tom Crecelius <holly@net-eclipse.net> -" Last Change: 2022 Nov 09 +" Last Change: 2023 Mar 22 " Highlighting Issues: " Depending on your colour schema, Strings or Comments might be highlighted in " a way, you don't like. If so, try one of the following settings after @@ -105,7 +105,7 @@ syn keyword hwIn contained In syn keyword hwStatement Return Break Continue syn keyword hwStatement Goto Gosub Dim DimStr Const Local Global syn match hwLabel "::\I\i*::" -syn match hwOperator "\%(&\|\*\|+\|-\|\.\||\|//\|/\|:\|<\|=\|>\|<>\|<=\|=>\|\^\|\~\|\\\|\<And\>\|\<Not\>\|\<Or\>\)" +syn match hwOperator "\%(&\|\*\|+\|-\|\.\||\|//\|/\|:\|<\|=\|>\|<>\|<=\|=>\|\^\|\~\|\\\|\<And\>\|\<Not\>\|\<Or\>\|\<Xor\>\)" syn keyword hwConstant Nil syn keyword hwConstant True False " predefined preprocessing commands @@ -113,7 +113,7 @@ syn match hwPreProcessor "@\<\%(ANIM\|APPAUTHOR\|APPCOPYRIGHT\|APPDESCRIPTION\|A " predefined constants syn match hwConstant "#\<\%(ACTIVEWINDOW\|ADF_ANIM\|ADF_FX\|ADF_MOVEOBJECT\|ALL\|ALPHABETICAL\|ALPHACHANNEL\|ALPHANUMERICAL\|AMIGAICON_DEVICE\|AMIGAICON_DISK\|AMIGAICON_DRAWER\|AMIGAICON_GARBAGE\|AMIGAICON_HIDE\|AMIGAICON_KICKSTART\|AMIGAICON_NONE\|AMIGAICON_PROJECT\|AMIGAICON_SETPOSITION\|AMIGAICON_SETTITLE\|AMIGAICON_SHOW\|AMIGAICON_TOOL\|ANIM\|ANIMSTREAM\|ANIMTYPE_RASTER\|ANIMTYPE_VECTOR\|ANMFMT_GIF\|ANMFMT_IFF\|ANMFMT_MJPEG\|ANTIALIAS\|AQUA\|ARC\|ASYNCDRAW\|ASYNCOBJ\|ATTRACTIVE\|ATTRADAPTER\|ATTRALPHAINTENSITY\|ATTRBGPIC\|ATTRBITRATE\|ATTRBORDERBOTTOM\|ATTRBORDERLEFT\|ATTRBORDERLESS\|ATTRBORDERPEN\|ATTRBORDERRIGHT\|ATTRBORDERTOP\|ATTRBULLETPEN\|ATTRCANSEEK\|ATTRCLIPREGION\|ATTRCOUNT\|ATTRCURFRAME\|ATTRCURSORX\|ATTRCURSORY\|ATTRCURSUBSONG\|ATTRCYCLE\|ATTRDENSITY\|ATTRDEPTH\|ATTRDISPLAY\|ATTRDITHERMODE\|ATTRDOUBLEBUFFER\|ATTRDRIVER\|ATTRDURATION\|ATTRELAPSE\|ATTRENCODING\|ATTRFIXED\|ATTRFONTAA\|ATTRFONTASCENDER\|ATTRFONTCHARMAP\|ATTRFONTDEPTH\|ATTRFONTDESCENDER\|ATTRFONTENGINE\|ATTRFONTNAME\|ATTRFONTPALETTE\|ATTRFONTSCALABLE\|ATTRFONTSIZE\|ATTRFONTTRANSPARENTPEN\|ATTRFONTTYPE\|ATTRFORMAT\|ATTRFRAMEDELAY\|ATTRFUNCTION\|ATTRGROUP\|ATTRHARDWARE\|ATTRHASALPHA\|ATTRHASMASK\|ATTRHEIGHT\|ATTRHOSTDEPTH\|ATTRHOSTHEIGHT\|ATTRHOSTMONITORS\|ATTRHOSTSCALE\|ATTRHOSTSCALEX\|ATTRHOSTSCALEY\|ATTRHOSTTASKBAR\|ATTRHOSTTITLEBARHEIGHT\|ATTRHOSTWIDTH\|ATTRID\|ATTRIMMERSIVEMODE\|ATTRINTERPOLATE\|ATTRKEYBOARD\|ATTRLAYERID\|ATTRLAYERS\|ATTRLAYERSON\|ATTRLOADER\|ATTRMARGINLEFT\|ATTRMARGINRIGHT\|ATTRMASKMODE\|ATTRMAXHEIGHT\|ATTRMAXIMIZED\|ATTRMAXWIDTH\|ATTRMENU\|ATTRMODE\|ATTRMONITOR\|ATTRNOCLOSE\|ATTRNOHIDE\|ATTRNOMODESWITCH\|ATTRNUMENTRIES\|ATTRNUMFRAMES\|ATTRNUMSUBSONGS\|ATTRONSCREEN\|ATTRORIENTATION\|ATTROUTPUTDEVICE\|ATTRPALETTE\|ATTRPALETTEMODE\|ATTRPAUSED\|ATTRPEN\|ATTRPITCH\|ATTRPLAYING\|ATTRPOINTER\|ATTRPOSITION\|ATTRPUBSCREEN\|ATTRRAWHEIGHT\|ATTRRAWWIDTH\|ATTRRAWXPOS\|ATTRRAWYPOS\|ATTRSCALEHEIGHT\|ATTRSCALEMODE\|ATTRSCALESWITCH\|ATTRSCALEWIDTH\|ATTRSHADOWPEN\|ATTRSIZE\|ATTRSIZEABLE\|ATTRSPRITES\|ATTRSTANDARD\|ATTRSTATE\|ATTRSYSTEMBARS\|ATTRTEXT\|ATTRTITLE\|ATTRTRANSPARENTCOLOR\|ATTRTRANSPARENTPEN\|ATTRTYPE\|ATTRUSERDATA\|ATTRVISIBLE\|ATTRWIDTH\|ATTRXDPI\|ATTRXPOS\|ATTRXSERVER\|ATTRYDPI\|ATTRYPOS\|ATTRZPOS\|BARS\|BAUD_115200\|BAUD_1200\|BAUD_19200\|BAUD_2400\|BAUD_300\|BAUD_38400\|BAUD_460800\|BAUD_4800\|BAUD_57600\|BAUD_600\|BAUD_9600\|BEEPERROR\|BEEPINFORMATION\|BEEPQUESTION\|BEEPSYSTEM\|BEEPWARNING\|BGPIC\|BGPICPART\|BIGENDIAN\|BIGSINE\|BITMAP_DEFAULT\|BLACK\|BLEND\|BLUE\|BOLD\|BOOLEAN\|BORDER\|BOTTOM\|BOTTOMOUT\|BOUNCE\|BOX\|BRUSH\|BRUSH_VS_BOX\|BRUSHPART\|BULLET_ARROW\|BULLET_BOX\|BULLET_CHECKMARK\|BULLET_CIRCLE\|BULLET_CROSS\|BULLET_DASH\|BULLET_DIAMOND\|BULLET_LALPHA\|BULLET_LALPHADOUBLE\|BULLET_LALPHASINGLE\|BULLET_LROMAN\|BULLET_LROMANDOUBLE\|BULLET_LROMANSINGLE\|BULLET_NONE\|BULLET_NUMERIC\|BULLET_NUMERICDOUBLE\|BULLET_NUMERICSINGLE\|BULLET_UALPHA\|BULLET_UALPHADOUBLE\|BULLET_UALPHASINGLE\|BULLET_UROMAN\|BULLET_UROMANDOUBLE\|BULLET_UROMANSINGLE\|BYTE\|CAPBUTT\|CAPROUND\|CAPSQUARE\|CARDBOTTOM\|CARDTOP\|CENTER\|CHARMAP_ADOBECUSTOM\|CHARMAP_ADOBEEXPERT\|CHARMAP_ADOBELATIN1\|CHARMAP_ADOBESTANDARD\|CHARMAP_APPLEROMAN\|CHARMAP_BIG5\|CHARMAP_DEFAULT\|CHARMAP_JOHAB\|CHARMAP_MSSYMBOL\|CHARMAP_OLDLATIN2\|CHARMAP_SJIS\|CHARMAP_UNICODE\|CHARMAP_WANSUNG\|CHIPMEMORY\|CIRCLE\|CLIENT\|CLIPBOARD_EMPTY\|CLIPBOARD_IMAGE\|CLIPBOARD_SOUND\|CLIPBOARD_TEXT\|CLIPBOARD_UNKNOWN\|CLIPREGION\|CLOCKWIPE\|CLOSEWINDOW\|CONICAL\|COPYFILE_FAILED\|COPYFILE_OVERWRITE\|COPYFILE_STATUS\|COPYFILE_UNPROTECT\|COUNTBOTH\|COUNTDIRECTORIES\|COUNTFILES\|COUNTRY_AFGHANISTAN\|COUNTRY_ALANDISLANDS\|COUNTRY_ALBANIA\|COUNTRY_ALGERIA\|COUNTRY_AMERICANSAMOA\|COUNTRY_ANDORRA\|COUNTRY_ANGOLA\|COUNTRY_ANGUILLA\|COUNTRY_ANTARCTICA\|COUNTRY_ANTIGUAANDBARBUDA\|COUNTRY_ARGENTINA\|COUNTRY_ARMENIA\|COUNTRY_ARUBA\|COUNTRY_AUSTRALIA\|COUNTRY_AUSTRIA\|COUNTRY_AZERBAIJAN\|COUNTRY_BAHAMAS\|COUNTRY_BAHRAIN\|COUNTRY_BANGLADESH\|COUNTRY_BARBADOS\|COUNTRY_BELARUS\|COUNTRY_BELGIUM\|COUNTRY_BELIZE\|COUNTRY_BENIN\|COUNTRY_BERMUDA\|COUNTRY_BESISLANDS\|COUNTRY_BHUTAN\|COUNTRY_BOLIVIA\|COUNTRY_BOSNIAANDHERZEGOVINA\|COUNTRY_BOTSWANA\|COUNTRY_BOUVETISLAND\|COUNTRY_BRAZIL\|COUNTRY_BRUNEI\|COUNTRY_BULGARIA\|COUNTRY_BURKINAFASO\|COUNTRY_BURUNDI\|COUNTRY_CAMBODIA\|COUNTRY_CAMEROON\|COUNTRY_CANADA\|COUNTRY_CAPEVERDE\|COUNTRY_CAYMANISLANDS\|COUNTRY_CENTRALAFRICANREPUBLIC\|COUNTRY_CHAD\|COUNTRY_CHILE\|COUNTRY_CHINA\|COUNTRY_CHRISTMASISLAND\|COUNTRY_COCOSISLANDS\|COUNTRY_COLOMBIA\|COUNTRY_COMOROS\|COUNTRY_CONGO\|COUNTRY_COOKISLANDS\|COUNTRY_COSTARICA\|COUNTRY_CROATIA\|COUNTRY_CUBA\|COUNTRY_CURACAO\|COUNTRY_CYPRUS\|COUNTRY_CZECHREPUBLIC\|COUNTRY_DENMARK\|COUNTRY_DJIBOUTI\|COUNTRY_DOMINICA\|COUNTRY_DOMINICANREPUBLIC\|COUNTRY_DRCONGO\|COUNTRY_ECUADOR\|COUNTRY_EGYPT\|COUNTRY_ELSALVADOR\|COUNTRY_EQUATORIALGUINEA\|COUNTRY_ERITREA\|COUNTRY_ESTONIA\|COUNTRY_ETHIOPIA\|COUNTRY_FALKLANDISLANDS\|COUNTRY_FAROEISLANDS\|COUNTRY_FIJI\|COUNTRY_FINLAND\|COUNTRY_FRANCE\|COUNTRY_FRENCHGUIANA\|COUNTRY_FRENCHPOLYNESIA\|COUNTRY_GABON\|COUNTRY_GAMBIA\|COUNTRY_GEORGIA\|COUNTRY_GERMANY\|COUNTRY_GHANA\|COUNTRY_GIBRALTAR\|COUNTRY_GREECE\|COUNTRY_GREENLAND\|COUNTRY_GRENADA\|COUNTRY_GUADELOUPE\|COUNTRY_GUAM\|COUNTRY_GUATEMALA\|COUNTRY_GUERNSEY\|COUNTRY_GUINEA\|COUNTRY_GUINEABISSAU\|COUNTRY_GUYANA\|COUNTRY_HAITI\|COUNTRY_HOLYSEE\|COUNTRY_HONDURAS\|COUNTRY_HONGKONG\|COUNTRY_HUNGARY\|COUNTRY_ICELAND\|COUNTRY_INDIA\|COUNTRY_INDONESIA\|COUNTRY_IRAN\|COUNTRY_IRAQ\|COUNTRY_IRELAND\|COUNTRY_ISLEOFMAN\|COUNTRY_ISRAEL\|COUNTRY_ITALY\|COUNTRY_IVORYCOAST\|COUNTRY_JAMAICA\|COUNTRY_JAPAN\|COUNTRY_JERSEY\|COUNTRY_JORDAN\|COUNTRY_KAZAKHSTAN\|COUNTRY_KENYA\|COUNTRY_KIRIBATI\|COUNTRY_KUWAIT\|COUNTRY_KYRGYZSTAN\|COUNTRY_LAOS\|COUNTRY_LATVIA\|COUNTRY_LEBANON\|COUNTRY_LESOTHO\|COUNTRY_LIBERIA\|COUNTRY_LIBYA\|COUNTRY_LIECHTENSTEIN\|COUNTRY_LITHUANIA\|COUNTRY_LUXEMBOURG\|COUNTRY_MACAO\|COUNTRY_MACEDONIA\|COUNTRY_MADAGASCAR\|COUNTRY_MALAWI\|COUNTRY_MALAYSIA\|COUNTRY_MALDIVES\|COUNTRY_MALI\|COUNTRY_MALTA\|COUNTRY_MARSHALLISLANDS\|COUNTRY_MARTINIQUE\|COUNTRY_MAURITANIA\|COUNTRY_MAURITIUS\|COUNTRY_MAYOTTE\|COUNTRY_MEXICO\|COUNTRY_MICRONESIA\|COUNTRY_MOLDOVA\|COUNTRY_MONACO\|COUNTRY_MONGOLIA\|COUNTRY_MONTENEGRO\|COUNTRY_MONTSERRAT\|COUNTRY_MOROCCO\|COUNTRY_MOZAMBIQUE\|COUNTRY_MYANMAR\|COUNTRY_NAMIBIA\|COUNTRY_NAURU\|COUNTRY_NEPAL\|COUNTRY_NETHERLANDS\|COUNTRY_NEWCALEDONIA\|COUNTRY_NEWZEALAND\|COUNTRY_NICARAGUA\|COUNTRY_NIGER\|COUNTRY_NIGERIA\|COUNTRY_NIUE\|COUNTRY_NORFOLKISLAND\|COUNTRY_NORTHKOREA\|COUNTRY_NORWAY\|COUNTRY_OMAN\|COUNTRY_PAKISTAN\|COUNTRY_PALAU\|COUNTRY_PALESTINE\|COUNTRY_PANAMA\|COUNTRY_PAPUANEWGUINEA\|COUNTRY_PARAGUAY\|COUNTRY_PERU\|COUNTRY_PHILIPPINES\|COUNTRY_PITCAIRN\|COUNTRY_POLAND\|COUNTRY_PORTUGAL\|COUNTRY_PUERTORICO\|COUNTRY_QATAR\|COUNTRY_REUNION\|COUNTRY_ROMANIA\|COUNTRY_RUSSIA\|COUNTRY_RWANDA\|COUNTRY_SAINTBARTHELEMY\|COUNTRY_SAINTHELENA\|COUNTRY_SAINTKITTSANDNEVIS\|COUNTRY_SAINTLUCIA\|COUNTRY_SAINTVINCENT\|COUNTRY_SAMOA\|COUNTRY_SANMARINO\|COUNTRY_SAOTOMEANDPRINCIPE\|COUNTRY_SAUDIARABIA\|COUNTRY_SENEGAL\|COUNTRY_SERBIA\|COUNTRY_SEYCHELLES\|COUNTRY_SIERRALEONE\|COUNTRY_SINGAPORE\|COUNTRY_SLOVAKIA\|COUNTRY_SLOVENIA\|COUNTRY_SOLOMONISLANDS\|COUNTRY_SOMALIA\|COUNTRY_SOUTHAFRICA\|COUNTRY_SOUTHKOREA\|COUNTRY_SOUTHSUDAN\|COUNTRY_SPAIN\|COUNTRY_SRILANKA\|COUNTRY_SUDAN\|COUNTRY_SURINAME\|COUNTRY_SWAZILAND\|COUNTRY_SWEDEN\|COUNTRY_SWITZERLAND\|COUNTRY_SYRIA\|COUNTRY_TAIWAN\|COUNTRY_TAJIKISTAN\|COUNTRY_TANZANIA\|COUNTRY_THAILAND\|COUNTRY_TIMOR\|COUNTRY_TOGO\|COUNTRY_TONGA\|COUNTRY_TRINIDADANDTOBAGO\|COUNTRY_TUNISIA\|COUNTRY_TURKEY\|COUNTRY_TURKMENISTAN\|COUNTRY_TUVALU\|COUNTRY_UAE\|COUNTRY_UGANDA\|COUNTRY_UK\|COUNTRY_UKRAINE\|COUNTRY_UNKNOWN\|COUNTRY_URUGUAY\|COUNTRY_USA\|COUNTRY_UZBEKISTAN\|COUNTRY_VANUATU\|COUNTRY_VENEZUELA\|COUNTRY_VIETNAM\|COUNTRY_YEMEN\|COUNTRY_ZAMBIA\|COUNTSEPARATE\|CR_DEAD\|CR_RUNNING\|CR_SUSPENDED\|CROSSFADE\|CRUSHBOTTOM\|CRUSHLEFT\|CRUSHRIGHT\|CRUSHTOP\|DAMPED\|DATA_5\|DATA_6\|DATA_7\|DATA_8\|DATEDAY\|DATELOCAL\|DATELOCALNATIVE\|DATEMONTH\|DATETIME\|DATEUTC\|DATEYEAR\|DEFAULTICON\|DEFAULTSPEED\|DEINTERLACE_DEFAULT\|DEINTERLACE_DOUBLE\|DELETEFILE_FAILED\|DELETEFILE_STATUS\|DELETEFILE_UNPROTECT\|DENSITY_HIGH\|DENSITY_LOW\|DENSITY_MEDIUM\|DENSITY_NONE\|DIAGONAL\|DIRECTORY\|DIRMONITOR_ADD\|DIRMONITOR_CHANGE\|DIRMONITOR_REMOVE\|DISPLAY\|DISPMODE_ASK\|DISPMODE_FAKEFULLSCREEN\|DISPMODE_FULLSCREEN\|DISPMODE_FULLSCREENSCALE\|DISPMODE_MODEREQUESTER\|DISPMODE_MODESWITCH\|DISPMODE_SYSTEMSCALE\|DISPMODE_WINDOWED\|DISPSTATE_CLOSED\|DISPSTATE_MINIMIZED\|DISPSTATE_OPEN\|DISSOLVE\|DITHERMODE_FLOYDSTEINBERG\|DITHERMODE_NONE\|DOSTYPE_DIRECTORY\|DOSTYPE_FILE\|DOUBLE\|DOUBLEBUFFER\|DOWNLOADFILE_STATUS\|DTR_OFF\|DTR_ON\|DURATION_LONG\|DURATION_SHORT\|EDGE\|ELLIPSE\|ENCODING_AMIGA\|ENCODING_ISO8859_1\|ENCODING_RAW\|ENCODING_UTF8\|EOF\|ERR_8OR16BITONLY\|ERR_ACCELERATOR\|ERR_ADDAPPICON\|ERR_ADDAPPWIN\|ERR_ADDSYSEVENT\|ERR_ADDTASK\|ERR_ADFFREEDISP\|ERR_ADFWRONGDISP\|ERR_AFILEPROP\|ERR_AHI\|ERR_ALLOCALPHA\|ERR_ALLOCCHANNEL\|ERR_ALLOCCHUNKY\|ERR_ALLOCMASK\|ERR_ALRDYDECLRD\|ERR_ALREADYASYNC\|ERR_ALSAPCM\|ERR_AMIGAGUIDE\|ERR_ANIMDISK\|ERR_ANIMFRAME\|ERR_ANTIALIAS\|ERR_APPLET\|ERR_APPLETVERSION\|ERR_APPLICATION\|ERR_ARGS\|ERR_ARRAYDECLA\|ERR_ASSERTFAILED\|ERR_ATSUI\|ERR_AUDIOCONVERTER\|ERR_BACKFILL\|ERR_BAD8SVX\|ERR_BADBASE64\|ERR_BADBYTECODE\|ERR_BADCALLBACKRET\|ERR_BADCONSTANT\|ERR_BADDIMENSIONS\|ERR_BADENCODING\|ERR_BADINTEGER\|ERR_BADIP\|ERR_BADLAYERTYPE\|ERR_BADPLATFORM\|ERR_BADSIGNATURE\|ERR_BADUPVALUES\|ERR_BADURL\|ERR_BADWAVE\|ERR_BADYIELD\|ERR_BEGINREFRESH\|ERR_BGPICBUTTON\|ERR_BGPICPALETTE\|ERR_BGPICTYPE\|ERR_BITMAP\|ERR_BLKWOENDBLK\|ERR_BRACECLOSE\|ERR_BRACEOPEN\|ERR_BRACKETCLOSE\|ERR_BRACKETOPEN\|ERR_BRUSHLINK\|ERR_BRUSHSIZE\|ERR_BRUSHTYPE\|ERR_CACHEERROR\|ERR_CASECST\|ERR_CHANGEDIR\|ERR_CHANNELRANGE\|ERR_CHRCSTEMPTY\|ERR_CHRCSTLEN\|ERR_CLIPFORMAT\|ERR_CLIPOPEN\|ERR_CLIPREAD\|ERR_CLIPWRITE\|ERR_CLOSEDDISPLAY\|ERR_CLOSEFILE\|ERR_CMDASVAR\|ERR_CMPUNSUPPORTED\|ERR_COLORSPACE\|ERR_COMMENTSTRUCT\|ERR_COMMODITY\|ERR_COMPLEXEXPR\|ERR_COMPLEXPATTERN\|ERR_COMPLEXWHILE\|ERR_CONCAT\|ERR_CONFIG\|ERR_CONFIG2\|ERR_CONITEMS\|ERR_CONSOLEARG\|ERR_CONTEXTMENU\|ERR_COORDSRANGE\|ERR_COREFOUNDATION\|ERR_CORETEXT\|ERR_CREATEDIR\|ERR_CREATEDOCKY\|ERR_CREATEEVENT\|ERR_CREATEGC\|ERR_CREATEICON\|ERR_CREATEMENU\|ERR_CREATEPORT\|ERR_CREATESHORTCUT\|ERR_CSTDOUBLEDEF\|ERR_CTRLSTRUCT\|ERR_CYIELD\|ERR_DATATYPEALPHA\|ERR_DATATYPESAVE\|ERR_DATATYPESAVE2\|ERR_DBLENCODING\|ERR_DBPALETTE\|ERR_DBTRANSWIN\|ERR_DBVIDEOLAYER\|ERR_DDAUTOSCALE\|ERR_DDMOBILE\|ERR_DDRECVIDEO\|ERR_DEADRESUME\|ERR_DEFFONT\|ERR_DELETEFILE\|ERR_DEMO\|ERR_DEMO2\|ERR_DEMO3\|ERR_DEPTHMISMATCH\|ERR_DEPTHRANGE\|ERR_DESERIALIZE\|ERR_DIFFDEPTH\|ERR_DIFFENCODING\|ERR_DINPUT\|ERR_DIRECTSHOW\|ERR_DIRLOCK\|ERR_DISPLAYADAPTERSUPPORT\|ERR_DISPLAYDESKTOP\|ERR_DISPLAYDESKTOPPAL\|ERR_DISPLAYSIZE\|ERR_DISPMINIMIZED\|ERR_DLOPEN\|ERR_DOUBLEDECLA\|ERR_DOUBLEMENU\|ERR_DRAWPATH\|ERR_DSOUNDNOTIFY\|ERR_DSOUNDNOTIPOS\|ERR_DSOUNDPLAY\|ERR_ELSEIFAFTERELSE\|ERR_ELSETWICE\|ERR_ELSEWOIF\|ERR_EMPTYMENUTREE\|ERR_EMPTYOBJ\|ERR_EMPTYPATH\|ERR_EMPTYSCRIPT\|ERR_EMPTYTABLE\|ERR_ENDBLKWOBLK\|ERR_ENDDOUBLEBUFFER\|ERR_ENDFUNCWOFUNC\|ERR_ENDIFWOIF\|ERR_ENDSWCHWOSWCH\|ERR_ENDWITHWOWITH\|ERR_EQUALEXPECTED\|ERR_ERRORCALLED\|ERR_ESCREPLACE\|ERR_EVNTEXPCTED\|ERR_EXAMINE\|ERR_EXECUTE\|ERR_EXETYPE\|ERR_FGRABVIDSTATE\|ERR_FIELDINIT\|ERR_FILEEXIST\|ERR_FILEFORMAT\|ERR_FILENOTFOUND\|ERR_FILESIZE\|ERR_FINDACTIVITY\|ERR_FINDANIM\|ERR_FINDANIMSTREAM\|ERR_FINDAPPLICATION\|ERR_FINDARRAY\|ERR_FINDASYNCDRAW\|ERR_FINDASYNCOBJ\|ERR_FINDBGPIC\|ERR_FINDBRUSH\|ERR_FINDBUTTON\|ERR_FINDCLIENT\|ERR_FINDCLIPREGION\|ERR_FINDCST\|ERR_FINDDIR\|ERR_FINDDISPLAY\|ERR_FINDFILE\|ERR_FINDFONT\|ERR_FINDFONT2\|ERR_FINDICON\|ERR_FINDINTERVAL\|ERR_FINDLAYER\|ERR_FINDLAYERDATA\|ERR_FINDMEMBLK\|ERR_FINDMENU\|ERR_FINDMENUITEM\|ERR_FINDMONITOR\|ERR_FINDMOVE\|ERR_FINDMUSIC\|ERR_FINDOBJECTDATA\|ERR_FINDPALETTE\|ERR_FINDPATH\|ERR_FINDPLUGIN\|ERR_FINDPOINTER\|ERR_FINDPORT\|ERR_FINDSAMPLE\|ERR_FINDSELECTOR\|ERR_FINDSERIAL\|ERR_FINDSERVER\|ERR_FINDSPRITE\|ERR_FINDTEXTOBJECT\|ERR_FINDTIMEOUT\|ERR_FINDTIMER\|ERR_FINDUDPOBJECT\|ERR_FINDVIDEO\|ERR_FIRSTPREPROC\|ERR_FONTFORMAT\|ERR_FONTPATH\|ERR_FONTPATH2\|ERR_FORBIDMODAL\|ERR_FOREVERWOREPEAT\|ERR_FORWONEXT\|ERR_FRAMEGRABBER\|ERR_FREEABGPIC\|ERR_FREEADISPLAY\|ERR_FREECURPOINTER\|ERR_FT2\|ERR_FTPAUTH\|ERR_FTPERROR\|ERR_FULLSCREEN\|ERR_FUNCARGS\|ERR_FUNCDECLA\|ERR_FUNCEXPECTED\|ERR_FUNCJMP\|ERR_FUNCREMOVED\|ERR_FUNCTABLEARG\|ERR_FUNCWOENDFUNC\|ERR_GETDISKOBJ\|ERR_GETIFADDRS\|ERR_GETMONITORINFO\|ERR_GETSHORTCUT\|ERR_GRABSCREEN\|ERR_GROUPNAMEUSED\|ERR_GTK\|ERR_GUIGFX\|ERR_HEXPOINT\|ERR_HOSTNAME\|ERR_HTTPERROR\|ERR_HTTPTE\|ERR_HWBMCLOSEDISP\|ERR_HWBRUSH\|ERR_HWBRUSHFUNC\|ERR_HWDBFREEDISP\|ERR_ICONDIMS\|ERR_ICONENTRY\|ERR_ICONPARMS\|ERR_ICONSIZE\|ERR_ICONSTANDARD\|ERR_ICONVECTOR\|ERR_IFWOENDIF\|ERR_IMAGEERROR\|ERR_INCOMPATBRUSH\|ERR_INISYNTAX\|ERR_INITSERIAL\|ERR_INTERNAL\|ERR_INTERNAL1\|ERR_INTEXPECTED\|ERR_INVALIDDATE\|ERR_INVALIDUTF8\|ERR_INVALIDUTF8ARG\|ERR_INVCAPIDX\|ERR_INVINSERT\|ERR_INVNEXTKEY\|ERR_INVPATCAP\|ERR_INVREPLACE\|ERR_JAVA\|ERR_JAVAMETHOD\|ERR_JOYSTICK\|ERR_KEYFILE\|ERR_KEYNOTFOUND\|ERR_KEYWORD\|ERR_KICKSTART\|ERR_LABELDECLA\|ERR_LABELDOUBLE\|ERR_LABINFOR\|ERR_LABINFUNC\|ERR_LABINIF\|ERR_LABINWHILE\|ERR_LABMAINBLK\|ERR_LAYERRANGE\|ERR_LAYERSOFF\|ERR_LAYERSON\|ERR_LAYERSUPPORT\|ERR_LAYERSUPPORT2\|ERR_LAYERSWITCH\|ERR_LEGACYPTMOD\|ERR_LFSYNTAX\|ERR_LINKFONT\|ERR_LINKPLUGIN\|ERR_LOADFRAME\|ERR_LOADICON\|ERR_LOADPICTURE\|ERR_LOADPICTURE2\|ERR_LOADPLUGIN\|ERR_LOADSOUND\|ERR_LOADVIDEO\|ERR_LOCK\|ERR_LOCK2\|ERR_LOCKBMAP\|ERR_LOCKEDOBJ\|ERR_LOOPRANGE\|ERR_LOWFREQ\|ERR_MAGICKEY\|ERR_MALFORMPAT1\|ERR_MALFORMPAT2\|ERR_MASKNALPHA\|ERR_MAXLINES\|ERR_MAXLOCALS\|ERR_MAXPARAMS\|ERR_MAXUPVALS\|ERR_MEDIAFOUNDATION\|ERR_MEM\|ERR_MEMCODE\|ERR_MEMCST\|ERR_MEMRANGE\|ERR_MENUATTACHED\|ERR_MENUCOMPLEXITY\|ERR_MISSINGBRACKET\|ERR_MISSINGFIELD\|ERR_MISSINGOPBRACK\|ERR_MISSINGPARAMTR\|ERR_MISSINGSEPARTR\|ERR_MIXMUSMOD\|ERR_MOBILE\|ERR_MODIFYAANIM\|ERR_MODIFYABG\|ERR_MODIFYABGPIC\|ERR_MODIFYABR\|ERR_MODIFYPSMP\|ERR_MODIFYSPRITE\|ERR_MODIFYSPRITE2\|ERR_MONITORDIR\|ERR_MONITORFULLSCREEN\|ERR_MONITORRANGE\|ERR_MOVEFILE\|ERR_MSGPORT\|ERR_MULDISMOBILE\|ERR_MULTIBGPIC\|ERR_MULTIDISPLAYS\|ERR_MUSFMTSUPPORT\|ERR_MUSNOTPAUSED\|ERR_MUSNOTPLYNG\|ERR_MUSNOTPLYNG2\|ERR_MUSPAUSED\|ERR_MUSPLAYING\|ERR_NAMETOOLONG\|ERR_NAMEUSED\|ERR_NEEDAPPLICATION\|ERR_NEEDCOMPOSITE\|ERR_NEEDMORPHOS2\|ERR_NEEDOS41\|ERR_NEEDPALETTEIMAGE\|ERR_NEGCOORDS\|ERR_NEWHWPLUGIN\|ERR_NEXTWOFOR\|ERR_NOABSPATH\|ERR_NOACCESS\|ERR_NOALPHA\|ERR_NOANMLAYER\|ERR_NOAPPLET\|ERR_NOARGBVISUAL\|ERR_NOBLOCKBREAK\|ERR_NOCALLBACK\|ERR_NOCHANNEL\|ERR_NOCHAR\|ERR_NOCLIPREG\|ERR_NOCOLON\|ERR_NOCOMMA\|ERR_NOCOMPRESS\|ERR_NOCONSTANTS\|ERR_NOCONTEXTMENU\|ERR_NOCOORDCST\|ERR_NODIRPATTERN\|ERR_NODISLAYERS\|ERR_NODISPMODES\|ERR_NODOUBLEBUFFER\|ERR_NOFALLTHROUGH\|ERR_NOFILTERNAME\|ERR_NOFMBHANDLER\|ERR_NOFUNCTION\|ERR_NOHWFUNC\|ERR_NOJOYATPORT\|ERR_NOKEYWORDS\|ERR_NOLAYERS\|ERR_NOLOOP\|ERR_NOLOOPCONT\|ERR_NOMASKBRUSH\|ERR_NOMENU\|ERR_NOMIMEVIEWER\|ERR_NOMUSICCB\|ERR_NONE\|ERR_NONSUSPENDEDRESUME\|ERR_NOPALETTE\|ERR_NOPALETTEIMAGE\|ERR_NOPALETTEMODE\|ERR_NORETVAL\|ERR_NOREXX\|ERR_NOSPRITES\|ERR_NOTADIR\|ERR_NOTENOUGHPIXELS\|ERR_NOTIGER\|ERR_NOTPROTRACKER\|ERR_NOTRANSPARENCY\|ERR_NOTXTLAYER\|ERR_NUMBEREXPECTED\|ERR_NUMCALLBACK\|ERR_NUMCONCAT\|ERR_NUMEXPECTED\|ERR_NUMSTRCMP\|ERR_NUMTABLEARG\|ERR_OLDAPPLET\|ERR_OPENANIM\|ERR_OPENANIM2\|ERR_OPENAUDIO\|ERR_OPENFONT\|ERR_OPENLIB\|ERR_OPENSERIAL\|ERR_OPENSOCKET\|ERR_OPENSOUND\|ERR_OPENSOUND2\|ERR_OUTOFRANGE\|ERR_PAKFORMAT\|ERR_PALETTEFILL\|ERR_PALETTEMODE\|ERR_PALSCREEN\|ERR_PEERNAME\|ERR_PENRANGE\|ERR_PERCENTFORMAT\|ERR_PERCENTFORMATSTR\|ERR_PIPE\|ERR_PIXELFORMAT\|ERR_PIXELRANGE\|ERR_PLAYERCOMP\|ERR_PLAYVIDEO\|ERR_PLUGINARCH\|ERR_PLUGINDOUBLET\|ERR_PLUGINSUPPORT\|ERR_PLUGINSYMBOL\|ERR_PLUGINTYPE\|ERR_PLUGINVER\|ERR_POINTERFORMAT\|ERR_POINTERIMG\|ERR_PORTNOTAVAIL\|ERR_PREPROCSYM\|ERR_PROTMETATABLE\|ERR_PUBSCREEN\|ERR_QUICKTIME\|ERR_RADIOTOGGLEMENU\|ERR_RANDOMIZE\|ERR_READ\|ERR_READFILE\|ERR_READFUNC\|ERR_READONLY\|ERR_READRANGE\|ERR_READTABLE\|ERR_READVIDEOPIXELS\|ERR_RECVCLOSED\|ERR_RECVTIMEOUT\|ERR_RECVUNKNOWN\|ERR_REGCLASS\|ERR_REGISTRYREAD\|ERR_REGISTRYWRITE\|ERR_REMADLAYER\|ERR_RENAME\|ERR_RENDER\|ERR_RENDERADLAYER\|ERR_RENDERCALLBACK\|ERR_RENDERER\|ERR_REPEATWOUNTIL\|ERR_REQAUTH\|ERR_REQUIREFIELD\|ERR_REQUIREPLUGIN\|ERR_REQUIRETAGFMT\|ERR_RETWOGOSUB\|ERR_REVDWORD\|ERR_REWINDDIR\|ERR_REXXERR\|ERR_SATELLITE\|ERR_SATFREEDISP\|ERR_SAVEANIM\|ERR_SAVEICON\|ERR_SAVEIMAGE\|ERR_SAVEPNG\|ERR_SAVERALPHA\|ERR_SAVESAMPLE\|ERR_SCALEBGPIC\|ERR_SCREEN\|ERR_SCREENMODE\|ERR_SCREENSIZE\|ERR_SCRPIXFMT\|ERR_SEEK\|ERR_SEEKFILE\|ERR_SEEKFORMAT\|ERR_SEEKRANGE\|ERR_SELECTALPHACHANNEL\|ERR_SELECTANIM\|ERR_SELECTBG\|ERR_SELECTBGPIC\|ERR_SELECTBGPIC2\|ERR_SELECTBRUSH\|ERR_SELECTMASK\|ERR_SEMAPHORE\|ERR_SENDDATA\|ERR_SENDMESSAGE\|ERR_SENDTIMEOUT\|ERR_SENDUNKNOWN\|ERR_SERIALIO\|ERR_SERIALIZE\|ERR_SERIALIZETYPE\|ERR_SETADAPTER\|ERR_SETENV\|ERR_SETFILEATTR\|ERR_SETFILECOMMENT\|ERR_SETFILEDATE\|ERR_SETMENU\|ERR_SHORTIF\|ERR_SIGNAL\|ERR_SMODEALPHA\|ERR_SMPRANGE\|ERR_SOCKET\|ERR_SOCKNAME\|ERR_SOCKOPT\|ERR_SORTFUNC\|ERR_SPRITELINK\|ERR_SPRITEONSCREEN\|ERR_SPRITEONSCREEN2\|ERR_SQBRACKETCLOSE\|ERR_SQBRACKETOPEN\|ERR_STACK\|ERR_STAT\|ERR_STRCALLBACK\|ERR_STREAMASSAMPLE\|ERR_STREXPECTED\|ERR_STRINGCST\|ERR_STRINGEXPECTED\|ERR_STRORNUM\|ERR_STRTABLEARG\|ERR_STRTOOSHORT\|ERR_SURFACE\|ERR_SWCHWOENDSWCH\|ERR_SYNTAXERROR\|ERR_SYNTAXLEVELS\|ERR_SYSBUTTON\|ERR_SYSIMAGE\|ERR_SYSTOOOLD\|ERR_TABCALLBACK\|ERR_TABEXPECTED\|ERR_TABEXPECTED2\|ERR_TABEXPECTED3\|ERR_TABLEDECLA\|ERR_TABLEINDEX\|ERR_TABLEORNIL\|ERR_TABLEOVERFLOW\|ERR_TAGEXPECTED\|ERR_TASKSETUP\|ERR_TEXTARG\|ERR_TEXTCONVERT\|ERR_TEXTCONVERT2\|ERR_TEXTSYNTAX\|ERR_TEXTURE\|ERR_TFIMAGE\|ERR_TFVANIM\|ERR_TFVBGPICBRUSH\|ERR_TFVBRUSH\|ERR_TFVBRUSHBGPIC\|ERR_THREAD\|ERR_THREADEXPECTED\|ERR_TIMER\|ERR_TOKENEXPECTED\|ERR_TOOMANYARGS\|ERR_TOOMANYCAPTURES\|ERR_TOOSMALL2\|ERR_TRANSBGMOBILE\|ERR_TRANSBRUSH\|ERR_TRAYICON\|ERR_TRIALCOMPILE\|ERR_TRIALINCLUDE\|ERR_TRIALLIMIT\|ERR_TRIALSAVEVID\|ERR_UDEXPECTED\|ERR_UNBALANCEDPAT\|ERR_UNEXPECTEDEOF\|ERR_UNEXPECTEDSYM\|ERR_UNFINISHEDCAPTURE\|ERR_UNIMPLCMD\|ERR_UNKNOWN\|ERR_UNKNOWNANMOUT\|ERR_UNKNOWNATTR\|ERR_UNKNOWNCMD\|ERR_UNKNOWNCOND\|ERR_UNKNOWNFILTER\|ERR_UNKNOWNICNOUT\|ERR_UNKNOWNIMGOUT\|ERR_UNKNOWNMIMETYPE\|ERR_UNKNOWNMUSFMT\|ERR_UNKNOWNPALETTE\|ERR_UNKNOWNSEC\|ERR_UNKNOWNSEQ\|ERR_UNKNOWNSMPOUT\|ERR_UNKNOWNTAG\|ERR_UNKNUMFMT\|ERR_UNKPROTOCOL\|ERR_UNKTEXTFMT\|ERR_UNMPARENTHESES\|ERR_UNSETENV\|ERR_UNSUPPORTEDFEAT\|ERR_UNTERMINTDSTR\|ERR_UNTILWOREPEAT\|ERR_UPDATEICON\|ERR_UPLOADFORBIDDEN\|ERR_USERABORT\|ERR_VALUEEXPECTED\|ERR_VAREXPECTED\|ERR_VARLENGTH\|ERR_VARSYNTAX\|ERR_VECGFXPLUGIN\|ERR_VECTORANIM\|ERR_VECTORBRUSH\|ERR_VERSION\|ERR_VFONT\|ERR_VFONTTYPE\|ERR_VIDATTACHED\|ERR_VIDEOFRAME\|ERR_VIDEOINIT\|ERR_VIDEOLAYER\|ERR_VIDEOLAYERDRV\|ERR_VIDEOSTRATEGY\|ERR_VIDEOTRANS\|ERR_VIDLAYERFUNC\|ERR_VIDNOTPAUSED\|ERR_VIDNOTPLAYING\|ERR_VIDPAUSED\|ERR_VIDPLAYING\|ERR_VIDRECMULTI\|ERR_VIDRECTRANS\|ERR_VIDSTOPPED\|ERR_VISUALINFO\|ERR_VMMISMATCH\|ERR_WARPOS\|ERR_WENDWOWHILE\|ERR_WHILEWOWEND\|ERR_WINDOW\|ERR_WITHWOENDWITH\|ERR_WRITE\|ERR_WRITEFILE\|ERR_WRITEJPEG\|ERR_WRITEONLY\|ERR_WRONGCLIPREG\|ERR_WRONGCMDRECVIDEO\|ERR_WRONGDTYPE\|ERR_WRONGFLOAT\|ERR_WRONGHEX\|ERR_WRONGID\|ERR_WRONGOP\|ERR_WRONGOPCST\|ERR_WRONGSPRITESIZE\|ERR_WRONGUSAGE\|ERR_WRONGVSTRATEGY\|ERR_XCURSOR\|ERR_XDISPLAY\|ERR_XF86VIDMODEEXT\|ERR_XFIXES\|ERR_YIELD\|ERR_ZERODIVISION\|ERR_ZLIBDATA\|ERR_ZLIBIO\|ERR_ZLIBSTREAM\|ERR_ZLIBVERSION\|EVENTHANDLER\|FADE\|FASTMEMORY\|FASTSPEED\|FILE\|FILEATTR_ARCHIVE\|FILEATTR_DELETE_USR\|FILEATTR_EXECUTE_GRP\|FILEATTR_EXECUTE_OTH\|FILEATTR_EXECUTE_USR\|FILEATTR_HIDDEN\|FILEATTR_NORMAL\|FILEATTR_PURE\|FILEATTR_READ_GRP\|FILEATTR_READ_OTH\|FILEATTR_READ_USR\|FILEATTR_READONLY\|FILEATTR_SCRIPT\|FILEATTR_SYSTEM\|FILEATTR_WRITE_GRP\|FILEATTR_WRITE_OTH\|FILEATTR_WRITE_USR\|FILETYPE_ANIM\|FILETYPE_ICON\|FILETYPE_IMAGE\|FILETYPE_SOUND\|FILETYPE_VIDEO\|FILETYPEFLAGS_ALPHA\|FILETYPEFLAGS_FPS\|FILETYPEFLAGS_QUALITY\|FILETYPEFLAGS_SAVE\|FILLCOLOR\|FILLGRADIENT\|FILLNONE\|FILLRULEEVENODD\|FILLRULEWINDING\|FILLTEXTURE\|FLOAT\|FLOW_HARDWARE\|FLOW_OFF\|FLOW_XON_XOFF\|FONT\|FONTENGINE_INBUILT\|FONTENGINE_NATIVE\|FONTSLANT_ITALIC\|FONTSLANT_OBLIQUE\|FONTSLANT_ROMAN\|FONTTYPE_BITMAP\|FONTTYPE_COLOR\|FONTTYPE_VECTOR\|FONTWEIGHT_BLACK\|FONTWEIGHT_BOLD\|FONTWEIGHT_BOOK\|FONTWEIGHT_DEMIBOLD\|FONTWEIGHT_EXTRABLACK\|FONTWEIGHT_EXTRABOLD\|FONTWEIGHT_EXTRALIGHT\|FONTWEIGHT_HEAVY\|FONTWEIGHT_LIGHT\|FONTWEIGHT_MEDIUM\|FONTWEIGHT_NORMAL\|FONTWEIGHT_REGULAR\|FONTWEIGHT_SEMIBOLD\|FONTWEIGHT_THIN\|FONTWEIGHT_ULTRABLACK\|FONTWEIGHT_ULTRABOLD\|FONTWEIGHT_ULTRALIGHT\|FRAMEMODE_FULL\|FRAMEMODE_SINGLE\|FREESPACE\|FTPASCII\|FTPBINARY\|FUCHSIA\|FUNCTION\|GRAY\|GREEN\|HBLINDS128\|HBLINDS16\|HBLINDS32\|HBLINDS64\|HBLINDS8\|HCLOSECURTAIN\|HCLOSEGATE\|HEXNUMERICAL\|HFLIPCOIN\|HFLOWBOTTOM\|HFLOWTOP\|HIDEBRUSH\|HIDELAYER\|HKEY_CLASSES_ROOT\|HKEY_CURRENT_CONFIG\|HKEY_CURRENT_USER\|HKEY_LOCAL_MACHINE\|HKEY_USERS\|HLINES\|HLINES2\|HLOWFLIPCOIN\|HOLLYWOOD\|HOPENCURTAIN\|HOPENGATE\|HSPLIT\|HSTRANGEPUSH\|HSTRETCHCENTER\|HSTRIPES\|HSTRIPES16\|HSTRIPES2\|HSTRIPES32\|HSTRIPES4\|HSTRIPES64\|HSTRIPES8\|HW_64BIT\|HW_AMIGA\|HW_AMIGAOS3\|HW_AMIGAOS4\|HW_ANDROID\|HW_AROS\|HW_IOS\|HW_LINUX\|HW_LITTLE_ENDIAN\|HW_MACOS\|HW_MORPHOS\|HW_REVISION\|HW_VERSION\|HW_WARPOS\|HW_WINDOWS\|ICNFMT_HOLLYWOOD\|ICON\|IMAGETYPE_RASTER\|IMAGETYPE_VECTOR\|IMGFMT_BMP\|IMGFMT_GIF\|IMGFMT_ILBM\|IMGFMT_JPEG\|IMGFMT_NATIVE\|IMGFMT_PLUGIN\|IMGFMT_PNG\|IMGFMT_TIFF\|IMGFMT_UNKNOWN\|IMMERSIVE_LEANBACK\|IMMERSIVE_NONE\|IMMERSIVE_NORMAL\|IMMERSIVE_STICKY\|INACTIVEWINDOW\|INF\|INSERTBRUSH\|INTEGER\|INTERVAL\|IO_BUFFERED\|IO_FAKE64\|IO_LITTLEENDIAN\|IO_SIGNED\|IO_UNBUFFERED\|IO_UNSIGNED\|IPAUTO\|IPUNKNOWN\|IPV4\|IPV6\|ITALIC\|JOINBEVEL\|JOINMITER\|JOINROUND\|JOYDOWN\|JOYDOWNLEFT\|JOYDOWNRIGHT\|JOYLEFT\|JOYNODIR\|JOYRIGHT\|JOYUP\|JOYUPLEFT\|JOYUPRIGHT\|JUSTIFIED\|KEEPASPRAT\|KEEPPOSITION\|LANGUAGE_ABKHAZIAN\|LANGUAGE_AFAR\|LANGUAGE_AFRIKAANS\|LANGUAGE_AKAN\|LANGUAGE_ALBANIAN\|LANGUAGE_AMHARIC\|LANGUAGE_ARABIC\|LANGUAGE_ARAGONESE\|LANGUAGE_ARMENIAN\|LANGUAGE_ASSAMESE\|LANGUAGE_AVARIC\|LANGUAGE_AVESTAN\|LANGUAGE_AYMARA\|LANGUAGE_AZERBAIJANI\|LANGUAGE_BAMBARA\|LANGUAGE_BASHKIR\|LANGUAGE_BASQUE\|LANGUAGE_BELARUSIAN\|LANGUAGE_BENGALI\|LANGUAGE_BIHARI\|LANGUAGE_BISLAMA\|LANGUAGE_BOSNIAN\|LANGUAGE_BRETON\|LANGUAGE_BULGARIAN\|LANGUAGE_BURMESE\|LANGUAGE_CATALAN\|LANGUAGE_CENTRALKHMER\|LANGUAGE_CHAMORRO\|LANGUAGE_CHECHEN\|LANGUAGE_CHICHEWA\|LANGUAGE_CHINESE\|LANGUAGE_CHURCHSLAVIC\|LANGUAGE_CHUVASH\|LANGUAGE_CORNISH\|LANGUAGE_CORSICAN\|LANGUAGE_CREE\|LANGUAGE_CROATIAN\|LANGUAGE_CZECH\|LANGUAGE_DANISH\|LANGUAGE_DIVEHI\|LANGUAGE_DUTCH\|LANGUAGE_DZONGKHA\|LANGUAGE_ENGLISH\|LANGUAGE_ESPERANTO\|LANGUAGE_ESTONIAN\|LANGUAGE_EWE\|LANGUAGE_FAROESE\|LANGUAGE_FIJIAN\|LANGUAGE_FINNISH\|LANGUAGE_FRENCH\|LANGUAGE_FULAH\|LANGUAGE_GAELIC\|LANGUAGE_GALICIAN\|LANGUAGE_GANDA\|LANGUAGE_GEORGIAN\|LANGUAGE_GERMAN\|LANGUAGE_GREEK\|LANGUAGE_GREENLANDIC\|LANGUAGE_GUARANI\|LANGUAGE_GUJARATI\|LANGUAGE_HAITIAN\|LANGUAGE_HAUSA\|LANGUAGE_HEBREW\|LANGUAGE_HERERO\|LANGUAGE_HINDI\|LANGUAGE_HIRIMOTU\|LANGUAGE_HUNGARIAN\|LANGUAGE_ICELANDIC\|LANGUAGE_IDO\|LANGUAGE_IGBO\|LANGUAGE_INDONESIAN\|LANGUAGE_INTERLINGUA\|LANGUAGE_INTERLINGUE\|LANGUAGE_INUKTITUT\|LANGUAGE_INUPIAQ\|LANGUAGE_IRISH\|LANGUAGE_ITALIAN\|LANGUAGE_JAPANESE\|LANGUAGE_JAVANESE\|LANGUAGE_KANNADA\|LANGUAGE_KANURI\|LANGUAGE_KASHMIRI\|LANGUAGE_KAZAKH\|LANGUAGE_KIKUYU\|LANGUAGE_KINYARWANDA\|LANGUAGE_KIRGHIZ\|LANGUAGE_KOMI\|LANGUAGE_KONGO\|LANGUAGE_KOREAN\|LANGUAGE_KUANYAMA\|LANGUAGE_KURDISH\|LANGUAGE_LAO\|LANGUAGE_LATIN\|LANGUAGE_LATVIAN\|LANGUAGE_LIMBURGAN\|LANGUAGE_LINGALA\|LANGUAGE_LITHUANIAN\|LANGUAGE_LUBAKATANGA\|LANGUAGE_LUXEMBOURGISH\|LANGUAGE_MACEDONIAN\|LANGUAGE_MALAGASY\|LANGUAGE_MALAY\|LANGUAGE_MALAYALAM\|LANGUAGE_MALTESE\|LANGUAGE_MANX\|LANGUAGE_MAORI\|LANGUAGE_MARATHI\|LANGUAGE_MARSHALLESE\|LANGUAGE_MONGOLIAN\|LANGUAGE_NAURU\|LANGUAGE_NAVAJO\|LANGUAGE_NDONGA\|LANGUAGE_NEPALI\|LANGUAGE_NORTHERNSAMI\|LANGUAGE_NORTHNDEBELE\|LANGUAGE_NORWEGIAN\|LANGUAGE_NORWEGIANBOKMAL\|LANGUAGE_NORWEGIANNYNORSK\|LANGUAGE_OCCITAN\|LANGUAGE_OJIBWA\|LANGUAGE_ORIYA\|LANGUAGE_OROMO\|LANGUAGE_OSSETIAN\|LANGUAGE_PALI\|LANGUAGE_PANJABI\|LANGUAGE_PASHTO\|LANGUAGE_PERSIAN\|LANGUAGE_POLISH\|LANGUAGE_PORTUGUESE\|LANGUAGE_QUECHUA\|LANGUAGE_ROMANIAN\|LANGUAGE_ROMANSH\|LANGUAGE_RUNDI\|LANGUAGE_RUSSIAN\|LANGUAGE_SAMOAN\|LANGUAGE_SANGO\|LANGUAGE_SANSKRIT\|LANGUAGE_SARDINIAN\|LANGUAGE_SERBIAN\|LANGUAGE_SHONA\|LANGUAGE_SICHUANYI\|LANGUAGE_SINDHI\|LANGUAGE_SINHALA\|LANGUAGE_SLOVAK\|LANGUAGE_SLOVENIAN\|LANGUAGE_SOMALI\|LANGUAGE_SOUTHERNSOTHO\|LANGUAGE_SOUTHNDEBELE\|LANGUAGE_SPANISH\|LANGUAGE_SUNDANESE\|LANGUAGE_SWAHILI\|LANGUAGE_SWATI\|LANGUAGE_SWEDISH\|LANGUAGE_TAGALOG\|LANGUAGE_TAHITIAN\|LANGUAGE_TAJIK\|LANGUAGE_TAMIL\|LANGUAGE_TATAR\|LANGUAGE_TELUGU\|LANGUAGE_THAI\|LANGUAGE_TIBETAN\|LANGUAGE_TIGRINYA\|LANGUAGE_TONGA\|LANGUAGE_TSONGA\|LANGUAGE_TSWANA\|LANGUAGE_TURKISH\|LANGUAGE_TURKMEN\|LANGUAGE_TWI\|LANGUAGE_UIGHUR\|LANGUAGE_UKRAINIAN\|LANGUAGE_UNKNOWN\|LANGUAGE_URDU\|LANGUAGE_UZBEK\|LANGUAGE_VENDA\|LANGUAGE_VIETNAMESE\|LANGUAGE_WALLOON\|LANGUAGE_WELSH\|LANGUAGE_WESTERNFRISIAN\|LANGUAGE_WOLOF\|LANGUAGE_XHOSA\|LANGUAGE_YIDDISH\|LANGUAGE_YORUBA\|LANGUAGE_ZHUANG\|LANGUAGE_ZULU\|LAYER\|LAYER_VS_BOX\|LAYERBUTTON\|LEFT\|LEFTOUT\|LIGHTUSERDATA\|LIME\|LINE\|LINEAR\|LITTLEENDIAN\|LONG\|LOWERCURVE\|MAROON\|MASK\|MASKAND\|MASKINVISIBLE\|MASKOR\|MASKVANILLACOPY\|MASKVISIBLE\|MASKXOR\|MEMORY\|MENU\|MENUITEM_DISABLED\|MENUITEM_RADIO\|MENUITEM_SELECTED\|MENUITEM_TOGGLE\|MILLISECONDS\|MODE_READ\|MODE_READWRITE\|MODE_WRITE\|MODLALT\|MODLCOMMAND\|MODLCONTROL\|MODLSHIFT\|MODRALT\|MODRCOMMAND\|MODRCONTROL\|MODRSHIFT\|MONO16\|MONO8\|MONOSPACE\|MOVEFILE_COPY\|MOVEFILE_COPYFAILED\|MOVEFILE_DELETE\|MOVEFILE_DELETEFAILED\|MOVEFILE_UNPROTECT\|MOVELIST\|MOVEWINDOW\|MUSIC\|NAN\|NATIVE\|NATIVEENDIAN\|NAVY\|NETWORKCONNECTION\|NETWORKSERVER\|NETWORKUDP\|NEXTFRAME\|NEXTFRAME2\|NIL\|NOCOLOR\|NONE\|NOPEN\|NORMAL\|NORMALSPEED\|NOTRANSPARENCY\|NUMBER\|NUMERICAL\|OLIVE\|ONBUTTONCLICK\|ONBUTTONCLICKALL\|ONBUTTONOVER\|ONBUTTONOVERALL\|ONBUTTONRIGHTCLICK\|ONBUTTONRIGHTCLICKALL\|ONKEYDOWN\|ONKEYDOWNALL\|ORIENTATION_LANDSCAPE\|ORIENTATION_LANDSCAPEREV\|ORIENTATION_NONE\|ORIENTATION_PORTRAIT\|ORIENTATION_PORTRAITREV\|PALETTE\|PALETTE_AGA\|PALETTE_CGA\|PALETTE_DEFAULT\|PALETTE_EGA\|PALETTE_GRAY128\|PALETTE_GRAY16\|PALETTE_GRAY256\|PALETTE_GRAY32\|PALETTE_GRAY4\|PALETTE_GRAY64\|PALETTE_GRAY8\|PALETTE_MACINTOSH\|PALETTE_MONOCHROME\|PALETTE_OCS\|PALETTE_WINDOWS\|PALETTE_WORKBENCH\|PALETTEMODE_PEN\|PALETTEMODE_REMAP\|PARITY_EVEN\|PARITY_NONE\|PARITY_ODD\|PERMREQ_READEXTERNAL\|PERMREQ_WRITEEXTERNAL\|PI\|PIXELZOOM1\|PIXELZOOM2\|PLOT\|PLUGINCAPS_ANIM\|PLUGINCAPS_AUDIOADAPTER\|PLUGINCAPS_CONVERT\|PLUGINCAPS_DIRADAPTER\|PLUGINCAPS_DISPLAYADAPTER\|PLUGINCAPS_EXTENSION\|PLUGINCAPS_FILEADAPTER\|PLUGINCAPS_ICON\|PLUGINCAPS_IMAGE\|PLUGINCAPS_IPCADAPTER\|PLUGINCAPS_LIBRARY\|PLUGINCAPS_NETWORKADAPTER\|PLUGINCAPS_REQUESTERADAPTER\|PLUGINCAPS_REQUIRE\|PLUGINCAPS_SAVEANIM\|PLUGINCAPS_SAVEICON\|PLUGINCAPS_SAVEIMAGE\|PLUGINCAPS_SAVESAMPLE\|PLUGINCAPS_SERIALIZE\|PLUGINCAPS_SOUND\|PLUGINCAPS_TIMERADAPTER\|PLUGINCAPS_VECTOR\|PLUGINCAPS_VIDEO\|POINTER\|POLYGON\|PRGTYPE_APPLET\|PRGTYPE_PROGRAM\|PRGTYPE_SCRIPT\|PRINT\|PURPLE\|PUSHBOTTOM\|PUSHLEFT\|PUSHRIGHT\|PUSHTOP\|PUZZLE\|QUADRECT\|QUARTERS\|RADIAL\|RANDOMEFFECT\|RANDOMPARAMETER\|RECEIVEALL\|RECEIVEBYTES\|RECEIVEDATA_PACKET\|RECEIVELINE\|RECTBACKCENTER\|RECTBACKEAST\|RECTBACKNORTH\|RECTBACKNORTHEAST\|RECTBACKNORTHWEST\|RECTBACKSOUTH\|RECTBACKSOUTHEAST\|RECTBACKSOUTHWEST\|RECTBACKWEST\|RECTCENTER\|RECTEAST\|RECTNORTH\|RECTNORTHEAST\|RECTNORTHWEST\|RECTSOUTH\|RECTSOUTHEAST\|RECTSOUTHWEST\|RECTWEST\|RED\|REMOVELAYER\|REQ_CAMERA\|REQ_GALLERY\|REQ_HIDEICONS\|REQ_MULTISELECT\|REQ_NORMAL\|REQ_SAVEMODE\|REQICON_ERROR\|REQICON_INFORMATION\|REQICON_NONE\|REQICON_QUESTION\|REQICON_WARNING\|REVEALBOTTOM\|REVEALLEFT\|REVEALRIGHT\|REVEALTOP\|RIGHT\|RIGHTOUT\|ROLLLEFT\|ROLLTOP\|RTS_OFF\|RTS_ON\|SAMPLE\|SANS\|SCALEMODE_AUTO\|SCALEMODE_LAYER\|SCALEMODE_NONE\|SCROLLBOTTOM\|SCROLLEAST\|SCROLLLEFT\|SCROLLNORTH\|SCROLLNORTHEAST\|SCROLLNORTHWEST\|SCROLLRIGHT\|SCROLLSOUTH\|SCROLLSOUTHEAST\|SCROLLSOUTHWEST\|SCROLLTOP\|SCROLLWEST\|SECONDS\|SEEK_BEGINNING\|SEEK_CURRENT\|SEEK_END\|SELMODE_COMBO\|SELMODE_LAYERS\|SELMODE_NORMAL\|SERIAL\|SERIF\|SERVER\|SHADOW\|SHAPE\|SHDWEAST\|SHDWNORTH\|SHDWNORTHEAST\|SHDWNORTHWEST\|SHDWSOUTH\|SHDWSOUTHEAST\|SHDWSOUTHWEST\|SHDWWEST\|SHORT\|SILVER\|SIMPLEBUTTON\|SINE\|SIZEWINDOW\|SLIDEBOTTOM\|SLIDELEFT\|SLIDERIGHT\|SLIDETOP\|SLOWSPEED\|SMOOTHOUT\|SMPFMT_WAVE\|SNAPDESKTOP\|SNAPDISPLAY\|SNAPWINDOW\|SPIRAL\|SPRITE\|SPRITE_VS_BOX\|SPRITE_VS_BRUSH\|STAR\|STDERR\|STDIN\|STDOUT\|STDPTR_BUSY\|STDPTR_CUSTOM\|STDPTR_SYSTEM\|STEREO16\|STEREO8\|STOP_1\|STOP_2\|STRETCHBOTTOM\|STRETCHLEFT\|STRETCHRIGHT\|STRETCHTOP\|STRING\|STRUDEL\|SUN\|SWISS\|TABLE\|TEAL\|TEXTOBJECT\|TEXTOUT\|THREAD\|TICKS\|TIMEOUT\|TIMER\|TOP\|TOPOUT\|TRUETYPE_DEFAULT\|TURNDOWNBOTTOM\|TURNDOWNLEFT\|TURNDOWNRIGHT\|TURNDOWNTOP\|UDPCLIENT\|UDPNONE\|UDPOBJECT\|UDPSERVER\|UNDERLINED\|UNDO\|UPLOADFILE_RESPONSE\|UPLOADFILE_STATUS\|UPNDOWN\|UPPERCURVE\|USEDSPACE\|USELAYERPOSITION\|USERDATA\|VANILLACOPY\|VBLINDS128\|VBLINDS16\|VBLINDS32\|VBLINDS64\|VBLINDS8\|VCLOSECURTAIN\|VCLOSEGATE\|VECTORPATH\|VFLIPCOIN\|VFLOWLEFT\|VFLOWRIGHT\|VIDDRV_HOLLYWOOD\|VIDDRV_OS\|VIDEO\|VIEWMODE_DATE\|VIEWMODE_ICONS\|VIEWMODE_NAME\|VIEWMODE_NONE\|VIEWMODE_SIZE\|VIEWMODE_TYPE\|VLINES\|VLINES2\|VLOWFLIPCOIN\|VOID\|VOPENCURTAIN\|VOPENGATE\|VSPLIT\|VSTRANGEPUSH\|VSTRETCHCENTER\|VSTRIPES\|VSTRIPES16\|VSTRIPES2\|VSTRIPES32\|VSTRIPES4\|VSTRIPES64\|VSTRIPES8\|WALLPAPERLEFT\|WALLPAPERTOP\|WATER1\|WATER2\|WATER3\|WATER4\|WHITE\|WORD\|YELLOW\|ZOOMCENTER\|ZOOMEAST\|ZOOMIN\|ZOOMNORTH\|ZOOMNORTHEAST\|ZOOMNORTHWEST\|ZOOMOUT\|ZOOMSOUTH\|ZOOMSOUTHEAST\|ZOOMSOUTHWEST\|ZOOMWEST\)\>" " Hollywood Functions -syn keyword hwFunction Abs ACos ARGB ActivateDisplay Add AddArcToPath AddBoxToPath AddCircleToPath AddEllipseToPath AddFontPath AddIconImage AddMove AddStr AddTab AddTextToPath AllocMem AllocMemFromPointer AllocMemFromVirtualFile AppendPath ApplyPatch Arc ArcDistortBrush ArrayToStr Asc ASin Assert AsyncDrawFrame ATan ATan2 BarrelDistortBrush Base64Str Beep BeginAnimStream BeginDoubleBuffer BeginRefresh BGPicToBrush BinStr BitClear BitComplement BitSet BitTest BitXor Blue BlurBrush Box BreakEventHandler BreakWhileMouseOn BrushToBGPic BrushToGray BrushToMonochrome BrushToPenArray BrushToRGBArray ByteAsc ByteChr ByteLen ByteOffset ByteStrStr ByteVal CRC32 CRC32Str CallJavaMethod CancelAsyncDraw CancelAsyncOperation CanonizePath Cast Ceil ChangeApplicationIcon ChangeBrushTransparency ChangeDirectory ChangeDisplayMode ChangeDisplaySize ChangeInterval CharcoalBrush CharOffset CharWidth CheckEvent CheckEvents Chr Circle ClearClipboard ClearEvents ClearInterval ClearMove ClearObjectData ClearPath ClearScreen ClearSerialQueue ClearTimeout CloseAmigaGuide CloseAnim CloseAudio CloseCatalog CloseConnection CloseDirectory CloseDisplay CloseFile CloseFont CloseMusic ClosePath CloseResourceMonitor CloseSerialPort CloseServer CloseUDPObject CloseVideo Cls CollectGarbage Collision ColorRequest CompareDates CompareStr CompressFile Concat ConsolePrint ConsolePrintNR ConsolePrompt ContinueAsyncOperation ContrastBrush ContrastPalette ConvertStr ConvertToBrush CopyAnim CopyBGPic CopyBrush CopyFile CopyLayer CopyMem CopyObjectData CopyPalette CopyPath CopyPens CopySample CopySprite CopyTable CopyTextObject Cos CountDirectoryEntries CountJoysticks CountStr CreateAnim CreateBGPic CreateBorderBrush CreateBrush CreateButton CreateClipRegion CreateCoroutine CreateDisplay CreateGradientBGPic CreateGradientBrush CreateIcon CreateKeyDown CreateLayer CreateList CreateMenu CreateMusic CreatePalette CreatePointer CreatePort CreateRainbowBGPic CreateRexxPort CreateSample CreateServer CreateShadowBrush CreateShortcut CreateSprite CreateTextObject CreateTexturedBGPic CreateTexturedBrush CreateUDPObject CropBrush CtrlCQuit CurveTo CyclePalette DateToTimestamp DateToUTC DebugOutput DebugPrint DebugPrintNR DebugPrompt DebugStr DebugVal DecompressFile DecreasePointer DefineVirtualFile DefineVirtualFileFromString Deg DeleteAlphaChannel DeleteButton DeleteFile DeleteMask DeletePrefs DeselectMenuItem DeserializeTable DirectoryItems DisableButton DisableEvent DisableEventHandler DisableLayers DisableLineHook DisableMenuItem DisablePlugin DisablePrecalculation DisableVWait DisplayAnimFrame DisplayBGPic DisplayBGPicPart DisplayBGPicPartFX DisplayBrush DisplayBrushFX DisplayBrushPart DisplaySprite DisplayTextObject DisplayTextObjectFX DisplayTransitionFX DisplayVideoFrame Div DoMove DownloadFile DrawPath DumpButtons DumpLayers DumpMem DumpVideo DumpVideoTime EdgeBrush Ellipse EmbossBrush EmptyStr EnableButton EnableEventHandler EnableEvent EnableLayers EnableLineHook EnableMenuItem EnablePlugin EnablePrecalculation EnableVWait End EndDoubleBuffer EndianSwap EndRefresh EndSelect EndsWith Eof Error EscapeQuit Eval Execute Exists ExitOnError Exp ExtractPalette FileAttributes FileLength FileLines FilePart FilePos FileRequest FileSize FileToString FillMem FillMusicBuffer FindStr FinishAnimStream FinishAsyncDraw Flip FlipBrush FlipSprite FloodFill Floor FlushFile FlushMusicBuffer FlushSerialPort FontRequest ForcePathUse ForceSound ForceVideoDriver ForceVideoMode ForEach ForEachI FormatStr Frac FreeAnim FreeBGPic FreeBrush FreeClipRegion FreeDisplay FreeEventCache FreeGlyphCache FreeIcon FreeLayers FreeMem FreeMenu FreeModule FreePalette FreePath FreePointer FreeSample FreeSprite FreeTextObject FrExp FullPath GammaBrush GammaPalette GCInfo GetAnimFrame GetApplicationInfo GetApplicationList GetAsset GetAttribute GetAvailableFonts GetBaudRate GetBestPen GetBrushLink GetBrushPen GetBulletColor GetCatalogString GetChannels GetCharMaps GetClipboard GetCommandLine GetConnectionIP GetConnectionPort GetConnectionProtocol GetConstant GetCoroutineStatus GetCountryInfo GetCurrentDirectory GetCurrentPoint GetDash GetDataBits GetDate GetDateNum GetDefaultEncoding GetDirectoryEntry GetDisplayModes GetDTR GetEnv GetErrorName GetEventCode GetFileArgument GetFileAttributes GetFillRule GetFillStyle GetFlowControl GetFontColor GetFontStyle GetFormStyle GetFPSLimit GetFrontScreen GetHostName GetIconProperties GetItem GetKerningPair GetLanguageInfo GetLastError GetLayerAtPos GetLayerPen GetLayerStyle GetLineCap GetLineJoin GetLineWidth GetLocalInterfaces GetLocalIP GetLocalPort GetLocalProtocol GetMACAddress GetMemoryInfo GetMemPointer GetMemString GetMetaTable GetMiterLimit GetMonitors GetObjectData GetObjects GetObjectType GetPalettePen GetParity GetPathExtents GetPatternPosition GetPen GetPlugins GetProgramDirectory GetProgramInfo GetPubScreens GetRandomColor GetRandomFX GetRealColor GetRTS GetSampleData GetShortcutPath GetSongPosition GetStartDirectory GetStopBits GetSystemCountry GetSystemInfo GetSystemLanguage GetTempFileName GetTime GetTimer GetTimestamp GetTimeZone GetType GetVersion GetVideoFrame GetVolumeInfo GetVolumeName GetWeekday Gosub Goto GrabDesktop Green HaveFreeChannel HaveItem HaveObject HaveObjectData HavePlugin HaveVolume HexStr HideDisplay HideKeyboard HideLayer HideLayerFX HidePointer HideScreen Hypot IgnoreCase IIf ImageRequest IncreasePointer InKeyStr InsertItem InsertLayer InsertSample InsertStr InstallEventHandler Intersection Int InvertAlphaChannel InvertBrush InvertMask InvertPalette IPairs IsAbsolutePath IsAlNum IsAlpha IsAnim IsAnimPlaying IsBrushEmpty IsChannelPlaying IsCntrl IsDigit IsDirectory IsFinite IsGraph IsInf IsKeyDown IsLeftMouse IsLower IsMenuItemDisabled IsMenuItemSelected IsMidMouse IsModule IsMusicPlaying IsMusic IsNan IsNil IsOnline IsPathEmpty IsPicture IsPrint IsPunct IsRightMouse IsSamplePlaying IsSample IsSound IsSpace IsTableEmpty IsUnicode IsUpper IsVideo IsVideoPlaying IsXDigit JoyDir JoyFire Label LayerExists LayerToBack LayerToFront Ld LdExp LeftMouseQuit LeftStr LegacyControl Limit Line LineTo ListItems ListRequest Ln LoadAnim LoadAnimFrame LoadBGPic LoadBrush LoadIcon LoadModule LoadPalette LoadPlugin LoadPrefs LoadSample LoadSprite Locate Log LowerStr MakeButton MakeDate MakeDirectory MakeHostPath MatchPattern Max MD5 MD5Str MemToTable MidStr Min MixBrush MixRGB MixSample ModifyAnimFrames ModifyButton ModifyKeyDown ModifyLayerFrames ModulateBrush Mod ModulatePalette MonitorDirectory MouseX MouseY MoveAnim MoveBrush MoveDisplay MoveFile MoveLayer MovePointer MoveSprite MoveTextObject MoveTo Mul NextDirectoryEntry NextFrame NextItem NormalizePath NPrint OilPaintBrush OpenAmigaGuide OpenAnim OpenAudio OpenCatalog OpenConnection OpenDirectory OpenDisplay OpenFile OpenFont OpenMusic OpenResourceMonitor OpenSerialPort OpenURL OpenVideo Pack PadNum Pairs PaletteToGray ParseDate PathItems PathPart PathRequest PathToBrush PatternFindStr PatternFindStrDirect PatternFindStrShort PatternReplaceStr PauseLayer PauseModule PauseMusic PauseTimer PauseVideo PeekClipboard Peek PenArrayToBrush PerformSelector PermissionRequest PerspectiveDistortBrush Pi PixelateBrush PlayAnim PlayAnimDisk PlayLayer PlayModule PlayMusic PlaySample PlaySubsong PlayVideo Plot Poke PolarDistortBrush PollSerialQueue Polygon Pow Print QuantizeBrush Rad RaiseOnError RasterizeBrush RawDiv RawEqual RawGet RawSet ReadBrushPixel ReadByte ReadBytes ReadChr ReadDirectory ReadFloat ReadFunction ReadInt ReadLine ReadMem ReadPen ReadPixel ReadRegistryKey ReadSerialData ReadShort ReadString ReadTable ReceiveData ReceiveUDPData Red ReduceAlphaChannel RefreshDisplay RelCurveTo RelLineTo RelMoveTo RemapBrush RemoveBrushPalette RemoveButton RemoveIconImage RemoveItem RemoveKeyDown RemoveLayer RemoveLayerFX RemoveLayers RemoveSprite RemoveSprites Rename RepeatStr ReplaceColors ReplaceStr ResetKeyStates ResetTabs ResetTimer ResolveHostName ResumeCoroutine ResumeLayer ResumeModule ResumeMusic ResumeTimer ResumeVideo ReverseFindStr ReverseStr RewindDirectory RGB RGBArrayToBrush RightStr Rnd RndF RndStrong Rol Ror RotateBrush RotateLayer RotateTextObject Round Rt Run RunCallback RunRexxScript Sar SaveAnim SaveBrush SaveIcon SavePalette SavePrefs SaveSample SaveSnapshot ScaleAnim ScaleBGPic ScaleBrush ScaleLayer ScaleSprite ScaleTextObject Seek SeekLayer SeekMusic SeekVideo SelectAlphaChannel SelectAnim SelectBGPic SelectBrush SelectDisplay SelectLayer SelectMask SelectMenuItem SelectPalette SendApplicationMessage SendData SendMessage SendRexxCommand SendUDPData SepiaToneBrush SerializeTable SetAlphaIntensity SetAnimFrameDelay SetBaudRate SetBorderPen SetBrushDepth SetBrushPalette SetBrushPen SetBrushTransparency SetBrushTransparentPen SetBulletColor SetBulletPen SetChannelVolume SetClipboard SetClipRegion SetCycleTable SetDash SetDataBits SetDefaultEncoding SetDepth SetDisplayAttributes SetDitherMode SetDrawPen SetDrawTagsDefault SetDTR SetEnv SetEventTimeout SetFileAttributes SetFileEncoding SetFillRule SetFillStyle SetFlowControl SetFont SetFontColor SetFontStyle SetFormStyle SetFPSLimit SetGradientPalette SetIconProperties SetInterval SetIOMode SetLayerAnchor SetLayerBorder SetLayerDepth SetLayerFilter SetLayerLight SetLayerName SetLayerPalette SetLayerPen SetLayerShadow SetLayerStyle SetLayerTint SetLayerTransparency SetLayerTransparentPen SetLayerVolume SetLayerZPos SetLineCap SetLineJoin SetLineWidth SetListItems SetMargins SetMaskMode SetMasterVolume SetMetaTable SetMiterLimit SetMusicVolume SetNetworkProtocol SetNetworkTimeout SetObjectData SetPalette SetPaletteDepth SetPaletteMode SetPalettePen SetPaletteTransparentPen SetPanning SetParity SetPen SetPitch SetPointer SetRTS SetScreenTitle SetShadowPen SetSpriteZPos SetStandardIconImage SetStandardPalette SetStopBits SetSubtitle SetTimeout SetTimerElapse SetTitle SetTransparentPen SetTransparentThreshold SetTrayIcon SetVarType SetVectorEngine SetVideoPosition SetVideoSize SetVideoVolume SetVolume SetWBIcon Sgn SharpenBrush Shl ShowDisplay ShowKeyboard ShowLayer ShowLayerFX ShowNotification ShowPointer ShowRinghioMessage ShowScreen ShowToast Shr Sin SolarizeBrush SolarizePalette Sort SplitStr Sqrt StartPath StartSubPath StartTimer StartsWith StopAnim StopChannel StopLayer StopModule StopMusic StopSample StopTimer StopVideo StringRequest StringToFile StripStr StrLen StrStr StrToArray Sub SwapLayers SwirlBrush SystemRequest TableItems TableToMem Tan TextExtent TextHeight TextOut TextWidth TimerElapsed TimestampToDate TintBrush TintPalette ToHostName ToIP ToNumber ToString ToUserData TransformBrush TransformLayer TranslateLayer TranslatePath TrimBrush TrimStr UndefineVirtualStringFile Undo UndoFX UnleftStr UnmidStr Unpack UnrightStr UnsetEnv UploadFile UpperStr Usage UseCarriageReturn UseFont UTCToDate Val ValidateDate ValidateStr Vibrate VWait Wait WaitAnimEnd WaitEvent WaitKeyDown WaitLeftMouse WaitMidMouse WaitPatternPosition WaitRightMouse WaitSampleEnd WaitSongPosition WaitTimer WaterRippleBrush WhileKeyDown WhileMouseDown WhileMouseOn WhileRightMouseDown Wrap WriteAnimFrame WriteBrushPixel WriteByte WriteBytes WriteChr WriteFloat WriteFunction WriteInt WriteLine WriteMem WritePen WriteRegistryKey WriteSerialData WriteShort WriteString WriteTable YieldCoroutine +syn keyword hwFunction Abs ACos ActivateDisplay Add AddArcToPath AddBoxToPath AddCircleToPath AddEllipseToPath AddFontPath AddIconImage AddMove AddStr AddTab AddTextToPath AllocConsoleColor AllocMem AllocMemFromPointer AllocMemFromVirtualFile AppendPath ApplyPatch Arc ArcDistortBrush ARGB ArrayToStr Asc ASin Assert AsyncDrawFrame ATan ATan2 BarrelDistortBrush Base64Str Beep BeepConsole BeginAnimStream BeginDoubleBuffer BeginRefresh BGPicToBrush BinStr BitClear BitComplement BitSet BitTest BitXor Blue BlurBrush Box BreakEventHandler BreakWhileMouseOn BrushToBGPic BrushToGray BrushToMonochrome BrushToPenArray BrushToRGBArray ByteAsc ByteChr ByteLen ByteOffset ByteStrStr ByteVal CallJavaMethod CancelAsyncDraw CancelAsyncOperation CanonizePath Cast Ceil ChangeApplicationIcon ChangeBrushTransparency ChangeDirectory ChangeDisplayMode ChangeDisplaySize ChangeInterval CharcoalBrush CharOffset CharWidth CheckEvent CheckEvents Chr Circle ClearClipboard ClearConsole ClearConsoleStyle ClearEvents ClearInterval ClearMove ClearObjectData ClearPath ClearScreen ClearSerialQueue ClearTimeout CloseAmigaGuide CloseAnim CloseAudio CloseCatalog CloseConnection CloseConsole CloseDirectory CloseDisplay CloseFile CloseFont CloseMusic ClosePath CloseResourceMonitor CloseSerialPort CloseServer CloseUDPObject CloseVideo Cls CollectGarbage Collision ColorRequest CompareDates CompareStr CompressFile Concat ConfigureJoystick ConsolePrint ConsolePrintChr ConsolePrintNR ConsolePrompt ContinueAsyncOperation ContrastBrush ContrastPalette ConvertStr ConvertToBrush CopyAnim CopyBGPic CopyBrush CopyConsoleWindow CopyFile CopyLayer CopyMem CopyObjectData CopyPalette CopyPath CopyPens CopySample CopySprite CopyTable CopyTextObject Cos CountDirectoryEntries CountJoysticks CountStr CRC32 CRC32Str CreateAnim CreateBGPic CreateBorderBrush CreateBrush CreateButton CreateClipRegion CreateConsoleWindow CreateCoroutine CreateDisplay CreateFont CreateGradientBGPic CreateGradientBrush CreateIcon CreateKeyDown CreateLayer CreateList CreateMenu CreateMusic CreatePalette CreatePointer CreatePort CreateRainbowBGPic CreateRexxPort CreateSample CreateServer CreateShadowBrush CreateShortcut CreateSprite CreateTextObject CreateTexturedBGPic CreateTexturedBrush CreateUDPObject CropBrush CtrlCQuit CurveTo CyclePalette DateToTimestamp DateToUTC DebugOutput DebugPrint DebugPrintNR DebugPrompt DebugStr DebugVal DecomposeConsoleChr DecompressFile DecreasePointer DefineVirtualFile DefineVirtualFileFromString Deg DeleteAlphaChannel DeleteButton DeleteConsoleChr DeleteConsoleLine DeleteFile DeleteMask DeletePrefs DeselectMenuItem DeserializeTable DirectoryItems DisableAdvancedConsole DisableButton DisableEvent DisableEventHandler DisableLayers DisableLineHook DisableMenuItem DisablePlugin DisablePrecalculation DisableVWait DisplayAnimFrame DisplayBGPic DisplayBGPicPart DisplayBGPicPartFX DisplayBrush DisplayBrushFX DisplayBrushPart DisplaySprite DisplayTextObject DisplayTextObjectFX DisplayTransitionFX DisplayVideoFrame Div DoMove DownloadFile DrawConsoleBorder DrawConsoleBox DrawConsoleHLine DrawConsoleVLine DrawPath DumpButtons DumpLayers DumpMem DumpVideo DumpVideoTime EdgeBrush Ellipse EmbossBrush EmptyStr EnableAdvancedConsole EnableButton EnableEvent EnableEventHandler EnableLayers EnableLineHook EnableMenuItem EnablePlugin EnablePrecalculation EnableVWait End EndDoubleBuffer EndianSwap EndRefresh EndSelect EndsWith Eof EraseConsole Error EscapeQuit Eval Execute Exists ExitOnError Exp ExtendBrush ExtractPalette FileAttributes FileLength FileLines FilePart FilePos FileRequest FileSize FileToString FillMem FillMusicBuffer FindStr FinishAnimStream FinishAsyncDraw FlashConsole Flip FlipBrush FlipSprite FloodFill Floor FlushFile FlushMusicBuffer FlushSerialPort FontRequest ForcePathUse ForceSound ForceVideoDriver ForceVideoMode ForEach ForEachI FormatConsoleLine FormatDate FormatNumber FormatStr Frac FreeAnim FreeBGPic FreeBrush FreeClipRegion FreeConsoleColor FreeConsoleWindow FreeDisplay FreeEventCache FreeGlyphCache FreeIcon FreeLayers FreeMem FreeMenu FreeModule FreePalette FreePath FreePointer FreeSample FreeSprite FreeTextObject FrExp FullPath GammaBrush GammaPalette GCInfo GetAllocConsoleColor GetAnimFrame GetApplicationInfo GetApplicationList GetAsset GetAttribute GetAvailableFonts GetBaudRate GetBestPen GetBrushLink GetBrushPen GetBulletColor GetCatalogString GetChannels GetCharMaps GetClipboard GetCommandLine GetConnectionIP GetConnectionPort GetConnectionProtocol GetConsoleBackground GetConsoleChr GetConsoleColor GetConsoleControlChr GetConsoleCursor GetConsoleOrigin GetConsoleSize GetConsoleStr GetConsoleStyle GetConsoleWindow GetConstant GetCoroutineStatus GetCountryInfo GetCurrentDirectory GetCurrentPoint GetDash GetDataBits GetDate GetDateNum GetDefaultAdapter GetDefaultEncoding GetDefaultLoader GetDirectoryEntry GetDisplayModes GetDTR GetEnv GetErrorName GetEventCode GetFileArgument GetFileAttributes GetFillRule GetFillStyle GetFlowControl GetFontColor GetFontStyle GetFormStyle GetFPSLimit GetFreePen GetFrontScreen GetHostName GetIconProperties GetItem GetKerningPair GetLanguageInfo GetLastError GetLayerAtPos GetLayerGroupMembers GetLayerGroups GetLayerPen GetLayerStyle GetLineCap GetLineJoin GetLineWidth GetLocaleInfo GetLocalInterfaces GetLocalIP GetLocalPort GetLocalProtocol GetMACAddress GetMemoryInfo GetMemPointer GetMemString GetMetaTable GetMiterLimit GetMonitors GetObjectData GetObjects GetObjectType GetPalettePen GetParity GetPathExtents GetPatternPosition GetPen GetPlugins GetProgramDirectory GetProgramInfo GetPubScreens GetRandomColor GetRandomFX GetRawArguments GetRealColor GetRTS GetSampleData GetSerializeMode GetShortcutPath GetSongPosition GetStartDirectory GetStopBits GetSystemCountry GetSystemInfo GetSystemLanguage GetTempFileName GetTime GetTimer GetTimestamp GetTimeZone GetType GetVersion GetVideoFrame GetVolumeInfo GetVolumeName GetWeekday Gosub Goto GrabDesktop Green GroupLayer HasItem HaveConsole HaveFreeChannel HaveItem HaveObject HaveObjectData HavePlugin HaveVolume HexStr HideConsoleCursor HideDisplay HideKeyboard HideLayer HideLayerFX HidePointer HideScreen Hypot IgnoreCase IIf ImageRequest IncreasePointer InitConsoleColor InKeyStr InsertConsoleChr InsertConsoleLine InsertConsoleStr InsertItem InsertLayer InsertSample InsertStr InstallEventHandler Int Intersection InvertAlphaChannel InvertBrush InvertMask InvertPalette IPairs IsAbsolutePath IsAlNum IsAlpha IsAnim IsAnimPlaying IsBrushEmpty IsChannelPlaying IsCntrl IsDigit IsDirectory IsFinite IsGraph IsInf IsKeyDown IsLeftMouse IsLower IsMenuItemDisabled IsMenuItemSelected IsMidMouse IsModule IsMusic IsMusicPlaying IsNan IsNil IsOnline IsPathEmpty IsPicture IsPrint IsPunct IsRightMouse IsSample IsSamplePlaying IsSound IsSpace IsTableEmpty IsUnicode IsUpper IsVideo IsVideoPlaying IsXDigit JoyAxisX JoyAxisY JoyAxisZ JoyButton JoyDir JoyFire Label JoyHat LayerExists LayerGroupExists LayerToBack LayerToFront Ld LdExp LeftMouseQuit LeftStr LegacyControl Limit Line LineTo ListItems ListRequest Ln LoadAnim LoadAnimFrame LoadBGPic LoadBrush LoadIcon LoadModule LoadPalette LoadPlugin LoadPrefs LoadSample LoadSprite Locate Log LowerStr MakeButton MakeConsoleChr MakeDate MakeDirectory MakeHostPath MatchPattern Matrix2D Max MD5 MD5Str MemToTable MergeLayers MidStr Min MixBrush MixRGB MixSample Mod ModifyAnimFrames ModifyButton ModifyKeyDown ModifyLayerFrames ModulateBrush ModulatePalette MonitorDirectory MouseX MouseY MoveAnim MoveBrush MoveConsoleWindow MoveDisplay MoveFile MoveLayer MovePointer MoveSprite MoveTextObject MoveTo Mul NearlyEqual NextDirectoryEntry NextFrame NextItem NormalizePath NPrint OilPaintBrush OpenAmigaGuide OpenAnim OpenAudio OpenCatalog OpenConnection OpenConsole OpenDirectory OpenDisplay OpenFile OpenFont OpenMusic OpenResourceMonitor OpenSerialPort OpenURL OpenVideo Pack PadNum Pairs PaletteToGray ParseDate PathItems PathPart PathRequest PathToBrush PatternFindStr PatternFindStrDirect PatternFindStrShort PatternReplaceStr PauseLayer PauseModule PauseMusic PauseTimer PauseVideo Peek PeekClipboard PenArrayToBrush PerformSelector PermissionRequest PerspectiveDistortBrush Pi PixelateBrush PlayAnim PlayAnimDisk PlayLayer PlayModule PlayMusic PlaySample PlaySubsong PlayVideo Plot Poke PolarDistortBrush PollSerialQueue Polygon PopupMenu Pow Print QuantizeBrush Rad RaiseOnError RasterizeBrush RawDiv RawEqual RawGet RawSet ReadBrushPixel ReadByte ReadBytes ReadChr ReadConsoleKey ReadConsoleStr ReadDirectory ReadFloat ReadFunction ReadInt ReadLine ReadMem ReadPen ReadPixel ReadRegistryKey ReadSerialData ReadShort ReadString ReadTable ReceiveData ReceiveUDPData Red ReduceAlphaChannel RefreshConsole RefreshDisplay RefreshLayer RelCurveTo RelLineTo RelMoveTo RemapBrush RemoveBrushPalette RemoveButton RemoveIconImage RemoveItem RemoveKeyDown RemoveLayer RemoveLayerFX RemoveLayers RemoveSprite RemoveSprites Rename RenderLayer RepeatStr ReplaceColors ReplaceStr ResetKeyStates ResetTabs ResetTimer ResolveHostName ResumeCoroutine ResumeLayer ResumeModule ResumeMusic ResumeTimer ResumeVideo ReverseFindStr ReverseStr RewindDirectory RGB RGBArrayToBrush RightStr Rnd RndF RndStrong Rol Ror RotateBrush RotateLayer RotateTextObject Round Rt Run RunCallback RunRexxScript Sar SaveAnim SaveBrush SaveIcon SavePalette SavePrefs SaveSample SaveSnapshot ScaleAnim ScaleBGPic ScaleBrush ScaleLayer ScaleSprite ScaleTextObject ScrollConsole Seek SeekLayer SeekMusic SeekVideo SelectAlphaChannel SelectAnim SelectBGPic SelectBrush SelectConsoleWindow SelectDisplay SelectLayer SelectMask SelectMenuItem SelectPalette SendApplicationMessage SendData SendMessage SendRexxCommand SendUDPData SepiaToneBrush SerializeTable SetAllocConsoleColor SetAlphaIntensity SetAnimFrameDelay SetAttribute SetBaudRate SetBorderPen SetBrushDepth SetBrushPalette SetBrushPen SetBrushTransparency SetBrushTransparentPen SetBulletColor SetBulletPen SetChannelVolume SetClipboard SetClipRegion SetConsoleBackground SetConsoleColor SetConsoleCursor SetConsoleOptions SetConsoleStyle SetConsoleTitle SetCycleTable SetDash SetDataBits SetDefaultAdapter SetDefaultEncoding SetDefaultLoader SetDepth SetDisplayAttributes SetDitherMode SetDrawPen SetDrawTagsDefault SetDTR SetEnv SetEventTimeout SetFileAttributes SetFileEncoding SetFillRule SetFillStyle SetFlowControl SetFont SetFontColor SetFontStyle SetFormStyle SetFPSLimit SetGradientPalette SetIconProperties SetInterval SetIOMode SetLayerAnchor SetLayerBorder SetLayerDepth SetLayerFilter SetLayerLight SetLayerName SetLayerPalette SetLayerPen SetLayerShadow SetLayerStyle SetLayerTint SetLayerTransparency SetLayerTransparentPen SetLayerVolume SetLayerZPos SetLineCap SetLineJoin SetLineWidth SetListItems SetMargins SetMaskMode SetMasterVolume SetMetaTable SetMiterLimit SetMusicVolume SetNetworkProtocol SetNetworkTimeout SetObjectData SetPalette SetPaletteDepth SetPaletteMode SetPalettePen SetPaletteTransparentPen SetPanning SetParity SetPen SetPitch SetPointer SetRTS SetScreenTitle SetSerializeMode SetSerializeOptions SetShadowPen SetSpriteZPos SetStandardIconImage SetStandardPalette SetStopBits SetSubtitle SetTimeout SetTimerElapse SetTitle SetTransparentPen SetTransparentThreshold SetTrayIcon SetVarType SetVectorEngine SetVideoPosition SetVideoSize SetVideoVolume SetVolume SetWBIcon Sgn SharpenBrush Shl ShowConsoleCursor ShowDisplay ShowKeyboard ShowLayer ShowLayerFX ShowNotification ShowPointer ShowRinghioMessage ShowScreen ShowToast Shr Sin Sleep SolarizeBrush SolarizePalette Sort SplitStr Sqrt StartConsoleColorMode StartPath StartSubPath StartsWith StartTimer StopAnim StopChannel StopLayer StopModule StopMusic StopSample StopTimer StopVideo StringRequest StringToFile StripStr StrLen StrStr StrToArray Sub SwapLayers SwirlBrush SystemRequest TableItems TableToMem Tan TextExtent TextHeight TextOut TextWidth TimerElapsed TimestampToDate TintBrush TintPalette ToHostName ToIP ToNumber ToString TouchConsoleWindow ToUserData TransformBox TransformBrush TransformLayer TransformPoint TransformTextObject TranslateLayer TranslatePath TrimBrush TrimStr UndefineVirtualStringFile Undo UndoFX UngroupLayer UnleftStr UnmidStr Unpack UnrightStr UnsetEnv UploadFile UpperStr Usage UseCarriageReturn UseFont UTCToDate Val ValidateDate ValidateStr Vibrate VWait Wait WaitAnimEnd WaitEvent WaitKeyDown WaitLeftMouse WaitMidMouse WaitMusicEnd WaitPatternPosition WaitRightMouse WaitSampleEnd WaitSongPosition WaitTimer WaterRippleBrush WhileKeyDown WhileMouseDown WhileMouseOn WhileRightMouseDown Wrap WriteAnimFrame WriteBrushPixel WriteByte WriteBytes WriteChr WriteFloat WriteFunction WriteInt WriteLine WriteMem WritePen WriteRegistryKey WriteSerialData WriteShort WriteString WriteTable YieldCoroutine " user-defined constants syn match hwUserConstant "#\<\u\+\>" diff --git a/runtime/syntax/html.vim b/runtime/syntax/html.vim index 605db3ae1c..82c829a2e1 100644 --- a/runtime/syntax/html.vim +++ b/runtime/syntax/html.vim @@ -3,7 +3,7 @@ " Maintainer: Doug Kearns <dougkearns@gmail.com> " Previous Maintainers: Jorge Maldonado Ventura <jorgesumle@freakspot.net> " Claudio Fleiner <claudio@fleiner.com> -" Last Change: 2022 Nov 18 +" Last Change: 2023 Feb 20 " Please check :help html.vim for some comments and a description of the options @@ -221,7 +221,7 @@ if main_syntax != 'java' || exists("java_javascript") " JAVA SCRIPT syn include @htmlJavaScript syntax/javascript.vim unlet b:current_syntax - syn region javaScript start=+<script\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc + syn region javaScript start=+<script\>\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc syn region htmlScriptTag contained start=+<script+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent hi def link htmlScriptTag htmlTag diff --git a/runtime/syntax/i3config.vim b/runtime/syntax/i3config.vim index caef244ce5..d4512525f9 100644 --- a/runtime/syntax/i3config.vim +++ b/runtime/syntax/i3config.vim @@ -1,9 +1,9 @@ " Vim syntax file " Language: i3 config file -" Original Author: Mohamed Boughaba <mohamed dot bgb at gmail dot com> +" Original Author: Josef Litos (JosefLitos/i3config.vim) " Maintainer: Quentin Hibon (github user hiqua) -" Version: 0.4 -" Last Change: 2022 Jun 05 +" Version: 1.0.0 +" Last Change: 2023-11-11 " References: " http://i3wm.org/docs/userguide.html#configuring @@ -18,247 +18,320 @@ endif scriptencoding utf-8 " Error -syn match i3ConfigError /.*/ +syn match i3ConfigError /.\+/ " Todo syn keyword i3ConfigTodo TODO FIXME XXX contained -" Comment -" Comments are started with a # and can only be used at the beginning of a line +" Helper type definitions +syn match i3ConfigSeparator /[,;\\]/ contained +syn match i3ConfigParen /[{}]/ contained +syn keyword i3ConfigBoolean yes no enabled disabled on off true false contained +syn region i3ConfigString start=/\W\@<="/ skip=/\\\("\|$\)/ end=/"\|$/ contained contains=i3ConfigShCommand,i3ConfigShDelim,i3ConfigShOper,i3ConfigShParam,i3ConfigNumber,i3ConfigVariable,i3ConfigExecAction keepend extend +syn region i3ConfigString start=/\W\@<='/ skip=/\\$/ end=/'\|$/ contained contains=i3ConfigShCommand,i3ConfigShDelim,i3ConfigShOper,i3ConfigShParam,i3ConfigNumber,i3ConfigVariable,i3ConfigExecAction keepend extend +syn match i3ConfigColor /#[0-9A-Fa-f]\{3,8}/ contained +syn match i3ConfigNumber /[0-9A-Za-z_$-]\@<!-\?\d\+\w\@!/ contained + +" 4.1 Include directive +syn keyword i3ConfigIncludeKeyword include contained +syn match i3ConfigIncludeCommand /`[^`]*`/ contained contains=i3ConfigShDelim,i3ConfigShParam,i3ConfigShOper,i3ConfigShCommand,i3ConfigString +syn match i3ConfigParamLine /^include .*$/ contains=i3ConfigIncludeKeyword,i3ConfigString,i3ConfigVariable,i3ConfigIncludeCommand,i3ConfigShOper + +" 4.2 Comments syn match i3ConfigComment /^\s*#.*$/ contains=i3ConfigTodo -" Font -" A FreeType font description is composed by: -" a font family, a style, a weight, a variant, a stretch and a size. -syn match i3ConfigFontSeparator /,/ contained -syn match i3ConfigFontSeparator /:/ contained +" 4.3 Fonts syn keyword i3ConfigFontKeyword font contained -syn match i3ConfigFontNamespace /\w\+:/ contained contains=i3ConfigFontSeparator -syn match i3ConfigFontContent /-\?\w\+\(-\+\|\s\+\|,\)/ contained contains=i3ConfigFontNamespace,i3ConfigFontSeparator,i3ConfigFontKeyword -syn match i3ConfigFontSize /\s\=\d\+\(px\)\?\s\?$/ contained -syn match i3ConfigFont /^\s*font\s\+.*$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace -syn match i3ConfigFont /^\s*font\s\+.*\(\\\_.*\)\?$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace -syn match i3ConfigFont /^\s*font\s\+.*\(\\\_.*\)\?[^\\]\+$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace -syn match i3ConfigFont /^\s*font\s\+\(\(.*\\\_.*\)\|\(.*[^\\]\+$\)\)/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace - -" variables -syn match i3ConfigString /\(['"]\)\(.\{-}\)\1/ contained -syn match i3ConfigColor /#\w\{6}/ contained -syn match i3ConfigVariableModifier /+/ contained -syn match i3ConfigVariableAndModifier /+\w\+/ contained contains=i3ConfigVariableModifier -syn match i3ConfigVariable /\$\w\+\(\(-\w\+\)\+\)\?\(\s\|+\)\?/ contains=i3ConfigVariableModifier,i3ConfigVariableAndModifier -syn keyword i3ConfigInitializeKeyword set contained -syn match i3ConfigInitialize /^\s*set\s\+.*$/ contains=i3ConfigVariable,i3ConfigInitializeKeyword,i3ConfigColor,i3ConfigString - -" Include -syn keyword i3ConfigIncludeKeyword include contained -syn match i3ConfigInclude /^\s*include\s\+.*$/ contains=i3ConfigIncludeKeyword,i3ConfigString,i3ConfigVariable - -" Gaps -syn keyword i3ConfigGapStyleKeyword inner outer horizontal vertical top right bottom left current all set plus minus toggle up down contained -syn match i3ConfigGapStyle /^\s*\(gaps\)\s\+\(inner\|outer\|horizontal\|vertical\|left\|top\|right\|bottom\)\(\s\+\(current\|all\)\)\?\(\s\+\(set\|plus\|minus\|toggle\)\)\?\(\s\+\(-\?\d\+\|\$.*\)\)$/ contains=i3ConfigGapStyleKeyword,i3ConfigNumber,i3ConfigVariable -syn keyword i3ConfigSmartGapKeyword on inverse_outer off contained -syn match i3ConfigSmartGap /^\s*smart_gaps\s\+\(on\|inverse_outer\|off\)\s\?$/ contains=i3ConfigSmartGapKeyword -syn keyword i3ConfigSmartBorderKeyword on no_gaps contained -syn match i3ConfigSmartBorder /^\s*smart_borders\s\+\(on\|no_gaps\)\s\?$/ contains=i3ConfigSmartBorderKeyword - -" Keyboard bindings -syn keyword i3ConfigAction toggle fullscreen restart key import kill shrink grow contained -syn keyword i3ConfigAction focus move grow height width split layout resize restore reload mute unmute exit mode workspace container to contained -syn match i3ConfigModifier /\w\++\w\+\(\(+\w\+\)\+\)\?/ contained contains=i3ConfigVariableModifier -syn match i3ConfigNumber /\s\d\+/ contained -syn match i3ConfigUnit /\sp\(pt\|x\)/ contained -syn match i3ConfigUnitOr /\sor/ contained -syn keyword i3ConfigBindKeyword bindsym bindcode exec gaps border contained -syn match i3ConfigBindArgument /--\w\+\(\(-\w\+\)\+\)\?\s/ contained -syn match i3ConfigBind /^\s*\(bindsym\|bindcode\)\s\+.*$/ contains=i3ConfigVariable,i3ConfigBindKeyword,i3ConfigVariableAndModifier,i3ConfigNumber,i3ConfigUnit,i3ConfigUnitOr,i3ConfigBindArgument,i3ConfigModifier,i3ConfigAction,i3ConfigString,i3ConfigGapStyleKeyword,i3ConfigBorderStyleKeyword - -" Floating +syn match i3ConfigColonOperator /:/ contained +syn match i3ConfigFontNamespace /\w\+:/ contained contains=i3ConfigColonOperator +syn match i3ConfigFontSize / \d\+\(px\)\?\s\?$/ contained +syn region i3ConfigFont start=/^\s*font / skip=/\\$/ end=/$/ contains=i3ConfigFontKeyword,i3ConfigFontNamespace,i3ConfigFontSize,i3ConfigSeparator keepend + +" 4.4-4.5 Keyboard/Mouse bindings +syn keyword i3ConfigBindKeyword bindsym bindcode contained +syn match i3ConfigBindArgument /--\(release\|border\|whole-window\|exclude-titlebar\)/ contained +syn match i3ConfigBindModifier /+/ contained +syn keyword i3ConfigBindModkey Ctrl Shift Mod1 Mod2 Mod3 Mod4 Mod5 contained +syn match i3ConfigBindCombo /[$0-9A-Za-z_+]\+ / contained contains=i3ConfigBindModifier,i3ConfigVariable,i3ConfigBindModkey +syn match i3ConfigBindComboLine /bind\(sym\|code\)\( --[a-z-]\+\)* [$0-9A-Za-z_+]\+ / contained contains=i3ConfigBindKeyword,i3ConfigBindArgument,i3ConfigBindCombo +syn region i3ConfigBind start=/^\s*bind\(sym\|code\) / skip=/\\$/ end=/$/ contains=i3ConfigBindComboLine,i3ConfigCriteria,i3ConfigAction,i3ConfigSeparator,i3ConfigActionKeyword,i3ConfigOption,i3ConfigString,i3ConfigNumber,i3ConfigVariable,i3ConfigBoolean keepend + +" 4.6 Binding modes +syn region i3ConfigKeyword start=/^mode\( --pango_markup\)\? \([^'" {]\+\|'[^']\+'\|".\+"\)\s\+{$/ end=/^\s*}$/ contains=i3ConfigShParam,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigNumber,i3ConfigParen,i3ConfigVariable fold keepend extend + +" 4.7 Floating modifier +syn match i3ConfigKeyword /^floating_modifier [$0-9A-Za-z]*$/ contains=i3ConfigVariable,i3ConfigBindModkey + +" 4.8 Floating window size syn keyword i3ConfigSizeSpecial x contained -syn match i3ConfigNegativeSize /-/ contained -syn match i3ConfigSize /-\?\d\+\s\?x\s\?-\?\d\+/ contained contains=i3ConfigSizeSpecial,i3ConfigNumber,i3ConfigNegativeSize -syn match i3ConfigFloatingModifier /^\s*floating_modifier\s\+\$\w\+\d\?/ contains=i3ConfigVariable -syn match i3ConfigFloating /^\s*floating_\(maximum\|minimum\)_size\s\+-\?\d\+\s\?x\s\?-\?\d\+/ contains=i3ConfigSize - -" Orientation -syn keyword i3ConfigOrientationKeyword vertical horizontal auto contained -syn match i3ConfigOrientation /^\s*default_orientation\s\+\(vertical\|horizontal\|auto\)\s\?$/ contains=i3ConfigOrientationKeyword - -" Layout -syn keyword i3ConfigLayoutKeyword default stacking tabbed contained -syn match i3ConfigLayout /^\s*workspace_layout\s\+\(default\|stacking\|tabbed\)\s\?$/ contains=i3ConfigLayoutKeyword - -" Border style -syn keyword i3ConfigBorderStyleKeyword none normal pixel contained -syn match i3ConfigBorderStyle /^\s*\(new_window\|new_float\|default_border\|default_floating_border\)\s\+\(none\|\(normal\|pixel\)\(\s\+\d\+\)\?\(\s\+\$\w\+\(\(-\w\+\)\+\)\?\(\s\|+\)\?\)\?\)\s\?$/ contains=i3ConfigBorderStyleKeyword,i3ConfigNumber,i3ConfigVariable - -" Hide borders and edges -syn keyword i3ConfigEdgeKeyword none vertical horizontal both smart smart_no_gaps contained -syn match i3ConfigEdge /^\s*hide_edge_borders\s\+\(none\|vertical\|horizontal\|both\|smart\|smart_no_gaps\)\s\?$/ contains=i3ConfigEdgeKeyword - -" Arbitrary commands for specific windows (for_window) -syn keyword i3ConfigCommandKeyword for_window contained -syn region i3ConfigWindowStringSpecial start=+"+ skip=+\\"+ end=+"+ contained contains=i3ConfigString -syn region i3ConfigWindowCommandSpecial start="\[" end="\]" contained contains=i3ConfigWindowStringSpacial,i3ConfigString -syn match i3ConfigArbitraryCommand /^\s*for_window\s\+.*$/ contains=i3ConfigWindowCommandSpecial,i3ConfigCommandKeyword,i3ConfigBorderStyleKeyword,i3ConfigLayoutKeyword,i3ConfigOrientationKeyword,Size,i3ConfigNumber - -" Disable focus open opening -syn keyword i3ConfigNoFocusKeyword no_focus contained -syn match i3ConfigDisableFocus /^\s*no_focus\s\+.*$/ contains=i3ConfigWindowCommandSpecial,i3ConfigNoFocusKeyword - -" Move client to specific workspace automatically -syn keyword i3ConfigAssignKeyword assign contained -syn match i3ConfigAssignSpecial /→/ contained -syn match i3ConfigAssign /^\s*assign\s\+.*$/ contains=i3ConfigAssignKeyword,i3ConfigWindowCommandSpecial,i3ConfigAssignSpecial +syn match i3ConfigSize / -\?\d\+ x -\?\d\+/ contained contains=i3ConfigSizeSpecial,i3ConfigNumber +syn match i3ConfigKeyword /^floating_\(maximum\|minimum\)_size .*$/ contains=i3ConfigSize -" X resources -syn keyword i3ConfigResourceKeyword set_from_resource contained -syn match i3ConfigResource /^\s*set_from_resource\s\+.*$/ contains=i3ConfigResourceKeyword,i3ConfigWindowCommandSpecial,i3ConfigColor,i3ConfigVariable +" 4.9 Orientation +syn keyword i3ConfigOrientationOpts vertical horizontal auto contained +syn match i3ConfigKeyword /^default_orientation \w*$/ contains=i3ConfigOrientationOpts -" Auto start applications -syn keyword i3ConfigExecKeyword exec exec_always contained -syn match i3ConfigNoStartupId /--no-startup-id/ contained " We are not using i3ConfigBindArgument as only no-startup-id is supported here -syn match i3ConfigExec /^\s*exec\(_always\)\?\s\+.*$/ contains=i3ConfigExecKeyword,i3ConfigNoStartupId,i3ConfigString +" 4.10 Layout mode +syn keyword i3ConfigWorkspaceLayoutOpts default stacking tabbed contained +syn match i3ConfigKeyword /^workspace_layout \w*$/ contains=i3ConfigWorkspaceLayoutOpts -" Automatically putting workspaces on specific screens -syn keyword i3ConfigWorkspaceKeyword workspace contained -syn keyword i3ConfigOutput output contained -syn match i3ConfigWorkspace /^\s*workspace\s\+.*$/ contains=i3ConfigWorkspaceKeyword,i3ConfigNumber,i3ConfigString,i3ConfigOutput +" 4.11 Title alignment +syn keyword i3ConfigTitleAlignOpts left center right contained +syn match i3ConfigKeyword /^title_align .*$/ contains=i3ConfigTitleAlignOpts -" Changing colors -syn keyword i3ConfigClientColorKeyword client focused focused_inactive unfocused urgent placeholder background contained -syn match i3ConfigClientColor /^\s*client.\w\+\s\+.*$/ contains=i3ConfigClientColorKeyword,i3ConfigColor,i3ConfigVariable +" 4.12 Border style +syn keyword i3ConfigBorderOpts none normal pixel contained +syn match i3ConfigKeyword /^default\(_floating\)\?_border .*$/ contains=i3ConfigBorderOpts,i3ConfigNumber,i3ConfigVariable -syn keyword i3ConfigTitleAlignKeyword left center right contained -syn match i3ConfigTitleAlign /^\s*title_align\s\+.*$/ contains=i3ConfigTitleAlignKeyword +" 4.13 Hide edge borders +syn keyword i3ConfigEdgeOpts none vertical horizontal both smart smart_no_gaps contained +syn match i3ConfigKeyword /^hide_edge_borders \w*$/ contains=i3ConfigEdgeOpts -" Interprocess communication -syn match i3ConfigInterprocessKeyword /ipc-socket/ contained -syn match i3ConfigInterprocess /^\s*ipc-socket\s\+.*$/ contains=i3ConfigInterprocessKeyword +" 4.14 Smart Borders +syn keyword i3ConfigSmartBorderOpts no_gaps contained +syn match i3ConfigKeyword /^smart_borders \(on\|off\|no_gaps\)$/ contains=i3ConfigSmartBorderOpts,i3ConfigBoolean -" Mouse warping -syn keyword i3ConfigMouseWarpingKeyword mouse_warping contained -syn keyword i3ConfigMouseWarpingType output none contained -syn match i3ConfigMouseWarping /^\s*mouse_warping\s\+\(output\|none\)\s\?$/ contains=i3ConfigMouseWarpingKeyword,i3ConfigMouseWarpingType +" 4.15 Arbitrary commands +syn region i3ConfigKeyword start=/^for_window / end=/$/ contains=i3ConfigForWindowKeyword,i3ConfigCriteria keepend -" Focus follows mouse -syn keyword i3ConfigFocusFollowsMouseKeyword focus_follows_mouse contained -syn keyword i3ConfigFocusFollowsMouseType yes no contained -syn match i3ConfigFocusFollowsMouse /^\s*focus_follows_mouse\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusFollowsMouseKeyword,i3ConfigFocusFollowsMouseType +" 4.16 No opening focus +syn match i3ConfigKeyword /^no_focus .*$/ contains=i3ConfigCondition -" Popups during fullscreen mode -syn keyword i3ConfigPopupOnFullscreenKeyword popup_during_fullscreen contained -syn keyword i3ConfigPopuponFullscreenType smart ignore leave_fullscreen contained -syn match i3ConfigPopupOnFullscreen /^\s*popup_during_fullscreen\s\+\w\+\s\?$/ contains=i3ConfigPopupOnFullscreenKeyword,i3ConfigPopupOnFullscreenType +" 4.17 Variables +syn match i3ConfigVariable /\$[0-9A-Za-z_:|[\]-]\+/ +syn keyword i3ConfigSetKeyword set contained +syn match i3ConfigSet /^set \$.*$/ contains=i3ConfigSetKeyword,i3ConfigVariable,i3ConfigColor,i3ConfigString,i3ConfigNumber,i3ConfigShCommand,i3ConfigShDelim,i3ConfigShParam,i3ConfigShOper,i3ConfigBindModkey -" Focus wrapping -syn keyword i3ConfigFocusWrappingKeyword force_focus_wrapping focus_wrapping contained -syn keyword i3ConfigFocusWrappingType yes no contained -syn match i3ConfigFocusWrapping /^\s*\(force_\)\?focus_wrapping\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigFocusWrappingKeyword +" 4.18 X resources +syn keyword i3ConfigResourceKeyword set_from_resource contained +syn match i3ConfigParamLine /^set_from_resource\s\+.*$/ contains=i3ConfigResourceKeyword,i3ConfigCondition,i3ConfigColor,i3ConfigVariable,i3ConfigString,i3ConfigNumber -" Forcing Xinerama -syn keyword i3ConfigForceXineramaKeyword force_xinerama contained -syn match i3ConfigForceXinerama /^\s*force_xinerama\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigForceXineramaKeyword +" 4.19 Assign clients to workspaces +syn keyword i3ConfigAssignKeyword assign contained +syn match i3ConfigAssignSpecial /→\|number/ contained +syn match i3ConfigAssign /^assign .*$/ contains=i3ConfigAssignKeyword,i3ConfigAssignSpecial,i3ConfigCondition,i3ConfigVariable,i3ConfigString,i3ConfigNumber + +" 4.20 Executing shell commands +syn keyword i3ConfigExecKeyword exec contained +syn keyword i3ConfigExecAlwaysKeyword exec_always contained +syn match i3ConfigShCmdDelim /\$(/ contained +syn region i3ConfigShCommand start=/\$(/ end=/)/ contained contains=i3ConfigShCmdDelim,i3ConfigExecAction,i3ConfigShCommand,i3ConfigShDelim,i3ConfigShOper,i3ConfigShParam,i3ConfigString,i3ConfigNumber,i3ConfigVariable keepend extend +syn match i3ConfigShDelim /[[\]{}();`]\+/ contained +syn match i3ConfigShOper /[<>&|+=~^*!.?]\+/ contained +syn match i3ConfigShParam /\<-[0-9A-Za-z_-]\+\>/ contained containedin=i3ConfigVar +syn region i3ConfigExec start=/^\s*exec\(_always\)\?\( --no-startup-id\)\? [^{]/ skip=/\\$/ end=/$/ contains=i3ConfigExecKeyword,i3ConfigExecAlwaysKeyword,i3ConfigShCommand,i3ConfigShDelim,i3ConfigShOper,i3ConfigShParam,i3ConfigNumber,i3ConfigString,i3ConfigVariable,i3ConfigExecAction keepend + +" 4.21 Workspaces per output +syn keyword i3ConfigWorkspaceKeyword workspace contained +syn keyword i3ConfigWorkspaceOutput output contained +syn keyword i3ConfigWorkspaceDir prev next back_and_forth number contained +syn region i3ConfigWorkspaceLine start=/^workspace / skip=/\\$/ end=/$/ contains=i3ConfigWorkspaceKeyword,i3ConfigNumber,i3ConfigString,i3ConfigGaps,i3ConfigWorkspaceOutput,i3ConfigVariable,i3ConfigBoolean,i3ConfigSeparator keepend -" Automatic back-and-forth when switching to the current workspace -syn keyword i3ConfigAutomaticSwitchKeyword workspace_auto_back_and_forth contained -syn match i3ConfigAutomaticSwitch /^\s*workspace_auto_back_and_forth\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigAutomaticSwitchKeyword +" 4.22 Changing colors +syn match i3ConfigDotOperator /\./ contained +syn keyword i3ConfigClientOpts focused focused_inactive unfocused urgent placeholder background contained +syn match i3ConfigKeyword /^client\..*$/ contains=i3ConfigDotOperator,i3ConfigClientOpts,i3ConfigColor,i3ConfigVariable -" Delay urgency hint -syn keyword i3ConfigTimeUnit ms contained -syn keyword i3ConfigDelayUrgencyKeyword force_display_urgency_hint contained -syn match i3ConfigDelayUrgency /^\s*force_display_urgency_hint\s\+\d\+\s\+ms\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigDelayUrgencyKeyword,i3ConfigNumber,i3ConfigTimeUnit +" 4.23 Interprocess communication +syn match i3ConfigIpcKeyword /ipc-socket/ contained +syn match i3ConfigParamLine /^ipc-socket .*$/ contains=i3ConfigIpcKeyword + +" 4.24 Focus follows mouse +syn keyword i3ConfigFocusFollowsMouseOpts always contained +syn match i3ConfigKeyword /^focus_follows_mouse \(yes\|no\|always\)$/ contains=i3ConfigBoolean,i3ConfigFocusFollowsMouseOpts + +" 4.25 Mouse warping +syn keyword i3ConfigMouseWarpingOpts output container none contained +syn match i3ConfigKeyword /^mouse_warping \w*$/ contains=i3ConfigMouseWarpingOpts -" Focus on window activation -syn keyword i3ConfigFocusOnActivationKeyword focus_on_window_activation contained -syn keyword i3ConfigFocusOnActivationType smart urgent focus none contained -syn match i3ConfigFocusOnActivation /^\s*focus_on_window_activation\s\+\(smart\|urgent\|focus\|none\)\s\?$/ contains=i3ConfigFocusOnActivationKeyword,i3ConfigFocusOnActivationType +" 4.26 Popups while fullscreen +syn keyword i3ConfigPopupFullscreenOpts smart ignore leave_fullscreen contained +syn match i3ConfigKeyword /^popup_during_fullscreen \w*$/ contains=i3ConfigPopupFullscreenOpts -" Automatic back-and-forth when switching to the current workspace -syn keyword i3ConfigDrawingMarksKeyword show_marks contained -syn match i3ConfigDrawingMarks /^\s*show_marks\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigDrawingMarksKeyword +" 4.27 Focus wrapping +syn keyword i3ConfigFocusWrappingOpts force workspace contained +syn match i3ConfigKeyword /^focus_wrapping \(yes\|no\|force\|workspace\)$/ contains=i3ConfigBoolean,i3ConfigFocusWrappingOpts -" Group mode/bar -syn keyword i3ConfigBlockKeyword mode bar colors i3bar_command status_command position exec mode hidden_state modifier id position output background statusline tray_output tray_padding separator separator_symbol workspace_min_width workspace_buttons strip_workspace_numbers binding_mode_indicator focused_workspace active_workspace inactive_workspace urgent_workspace binding_mode contained -syn region i3ConfigBlock start=+^\s*[^#]*s\?{$+ end=+^\s*[^#]*}$+ contains=i3ConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend +" 4.28 Forcing Xinerama +syn match i3ConfigKeyword /^force_xinerama \(yes\|no\)$/ contains=i3ConfigBoolean -" Line continuation -syn region i3ConfigLineCont start=/^.*\\$/ end=/^.*$/ contains=i3ConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend +" 4.29 Automatic workspace back-and-forth +syn match i3ConfigKeyword /^workspace_auto_back_and_forth \(yes\|no\)$/ contains=i3ConfigBoolean + +" 4.30 Delay urgency hint +syn keyword i3ConfigTimeUnit ms contained +syn match i3ConfigKeyword /^force_display_urgency_hint \d\+\( ms\)\?$/ contains=i3ConfigNumber,i3ConfigTimeUnit + +" 4.31 Focus on window activation +syn keyword i3ConfigFocusOnActivationOpts smart urgent focus none contained +syn match i3ConfigKeyword /^focus_on_window_activation \w*$/ contains=i3ConfigFocusOnActivationOpts + +" 4.32 Show marks in title +syn match i3ConfigShowMarks /^show_marks \(yes\|no\)$/ contains=i3ConfigBoolean + +" 4.34 Tiling drag +syn keyword i3ConfigTilingDragOpts modifier titlebar contained +syn match i3ConfigKeyword /^tiling_drag\( off\|\( modifier\| titlebar\)\{1,2\}\)$/ contains=i3ConfigTilingDragOpts,i3ConfigBoolean + +" 4.35 Gaps +syn keyword i3ConfigGapsOpts inner outer horizontal vertical left right top bottom current all set plus minus toggle contained +syn region i3ConfigGaps start=/gaps/ skip=/\\$/ end=/[,;]\|$/ contained contains=i3ConfigGapsOpts,i3ConfigNumber,i3ConfigVariable,i3ConfigSeparator keepend +syn match i3ConfigGapsLine /^gaps .*$/ contains=i3ConfigGaps +syn keyword i3ConfigSmartGapOpts inverse_outer contained +syn match i3ConfigKeyword /^smart_gaps \(on\|off\|inverse_outer\)$/ contains=i3ConfigSmartGapOpts,i3ConfigBoolean + +" 5 Configuring bar +syn match i3ConfigBarModifier /^\s\+modifier \S\+$/ contained contains=i3ConfigBindModifier,i3ConfigVariable,i3ConfigBindModkey,i3ConfigBarOptVals +syn keyword i3ConfigBarOpts bar i3bar_command status_command workspace_command mode hidden_state id position output tray_output tray_padding separator_symbol workspace_buttons workspace_min_width strip_workspace_numbers strip_workspace_name binding_mode_indicator padding contained +syn keyword i3ConfigBarOptVals dock hide invisible show none top bottom primary nonprimary contained +syn region i3ConfigBarBlock start=/^bar {$/ end=/^}$/ contains=i3ConfigBarOpts,i3ConfigBarOptVals,i3ConfigBarModifier,i3ConfigBind,i3ConfigString,i3ConfigComment,i3ConfigFont,i3ConfigBoolean,i3ConfigNumber,i3ConfigParen,i3ConfigColor,i3ConfigVariable,i3ConfigColorsBlock,i3ConfigShOper,i3ConfigShCommand fold keepend extend + +" 5.16 Color block +syn keyword i3ConfigColorsKeyword colors contained +syn match i3ConfigColorsOpts /\(focused_\)\?\(background\|statusline\|separator\)\|\(focused\|active\|inactive\|urgent\)_workspace\|binding_mode/ contained +syn region i3ConfigColorsBlock start=/^\s\+colors {$/ end=/^\s\+}$/ contained contains=i3ConfigColorsKeyword,i3ConfigColorsOpts,i3ConfigColor,i3ConfigVariable,i3ConfigComment,i3ConfigParen fold keepend extend + +" 6.0 Command criteria +syn keyword i3ConfigConditionProp class instance window_role window_type machine id title urgent workspace con_mark con_id floating_from tiling_from contained +syn keyword i3ConfigConditionSpecial __focused__ all floating tiling contained +syn region i3ConfigCondition start=/\[/ end=/\]/ contained contains=i3ConfigShDelim,i3ConfigConditionProp,i3ConfigShOper,i3ConfigConditionSpecial,i3ConfigNumber,i3ConfigString keepend extend +syn region i3ConfigCriteria start=/\[/ skip=/\\$/ end=/\(;\|$\)/ contained contains=i3ConfigCondition,i3ConfigAction,i3ConfigActionKeyword,i3ConfigOption,i3ConfigBoolean,i3ConfigNumber,i3ConfigVariable,i3ConfigSeparator keepend transparent + +" 6.1 Actions through shell +syn match i3ConfigExecActionKeyword /i3-msg/ contained +syn region i3ConfigExecAction start=/[a-z3-]\+msg "/ skip=/ "\|\\$/ end=/"\|$/ contained contains=i3ConfigExecActionKeyword,i3ConfigShCommand,i3ConfigNumber,i3ConfigShOper,i3ConfigCriteria,i3ConfigAction,i3ConfigActionKeyword,i3ConfigOption,i3ConfigVariable keepend extend +syn region i3ConfigExecAction start=/[a-z3-]\+msg '/ skip=/ '\|\\$/ end=/'\|$/ contained contains=i3ConfigExecActionKeyword,i3ConfigShCommand,i3ConfigNumber,i3ConfigShOper,i3ConfigCriteria,i3ConfigAction,i3ConfigActionKeyword,i3ConfigOption,i3ConfigVariable keepend extend +syn region i3ConfigExecAction start=/[a-z3-]\+msg ['"-]\@!/ skip=/\\$/ end=/[&|;})'"]\@=\|$/ contained contains=i3ConfigExecActionKeyword,i3ConfigShCommand,i3ConfigNumber,i3ConfigShOper,i3ConfigCriteria,i3ConfigAction,i3ConfigActionKeyword,i3ConfigOption,i3ConfigVariable keepend extend +" 6.1 Executing applications (4.20) +syn region i3ConfigAction start=/exec/ skip=/\\$/ end=/[,;]\|$/ contained contains=i3ConfigExecKeyword,i3ConfigExecAction,i3ConfigShCommand,i3ConfigShDelim,i3ConfigShOper,i3ConfigShParam,i3ConfigNumber,i3ConfigString,i3ConfigVariable,i3ConfigSeparator keepend + +" 6.3 Manipulating layout +syn keyword i3ConfigLayoutKeyword layout contained +syn keyword i3ConfigLayoutOpts default tabbed stacking splitv splith toggle split all contained +syn region i3ConfigAction start=/layout/ skip=/\\$/ end=/[,;]\|$/ contained contains=i3ConfigLayoutKeyword,i3ConfigLayoutOpts,i3ConfigSeparator keepend transparent + +" 6.4 Focusing containers +syn keyword i3ConfigFocusKeyword focus contained +syn keyword i3ConfigFocusOpts left right up down workspace parent child next prev sibling floating tiling mode_toggle contained +syn keyword i3ConfigFocusOutputOpts left right down up current primary nonprimary next prev contained +syn region i3ConfigFocusOutput start=/ output / skip=/\\$/ end=/[,;]\|$/ contained contains=i3ConfigWorkspaceOutput,i3ConfigFocusOutputOpts,i3ConfigString,i3ConfigNumber,i3ConfigSeparator keepend +syn match i3ConfigFocusOutputLine /^focus output .*$/ contains=i3ConfigFocusKeyword,i3ConfigFocusOutput +syn region i3ConfigAction start=/focus/ skip=/\\$/ end=/[,;]\|$/ contained contains=i3ConfigFocusKeyword,i3ConfigFocusOpts,i3ConfigFocusOutput,i3ConfigString,i3ConfigSeparator keepend transparent + +" 6.8 Focusing workspaces (4.21) +syn region i3ConfigAction start=/workspace / skip=/\\$/ end=/[,;]\|$/ contained contains=i3ConfigWorkspaceKeyword,i3ConfigWorkspaceDir,i3ConfigNumber,i3ConfigString,i3ConfigGaps,i3ConfigWorkspaceOutput,i3ConfigVariable,i3ConfigBoolean,i3ConfigSeparator keepend transparent + +" 6.8.2 Renaming workspaces +syn keyword i3ConfigRenameKeyword rename contained +syn region i3ConfigAction start=/rename workspace/ end=/[,;]\|$/ contained contains=i3ConfigRenameKeyword,i3ConfigMoveDir,i3ConfigMoveType,i3ConfigNumber,i3ConfigVariable,i3ConfigString keepend transparent + +" 6.5,6.9-6.11 Moving containers +syn keyword i3ConfigMoveKeyword move contained +syn keyword i3ConfigMoveDir left right down up position absolute center to current contained +syn keyword i3ConfigMoveType window container workspace output mark mouse scratchpad contained +syn match i3ConfigUnit / px\| ppt/ contained +syn region i3ConfigAction start=/move/ skip=/\\$/ end=/[,;]\|$/ contained contains=i3ConfigMoveKeyword,i3ConfigMoveDir,i3ConfigMoveType,i3ConfigWorkspaceDir,i3ConfigUnit,i3ConfigNumber,i3ConfigVariable,i3ConfigString,i3ConfigSeparator,i3ConfigShParam keepend transparent + +" 6.12 Resizing containers/windows +syn keyword i3ConfigResizeKeyword resize contained +syn keyword i3ConfigResizeOpts grow shrink up down left right set width height or contained +syn region i3ConfigAction start=/resize/ skip=/\\$/ end=/[,;]\|$/ contained contains=i3ConfigResizeKeyword,i3ConfigResizeOpts,i3ConfigNumber,i3ConfigUnit,i3ConfigSeparator keepend transparent + +" 6.14 VIM-like marks +syn match i3ConfigMark /mark\( --\(add\|replace\)\( --toggle\)\?\)\?/ contained contains=i3ConfigShParam +syn region i3ConfigAction start=/\<mark/ skip=/\\$/ end=/[,;]\|$/ contained contains=i3ConfigMark,i3ConfigNumber,i3ConfigString,i3ConfigSeparator keepend transparent + +" 6.24 Changing gaps (4.35) +syn region i3ConfigAction start=/gaps/ skip=/\\$/ end=/[,;]\|$/ contained contains=i3ConfigGaps keepend transparent + +" Commands useable in keybinds +syn keyword i3ConfigActionKeyword mode append_layout kill open fullscreen sticky split floating swap unmark show_marks title_window_icon title_format border restart reload exit scratchpad nop bar contained +syn keyword i3ConfigOption default enable disable toggle key restore current horizontal vertical auto none normal pixel show container with id con_id padding hidden_state hide dock invisible contained " Define the highlighting. hi def link i3ConfigError Error hi def link i3ConfigTodo Todo -hi def link i3ConfigComment Comment -hi def link i3ConfigFontContent Type -hi def link i3ConfigFocusOnActivationType Type -hi def link i3ConfigPopupOnFullscreenType Type -hi def link i3ConfigOrientationKeyword Type -hi def link i3ConfigMouseWarpingType Type -hi def link i3ConfigFocusFollowsMouseType Type -hi def link i3ConfigGapStyleKeyword Type -hi def link i3ConfigTitleAlignKeyword Type -hi def link i3ConfigSmartGapKeyword Type -hi def link i3ConfigSmartBorderKeyword Type -hi def link i3ConfigLayoutKeyword Type -hi def link i3ConfigBorderStyleKeyword Type -hi def link i3ConfigEdgeKeyword Type -hi def link i3ConfigAction Type -hi def link i3ConfigCommand Type -hi def link i3ConfigOutput Type -hi def link i3ConfigWindowCommandSpecial Type -hi def link i3ConfigFocusWrappingType Type -hi def link i3ConfigUnitOr Type -hi def link i3ConfigFontSize Constant +hi def link i3ConfigKeyword Keyword +hi def link i3ConfigCommand Statement +hi def link i3ConfigParamLine i3ConfigString +hi def link i3ConfigOperator Operator +hi def link i3ConfigSeparator i3ConfigOperator +hi def link i3ConfigParen Delimiter +hi def link i3ConfigBoolean Boolean +hi def link i3ConfigString String hi def link i3ConfigColor Constant -hi def link i3ConfigNumber Constant -hi def link i3ConfigUnit Constant -hi def link i3ConfigVariableAndModifier Constant -hi def link i3ConfigTimeUnit Constant -hi def link i3ConfigModifier Constant -hi def link i3ConfigString Constant -hi def link i3ConfigNegativeSize Constant -hi def link i3ConfigInclude Constant -hi def link i3ConfigFontSeparator Special -hi def link i3ConfigVariableModifier Special -hi def link i3ConfigSizeSpecial Special -hi def link i3ConfigWindowSpecial Special -hi def link i3ConfigAssignSpecial Special -hi def link i3ConfigFontNamespace PreProc -hi def link i3ConfigBindArgument PreProc -hi def link i3ConfigNoStartupId PreProc -hi def link i3ConfigIncludeKeyword Identifier -hi def link i3ConfigFontKeyword Identifier -hi def link i3ConfigBindKeyword Identifier -hi def link i3ConfigOrientation Identifier -hi def link i3ConfigGapStyle Identifier -hi def link i3ConfigTitleAlign Identifier -hi def link i3ConfigSmartGap Identifier -hi def link i3ConfigSmartBorder Identifier -hi def link i3ConfigLayout Identifier -hi def link i3ConfigBorderStyle Identifier -hi def link i3ConfigEdge Identifier -hi def link i3ConfigFloating Identifier -hi def link i3ConfigFloatingModifier Identifier -hi def link i3ConfigCommandKeyword Identifier -hi def link i3ConfigNoFocusKeyword Identifier -hi def link i3ConfigInitializeKeyword Identifier -hi def link i3ConfigAssignKeyword Identifier -hi def link i3ConfigResourceKeyword Identifier -hi def link i3ConfigExecKeyword Identifier -hi def link i3ConfigWorkspaceKeyword Identifier -hi def link i3ConfigClientColorKeyword Identifier -hi def link i3ConfigInterprocessKeyword Identifier -hi def link i3ConfigMouseWarpingKeyword Identifier -hi def link i3ConfigFocusFollowsMouseKeyword Identifier -hi def link i3ConfigPopupOnFullscreenKeyword Identifier -hi def link i3ConfigFocusWrappingKeyword Identifier -hi def link i3ConfigForceXineramaKeyword Identifier -hi def link i3ConfigAutomaticSwitchKeyword Identifier -hi def link i3ConfigDelayUrgencyKeyword Identifier -hi def link i3ConfigFocusOnActivationKeyword Identifier -hi def link i3ConfigDrawingMarksKeyword Identifier -hi def link i3ConfigBlockKeyword Identifier -hi def link i3ConfigVariable Statement -hi def link i3ConfigArbitraryCommand Type +hi def link i3ConfigNumber Number +hi def link i3ConfigIncludeKeyword i3ConfigKeyword +hi def link i3ConfigComment Comment +hi def link i3ConfigFontKeyword i3ConfigKeyword +hi def link i3ConfigColonOperator i3ConfigOperator +hi def link i3ConfigFontNamespace i3ConfigOption +hi def link i3ConfigFontSize i3ConfigNumber +hi def link i3ConfigFont i3ConfigString +hi def link i3ConfigBindKeyword i3ConfigKeyword +hi def link i3ConfigBindArgument i3ConfigShParam +hi def link i3ConfigBindModifier i3ConfigOperator +hi def link i3ConfigBindModkey Special +hi def link i3ConfigBindCombo SpecialChar +hi def link i3ConfigSizeSpecial i3ConfigOperator +hi def link i3ConfigOrientationOpts i3ConfigOption +hi def link i3ConfigWorkspaceLayoutOpts i3ConfigOption +hi def link i3ConfigTitleAlignOpts i3ConfigOption +hi def link i3ConfigBorderOpts i3ConfigOption +hi def link i3ConfigEdgeOpts i3ConfigOption +hi def link i3ConfigSmartBorderOpts i3ConfigOption +hi def link i3ConfigVariable Variable +hi def link i3ConfigSetKeyword i3ConfigKeyword +hi def link i3ConfigResourceKeyword i3ConfigKeyword +hi def link i3ConfigAssignKeyword i3ConfigKeyword +hi def link i3ConfigAssignSpecial i3ConfigOption +hi def link i3ConfigExecKeyword i3ConfigCommand +hi def link i3ConfigExecAlwaysKeyword i3ConfigKeyword +hi def link i3ConfigShParam PreProc +hi def link i3ConfigShDelim Delimiter +hi def link i3ConfigShOper Operator +hi def link i3ConfigShCmdDelim i3ConfigShDelim +hi def link i3ConfigShCommand Normal +hi def link i3ConfigWorkspaceKeyword i3ConfigCommand +hi def link i3ConfigWorkspaceOutput i3ConfigMoveType +hi def link i3ConfigWorkspaceDir i3ConfigOption +hi def link i3ConfigDotOperator i3ConfigOperator +hi def link i3ConfigClientOpts i3ConfigOption +hi def link i3ConfigIpcKeyword i3ConfigKeyword +hi def link i3ConfigFocusFollowsMouseOpts i3ConfigOption +hi def link i3ConfigMouseWarpingOpts i3ConfigOption +hi def link i3ConfigPopupFullscreenOpts i3ConfigOption +hi def link i3ConfigFocusWrappingOpts i3ConfigOption +hi def link i3ConfigTimeUnit i3ConfigNumber +hi def link i3ConfigFocusOnActivationOpts i3ConfigOption +hi def link i3ConfigShowMarks i3ConfigCommand +hi def link i3ConfigTilingDragOpts i3ConfigOption +hi def link i3ConfigGapsOpts i3ConfigOption +hi def link i3ConfigGaps i3ConfigCommand +hi def link i3ConfigSmartGapOpts i3ConfigOption +hi def link i3ConfigBarModifier i3ConfigKeyword +hi def link i3ConfigBarOpts i3ConfigKeyword +hi def link i3ConfigBarOptVals i3ConfigOption +hi def link i3ConfigColorsKeyword i3ConfigKeyword +hi def link i3ConfigColorsOpts i3ConfigOption +hi def link i3ConfigConditionProp i3ConfigShParam +hi def link i3ConfigConditionSpecial Constant +hi def link i3ConfigExecActionKeyword i3ConfigShCommand +hi def link i3ConfigExecAction i3ConfigString +hi def link i3ConfigLayoutKeyword i3ConfigCommand +hi def link i3ConfigLayoutOpts i3ConfigOption +hi def link i3ConfigFocusKeyword i3ConfigCommand +hi def link i3ConfigFocusOpts i3ConfigOption +hi def link i3ConfigFocusOutputOpts i3ConfigOption +hi def link i3ConfigRenameKeyword i3ConfigCommand +hi def link i3ConfigMoveKeyword i3ConfigCommand +hi def link i3ConfigMoveDir i3ConfigOption +hi def link i3ConfigMoveType Constant +hi def link i3ConfigUnit i3ConfigNumber +hi def link i3ConfigResizeKeyword i3ConfigCommand +hi def link i3ConfigResizeOpts i3ConfigOption +hi def link i3ConfigMark i3ConfigCommand +hi def link i3ConfigActionKeyword i3ConfigCommand +hi def link i3ConfigOption Type let b:current_syntax = "i3config" diff --git a/runtime/syntax/iss.vim b/runtime/syntax/iss.vim index 34bb698368..212c0f6dbe 100644 --- a/runtime/syntax/iss.vim +++ b/runtime/syntax/iss.vim @@ -2,10 +2,9 @@ " Language: Inno Setup File (iss file) and My InnoSetup extension " Maintainer: Jason Mills (jmills@cs.mun.ca) " Previous Maintainer: Dominique Stéphan (dominique@mggen.com) -" Last Change: 2021 Aug 30 +" Last Change: 2023 Jan 26 " " Todo: -" - The parameter String: is matched as flag string (because of case ignore). " - Pascal scripting syntax is not recognized. " - Embedded double quotes confuse string matches. e.g. "asfd""asfa" @@ -17,6 +16,9 @@ endif " shut case off syn case ignore +" match keywords with colon +syn iskeyword @,48-57,_,192-255,: + " Preprocessor syn region issPreProc start="^\s*#" end="$" @@ -30,25 +32,25 @@ syn match issDirective "^[^=]\+=" syn match issURL "http[s]\=:\/\/.*$" " Parameters used for any section. -" syn match issParam"[^: ]\+:" -syn match issParam "Name:" -syn match issParam "MinVersion:\|OnlyBelowVersion:\|Languages:" -syn match issParam "Source:\|DestDir:\|DestName:\|CopyMode:" -syn match issParam "Attribs:\|Permissions:\|FontInstall:\|Flags:" -syn match issParam "FileName:\|Parameters:\|WorkingDir:\|HotKey:\|Comment:" -syn match issParam "IconFilename:\|IconIndex:" -syn match issParam "Section:\|Key:\|String:" -syn match issParam "Root:\|SubKey:\|ValueType:\|ValueName:\|ValueData:" -syn match issParam "RunOnceId:" -syn match issParam "Type:\|Excludes:" -syn match issParam "Components:\|Description:\|GroupDescription:\|Types:\|ExtraDiskSpaceRequired:" -syn match issParam "StatusMsg:\|RunOnceId:\|Tasks:" -syn match issParam "MessagesFile:\|LicenseFile:\|InfoBeforeFile:\|InfoAfterFile:" +" syn match issParam "[^: ]\+:" +syn keyword issParam Name: +syn keyword issParam MinVersion: OnlyBelowVersion: Languages: +syn keyword issParam Source: DestDir: DestName: CopyMode: ExternalSize: +syn keyword issParam Attribs: Permissions: FontInstall: Flags: +syn keyword issParam FileName: Parameters: WorkingDir: HotKey: Comment: +syn keyword issParam IconFilename: IconIndex: +syn keyword issParam Section: Key: String: +syn keyword issParam Root: SubKey: ValueType: ValueName: ValueData: +syn keyword issParam RunOnceId: +syn keyword issParam Type: Excludes: +syn keyword issParam Components: Description: GroupDescription: Types: ExtraDiskSpaceRequired: +syn keyword issParam StatusMsg: RunOnceId: Tasks: +syn keyword issParam MessagesFile: LicenseFile: InfoBeforeFile: InfoAfterFile: syn match issComment "^\s*;.*$" contains=@Spell " folder constant -syn match issFolder "{[^{]*}" contains=@NoSpell +syn match issFolder "{\@1<!{[^{]*}" contains=@NoSpell " string syn region issString start=+"+ end=+"+ contains=issFolder,@Spell @@ -61,16 +63,16 @@ syn keyword issFilesCopyMode normal onlyifdoesntexist alwaysoverwrite alwaysskip syn keyword issFilesAttribs readonly hidden system syn keyword issFilesPermissions full modify readexec syn keyword issFilesFlags allowunsafefiles comparetimestampalso confirmoverwrite deleteafterinstall -syn keyword issFilesFlags dontcopy dontverifychecksum external fontisnttruetype ignoreversion -syn keyword issFilesFlags isreadme onlyifdestfileexists onlyifdoesntexist overwritereadonly +syn keyword issFilesFlags dontcopy dontverifychecksum external fontisnttruetype ignoreversion +syn keyword issFilesFlags isreadme onlyifdestfileexists onlyifdoesntexist overwritereadonly syn keyword issFilesFlags promptifolder recursesubdirs regserver regtypelib restartreplace -syn keyword issFilesFlags sharedfile skipifsourcedoesntexist sortfilesbyextension touch +syn keyword issFilesFlags sharedfile skipifsourcedoesntexist sortfilesbyextension touch syn keyword issFilesFlags uninsremovereadonly uninsrestartdelete uninsneveruninstall -syn keyword issFilesFlags replacesameversion nocompression noencryption noregerror +syn keyword issFilesFlags replacesameversion setntfscompression nocompression noencryption noregerror " [Icons] -syn keyword issIconsFlags closeonexit createonlyiffileexists dontcloseonexit +syn keyword issIconsFlags closeonexit createonlyiffileexists dontcloseonexit syn keyword issIconsFlags runmaximized runminimized uninsneveruninstall useapppaths " [INI] @@ -79,13 +81,13 @@ syn keyword issINIFlags createkeyifdoesntexist uninsdeleteentry uninsdeletesecti " [Registry] syn keyword issRegRootKey HKCR HKCU HKLM HKU HKCC syn keyword issRegValueType none string expandsz multisz dword binary -syn keyword issRegFlags createvalueifdoesntexist deletekey deletevalue dontcreatekey -syn keyword issRegFlags preservestringtype noerror uninsclearvalue +syn keyword issRegFlags createvalueifdoesntexist deletekey deletevalue dontcreatekey +syn keyword issRegFlags preservestringtype noerror uninsclearvalue syn keyword issRegFlags uninsdeletekey uninsdeletekeyifempty uninsdeletevalue " [Run] and [UninstallRun] syn keyword issRunFlags hidewizard nowait postinstall runhidden runmaximized -syn keyword issRunFlags runminimized shellexec skipifdoesntexist skipifnotsilent +syn keyword issRunFlags runminimized shellexec skipifdoesntexist skipifnotsilent syn keyword issRunFlags skipifsilent unchecked waituntilidle " [Types] @@ -98,7 +100,7 @@ syn keyword issComponentsFlags dontinheritcheck exclusive fixed restart disablen syn keyword issInstallDeleteType files filesandordirs dirifempty " [Tasks] -syn keyword issTasksFlags checkedonce dontinheritcheck exclusive restart unchecked +syn keyword issTasksFlags checkedonce dontinheritcheck exclusive restart unchecked " Define the default highlighting. @@ -112,7 +114,7 @@ hi def link issParam Type hi def link issFolder Special hi def link issString String hi def link issURL Include -hi def link issPreProc PreProc +hi def link issPreProc PreProc hi def link issDirsFlags Keyword hi def link issFilesCopyMode Keyword diff --git a/runtime/syntax/javascript.vim b/runtime/syntax/javascript.vim index e513137984..e3b4cdf703 100644 --- a/runtime/syntax/javascript.vim +++ b/runtime/syntax/javascript.vim @@ -52,11 +52,11 @@ syn match javaScriptNumber "\<\d\+\(_\d\+\)*\.\(\d\+\(_\d\+\)*\([eE] syn region javaScriptRegexpString start=+[,(=+]\s*/[^/*]+ms=e-1,me=e-1 skip=+\\\\\|\\/+ end=+/[gimuys]\{0,2\}\s*$+ end=+/[gimuys]\{0,2\}\s*[+;.,)\]}]+me=e-1 end=+/[gimuys]\{0,2\}\s\+\/+me=e-1 contains=@htmlPreproc,javaScriptComment oneline syn keyword javaScriptConditional if else switch -syn keyword javaScriptRepeat while for do in +syn keyword javaScriptRepeat while for do in of syn keyword javaScriptBranch break continue syn keyword javaScriptOperator new delete instanceof typeof syn keyword javaScriptType Array Boolean Date Function Number Object String RegExp -syn keyword javaScriptStatement return with await +syn keyword javaScriptStatement return with await yield syn keyword javaScriptBoolean true false syn keyword javaScriptNull null undefined syn keyword javaScriptIdentifier arguments this var let @@ -103,7 +103,7 @@ hi def link javaScriptStringD String hi def link javaScriptStringT String hi def link javaScriptCharacter Character hi def link javaScriptSpecialCharacter javaScriptSpecial -hi def link javaScriptNumber javaScriptValue +hi def link javaScriptNumber Number hi def link javaScriptConditional Conditional hi def link javaScriptRepeat Repeat hi def link javaScriptBranch Conditional diff --git a/runtime/syntax/json5.vim b/runtime/syntax/json5.vim new file mode 100644 index 0000000000..5b01d33aad --- /dev/null +++ b/runtime/syntax/json5.vim @@ -0,0 +1,73 @@ +" Vim syntax file +" Language: JSON5 +" Maintainer: Mazunki Hoksaas rolferen@gmail.com +" Previous Maintainer: Guten Ye <ywzhaifei@gmail.com> +" Last Change: 2019 Apr 1 +" Version: vim9.0-1 +" URL: https://github.com/json5/json5 + +" Syntax setup +if exists('b:current_syntax') && b:current_syntax == 'json5' + finish +endif + +" Numbers +syn match json5Number "[-+]\=\%(0\|[1-9]\d*\)\%(\.\d*\)\=\%([eE][-+]\=\d\+\)\=" +syn match json5Number "[-+]\=\%(\.\d\+\)\%([eE][-+]\=\d\+\)\=" +syn match json5Number "[-+]\=0[xX]\x*" +syn match json5Number "[-+]\=Infinity\|NaN" + +" An integer part of 0 followed by other digits is not allowed +syn match json5NumError "[-+]\=0\d\(\d\|\.\)*" + +" A hexadecimal number cannot have a fractional part +syn match json5NumError "[-+]\=0x\x*\.\x*" + +" Strings +syn region json5String start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=json5Escape,@Spell +syn region json5String start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=json5Escape,@Spell + +" Escape sequences +syn match json5Escape "\\['\"\\bfnrtv]" contained +syn match json5Escape "\\u\x\{4}" contained + +" Boolean +syn keyword json5Boolean true false + +" Null +syn keyword json5Null null + +" Delimiters and Operators +syn match json5Delimiter "," +syn match json5Operator ":" + +" Braces +syn match json5Braces "[{}\[\]]" + +" Keys +syn match json5Key /@\?\%(\I\|\$\)\%(\i\|\$\)*\s*\ze::\@!/ contains=@Spell +syn match json5Key /"\([^"]\|\\"\)\{-}"\ze\s*:/ contains=json5Escape,@Spell + +" Comment +syn region json5LineComment start=+\/\/+ end=+$+ keepend contains=@Spell +syn region json5LineComment start=+^\s*\/\/+ skip=+\n\s*\/\/+ end=+$+ keepend fold contains=@Spell +syn region json5Comment start="/\*" end="\*/" fold contains=@Spell + +" Define the default highlighting +hi def link json5String String +hi def link json5Key Identifier +hi def link json5Escape Special +hi def link json5Number Number +hi def link json5Delimiter Delimiter +hi def link json5Operator Operator +hi def link json5Braces Delimiter +hi def link json5Null Keyword +hi def link json5Boolean Boolean +hi def link json5LineComment Comment +hi def link json5Comment Comment +hi def link json5NumError Error + +if !exists('b:current_syntax') + let b:current_syntax = 'json5' +endif + diff --git a/runtime/syntax/kotlin.vim b/runtime/syntax/kotlin.vim new file mode 100644 index 0000000000..9b85b8ef5c --- /dev/null +++ b/runtime/syntax/kotlin.vim @@ -0,0 +1,157 @@ +" Vim syntax file +" Language: Kotlin +" Maintainer: Alexander Udalov +" URL: https://github.com/udalov/kotlin-vim +" Last Change: 30 December 2022 + +if exists('b:current_syntax') + finish +endif + +syn keyword ktStatement break continue return +syn keyword ktConditional if else when +syn keyword ktRepeat do for while +syn keyword ktOperator in is by +syn keyword ktKeyword get set out super this where +syn keyword ktException try catch finally throw + +syn keyword ktInclude import package + +" Generated stdlib class names {{{ +" The following is generated by https://github.com/udalov/kotlin-vim/blob/master/extra/generate-stdlib-class-names.main.kts +syn keyword ktType AbstractCollection AbstractCoroutineContextElement AbstractCoroutineContextKey AbstractDoubleTimeSource AbstractIterator AbstractList AbstractLongTimeSource +syn keyword ktType AbstractMap AbstractMutableCollection AbstractMutableList AbstractMutableMap AbstractMutableSet AbstractSet AccessDeniedException Accessor Annotation +syn keyword ktType AnnotationRetention AnnotationTarget Any Appendable ArithmeticException Array ArrayDeque ArrayList AssertionError Boolean BooleanArray BooleanIterator +syn keyword ktType BuilderInference Byte ByteArray ByteIterator CName CallsInPlace CancellationException Char CharArray CharCategory CharDirectionality CharIterator CharProgression +syn keyword ktType CharRange CharSequence CharacterCodingException Charsets ClassCastException Cloneable ClosedFloatingPointRange ClosedRange Collection Comparable +syn keyword ktType ComparableTimeMark Comparator ConcurrentModificationException ConditionalEffect ContextFunctionTypeParams Continuation ContinuationInterceptor ContractBuilder +syn keyword ktType CopyActionContext CopyActionResult CoroutineContext DeepRecursiveFunction DeepRecursiveScope Delegates Deprecated DeprecatedSinceKotlin DeprecationLevel +syn keyword ktType Destructured Double DoubleArray DoubleIterator DslMarker Duration DurationUnit Effect Element EmptyCoroutineContext Entry Enum EnumEntries Error Exception +syn keyword ktType ExperimentalContracts ExperimentalJsExport ExperimentalMultiplatform ExperimentalObjCName ExperimentalObjCRefinement ExperimentalPathApi ExperimentalStdlibApi +syn keyword ktType ExperimentalSubclassOptIn ExperimentalTime ExperimentalTypeInference ExperimentalUnsignedTypes ExtensionFunctionType FileAlreadyExistsException +syn keyword ktType FileSystemException FileTreeWalk FileVisitorBuilder FileWalkDirection Float FloatArray FloatIterator FreezingIsDeprecated Function Function0 Function1 Function10 +syn keyword ktType Function11 Function12 Function13 Function14 Function15 Function16 Function17 Function18 Function19 Function2 Function20 Function21 Function22 Function3 Function4 +syn keyword ktType Function5 Function6 Function7 Function8 Function9 FunctionN Getter Grouping HashMap HashSet HiddenFromObjC HidesFromObjC Ignore IllegalArgumentException +syn keyword ktType IllegalStateException IndexOutOfBoundsException IndexedValue Int IntArray IntIterator IntProgression IntRange InvocationKind Iterable Iterator JsExport JsName +syn keyword ktType JvmDefault JvmDefaultWithCompatibility JvmDefaultWithoutCompatibility JvmField JvmInline JvmMultifileClass JvmName JvmOverloads JvmRecord JvmSerializableLambda +syn keyword ktType JvmStatic JvmSuppressWildcards JvmSynthetic JvmWildcard KAnnotatedElement KCallable KClass KClassifier KDeclarationContainer KFunction KMutableProperty +syn keyword ktType KMutableProperty0 KMutableProperty1 KMutableProperty2 KParameter KProperty KProperty0 KProperty1 KProperty2 KType KTypeParameter KTypeProjection KVariance +syn keyword ktType KVisibility Key Kind KotlinNullPointerException KotlinReflectionNotSupportedError KotlinVersion Lazy LazyThreadSafetyMode Level LinkedHashMap LinkedHashSet List +syn keyword ktType ListIterator Long LongArray LongIterator LongProgression LongRange Map MatchGroup MatchGroupCollection MatchNamedGroupCollection MatchResult Metadata Monotonic +syn keyword ktType MustBeDocumented MutableCollection MutableEntry MutableIterable MutableIterator MutableList MutableListIterator MutableMap MutableSet NoSuchElementException +syn keyword ktType NoSuchFileException NoWhenBranchMatchedException NotImplementedError Nothing NullPointerException Number NumberFormatException ObjCName ObservableProperty +syn keyword ktType OnErrorAction OnErrorResult OpenEndRange OptIn OptionalExpectation OverloadResolutionByLambdaReturnType Pair ParameterName PathWalkOption +syn keyword ktType PropertyDelegateProvider PublishedApi PurelyImplements Random RandomAccess ReadOnlyProperty ReadWriteProperty RefinesInSwift Regex RegexOption Repeatable +syn keyword ktType ReplaceWith RequiresOptIn RestrictsSuspension Result Retention Returns ReturnsNotNull RuntimeException Sequence SequenceScope Set Setter SharedImmutable Short +syn keyword ktType ShortArray ShortIterator ShouldRefineInSwift SimpleEffect SinceKotlin Strictfp String StringBuilder SubclassOptInRequired Suppress Synchronized Target +syn keyword ktType TestTimeSource ThreadLocal Throwable Throws TimeMark TimeSource TimedValue Transient Triple TypeCastException Typography UByte UByteArray UInt UIntArray +syn keyword ktType UIntProgression UIntRange ULong ULongArray ULongProgression ULongRange UShort UShortArray UninitializedPropertyAccessException Unit UnsafeVariance +syn keyword ktType UnsupportedOperationException ValueTimeMark Volatile WithComparableMarks +" }}} + +syn keyword ktModifier annotation companion enum inner abstract final open override sealed vararg dynamic expect actual suspend +syn keyword ktStructure class object interface typealias fun val var constructor init + +syn keyword ktReservedKeyword typeof + +syn keyword ktBoolean true false +syn keyword ktConstant null + +syn keyword ktModifier reified external inline noinline crossinline + +syn match ktModifier "\v<data>\ze\@=.*<(class|object)>" +syn match ktModifier "\v<value>\ze\@=.*<class>" +syn match ktModifier "\v<(tailrec|operator|infix)>\ze\@=.*<fun>" +syn match ktModifier "\v<const>\ze\@=.*<val>" +syn match ktModifier "\v<lateinit>\ze\@=.*<var>" +syn match ktModifier "\v<(internal|private|protected|public)>\ze\@=.*<(class|object|interface|typealias|fun|val|var|constructor|get|set)>" + +syn match ktOperator "\v\?:|::|\<\=? | \>\=?|[!=]\=\=?|<as>\??|[-*+/%]\=?|[!&|]" + +syn keyword ktTodo TODO FIXME XXX contained +syn match ktShebang "\v^#!.*$" +syn match ktLineComment "\v//.*$" contains=ktTodo,@Spell +syn region ktComment matchgroup=ktCommentMatchGroup start="/\*" end="\*/" contains=ktComment,ktTodo,@Spell + +syn region ktDocComment start="/\*\*" end="\*/" contains=ktDocTag,ktTodo,@Spell +syn match ktDocTag "\v\@(author|constructor|receiver|return|since|suppress)>" contained +syn match ktDocTag "\v\@(exception|param|property|throws|see|sample)>\s*\S+" contains=ktDocTagParam contained +syn match ktDocTagParam "\v(\s|\[)\S+" contained +syn match ktComment "/\*\*/" + +syn match ktSpecialCharError "\v\\." contained +syn match ktSpecialChar "\v\\([tbnr'"$\\]|u\x{4})" contained +syn region ktString start='"' skip='\\"' end='"' contains=ktSimpleInterpolation,ktComplexInterpolation,ktSpecialChar,ktSpecialCharError,@Spell +syn region ktString start='"""' end='""""*' contains=ktSimpleInterpolation,ktComplexInterpolation,@Spell +syn match ktCharacter "\v'[^']*'" contains=ktSpecialChar,ktSpecialCharError +syn match ktCharacter "\v'\\''" contains=ktSpecialChar +syn match ktCharacter "\v'[^\\]'" + +syn match ktAnnotation "\v(\w)@<!\@[[:alnum:]_.]*(:[[:alnum:]_.]*)?" +syn match ktLabel "\v\w+\@" +syn match ktLabel "\v(\w)@<=\@\w+" + +syn match ktSimpleInterpolation "\v\$\h\w*" contained +syn region ktComplexInterpolation matchgroup=ktComplexInterpolationBrace start="\v\$\{" end="\v\}" contains=ALLBUT,ktSimpleInterpolation,ktTodo,ktSpecialCharError,ktSpecialChar,ktDocTag,ktDocTagParam + +syn match ktNumber "\v<\d+[_[:digit:]]*(uL?|UL?|[LFf])?" +syn match ktNumber "\v<0[Xx]\x+[_[:xdigit:]]*(uL?|UL?|L)?" +syn match ktNumber "\v<0[Bb][01]+[_01]*(uL?|UL?|L)?" +syn match ktFloat "\v<\d*(\d[eE][-+]?\d+|\.\d+([eE][-+]?\d+)?)[Ff]?" + +syn match ktEscapedName "\v`.*`" + +syn match ktExclExcl "!!" +syn match ktArrow "->" + +syn region ktFold start="{" end="}" transparent fold + +exec "syntax sync ccomment ktComment minlines=10" + +hi def link ktStatement Statement +hi def link ktConditional Conditional +hi def link ktRepeat Repeat +hi def link ktOperator Operator +hi def link ktKeyword Keyword +hi def link ktException Exception +hi def link ktReservedKeyword Error + +hi def link ktInclude Include + +hi def link ktType Type +hi def link ktModifier StorageClass +hi def link ktStructure Structure +hi def link ktTypedef Typedef + +hi def link ktBoolean Boolean +hi def link ktConstant Constant + +hi def link ktTodo Todo +hi def link ktShebang Comment +hi def link ktLineComment Comment +hi def link ktComment Comment +hi def link ktCommentMatchGroup Comment +hi def link ktDocComment Comment +hi def link ktDocTag Special +hi def link ktDocTagParam Identifier + +hi def link ktSpecialChar SpecialChar +hi def link ktSpecialCharError Error +hi def link ktString String +hi def link ktCharacter Character + +hi def link ktAnnotation Identifier +hi def link ktLabel Identifier + +hi def link ktSimpleInterpolation Identifier +hi def link ktComplexInterpolationBrace Identifier + +hi def link ktNumber Number +hi def link ktFloat Float + +hi def link ktExclExcl Special +hi def link ktArrow Structure + +let b:current_syntax = 'kotlin' + +" vim:foldmethod=marker diff --git a/runtime/syntax/krl.vim b/runtime/syntax/krl.vim index a50790841e..6808a48fc4 100644 --- a/runtime/syntax/krl.vim +++ b/runtime/syntax/krl.vim @@ -2,7 +2,7 @@ " Language: Kuka Robot Language " Maintainer: Patrick Meiser-Knosowski <knosowski@graeffrobotics.de> " Version: 3.0.0 -" Last Change: 18. Apr 2022 +" Last Change: 22. Jun 2023 " Credits: Thanks for contributions to this to Michael Jagusch " Thanks for beta testing to Thomas Baginski " @@ -109,11 +109,11 @@ highlight default link krlGeomOperator Operator " Type, StorageClass and Typedef {{{ " Simple data types -syn keyword krlType bool char real int containedin=krlAnyType +syn keyword krlType bool char real int " External program and function -syn keyword krlType ext extfct extfctp extp containedin=krlAnyType +syn keyword krlType ext extfct extfctp extp " Communication -syn keyword krlType signal channel containedin=krlAnyType +syn keyword krlType signal channel highlight default link krlType Type " StorageClass syn keyword krlStorageClass decl global const struc enum @@ -200,19 +200,20 @@ syn keyword krlEnum adap_acc model_type control_parameter eko_mode " " Predefined structures and enums found in /steu/mada/$custom.dat syn keyword krlStructure pro_io_t ser ext_mod_t coop_krc ws_config bin_type coop_update_t ldc_reaction -syn keyword krlEnum axis_of_coordinates spline_para_variant target_status cp_vel_type cp_statmon +syn keyword krlEnum axis_of_coordinates motion_mode spline_para_variant spreadstartpolicy target_status cp_vel_type cp_statmon " " Predefined structures and enums found in /steu/mada/$machine.dat syn keyword krlStructure emstop_path boxstatesafein boxstatesafeout syn keyword krlEnum digincode " " Predefined structures and enums found in /steu/mada/$option.dat -syn keyword krlStructure msg_t +syn keyword krlStructure installed_motion_modes msg_t +syn keyword krlEnum step_enum " syn keyword krlEnum " " Predefined structures and enums found in /r1/system/$config.dat " BasisTech -syn keyword krlStructure dig_out_type ctrl_in_t ctrl_out_t fct_out_t fct_in_t odat basis_sugg_t out_sugg_t md_state machine_def_t machine_tool_t machine_frame_t trigger_para constvel_para condstop_para adat tm_sugg_t tqm_tqdat_t sps_prog_type +syn keyword krlStructure dig_out_type ctrl_in_t ctrl_out_t fct_out_t fct_in_t odat hdat basis_sugg_t out_sugg_t md_state machine_def_t machine_tool_t machine_frame_t trigger_para constvel_para condstop_para adat tm_sugg_t tqm_tqdat_t sps_prog_type syn keyword krlEnum bas_command out_modetype ipo_m_t apo_mode_t funct_type p00_command timer_actiontype " " GripperTech @@ -271,7 +272,9 @@ highlight default link krlStatement Statement syn keyword krlConditional if then else endif switch case default endswitch skip endskip highlight default link krlConditional Conditional " Repeat -syn keyword krlRepeat for to step endfor while endwhile repeat until loop endloop exit +syn keyword krlRepeat for to endfor while endwhile repeat until loop endloop exit +" STEP is used as variable in VKRC, this pattern should match STEP -, 5(constant number) or VAR +syn match krlRepeat /\v\cstep\s+%(-|\w)/me=e-1 highlight default link krlRepeat Repeat " Label syn keyword krlLabel goto @@ -390,7 +393,7 @@ if get(g:, 'krlShowError', 1) " some more or less common typos " " vars or funcs >24 chars are not possible in krl. a234567890123456789012345 - syn match krlError0 /\w\{25,}/ containedin=krlFunction,krlNames,krlLabel,krlAnyType,krlEnumVal,krlSysvars + syn match krlError0 /\w\{25,}/ containedin=krlFunction,krlNames,krlLabel,krlEnumVal,krlSysvars " " should be interrupt (on|off) \w+ syn match krlError1 /\vinterrupt[ \t(]+[_$a-zA-Z0-9]+[_$a-zA-Z0-9.\[\]()+\-*/]*[ \t)]+o%(n|ff)>/ diff --git a/runtime/syntax/lc.vim b/runtime/syntax/lc.vim new file mode 100644 index 0000000000..a334529385 --- /dev/null +++ b/runtime/syntax/lc.vim @@ -0,0 +1,31 @@ +" Vim syntax file +" Language: Elsa +" Maintainer: Miles Glapa-Grossklag <miles@glapa-grossklag.com> +" Last Change: 2023-01-29 + +if exists('b:current_syntax') + finish +endif + +" Keywords +syntax keyword elsaKeyword let eval +syntax match elsaKeyword "\v:" +highlight link elsaKeyword Keyword + +" Comments +setlocal commentstring=--%s +syntax match elsaComment "\v--.*$" +highlight link elsaComment Comment + +" Operators +syntax match elsaOperator "\v\=" +syntax match elsaOperator "\v\=[abd*~]\>" +syntax match elsaOperator "\v-\>" +syntax match elsaOperator "\v\\" +highlight link elsaOperator Operator + +" Definitions +syntax match elsaConstant "\v[A-Z]+[A-Z_0-9]*" +highlight link elsaConstant Constant + +let b:current_syntax = 'elsa' diff --git a/runtime/syntax/ld.vim b/runtime/syntax/ld.vim index 6a117ee87b..7ac050131b 100644 --- a/runtime/syntax/ld.vim +++ b/runtime/syntax/ld.vim @@ -2,6 +2,7 @@ " Language: ld(1) script " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2006-04-19 +" Last Change: 2023 Apr 19 if exists("b:current_syntax") finish @@ -43,7 +44,7 @@ syn match ldSpecial '/DISCARD/' syn keyword ldIdentifier ORIGIN LENGTH syn match ldSpecSections '\.' -syn match ldSections '\.\S\+' +syn match ldSections '\.[^ \t)]\+' syn match ldSpecSections '\.\%(text\|data\|bss\|symver\)\>' syn match ldNumber display '\<0[xX]\x\+\>' diff --git a/runtime/syntax/lite.vim b/runtime/syntax/lite.vim index a8d26892d4..f6e41e7e18 100644 --- a/runtime/syntax/lite.vim +++ b/runtime/syntax/lite.vim @@ -5,7 +5,7 @@ " Email: Subject: send syntax_vim.tgz " Last Change: 2001 Mai 01 " -" Options lite_sql_query = 1 for SQL syntax highligthing inside strings +" Options lite_sql_query = 1 for SQL syntax highlighting inside strings " lite_minlines = x to sync at least x lines backwards " quit when a syntax file was already loaded diff --git a/runtime/syntax/livebook.vim b/runtime/syntax/livebook.vim new file mode 100644 index 0000000000..133cab01e3 --- /dev/null +++ b/runtime/syntax/livebook.vim @@ -0,0 +1,8 @@ +" Placeholder Livebook syntax file. +" This simply uses the markdown syntax. + +if exists("b:current_syntax") + finish +endif + +runtime! syntax/markdown.vim diff --git a/runtime/syntax/logtalk.vim b/runtime/syntax/logtalk.vim index a7fe9ce925..bc70ef41b4 100644 --- a/runtime/syntax/logtalk.vim +++ b/runtime/syntax/logtalk.vim @@ -330,7 +330,7 @@ syn match logtalkKeyword "\<t\(an\|runcate\)\ze(" syn match logtalkKeyword "\<ceiling\ze(" -" Other arithemtic functors +" Other arithmetic functors syn match logtalkOperator "\*\*" syn match logtalkKeyword "\<s\(in\|qrt\)\ze(" diff --git a/runtime/syntax/lss.vim b/runtime/syntax/lss.vim index 6ee717bcb4..eceaf75674 100644 --- a/runtime/syntax/lss.vim +++ b/runtime/syntax/lss.vim @@ -9,7 +9,7 @@ if exists("b:current_syntax") endif " This setup is probably atypical for a syntax highlighting file, because -" most of it is not really intended to be overrideable. Instead, the +" most of it is not really intended to be overridable. Instead, the " highlighting is supposed to correspond to the highlighting specified by " the .lss file entries themselves; ie. the "bold" keyword should be bold, " the "red" keyword should be red, and so forth. The exceptions to this diff --git a/runtime/syntax/luau.vim b/runtime/syntax/luau.vim new file mode 100644 index 0000000000..59eccac100 --- /dev/null +++ b/runtime/syntax/luau.vim @@ -0,0 +1,15 @@ +" Vim syntax file +" Language: Luau +" Maintainer: None yet +" Last Change: 2023 Apr 30 + +if exists("b:current_syntax") + finish +endif + +" Luau is a superset of lua +runtime! syntax/lua.vim + +let b:current_syntax = "luau" + +" vim: nowrap sw=2 sts=2 ts=8 noet: diff --git a/runtime/syntax/lynx.vim b/runtime/syntax/lynx.vim index fa7c26f629..fcaf923ebe 100644 --- a/runtime/syntax/lynx.vim +++ b/runtime/syntax/lynx.vim @@ -1,9 +1,9 @@ " Vim syntax file -" Language: Lynx configuration file (lynx.cfg) +" Language: Lynx Web Browser Configuration (lynx.cfg) " Maintainer: Doug Kearns <dougkearns@gmail.com> -" Last Change: 2013 Jun 20 +" Last Change: 2023 Nov 09 -" Lynx 2.8.7 +" Lynx 2.8.9 if exists("b:current_syntax") finish @@ -12,34 +12,35 @@ endif let s:cpo_save = &cpo set cpo&vim -syn match lynxStart "^" transparent skipwhite nextgroup=lynxOption +syn match lynxStart "^" skipwhite nextgroup=lynxOption -syn match lynxComment "\(^\|\s\+\)#.*$" contains=lynxTodo +syn match lynxComment "\%(^\|\s\+\)#.*" contains=lynxTodo syn keyword lynxTodo TODO NOTE FIXME XXX contained -syn match lynxDelimiter ":" skipwhite nextgroup=lynxBoolean,lynxNumber,lynxNone,lynxRCOption +syn match lynxDelimiter ":" skipwhite nextgroup=lynxBoolean,lynxHttpProtocol,lynxNumber,lynxNone,lynxRCOption syn case ignore syn keyword lynxBoolean TRUE FALSE ON OFF contained -syn keyword lynxNone NONE contained +syn keyword lynxNone NONE contained syn case match -syn match lynxNumber "-\=\<\d\+\>" contained +syn match lynxNumber "-\=\<\d\+\>" contained +syn match lynxHttpProtocol "\<1\.[01]\>" contained "{{{ Options syn case ignore -syn keyword lynxOption ACCEPT_ALL_COOKIES ALERTSECS ALWAYS_RESUBMIT_POSTS - \ ALWAYS_TRUSTED_EXEC ANONFTP_PASSWORD ASSUMED_COLOR - \ ASSUMED_DOC_CHARSET_CHOICE ASSUME_CHARSET ASSUME_LOCAL_CHARSET - \ ASSUME_UNREC_CHARSET AUTO_SESSION AUTO_UNCACHE_DIRLISTS BAD_HTML - \ BIBP_BIBHOST BIBP_GLOBAL_SERVER BLOCK_MULTI_BOOKMARKS BOLD_H1 - \ BOLD_HEADERS BOLD_NAME_ANCHORS BOOKMARK_FILE BROKEN_FTP_EPSV - \ BROKEN_FTP_RETR BZIP2_PATH CASE_SENSITIVE_ALWAYS_ON - \ CASE_SENSITIVE_SEARCHING CHARACTER_SET CHARSETS_DIRECTORY - \ CHARSET_SWITCH_RULES CHECKMAIL CHMOD_PATH COLLAPSE_BR_TAGS COLOR - \ COLOR_STYLE COMPRESS_PATH CONNECT_TIMEOUT COOKIE_ACCEPT_DOMAINS - \ COOKIE_FILE COOKIE_LOOSE_INVALID_DOMAINS +syn keyword lynxOption ACCEPT_ALL_COOKIES ALERTSECS + \ ALWAYS_RESUBMIT_POSTS ALWAYS_TRUSTED_EXEC ANONFTP_PASSWORD + \ ASSUMED_COLOR ASSUMED_DOC_CHARSET_CHOICE ASSUME_CHARSET + \ ASSUME_LOCAL_CHARSET ASSUME_UNREC_CHARSET AUTO_SESSION + \ AUTO_UNCACHE_DIRLISTS BAD_HTML BIBP_BIBHOST BIBP_GLOBAL_SERVER + \ BLOCK_MULTI_BOOKMARKS BOLD_H1 BOLD_HEADERS BOLD_NAME_ANCHORS + \ BOOKMARK_FILE BROKEN_FTP_EPSV BROKEN_FTP_RETR BZIP2_PATH + \ CASE_SENSITIVE_ALWAYS_ON CASE_SENSITIVE_SEARCHING CHARACTER_SET + \ CHARSETS_DIRECTORY CHARSET_SWITCH_RULES CHECKMAIL CHMOD_PATH + \ COLLAPSE_BR_TAGS COLOR COLOR_STYLE COMPRESS_PATH CONNECT_TIMEOUT + \ COOKIE_ACCEPT_DOMAINS COOKIE_FILE COOKIE_LOOSE_INVALID_DOMAINS \ COOKIE_QUERY_INVALID_DOMAINS COOKIE_REJECT_DOMAINS COOKIE_SAVE_FILE \ COOKIE_STRICT_INVALID_DOMAINS COPY_PATH CSO_PROXY CSWING_PATH \ DEBUGSECS DEFAULT_BOOKMARK_FILE DEFAULT_CACHE_SIZE DEFAULT_COLORS @@ -97,35 +98,45 @@ syn keyword lynxOption ACCEPT_ALL_COOKIES ALERTSECS ALWAYS_RESUBMIT_POSTS \ USE_FIXED_RECORDS USE_MOUSE USE_SELECT_POPUPS UUDECODE_PATH \ VERBOSE_IMAGES VIEWER VISITED_LINKS VI_KEYS VI_KEYS_ALWAYS_ON \ WAIS_PROXY XHTML_PARSING XLOADIMAGE_COMMAND ZCAT_PATH ZIP_PATH + \ TRIM_BLANK_LINES GUESS_SCHEME HTTP_PROTOCOL HTML5_CHARSETS + \ TRIM_BLANK_LINES PREFERRED_CONTENT_TYPE SSL_CLIENT_CERT_FILE + \ SSL_CLIENT_KEY_FILE MAX_URI_SIZE UNIQUE_URLS MESSAGE_LANGUAGE + \ CONV_JISX0201KANA WAIT_VIEWER_TERMINATION BLAT_MAIL ALT_BLAT_MAIL + \ DONT_WRAP_PRE TRACK_INTERNAL_LINKS FORCE_HTML HIDDENLINKS SHORT_URL + \ LISTONLY LIST_INLINE LOCALHOST WITH_BACKSPACES \ contained nextgroup=lynxDelimiter syn keyword lynxRCOption accept_all_cookies assume_charset auto_session \ bookmark_file case_sensitive_searching character_set - \ cookie_accept_domains cookie_file cookie_loose_invalid_domains - \ cookie_query_invalid_domains cookie_reject_domains + \ collapse_br_tags cookie_accept_domains cookie_file + \ cookie_loose_invalid_domains cookie_query_invalid_domains + \ cookie_reject_domains cookie_strict_invalid_domain \ cookie_strict_invalid_domains dir_list_style display emacs_keys \ file_editor file_sorting_method force_cookie_prompt force_ssl_prompt - \ ftp_passive kblayout keypad_mode lineedit_mode locale_charset - \ make_links_for_all_images make_pseudo_alts_for_inlines - \ multi_bookmark no_pause personal_mail_address preferred_charset - \ preferred_encoding preferred_language preferred_media_types raw_mode - \ run_all_execution_links run_execution_links_on_local_files scrollbar - \ select_popups send_useragent session_file set_cookies show_color - \ show_cursor show_dotfiles show_kb_rate sub_bookmarks tagsoup - \ underline_links user_mode useragent verbose_images vi_keys - \ visited_links + \ ftp_passive html5_charsets http_protocol kblayout keypad_mode + \ lineedit_mode locale_charset make_links_for_all_images + \ make_pseudo_alts_for_inlines multi_bookmark no_pause + \ personal_mail_address preferred_charset preferred_encoding + \ preferred_language preferred_media_types raw_mode + \ run_all_execution_links run_execution_links_local + \ run_execution_links_on_local_files scrollbar select_popups + \ send_useragent session_file set_cookies show_color show_cursor + \ show_dotfiles show_kb_rate sub_bookmarks tagsoup underline_links + \ useragent user_mode verbose_images vi_keys visited_links \ contained nextgroup=lynxDelimiter syn case match " }}} " cfg2html.pl formatting directives syn match lynxFormatDir "^\.h\d\s.*$" -syn match lynxFormatDir "^\.\(ex\|nf\)\(\s\+\d\+\)\=$" +syn match lynxFormatDir "^\.\%(ex\|nf\)\%(\s\+\d\+\)\=$" syn match lynxFormatDir "^\.fi$" +syn match lynxFormatDir "^\.url\>" hi def link lynxBoolean Boolean hi def link lynxComment Comment hi def link lynxDelimiter Special hi def link lynxFormatDir Special +hi def link lynxHttpProtocol Constant hi def link lynxNone Constant hi def link lynxNumber Number hi def link lynxOption Identifier @@ -137,4 +148,4 @@ let b:current_syntax = "lynx" let &cpo = s:cpo_save unlet s:cpo_save -" vim: ts=8 fdm=marker: +" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker: diff --git a/runtime/syntax/manual.vim b/runtime/syntax/manual.vim index c0e53fa7b4..8388336f25 100644 --- a/runtime/syntax/manual.vim +++ b/runtime/syntax/manual.vim @@ -1,6 +1,7 @@ " Vim syntax support file -" Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2016 Feb 01 +" Maintainer: The Vim Project <https://github.com/vim/vim> +" Last Change: 2023 Aug 10 +" Former Maintainer: Bram Moolenaar <Bram@vim.org> " This file is used for ":syntax manual". " It installs the Syntax autocommands, but no the FileType autocommands. diff --git a/runtime/syntax/masm.vim b/runtime/syntax/masm.vim index 3be0fd45d1..85e457106d 100644 --- a/runtime/syntax/masm.vim +++ b/runtime/syntax/masm.vim @@ -2,7 +2,7 @@ " Language: Microsoft Macro Assembler (80x86) " Orig Author: Rob Brady <robb@datatone.com> " Maintainer: Wu Yongwei <wuyongwei@gmail.com> -" Last Change: 2022-04-24 20:07:04 +0800 +" Last Change: 2023-09-09 20:48:26 +0800 " Quit when a syntax file was already loaded if exists("b:current_syntax") @@ -194,8 +194,8 @@ syn keyword masmRegister R8W R9W R10W R11W R12W R13W R14W R15W syn keyword masmRegister R8B R9B R10B R11B R12B R13B R14B R15B " SSE/AVX registers -syn match masmRegister "\(X\|Y\)MM[0-9]\>" -syn match masmRegister "\(X\|Y\)MM1[0-5]\>" +syn match masmRegister "\(X\|Y\|Z\)MM[12]\?[0-9]\>" +syn match masmRegister "\(X\|Y\|Z\)MM3[01]\>" " Instruction prefixes syn keyword masmOpcode LOCK REP REPE REPNE REPNZ REPZ @@ -338,11 +338,192 @@ syn keyword masmOpcode VINSERTF128 VEXTRACTF128 VMASKMOVPS VMASKMOVPD syn keyword masmOpcode VPERMILPS VPERMILPD VPERM2F128 syn keyword masmOpcode VZEROALL VZEROUPPER +" AVX-2 (Haswell and later) +syn keyword masmOpcode VPBROADCASTB VPBROADCASTW VPBROADCASTD +syn keyword masmOpcode VPBROADCASTQ VBROADCASTI128 +syn keyword masmOpcode VINSERTI128 VEXTRACTI128 +syn keyword masmOpcode VGATHERDPD VGATHERQPD VGATHERDPS VGATHERQPS +syn keyword masmOpcode VPGATHERDD VPGATHERDQ VPGATHERQD VPGATHERQQ +syn keyword masmOpcode VPMASKMOVD VPMASKMOVQ +syn keyword masmOpcode PERMPS VPERMD VPERMPD VPERMQ VPERM2I128 +syn keyword masmOpcode VPBLENDD VPSLLVD VPSLLVQ VPSRLVD VPSRLVQ +syn keyword masmOpcode VPSRAVD + +" AVX-512 (Knights Landing/Skylake-X and later) +syn keyword masmOpcode KAND KANDN KMOV KUNPCK KNOT KOR KORTEST +syn keyword masmOpcode KSHIFTL KSHIFTR KXNOR KXOR KADD KTEST +syn keyword masmOpcode VBLENDMPD VBLENDMPS +syn keyword masmOpcode VPBLENDMD VPBLENDMQ VPBLENDMB VPBLENDMW +syn keyword masmOpcode VPCMPD VPCMPUD VPCMPQ VPCMPUQ +syn keyword masmOpcode VPCMPB VPCMPUB VPCMPW VPCMPUW +syn keyword masmOpcode VPTESTMD VPTESTMQ VPTESTNMD VPTESTNMQ +syn keyword masmOpcode VPTESTMB VPTESTMW VPTESTNMB VPTESTNMW +syn keyword masmOpcode VCOMPRESSPD VCOMPRESSPS VPCOMPRESSD VPCOMPRESSQ +syn keyword masmOpcode VEXPANDPD VEXPANDPS VPEXPANDD VPEXPANDQ +syn keyword masmOpcode VPERMB VPERMW VPERMT2B VPERMT2W VPERMI2PD +syn keyword masmOpcode VPERMI2PS VPERMI2D VPERMI2Q VPERMI2B VPERMI2W +syn keyword masmOpcode VPERMT2PS VPERMT2PD VPERMT2D VPERMT2Q +syn keyword masmOpcode VSHUFF32x4 VSHUFF64x2 VSHUFI32x4 VSHUFI64x2 +syn keyword masmOpcode VPMULTISHIFTQB VPTERNLOGD VPTERNLOGQ +syn keyword masmOpcode VPMOVQD VPMOVSQD VPMOVUSQD VPMOVQW VPMOVSQW +syn keyword masmOpcode VPMOVUSQW VPMOVQB VPMOVSQB VPMOVUSQB VPMOVDW +syn keyword masmOpcode VPMOVSDW VPMOVUSDW VPMOVDB VPMOVSDB VPMOVUSDB +syn keyword masmOpcode VPMOVWB VPMOVSWB VPMOVUSWB +syn keyword masmOpcode VCVTPS2UDQ VCVTPD2UDQ VCVTTPS2UDQ VCVTTPD2UDQ +syn keyword masmOpcode VCVTSS2USI VCVTSD2USI VCVTTSS2USI VCVTTSD2USI +syn keyword masmOpcode VCVTPS2QQ VCVTPD2QQ VCVTPS2UQQ VCVTPD2UQQ +syn keyword masmOpcode VCVTTPS2QQ VCVTTPD2QQ VCVTTPS2UQQ VCVTTPD2UQQ +syn keyword masmOpcode VCVTUDQ2PS VCVTUDQ2PD VCVTUSI2PS VCVTUSI2PD +syn keyword masmOpcode VCVTUSI2SD VCVTUSI2SS VCVTUQQ2PS VCVTUQQ2PD +syn keyword masmOpcode VCVTQQ2PD VCVTQQ2PS VGETEXPPD +syn keyword masmOpcode VGETEXPPS VGETEXPSD VGETEXPSS +syn keyword masmOpcode VGETMANTPD VGETMANTPS VGETMANTSD VGETMANTSS +syn keyword masmOpcode VFIXUPIMMPD VFIXUPIMMPS VFIXUPIMMSD VFIXUPIMMSS +syn keyword masmOpcode VRCP14PD VRCP14PS VRCP14SD VRCP14SS +syn keyword masmOpcode VRNDSCALEPS VRNDSCALEPD VRNDSCALESS VRNDSCALESD +syn keyword masmOpcode VRSQRT14PD VRSQRT14PS VRSQRT14SD VRSQRT14SS +syn keyword masmOpcode VSCALEFPS VSCALEFPD VSCALEFSS VSCALEFSD +syn keyword masmOpcode VBROADCASTI32X2 VBROADCASTI32X4 VBROADCASTI32X8 +syn keyword masmOpcode VBROADCASTI64X2 VBROADCASTI64X4 +syn keyword masmOpcode VALIGND VALIGNQ VDBPSADBW VPABSQ VPMAXSQ +syn keyword masmOpcode VPMAXUQ VPMINSQ VPMINUQ VPROLD VPROLVD VPROLQ +syn keyword masmOpcode VPROLVQ VPRORD VPRORVD VPRORQ VPRORVQ +syn keyword masmOpcode VPSCATTERDD VPSCATTERDQ VPSCATTERQD VPSCATTERQQ +syn keyword masmOpcode VSCATTERDPS VSCATTERDPD VSCATTERQPS VSCATTERQPD +syn keyword masmOpcode VPCONFLICTD VPCONFLICTQ VPLZCNTD VPLZCNTQ +syn keyword masmOpcode VPBROADCASTMB2Q VPBROADCASTMW2D +syn keyword masmOpcode VEXP2PD VEXP2PS +syn keyword masmOpcode VRCP28PD VRCP28PS VRCP28SD VRCP28SS +syn keyword masmOpcode VRSQRT28PD VRSQRT28PS VRSQRT28SD VRSQRT28SS +syn keyword masmOpcode VGATHERPF0DPS VGATHERPF0QPS VGATHERPF0DPD +syn keyword masmOpcode VGATHERPF0QPD VGATHERPF1DPS VGATHERPF1QPS +syn keyword masmOpcode VGATHERPF1DPD VGATHERPF1QPD VSCATTERPF0DPS +syn keyword masmOpcode VSCATTERPF0QPS VSCATTERPF0DPD VSCATTERPF0QPD +syn keyword masmOpcode VSCATTERPF1DPS VSCATTERPF1QPS VSCATTERPF1DPD +syn keyword masmOpcode VSCATTERPF1QPD +syn keyword masmOpcode V4FMADDPS V4FMADDSS V4FNMADDPS V4FNMADDSS +syn keyword masmOpcode VP4DPWSSD VP4DPWSSDS +syn keyword masmOpcode VFPCLASSPS VFPCLASSPD VFPCLASSSS VFPCLASSSD +syn keyword masmOpcode VRANGEPS VRANGEPD VRANGESS VRANGESD +syn keyword masmOpcode VREDUCEPS VREDUCEPD VREDUCESS VREDUCESD +syn keyword masmOpcode VPMOVM2D VPMOVM2Q VPMOVM2B VPMOVM2W VPMOVD2M +syn keyword masmOpcode VPMOVQ2M VPMOVB2M VPMOVW2M VPMULLQ +syn keyword masmOpcode VPCOMPRESSB VPCOMPRESSW VPEXPANDB VPEXPANDW +syn keyword masmOpcode VPSHLD VPSHLDV VPSHRD VPSHRDV +syn keyword masmOpcode VPDPBUSD VPDPBUSDS VPDPWSSD VPDPWSSDS +syn keyword masmOpcode VPMADD52LUQ VPMADD52HUQ +syn keyword masmOpcode VPOPCNTD VPOPCNTQ VPOPCNTB VPOPCNTW +syn keyword masmOpcode VPSHUFBITQMB VP2INTERSECTD VP2INTERSECTQ +syn keyword masmOpcode VGF2P8AFFINEINVQB VGF2P8AFFINEQB +syn keyword masmOpcode VGF2P8MULB VPCLMULQDQ +syn keyword masmOpcode VAESDEC VAESDECLAST VAESENC VAESENCLAST +syn keyword masmOpcode VCVTNE2PS2BF16 VCVTNEPS2BF16 VDPBF16PS +syn keyword masmOpcode VADDPH VADDSH VSUBPH VSUBSH VMULPH VMULSH +syn keyword masmOpcode VDIVPH VDIVSH VSQRTPH VSQRTSH +syn keyword masmOpcode VFMADD132PH VFMADD213PH VFMADD231PH +syn keyword masmOpcode VFMADD132SH VFMADD213SH VFMADD231SH +syn keyword masmOpcode VFNMADD132PH VFNMADD213PH VFNMADD231PH +syn keyword masmOpcode VFNMADD132SH VFNMADD213SH VFNMADD231SH +syn keyword masmOpcode VFMSUB132PH VFMSUB213PH VFMSUB231PH +syn keyword masmOpcode VFMSUB132SH VFMSUB213SH VFMSUB231SH +syn keyword masmOpcode VFNMSUB132PH VFNMSUB213PH VFNMSUB231PH +syn keyword masmOpcode VFNMSUB132SH VFNMSUB213SH VFNMSUB231SH +syn keyword masmOpcode VFMADDSUB132PH VFMADDSUB213PH VFMADDSUB231PH +syn keyword masmOpcode VFMSUBADD132PH VFMSUBADD213PH VFMSUBADD231PH +syn keyword masmOpcode VREDUCEPH VREDUCESH VRNDSCALEPH VRNDSCALESH +syn keyword masmOpcode VSCALEFPH VSCALEFSH VFMULCPH VFMULCSH VFCMULCPH +syn keyword masmOpcode VFCMULCSH VFMADDCPH VFMADDCSH VFCMADDCPH +syn keyword masmOpcode VFCMADDCSH VRCPPH VRCPSH VRSQRTPH VRSQRTSH +syn keyword masmOpcode VCMPPH VCMPSH VCOMISH VUCOMISH VMAXPH VMAXSH +syn keyword masmOpcode VMINPH VMINSH VFPCLASSPH VFPCLASSSH +syn keyword masmOpcode VCVTW2PH VCVTUW2PH VCVTDQ2PH VCVTUDQ2PH +syn keyword masmOpcode VCVTQQ2PH VCVTUQQ2PH VCVTPS2PHX VCVTPD2PH +syn keyword masmOpcode VCVTSI2SH VCVTUSI2SH VCVTSS2SH VCVTSD2SH +syn keyword masmOpcode VCVTPH2W VCVTTPH2W VCVTPH2UW VCVTTPH2UW +syn keyword masmOpcode VCVTPH2DQ VCVTTPH2DQ VCVTPH2UDQ VCVTTPH2UDQ +syn keyword masmOpcode VCVTPH2QQ VCVTTPH2QQ VCVTPH2UQQ VCVTTPH2UQQ +syn keyword masmOpcode VCVTPH2PSX VCVTPH2PD VCVTSH2SI VCVTTSH2SI +syn keyword masmOpcode VCVTSH2USI VCVTTSH2USI VCVTSH2SS VCVTSH2SD +syn keyword masmOpcode VGETEXPPH VGETEXPSH VGETMANTPH VGETMANTSH +syn keyword masmOpcode VMOVSH VMOVW VADDPD VADDPS VADDSD VADDSS +syn keyword masmOpcode VANDPD VANDPS VANDNPD VANDNPS +syn keyword masmOpcode VCMPPD VCMPPS VCMPSD VCMPSS +syn keyword masmOpcode VCOMISD VCOMISS VDIVPD VDIVPS VDIVSD VDIVSS +syn keyword masmOpcode VCVTDQ2PD VCVTDQ2PS VCVTPD2DQ VCVTPD2PS +syn keyword masmOpcode VCVTPH2PS VCVTPS2PH VCVTPS2DQ VCVTPS2PD +syn keyword masmOpcode VCVTSD2SI VCVTSD2SS VCVTSI2SD VCVTSI2SS +syn keyword masmOpcode VCVTSS2SD VCVTSS2SI VCVTTPD2DQ VCVTTPS2DQ +syn keyword masmOpcode VCVTTSD2SI VCVTTSS2SI VMAXPD VMAXPS +syn keyword masmOpcode VMAXSD VMAXSS VMINPD VMINPS VMINSD VMINSS +syn keyword masmOpcode VMOVAPD VMOVAPS VMOVD VMOVQ VMOVDDUP +syn keyword masmOpcode VMOVHLPS VMOVHPD VMOVHPS VMOVLHPS VMOVLPD +syn keyword masmOpcode VMOVLPS VMOVNTDQA VMOVNTDQ VMOVNTPD VMOVNTPS +syn keyword masmOpcode VMOVSD VMOVSHDUP VMOVSLDUP VMOVSS VMOVUPD +syn keyword masmOpcode VMOVUPS VMOVDQA32 VMOVDQA64 VMOVDQU8 +syn keyword masmOpcode VMOVDQU16 VMOVDQU32 VMOVDQU64 VMULPD VMULPS +syn keyword masmOpcode VMULSD VMULSS VORPD VORPS VSQRTPD VSQRTPS +syn keyword masmOpcode VSQRTSD VSQRTSS VSUBPD VSUBPS VSUBSD VSUBSS +syn keyword masmOpcode VUCOMISD VUCOMISS VUNPCKHPD VUNPCKHPS VUNPCKLPD +syn keyword masmOpcode VUNPCKLPS VXORPD VXORPS VEXTRACTPS VINSERTPS +syn keyword masmOpcode VPEXTRB VPEXTRW VPEXTRD VPEXTRQ VPINSRB VPINSRW +syn keyword masmOpcode VPINSRD VPINSRQ VPACKSSWB VPACKSSDW VPACKUSDW +syn keyword masmOpcode VPACKUSWB VPADDB VPADDW VPADDD VPADDQ VPADDSB +syn keyword masmOpcode VPADDSW VPADDUSB VPADDUSW VPANDD VPANDQ VPANDND +syn keyword masmOpcode VPANDNQ VPAVGB VPAVGW VPCMPEQB VPCMPEQW +syn keyword masmOpcode VPCMPEQD VPCMPEQQ VPCMPGTB VPCMPGTW VPCMPGTD +syn keyword masmOpcode VPCMPGTQ VPMAXSB VPMAXSW VPMAXSD VPMAXSQ +syn keyword masmOpcode VPMAXUB VPMAXUW VPMAXUD VPMAXUQ VPMINSB VPMINSW +syn keyword masmOpcode VPMINSD VPMINSQ VPMINUB VPMINUW VPMINUD VPMINUQ +syn keyword masmOpcode VPMOVSXBW VPMOVSXBD VPMOVSXBQ VPMOVSXWD +syn keyword masmOpcode VPMOVSXWQ VPMOVSXDQ VPMOVZXBW VPMOVZXBD +syn keyword masmOpcode VPMOVZXBQ VPMOVZXWD VPMOVZXWQ VPMOVZXDQ VPMULDQ +syn keyword masmOpcode VPMULUDQ VPMULHRSW VPMULHUW VPMULHW VPMULLD +syn keyword masmOpcode VPMULLQ VPMULLW VPORD VPORQ VPSUBB VPSUBW +syn keyword masmOpcode VPSUBD VPSUBQ VPSUBSB VPSUBSW VPSUBUSB VPSUBUSW +syn keyword masmOpcode VPUNPCKHBW VPUNPCKHWD VPUNPCKHDQ VPUNPCKHQDQ +syn keyword masmOpcode VPUNPCKLBW VPUNPCKLWD VPUNPCKLDQ VPUNPCKLQDQ +syn keyword masmOpcode VPXORD VPXORQ VPSADBW VPSHUFB VPSHUFHW VPSHUFLW +syn keyword masmOpcode VPSHUFD VPSLLDQ VPSLLW VPSLLD VPSLLQ VPSRAW +syn keyword masmOpcode VPSRAD VPSRAQ VPSRLDQ VPSRLW VPSRLD VPSRLQ +syn keyword masmOpcode VPSLLVW VPSRLVW VPSHUFPD VPSHUFPS VEXTRACTF32X4 +syn keyword masmOpcode VEXTRACTF64X2 VEXTRACTF32X8 VEXTRACTF64X4 +syn keyword masmOpcode VEXTRACTI32X4 VEXTRACTI64X2 VEXTRACTI32X8 +syn keyword masmOpcode VEXTRACTI64X4 VINSERTF32x4 VINSERTF64X2 +syn keyword masmOpcode VINSERTF32X8 VINSERTF64x4 VINSERTI32X4 +syn keyword masmOpcode VINSERTI64X2 VINSERTI32X8 VINSERTI64X4 +syn keyword masmOpcode VPABSB VPABSW VPABSD VPABSQ VPALIGNR +syn keyword masmOpcode VPMADDUBSW VPMADDWD +syn keyword masmOpcode VFMADD132PD VFMADD213PD VFMADD231PD +syn keyword masmOpcode VFMADD132PS VFMADD213PS VFMADD231PS +syn keyword masmOpcode VFMADD132SD VFMADD213SD VFMADD231SD +syn keyword masmOpcode VFMADD132SS VFMADD213SS VFMADD231SS +syn keyword masmOpcode VFMADDSUB132PD VFMADDSUB213PD VFMADDSUB231PD +syn keyword masmOpcode VFMADDSUB132PS VFMADDSUB213PS VFMADDSUB231PS +syn keyword masmOpcode VFMSUBADD132PD VFMSUBADD213PD VFMSUBADD231PD +syn keyword masmOpcode VFMSUBADD132PS VFMSUBADD213PS VFMSUBADD231PS +syn keyword masmOpcode VFMSUB132PD VFMSUB213PD VFMSUB231PD +syn keyword masmOpcode VFMSUB132PS VFMSUB213PS VFMSUB231PS +syn keyword masmOpcode VFMSUB132SD VFMSUB213SD VFMSUB231SD +syn keyword masmOpcode VFMSUB132SS VFMSUB213SS VFMSUB231SS +syn keyword masmOpcode VFNMADD132PD VFNMADD213PD VFNMADD231PD +syn keyword masmOpcode VFNMADD132PS VFNMADD213PS VFNMADD231PS +syn keyword masmOpcode VFNMADD132SD VFNMADD213SD VFNMADD231SD +syn keyword masmOpcode VFNMADD132SS VFNMADD213SS VFNMADD231SS +syn keyword masmOpcode VFNMSUB132PD VFNMSUB213PD VFNMSUB231PD +syn keyword masmOpcode VFNMSUB132PS VFNMSUB213PS VFNMSUB231PS +syn keyword masmOpcode VFNMSUB132SD VFNMSUB213SD VFNMSUB231SD +syn keyword masmOpcode VFNMSUB132SS VFNMSUB213SS VFNMSUB231SS +syn keyword masmOpcode VPSRAVW VPSRAVQ + " Other opcodes in Pentium and later processors syn keyword masmOpcode CMPXCHG8B CPUID UD2 syn keyword masmOpcode RSM RDMSR WRMSR RDPMC RDTSC SYSENTER SYSEXIT syn match masmOpcode "CMOV\(P[EO]\|\(N\?\([ABGL]E\?\|[CEOPSZ]\)\)\)\>" +" Not really used by MASM, but useful for viewing GCC-generated assembly code +" in Intel syntax +syn match masmHexadecimal "[-+]\?0[Xx]\x*" +syn keyword masmOpcode MOVABS " The default highlighting hi def link masmLabel PreProc diff --git a/runtime/syntax/meson.vim b/runtime/syntax/meson.vim index 0af0d776f8..4eaf696322 100644 --- a/runtime/syntax/meson.vim +++ b/runtime/syntax/meson.vim @@ -3,7 +3,7 @@ " License: VIM License " Maintainer: Nirbheek Chauhan <nirbheek.chauhan@gmail.com> " Liam Beguin <liambeguin@gmail.com> -" Last Change: 2021 Aug 16 +" Last Change: 2023 May 27 " Credits: Zvezdan Petkovic <zpetkovic@acm.org> " Neil Schemenauer <nas@meson.ca> " Dmitry Vasiliev @@ -68,6 +68,7 @@ syn keyword mesonBuiltin \ add_global_link_arguments \ add_languages \ add_project_arguments + \ add_project_dependencies \ add_project_link_arguments \ add_test_setup \ alias_target @@ -99,6 +100,7 @@ syn keyword mesonBuiltin \ install_headers \ install_man \ install_subdir + \ install_symlink \ install_emptydir \ is_disabler \ is_variable @@ -115,6 +117,7 @@ syn keyword mesonBuiltin \ shared_library \ shared_module \ static_library + \ structured_sources \ subdir \ subdir_done \ subproject @@ -125,6 +128,7 @@ syn keyword mesonBuiltin \ vcs_tag \ warning \ range + \ debug if exists("meson_space_error_highlight") " trailing whitespace @@ -146,7 +150,7 @@ hi def link mesonEscape Special hi def link mesonNumber Number hi def link mesonBuiltin Function hi def link mesonBoolean Boolean -if exists("meson_space_error_higlight") +if exists("meson_space_error_highlight") hi def link mesonSpaceError Error endif diff --git a/runtime/syntax/model.vim b/runtime/syntax/model.vim index 5f3b7f8721..2df380c629 100644 --- a/runtime/syntax/model.vim +++ b/runtime/syntax/model.vim @@ -1,10 +1,11 @@ " Vim syntax file " Language: Model -" Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2005 Jun 20 +" Maintainer: The Vim Project <https://github.com/vim/vim> +" Last Change: 2023 Aug 10 +" Former Maintainer: Bram Moolenaar <Bram@vim.org> " very basic things only (based on the vgrindefs file). -" If you use this language, please improve it, and send me the patches! +" If you use this language, please improve it, and send patches! " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") diff --git a/runtime/syntax/modula3.vim b/runtime/syntax/modula3.vim index 390a1a90ff..67243db600 100644 --- a/runtime/syntax/modula3.vim +++ b/runtime/syntax/modula3.vim @@ -84,9 +84,7 @@ syn case ignore let s:digits = "0123456789ABCDEF" for s:radix in range(2, 16) - " Nvim does not support interpolated strings yet. - " exe $'syn match modula3Integer "\<{s:radix}_[{s:digits[:s:radix - 1]}]\+L\=\>"' - exe 'syn match modula3Integer "\<' .. s:radix .. '_[' .. s:digits[:s:radix - 1] .. ']\+L\=\>"' + exe $'syn match modula3Integer "\<{s:radix}_[{s:digits[:s:radix - 1]}]\+L\=\>"' endfor unlet s:digits s:radix diff --git a/runtime/syntax/mojo.vim b/runtime/syntax/mojo.vim new file mode 100644 index 0000000000..b7dae24a15 --- /dev/null +++ b/runtime/syntax/mojo.vim @@ -0,0 +1,316 @@ +" Vim syntax file +" Language: Mojo +" Maintainer: Mahmoud Abduljawad <me@mahmoudajawad.com> +" Last Change: 2023 Sep 09 +" Credits: Mahmoud Abduljawad <me@mahmoudajawad.com> +" Neil Schemenauer <nas@python.ca> +" Dmitry Vasiliev +" +" This is based on Vim Python highlighting +" +" - introduced highlighting of doctests +" - updated keywords, built-ins, and exceptions +" - corrected regular expressions for +" +" * functions +" * decorators +" * strings +" * escapes +" * numbers +" * space error +" +" - corrected synchronization +" - more highlighting is ON by default, except +" - space error highlighting is OFF by default +" +" Optional highlighting can be controlled using these variables. +" +" let mojo_no_builtin_highlight = 1 +" let mojo_no_doctest_code_highlight = 1 +" let mojo_no_doctest_highlight = 1 +" let mojo_no_exception_highlight = 1 +" let mojo_no_number_highlight = 1 +" let mojo_space_error_highlight = 1 +" +" All the options above can be switched on together. +" +" let mojo_highlight_all = 1 +" +" The use of Python 2 compatible syntax highlighting can be enforced. +" The straddling code (Python 2 and 3 compatible), up to Python 3.5, +" will be also supported. +" +" let mojo_use_python2_syntax = 1 +" +" This option will exclude all modern Python 3.6 or higher features. +" + +" quit when a syntax file was already loaded. +if exists("b:current_syntax") + finish +endif + +" We need nocompatible mode in order to continue lines with backslashes. +" Original setting will be restored. +let s:cpo_save = &cpo +set cpo&vim + +if exists("mojo_no_doctest_highlight") + let mojo_no_doctest_code_highlight = 1 +endif + +if exists("mojo_highlight_all") + if exists("mojo_no_builtin_highlight") + unlet mojo_no_builtin_highlight + endif + if exists("mojo_no_doctest_code_highlight") + unlet mojo_no_doctest_code_highlight + endif + if exists("mojo_no_doctest_highlight") + unlet mojo_no_doctest_highlight + endif + if exists("mojo_no_exception_highlight") + unlet mojo_no_exception_highlight + endif + if exists("mojo_no_number_highlight") + unlet mojo_no_number_highlight + endif + let mojo_space_error_highlight = 1 +endif + +" These keywords are based on Python syntax highlight, and adds to it struct, +" fn, alias, var, let +" +syn keyword mojoStatement False None True +syn keyword mojoStatement as assert break continue del global +syn keyword mojoStatement lambda nonlocal pass return with yield +syn keyword mojoStatement class def nextgroup=mojoFunction skipwhite +syn keyword mojoStatement struct fn nextgroup=mojoFunction skipwhite +syn keyword mojoStatement alias var let +syn keyword mojoConditional elif else if +syn keyword mojoRepeat for while +syn keyword mojoOperator and in is not or +syn keyword mojoException except finally raise try +syn keyword mojoInclude from import +syn keyword mojoAsync async await + +" Soft keywords +" These keywords do not mean anything unless used in the right context. +" See https://docs.python.org/3/reference/lexical_analysis.html#soft-keywords +" for more on this. +syn match mojoConditional "^\s*\zscase\%(\s\+.*:.*$\)\@=" +syn match mojoConditional "^\s*\zsmatch\%(\s\+.*:\s*\%(#.*\)\=$\)\@=" + +" Decorators +" A dot must be allowed because of @MyClass.myfunc decorators. +syn match mojoDecorator "@" display contained +syn match mojoDecoratorName "@\s*\h\%(\w\|\.\)*" display contains=pythonDecorator + +" Python 3.5 introduced the use of the same symbol for matrix multiplication: +" https://www.python.org/dev/peps/pep-0465/. We now have to exclude the +" symbol from highlighting when used in that context. +" Single line multiplication. +syn match mojoMatrixMultiply + \ "\%(\w\|[])]\)\s*@" + \ contains=ALLBUT,mojoDecoratorName,mojoDecorator,mojoFunction,mojoDoctestValue + \ transparent +" Multiplication continued on the next line after backslash. +syn match mojoMatrixMultiply + \ "[^\\]\\\s*\n\%(\s*\.\.\.\s\)\=\s\+@" + \ contains=ALLBUT,mojoDecoratorName,mojoDecorator,mojoFunction,mojoDoctestValue + \ transparent +" Multiplication in a parenthesized expression over multiple lines with @ at +" the start of each continued line; very similar to decorators and complex. +syn match mojoMatrixMultiply + \ "^\s*\%(\%(>>>\|\.\.\.\)\s\+\)\=\zs\%(\h\|\%(\h\|[[(]\).\{-}\%(\w\|[])]\)\)\s*\n\%(\s*\.\.\.\s\)\=\s\+@\%(.\{-}\n\%(\s*\.\.\.\s\)\=\s\+@\)*" + \ contains=ALLBUT,mojoDecoratorName,mojoDecorator,mojoFunction,mojoDoctestValue + \ transparent + +syn match mojoFunction "\h\w*" display contained + +syn match mojoComment "#.*$" contains=mojoTodo,@Spell +syn keyword mojoTodo FIXME NOTE NOTES TODO XXX contained + +" Triple-quoted strings can contain doctests. +syn region mojoString matchgroup=mojoQuotes + \ start=+[uU]\=\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1" + \ contains=mojoEscape,@Spell +syn region mojoString matchgroup=mojoTripleQuotes + \ start=+[uU]\=\z('''\|"""\)+ end="\z1" keepend + \ contains=mojoEscape,mojoSpaceError,mojoDoctest,@Spell +syn region mojoRawString matchgroup=mojoQuotes + \ start=+[uU]\=[rR]\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1" + \ contains=@Spell +syn region mojoRawString matchgroup=pythonTripleQuotes + \ start=+[uU]\=[rR]\z('''\|"""\)+ end="\z1" keepend + \ contains=pythonSpaceError,mojoDoctest,@Spell + +syn match mojoEscape +\\[abfnrtv'"\\]+ contained +syn match mojoEscape "\\\o\{1,3}" contained +syn match mojoEscape "\\x\x\{2}" contained +syn match mojoEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained +" Python allows case-insensitive Unicode IDs: http://www.unicode.org/charts/ +syn match mojoEscape "\\N{\a\+\%(\s\a\+\)*}" contained +syn match mojoEscape "\\$" + +" It is very important to understand all details before changing the +" regular expressions below or their order. +" The word boundaries are *not* the floating-point number boundaries +" because of a possible leading or trailing decimal point. +" The expressions below ensure that all valid number literals are +" highlighted, and invalid number literals are not. For example, +" +" - a decimal point in '4.' at the end of a line is highlighted, +" - a second dot in 1.0.0 is not highlighted, +" - 08 is not highlighted, +" - 08e0 or 08j are highlighted, +" +" and so on, as specified in the 'Python Language Reference'. +" https://docs.python.org/reference/lexical_analysis.html#numeric-literals +if !exists("mojo_no_number_highlight") + " numbers (including complex) + syn match mojoNumber "\<0[oO]\%(_\=\o\)\+\>" + syn match mojoNumber "\<0[xX]\%(_\=\x\)\+\>" + syn match mojoNumber "\<0[bB]\%(_\=[01]\)\+\>" + syn match mojoNumber "\<\%([1-9]\%(_\=\d\)*\|0\+\%(_\=0\)*\)\>" + syn match mojoNumber "\<\d\%(_\=\d\)*[jJ]\>" + syn match mojoNumber "\<\d\%(_\=\d\)*[eE][+-]\=\d\%(_\=\d\)*[jJ]\=\>" + syn match mojoNumber + \ "\<\d\%(_\=\d\)*\.\%([eE][+-]\=\d\%(_\=\d\)*\)\=[jJ]\=\%(\W\|$\)\@=" + syn match mojoNumber + \ "\%(^\|\W\)\zs\%(\d\%(_\=\d\)*\)\=\.\d\%(_\=\d\)*\%([eE][+-]\=\d\%(_\=\d\)*\)\=[jJ]\=\>" +endif + +" The built-ins are added in the same order of appearance in Mojo stdlib docs +" https://docs.modular.com/mojo/lib.html +" +if !exists("mojo_no_builtin_highlight") + " Built-in functions + syn keyword mojoBuiltin slice constrained debug_assert put_new_line print + syn keyword mojoBuiltin print_no_newline len range rebind element_type + syn keyword mojoBuiltin ord chr atol isdigit index address string + " Built-in types + syn keyword mojoType Byte ListLiteral CoroutineContext Coroutine DType + syn keyword mojoType dtype type invalid bool int8 si8 unit8 ui8 int16 + syn keyword mojoType si16 unit16 ui16 int32 si32 uint32 ui32 int64 + syn keyword mojoType si64 uint64 ui64 bfloat16 bf16 float16 f16 float32 + syn keyword mojoType f32 float64 f64 Error FloatLiteral Int Attr SIMD + syn keyword mojoType Int8 UInt8 Int16 UInt16 Int32 UInt32 Int64 UInt64 + syn keyword mojoType Float16 Float32 Float64 element_type _65x13_type + syn keyword mojoType String StringLiteral StringRef Tuple AnyType + syn keyword mojoType NoneType None Lifetime + " avoid highlighting attributes as builtins + syn match mojoAttribute /\.\h\w*/hs=s+1 + \ contains=ALLBUT,mojoBuiltin,mojoFunction,mojoAsync + \ transparent +endif + +" From the 'Python Library Reference' class hierarchy at the bottom. +" http://docs.python.org/library/exceptions.html +if !exists("mojo_no_exception_highlight") + " builtin base exceptions (used mostly as base classes for other exceptions) + syn keyword mojoExceptions BaseException Exception + syn keyword mojoExceptions ArithmeticError BufferError LookupError + " builtin exceptions (actually raised) + syn keyword mojoExceptions AssertionError AttributeError EOFError + syn keyword mojoExceptions FloatingPointError GeneratorExit ImportError + syn keyword mojoExceptions IndentationError IndexError KeyError + syn keyword mojoExceptions KeyboardInterrupt MemoryError + syn keyword mojoExceptions ModuleNotFoundError NameError + syn keyword mojoExceptions NotImplementedError OSError OverflowError + syn keyword mojoExceptions RecursionError ReferenceError RuntimeError + syn keyword mojoExceptions StopAsyncIteration StopIteration SyntaxError + syn keyword mojoExceptions SystemError SystemExit TabError TypeError + syn keyword mojoExceptions UnboundLocalError UnicodeDecodeError + syn keyword mojoExceptions UnicodeEncodeError UnicodeError + syn keyword mojoExceptions UnicodeTranslateError ValueError + syn keyword mojoExceptions ZeroDivisionError + " builtin exception aliases for OSError + syn keyword mojoExceptions EnvironmentError IOError WindowsError + " builtin OS exceptions in Python 3 + syn keyword mojoExceptions BlockingIOError BrokenPipeError + syn keyword mojoExceptions ChildProcessError ConnectionAbortedError + syn keyword mojoExceptions ConnectionError ConnectionRefusedError + syn keyword mojoExceptions ConnectionResetError FileExistsError + syn keyword mojoExceptions FileNotFoundError InterruptedError + syn keyword mojoExceptions IsADirectoryError NotADirectoryError + syn keyword mojoExceptions PermissionError ProcessLookupError TimeoutError + " builtin warnings + syn keyword mojoExceptions BytesWarning DeprecationWarning FutureWarning + syn keyword mojoExceptions ImportWarning PendingDeprecationWarning + syn keyword mojoExceptions ResourceWarning RuntimeWarning + syn keyword mojoExceptions SyntaxWarning UnicodeWarning + syn keyword mojoExceptions UserWarning Warning +endif + +if exists("mojo_space_error_highlight") + " trailing whitespace + syn match mojoSpaceError display excludenl "\s\+$" + " mixed tabs and spaces + syn match mojoSpaceError display " \+\t" + syn match mojoSpaceError display "\t\+ " +endif + +" Do not spell doctests inside strings. +" Notice that the end of a string, either ''', or """, will end the contained +" doctest too. Thus, we do *not* need to have it as an end pattern. +if !exists("mojo_no_doctest_highlight") + if !exists("mojo_no_doctest_code_highlight") + syn region mojoDoctest + \ start="^\s*>>>\s" end="^\s*$" + \ contained contains=ALLBUT,mojoDoctest,mojoFunction,@Spell + syn region mojoDoctestValue + \ start=+^\s*\%(>>>\s\|\.\.\.\s\|"""\|'''\)\@!\S\++ end="$" + \ contained + else + syn region mojoDoctest + \ start="^\s*>>>" end="^\s*$" + \ contained contains=@NoSpell + endif +endif + +" Sync at the beginning of class, function, or method definition. +syn sync match mojoSync grouphere NONE "^\%(def\|class\)\s\+\h\w*\s*[(:]" + +" The default highlight links. Can be overridden later. +hi def link mojoStatement Statement +hi def link mojoConditional Conditional +hi def link mojoRepeat Repeat +hi def link mojoOperator Operator +hi def link mojoException Exception +hi def link mojoInclude Include +hi def link mojoAsync Statement +hi def link mojoDecorator Define +hi def link mojoDecoratorName Function +hi def link mojoFunction Function +hi def link mojoComment Comment +hi def link mojoTodo Todo +hi def link mojoString String +hi def link mojoRawString String +hi def link mojoQuotes String +hi def link mojoTripleQuotes mojoQuotes +hi def link mojoEscape Special +if !exists("mojo_no_number_highlight") + hi def link mojoNumber Number +endif +if !exists("mojo_no_builtin_highlight") + hi def link mojoBuiltin Function + hi def link mojoType Type +endif +if !exists("mojo_no_exception_highlight") + hi def link mojoExceptions Structure +endif +if exists("mojo_space_error_highlight") + hi def link mojoSpaceError Error +endif +if !exists("mojo_no_doctest_highlight") + hi def link mojoDoctest Special + hi def link mojoDoctestValue Define +endif + +let b:current_syntax = "mojo" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:set sw=2 sts=2 ts=8 noet: diff --git a/runtime/syntax/muttrc.vim b/runtime/syntax/muttrc.vim index 830664e0eb..bf53a42f94 100644 --- a/runtime/syntax/muttrc.vim +++ b/runtime/syntax/muttrc.vim @@ -1,10 +1,10 @@ " Vim syntax file " Language: Mutt setup files " Original: Preben 'Peppe' Guldberg <peppe-vim@wielders.org> -" Maintainer: Kyle Wheeler <kyle-muttrc.vim@memoryhole.net> -" Last Change: 21 May 2018 +" Maintainer: Luna Celeste <luna@unixpoet.dev> +" Last Change: 14 Aug 2023 -" This file covers mutt version 1.10.0 +" This file covers mutt version 2.2.10 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -103,88 +103,96 @@ syn match muttrcKeyName contained "<F[0-9]\+>" syn keyword muttrcVarBool skipwhite contained \ allow_8bit allow_ansi arrow_cursor ascii_chars askbcc askcc attach_split - \ auto_tag autoedit beep beep_new bounce_delivered braille_friendly - \ browser_abbreviate_mailboxes change_folder_next check_mbox_size check_new - \ collapse_unread confirmappend confirmcreate crypt_autoencrypt crypt_autopgp - \ crypt_autosign crypt_autosmime crypt_confirmhook crypt_opportunistic_encrypt - \ crypt_replyencrypt crypt_replysign crypt_replysignencrypted crypt_timestamp - \ crypt_use_gpgme crypt_use_pka delete_untag digest_collapse duplicate_threads - \ edit_hdrs edit_headers encode_from envelope_from fast_reply fcc_clear - \ flag_safe followup_to force_name forw_decode forw_decrypt forw_quote - \ forward_decode forward_decrypt forward_quote hdrs header - \ header_color_partial help hidden_host hide_limited hide_missing - \ hide_thread_subject hide_top_limited hide_top_missing history_remove_dups - \ honor_disposition idn_decode idn_encode ignore_linear_white_space - \ ignore_list_reply_to imap_check_subscribed imap_list_subscribed imap_passive - \ imap_peek imap_servernoise implicit_autoview include_onlyfirst keep_flagged + \ auto_tag autoedit auto_subscribe background_edit background_confirm_quit beep beep_new + \ bounce_delivered braille_friendly browser_abbreviate_mailboxes browser_sticky_cursor + \ change_folder_next check_mbox_size check_new collapse_unread compose_confirm_detach_first + \ confirmappend confirmcreate copy_decode_weed count_alternatives crypt_autoencrypt crypt_autopgp + \ crypt_autosign crypt_autosmime crypt_confirmhook crypt_protected_headers_read + \ crypt_protected_headers_save crypt_protected_headers_write crypt_opportunistic_encrypt + \ crypt_opportunistic_encrypt_strong_keys crypt_replyencrypt crypt_replysign + \ crypt_replysignencrypted crypt_timestamp crypt_use_gpgme crypt_use_pka cursor_overlay + \ delete_untag digest_collapse duplicate_threads edit_hdrs edit_headers encode_from + \ envelope_from fast_reply fcc_before_send fcc_clear flag_safe followup_to force_name forw_decode + \ forw_decrypt forw_quote forward_decode forward_quote hdrs header + \ header_color_partial help hidden_host hide_limited hide_missing hide_thread_subject + \ hide_top_limited hide_top_missing history_remove_dups honor_disposition idn_decode idn_encode + \ ignore_linear_white_space ignore_list_reply_to imap_check_subscribed imap_condstore imap_deflate + \ imap_list_subscribed imap_passive imap_peek imap_qresync imap_servernoise + \ implicit_autoview include_encrypted include_onlyfirst keep_flagged local_date_header \ mail_check_recent mail_check_stats mailcap_sanitize maildir_check_cur \ maildir_header_cache_verify maildir_trash mark_old markers menu_move_off \ menu_scroll message_cache_clean meta_key metoo mh_purge mime_forward_decode - \ mime_type_query_first narrow_tree pager_stop pgp_auto_decode + \ mime_type_query_first muttlisp_inline_eval narrow_tree pager_stop pgp_auto_decode \ pgp_auto_traditional pgp_autoencrypt pgp_autoinline pgp_autosign - \ pgp_check_exit pgp_create_traditional pgp_ignore_subkeys pgp_long_ids - \ pgp_replyencrypt pgp_replyinline pgp_replysign pgp_replysignencrypted - \ pgp_retainable_sigs pgp_self_encrypt pgp_self_encrypt_as pgp_show_unusable - \ pgp_strict_enc pgp_use_gpg_agent pipe_decode pipe_split pop_auth_try_all - \ pop_last postpone_encrypt postpone_encrypt_as print_decode print_split - \ prompt_after read_only reflow_space_quotes reflow_text reflow_wrap - \ reply_self resolve resume_draft_files resume_edited_draft_files - \ reverse_alias reverse_name reverse_realname rfc2047_parameters save_address - \ save_empty save_name score sidebar_folder_indent sidebar_new_mail_only - \ sidebar_next_new_wrap sidebar_short_path sidebar_sort sidebar_visible - \ sig_dashes sig_on_top smart_wrap smime_ask_cert_label - \ smime_decrypt_use_default_key smime_is_default smime_self_encrypt - \ smime_self_encrypt_as sort_re ssl_force_tls ssl_use_sslv2 ssl_use_sslv3 - \ ssl_use_tlsv1 ssl_usesystemcerts ssl_verify_dates ssl_verify_host - \ ssl_verify_partial_chains status_on_top strict_mime strict_threads suspend - \ text_flowed thorough_search thread_received tilde ts_enabled uncollapse_jump - \ use_8bitmime use_domain use_envelope_from use_from use_idn use_ipv6 - \ uncollapse_new user_agent wait_key weed wrap_search write_bcc + \ pgp_check_exit pgp_check_gpg_decrypt_status_fd pgp_create_traditional + \ pgp_ignore_subkeys pgp_long_ids pgp_replyencrypt pgp_replyinline + \ pgp_replysign pgp_replysignencrypted pgp_retainable_sigs pgp_self_encrypt + \ pgp_self_encrypt_as pgp_show_unusable pgp_strict_enc pgp_use_gpg_agent + \ pipe_decode pipe_decode_weed pipe_split pop_auth_try_all pop_last postpone_encrypt + \ postpone_encrypt_as print_decode print_decode_weed print_split prompt_after read_only + \ reflow_space_quotes reflow_text reflow_wrap reply_self resolve + \ resume_draft_files resume_edited_draft_files reverse_alias reverse_name + \ reverse_realname rfc2047_parameters save_address save_empty save_name score + \ sidebar_folder_indent sidebar_new_mail_only sidebar_next_new_wrap + \ sidebar_relative_shortpath_indent sidebar_short_path sidebar_sort sidebar_use_mailbox_shortcuts + \ sidebar_visible sig_on_top sig_dashes size_show_bytes size_show_fraction size_show_mb + \ size_units_on_left smart_wrap smime_ask_cert_label smime_decrypt_use_default_key + \ smime_is_default smime_self_encrypt smime_self_encrypt_as sort_re + \ ssl_force_tls ssl_use_sslv2 ssl_use_sslv3 ssl_use_tlsv1 ssl_use_tlsv1_3 ssl_usesystemcerts + \ ssl_verify_dates ssl_verify_host ssl_verify_partial_chains status_on_top + \ strict_mime strict_threads suspend text_flowed thorough_search + \ thread_received tilde ts_enabled tunnel_is_secure uncollapse_jump use_8bitmime use_domain + \ use_envelope_from use_from use_idn use_ipv6 uncollapse_new user_agent + \ wait_key weed wrap_search write_bcc \ nextgroup=muttrcSetBoolAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarBool skipwhite contained \ noallow_8bit noallow_ansi noarrow_cursor noascii_chars noaskbcc noaskcc - \ noattach_split noauto_tag noautoedit nobeep nobeep_new nobounce_delivered - \ nobraille_friendly nobrowser_abbreviate_mailboxes nochange_folder_next - \ nocheck_mbox_size nocheck_new nocollapse_unread noconfirmappend - \ noconfirmcreate nocrypt_autoencrypt nocrypt_autopgp nocrypt_autosign - \ nocrypt_autosmime nocrypt_confirmhook nocrypt_opportunistic_encrypt - \ nocrypt_replyencrypt nocrypt_replysign nocrypt_replysignencrypted - \ nocrypt_timestamp nocrypt_use_gpgme nocrypt_use_pka nodelete_untag - \ nodigest_collapse noduplicate_threads noedit_hdrs noedit_headers - \ noencode_from noenvelope_from nofast_reply nofcc_clear noflag_safe + \ noattach_split noauto_tag noautoedit noauto_subscribe nobackground_edit + \ nobackground_confirm_quit nobeep nobeep_new nobounce_delivered + \ nobraille_friendly nobrowser_abbreviate_mailboxes nobrowser_sticky_cursor nochange_folder_next + \ nocheck_mbox_size nocheck_new nocompose_confirm_detach_first nocollapse_unread noconfirmappend + \ noconfirmcreate nocopy_decode_weed nocount_alternatives nocrypt_autoencrypt nocrypt_autopgp + \ nocrypt_autosign nocrypt_autosmime nocrypt_confirmhook nocrypt_protected_headers_read + \ nocrypt_protected_headers_save nocrypt_protected_headers_write nocrypt_opportunistic_encrypt + \ nocrypt_opportunistic_encrypt_strong_keys nocrypt_replyencrypt nocrypt_replysign + \ nocrypt_replysignencrypted nocrypt_timestamp nocrypt_use_gpgme nocrypt_use_pka nocursor_overlay + \ nodelete_untag nodigest_collapse noduplicate_threads noedit_hdrs noedit_headers + \ noencode_from noenvelope_from nofast_reply nofcc_before_send nofcc_clear noflag_safe \ nofollowup_to noforce_name noforw_decode noforw_decrypt noforw_quote - \ noforward_decode noforward_decrypt noforward_quote nohdrs noheader + \ noforward_decode noforward_quote nohdrs noheader \ noheader_color_partial nohelp nohidden_host nohide_limited nohide_missing \ nohide_thread_subject nohide_top_limited nohide_top_missing \ nohistory_remove_dups nohonor_disposition noidn_decode noidn_encode \ noignore_linear_white_space noignore_list_reply_to noimap_check_subscribed - \ noimap_list_subscribed noimap_passive noimap_peek noimap_servernoise - \ noimplicit_autoview noinclude_onlyfirst nokeep_flagged nomail_check_recent - \ nomail_check_stats nomailcap_sanitize nomaildir_check_cur - \ nomaildir_header_cache_verify nomaildir_trash nomark_old nomarkers - \ nomenu_move_off nomenu_scroll nomessage_cache_clean nometa_key nometoo - \ nomh_purge nomime_forward_decode nomime_type_query_first nonarrow_tree - \ nopager_stop nopgp_auto_decode nopgp_auto_traditional nopgp_autoencrypt - \ nopgp_autoinline nopgp_autosign nopgp_check_exit nopgp_create_traditional + \ noimap_condstore noimap_deflate noimap_list_subscribed noimap_passive noimap_peek + \ noimap_qresync noimap_servernoise noimplicit_autoview noinclude_encrypted noinclude_onlyfirst + \ nokeep_flagged nolocal_date_header nomail_check_recent nomail_check_stats nomailcap_sanitize + \ nomaildir_check_cur nomaildir_header_cache_verify nomaildir_trash nomark_old + \ nomarkers nomenu_move_off nomenu_scroll nomessage_cache_clean nometa_key + \ nometoo nomh_purge nomime_forward_decode nomime_type_query_first nomuttlisp_inline_eval + \ nonarrow_tree nopager_stop nopgp_auto_decode nopgp_auto_traditional nopgp_autoencrypt + \ nopgp_autoinline nopgp_autosign nopgp_check_exit + \ nopgp_check_gpg_decrypt_status_fd nopgp_create_traditional \ nopgp_ignore_subkeys nopgp_long_ids nopgp_replyencrypt nopgp_replyinline \ nopgp_replysign nopgp_replysignencrypted nopgp_retainable_sigs \ nopgp_self_encrypt nopgp_self_encrypt_as nopgp_show_unusable - \ nopgp_strict_enc nopgp_use_gpg_agent nopipe_decode nopipe_split + \ nopgp_strict_enc nopgp_use_gpg_agent nopipe_decode nopipe_decode_weed nopipe_split \ nopop_auth_try_all nopop_last nopostpone_encrypt nopostpone_encrypt_as - \ noprint_decode noprint_split noprompt_after noread_only + \ noprint_decode noprint_decode_weed noprint_split noprompt_after noread_only \ noreflow_space_quotes noreflow_text noreflow_wrap noreply_self noresolve \ noresume_draft_files noresume_edited_draft_files noreverse_alias \ noreverse_name noreverse_realname norfc2047_parameters nosave_address \ nosave_empty nosave_name noscore nosidebar_folder_indent - \ nosidebar_new_mail_only nosidebar_next_new_wrap nosidebar_short_path - \ nosidebar_sort nosidebar_visible nosig_dashes nosig_on_top nosmart_wrap - \ nosmime_ask_cert_label nosmime_decrypt_use_default_key nosmime_is_default - \ nosmime_self_encrypt nosmime_self_encrypt_as nosort_re nossl_force_tls - \ nossl_use_sslv2 nossl_use_sslv3 nossl_use_tlsv1 nossl_usesystemcerts + \ nosidebar_new_mail_only nosidebar_next_new_wrap nosidebar_relative_shortpath_indent + \ nosidebar_short_path nosidebar_sort nosidebar_visible nosidebar_use_mailbox_shortcuts + \ nosig_dashes nosig_on_top nosize_show_bytes nosize_show_fraction nosize_show_mb + \ nosize_units_on_left nosmart_wrap nosmime_ask_cert_label nosmime_decrypt_use_default_key + \ nosmime_is_default nosmime_self_encrypt nosmime_self_encrypt_as nosort_re nossl_force_tls + \ nossl_use_sslv2 nossl_use_sslv3 nossl_use_tlsv1 nossl_use_tlsv1_3 nossl_usesystemcerts \ nossl_verify_dates nossl_verify_host nossl_verify_partial_chains \ nostatus_on_top nostrict_mime nostrict_threads nosuspend notext_flowed - \ nothorough_search nothread_received notilde nots_enabled nouncollapse_jump + \ nothorough_search nothread_received notilde nots_enabled notunnel_is_secure nouncollapse_jump \ nouse_8bitmime nouse_domain nouse_envelope_from nouse_from nouse_idn \ nouse_ipv6 nouncollapse_new nouser_agent nowait_key noweed nowrap_search \ nowrite_bcc @@ -192,50 +200,53 @@ syn keyword muttrcVarBool skipwhite contained syn keyword muttrcVarBool skipwhite contained \ invallow_8bit invallow_ansi invarrow_cursor invascii_chars invaskbcc - \ invaskcc invattach_split invauto_tag invautoedit invbeep invbeep_new - \ invbounce_delivered invbraille_friendly invbrowser_abbreviate_mailboxes - \ invchange_folder_next invcheck_mbox_size invcheck_new invcollapse_unread - \ invconfirmappend invconfirmcreate invcrypt_autoencrypt invcrypt_autopgp - \ invcrypt_autosign invcrypt_autosmime invcrypt_confirmhook - \ invcrypt_opportunistic_encrypt invcrypt_replyencrypt invcrypt_replysign - \ invcrypt_replysignencrypted invcrypt_timestamp invcrypt_use_gpgme - \ invcrypt_use_pka invdelete_untag invdigest_collapse invduplicate_threads + \ invaskcc invattach_split invauto_tag invautoedit invauto_subscribe nobackground_edit + \ nobackground_confirm_quit invbeep invbeep_new invbounce_delivered invbraille_friendly + \ invbrowser_abbreviate_mailboxes invbrowser_sticky_cursor invchange_folder_next + \ invcheck_mbox_size invcheck_new invcollapse_unread invcompose_confirm_detach_first + \ invconfirmappend invcopy_decode_weed invconfirmcreate invcount_alternatives invcrypt_autopgp + \ invcrypt_autoencrypt invcrypt_autosign invcrypt_autosmime invcrypt_confirmhook + \ invcrypt_protected_headers_read invcrypt_protected_headers_save invcrypt_protected_headers_write + \ invcrypt_opportunistic_encrypt invcrypt_opportunistic_encrypt_strong_keys invcrypt_replysign + \ invcrypt_replyencrypt invcrypt_replysignencrypted invcrypt_timestamp invcrypt_use_gpgme + \ invcrypt_use_pka invcursor_overlay invdelete_untag invdigest_collapse invduplicate_threads \ invedit_hdrs invedit_headers invencode_from invenvelope_from invfast_reply - \ invfcc_clear invflag_safe invfollowup_to invforce_name invforw_decode - \ invforw_decrypt invforw_quote invforward_decode invforward_decrypt + \ invfcc_before_send invfcc_clear invflag_safe invfollowup_to invforce_name invforw_decode + \ invforw_decrypt invforw_quote invforward_decode \ invforward_quote invhdrs invheader invheader_color_partial invhelp \ invhidden_host invhide_limited invhide_missing invhide_thread_subject \ invhide_top_limited invhide_top_missing invhistory_remove_dups \ invhonor_disposition invidn_decode invidn_encode \ invignore_linear_white_space invignore_list_reply_to - \ invimap_check_subscribed invimap_list_subscribed invimap_passive - \ invimap_peek invimap_servernoise invimplicit_autoview invinclude_onlyfirst - \ invkeep_flagged invmail_check_recent invmail_check_stats invmailcap_sanitize - \ invmaildir_check_cur invmaildir_header_cache_verify invmaildir_trash - \ invmark_old invmarkers invmenu_move_off invmenu_scroll - \ invmessage_cache_clean invmeta_key invmetoo invmh_purge - \ invmime_forward_decode invmime_type_query_first invnarrow_tree invpager_stop - \ invpgp_auto_decode invpgp_auto_traditional invpgp_autoencrypt + \ invimap_check_subscribed invimap_condstore invimap_deflate invimap_list_subscribed + \ invimap_passive invimap_peek invimap_qresync invimap_servernoise invimplicit_autoview + \ invinclude_encrypted invinclude_onlyfirst invkeep_flagged invlocal_date_header + \ invmail_check_recent invmail_check_stats invmailcap_sanitize invmaildir_check_cur + \ invmaildir_header_cache_verify invmaildir_trash invmark_old invmarkers invmenu_move_off + \ invmenu_scroll invmessage_cache_clean invmeta_key invmetoo invmh_purge + \ invmime_forward_decode invmime_type_query_first invmuttlisp_inline_eval invnarrow_tree + \ invpager_stop invpgp_auto_decode invpgp_auto_traditional invpgp_autoencrypt \ invpgp_autoinline invpgp_autosign invpgp_check_exit - \ invpgp_create_traditional invpgp_ignore_subkeys invpgp_long_ids - \ invpgp_replyencrypt invpgp_replyinline invpgp_replysign - \ invpgp_replysignencrypted invpgp_retainable_sigs invpgp_self_encrypt - \ invpgp_self_encrypt_as invpgp_show_unusable invpgp_strict_enc - \ invpgp_use_gpg_agent invpipe_decode invpipe_split invpop_auth_try_all - \ invpop_last invpostpone_encrypt invpostpone_encrypt_as invprint_decode - \ invprint_split invprompt_after invread_only invreflow_space_quotes - \ invreflow_text invreflow_wrap invreply_self invresolve invresume_draft_files - \ invresume_edited_draft_files invreverse_alias invreverse_name - \ invreverse_realname invrfc2047_parameters invsave_address invsave_empty - \ invsave_name invscore invsidebar_folder_indent invsidebar_new_mail_only - \ invsidebar_next_new_wrap invsidebar_short_path invsidebar_sort - \ invsidebar_visible invsig_dashes invsig_on_top invsmart_wrap - \ invsmime_ask_cert_label invsmime_decrypt_use_default_key invsmime_is_default - \ invsmime_self_encrypt invsmime_self_encrypt_as invsort_re invssl_force_tls - \ invssl_use_sslv2 invssl_use_sslv3 invssl_use_tlsv1 invssl_usesystemcerts + \ invpgp_check_gpg_decrypt_status_fd invpgp_create_traditional + \ invpgp_ignore_subkeys invpgp_long_ids invpgp_replyencrypt invpgp_replyinline + \ invpgp_replysign invpgp_replysignencrypted invpgp_retainable_sigs + \ invpgp_self_encrypt invpgp_self_encrypt_as invpgp_show_unusable + \ invpgp_strict_enc invpgp_use_gpg_agent invpipe_decode invpipe_decode_weed invpipe_split + \ invpop_auth_try_all invpop_last invpostpone_encrypt invpostpone_encrypt_as + \ invprint_decode invprint_decode_weed invprint_split invprompt_after invread_only + \ invreflow_space_quotes invreflow_text invreflow_wrap invreply_self invresolve + \ invresume_draft_file sinvresume_edited_draft_files invreverse_alias + \ invreverse_name invreverse_realname invrfc2047_parameters invsave_address + \ invsave_empty invsave_name invscore invsidebar_folder_indent + \ invsidebar_new_mail_only invsidebar_next_new_wrap invsidebar_relative_shortpath_indent + \ invsidebar_short_path invsidebar_sort sidebar_use_mailbox_shortcuts invsidebar_visible + \ invsig_dashes invsig_on_top invsize_show_bytes invsize_show_fraction invsize_show_mb + \ invsize_units_on_left invsmart_wrap invsmime_ask_cert_label invsmime_decrypt_use_default_key + \ invsmime_is_default invsmime_self_encrypt invsmime_self_encrypt_as invsort_re invssl_force_tls + \ invssl_use_sslv2 invssl_use_sslv3 invssl_use_tlsv1 invssl_use_tlsv1_3 invssl_usesystemcerts \ invssl_verify_dates invssl_verify_host invssl_verify_partial_chains \ invstatus_on_top invstrict_mime invstrict_threads invsuspend invtext_flowed - \ invthorough_search invthread_received invtilde invts_enabled + \ invthorough_search invthread_received invtilde invts_enabled invtunnel_is_secure \ invuncollapse_jump invuse_8bitmime invuse_domain invuse_envelope_from \ invuse_from invuse_idn invuse_ipv6 invuncollapse_new invuser_agent \ invwait_key invweed invwrap_search invwrite_bcc @@ -243,32 +254,32 @@ syn keyword muttrcVarBool skipwhite contained syn keyword muttrcVarQuad skipwhite contained \ abort_nosubject abort_unmodified abort_noattach bounce copy crypt_verify_sig - \ delete fcc_attach forward_edit honor_followup_to include mime_forward - \ mime_forward_rest mime_fwd move pgp_mime_auto pgp_verify_sig pop_delete - \ pop_reconnect postpone print quit recall reply_to ssl_starttls + \ delete fcc_attach forward_attachments forward_decrypt forward_edit honor_followup_to include + \ mime_forward mime_forward_rest mime_fwd move pgp_mime_auto pgp_verify_sig pop_delete + \ pop_reconnect postpone print quit recall reply_to send_multipart_alternative ssl_starttls \ nextgroup=muttrcSetQuadAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained \ noabort_nosubject noabort_unmodified noabort_noattach nobounce nocopy - \ nocrypt_verify_sig nodelete nofcc_attach noforward_edit nohonor_followup_to - \ noinclude nomime_forward nomime_forward_rest nomime_fwd nomove + \ nocrypt_verify_sig nodelete nofcc_attach noforward_attachments noforward_decrypt noforward_edit + \ nohonor_followup_to noinclude nomime_forward nomime_forward_rest nomime_fwd nomove \ nopgp_mime_auto nopgp_verify_sig nopop_delete nopop_reconnect nopostpone - \ noprint noquit norecall noreply_to nossl_starttls + \ noprint noquit norecall noreply_to nosend_multipart_alternative nossl_starttls \ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarQuad skipwhite contained \ invabort_nosubject invabort_unmodified invabort_noattach invbounce invcopy - \ invcrypt_verify_sig invdelete invfcc_attach invforward_edit - \ invhonor_followup_to invinclude invmime_forward invmime_forward_rest + \ invcrypt_verify_sig invdelete invfcc_attach invforward_attachments invforward_decrypt + \ invforward_edit invhonor_followup_to invinclude invmime_forward invmime_forward_rest \ invmime_fwd invmove invpgp_mime_auto invpgp_verify_sig invpop_delete \ invpop_reconnect invpostpone invprint invquit invrecall invreply_to - \ invssl_starttls + \ invsend_multipart_alternative invssl_starttls \ nextgroup=muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarNum skipwhite contained - \ connect_timeout error_history history imap_keepalive imap_pipeline_depth + \ connect_timeout error_history history imap_fetch_chunk_size imap_keepalive imap_pipeline_depth \ imap_poll_timeout mail_check mail_check_stats_interval menu_context net_inc - \ pager_context pager_index_lines pgp_timeout pop_checkinterval read_inc + \ pager_context pager_index_lines pager_skip_quoted_context pgp_timeout pop_checkinterval read_inc \ save_history score_threshold_delete score_threshold_flag \ score_threshold_read search_context sendmail_wait sidebar_width sleep_time \ smime_timeout ssl_min_dh_prime_bits time_inc timeout wrap wrap_headers @@ -365,10 +376,14 @@ syn keyword muttrcVarStr contained skipwhite alias_format nextgroup=muttrcVarEqu syn match muttrcVarEqualsAliasFmt contained skipwhite "=" nextgroup=muttrcAliasFormatStr syn keyword muttrcVarStr contained skipwhite attach_format nextgroup=muttrcVarEqualsAttachFmt syn match muttrcVarEqualsAttachFmt contained skipwhite "=" nextgroup=muttrcAttachFormatStr +syn keyword muttrcVarStr contained skipwhite background_format nextgroup=muttrcVarEqualsBackgroundFormatFmt +syn match muttrcVarEqualsBackgroundFormatFmt contained skipwhite "=" nextgroup=muttrcBackgroundFormatStr syn keyword muttrcVarStr contained skipwhite compose_format nextgroup=muttrcVarEqualsComposeFmt syn match muttrcVarEqualsComposeFmt contained skipwhite "=" nextgroup=muttrcComposeFormatStr syn keyword muttrcVarStr contained skipwhite folder_format nextgroup=muttrcVarEqualsFolderFmt syn match muttrcVarEqualsFolderFmt contained skipwhite "=" nextgroup=muttrcFolderFormatStr +syn keyword muttrcVarStr contained skipwhite message_id_format nextgroup=muttrcVarEqualsMessageIdFmt +syn match muttrcVarEqualsMessageIdFmt contained skipwhite "=" nextgroup=muttrcMessageIdFormatStr syn keyword muttrcVarStr contained skipwhite mix_entry_format nextgroup=muttrcVarEqualsMixFmt syn match muttrcVarEqualsMixFmt contained skipwhite "=" nextgroup=muttrcMixFormatStr syn keyword muttrcVarStr contained skipwhite pgp_entry_format nextgroup=muttrcVarEqualsPGPFmt @@ -390,27 +405,29 @@ syn match muttrcVPrefix contained /[?&]/ nextgroup=muttrcVarBool,muttrcVarQuad, syn match muttrcVarStr contained skipwhite 'my_[a-zA-Z0-9_]\+' nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr syn keyword muttrcVarStr contained skipwhite - \ abort_noattach_regexp alias_file assumed_charset attach_charset attach_sep + \ abort_noattach_regexp alias_file assumed_charset attach_charset attach_save_dir attach_sep \ attribution_locale certificate_file charset config_charset content_type - \ default_hook display_filter dotlock_program dsn_notify dsn_return editor - \ entropy_file envelope_from_address escape folder forw_format + \ crypt_protected_headers_subject default_hook display_filter dotlock_program dsn_notify + \ dsn_return editor entropy_file envelope_from_address escape fcc_delimiter folder forw_format \ forward_attribution_intro forward_attribution_trailer forward_format from gecos_mask \ hdr_format header_cache header_cache_compress header_cache_pagesize history_file \ hostname imap_authenticators imap_delim_chars imap_headers imap_idle imap_login - \ imap_pass imap_user indent_str indent_string ispell locale mailcap_path - \ mark_macro_prefix mask mbox mbox_type message_cachedir mh_seq_flagged mh_seq_replied - \ mh_seq_unseen mime_type_query_command mixmaster msg_format new_mail_command pager - \ pgp_default_key pgp_decryption_okay pgp_good_sign pgp_mime_signature_description + \ imap_oauth_refresh_command imap_pass imap_user indent_str indent_string ispell locale + \ mailcap_pat hmark_macro_prefix mask mbox mbox_type message_cachedir mh_seq_flagged + \ mh_seq_replied mh_seq_unseen mime_type_query_command mixmaster msg_format new_mail_command + \ pager pgp_default_key pgp_decryption_okay pgp_good_sign pgp_mime_signature_description \ pgp_mime_signature_filename pgp_sign_as pgp_sort_keys pipe_sep pop_authenticators - \ pop_host pop_pass pop_user post_indent_str post_indent_string postpone_encrypt_as - \ postponed preconnect print_cmd print_command query_command quote_regexp realname - \ record reply_regexp send_charset sendmail shell sidebar_delim sidebar_delim_chars - \ sidebar_divider_char sidebar_format sidebar_indent_string sidebar_sort_method - \ signature simple_search smileys smime_ca_location smime_certificates + \ pop_host pop_oauth_refresh_command pop_pass pop_user post_indent_str post_indent_string + \ postpone_encrypt_as postponed preconnect print_cmd print_command query_command + \ quote_regexp realname record reply_regexp send_charset send_multipart_alternative_filter + \ sendmail shell sidebar_delim + \ sidebar_delim_chars sidebar_divider_char sidebar_format sidebar_indent_string + \ sidebar_sort_method signature simple_search smileys smime_ca_location smime_certificates \ smime_default_key smime_encrypt_with smime_keys smime_sign_as smime_sign_digest_alg - \ smtp_authenticators smtp_pass smtp_url sort sort_alias sort_aux sort_browser - \ spam_separator spoolfile ssl_ca_certificates_file ssl_ciphers ssl_client_cert - \ status_chars tmpdir to_chars trash ts_icon_format ts_status_format tunnel visual + \ smtp_authenticators smtp_oauth_refresh_command smtp_pass smtp_url sort sort_alias + \ sort_aux sort_browser sort_thread_groups spam_separator spoolfile ssl_ca_certificates_file + \ ssl_ciphers ssl_client_cert ssl_verify_host_override status_chars tmpdir to_chars trash + \ ts_icon_format ts_status_format tunnel visual \ nextgroup=muttrcSetStrAssignment,muttrcVPrefix,muttrcVarBool,muttrcVarQuad,muttrcVarNum,muttrcVarStr " Present in 1.4.2.1 (pgp_create_traditional was a bool then) @@ -422,11 +439,11 @@ syn keyword muttrcMenu contained alias attach browser compose editor index page syn match muttrcMenuList "\S\+" contained contains=muttrcMenu syn match muttrcMenuCommas /,/ contained -syn keyword muttrcHooks contained skipwhite account-hook charset-hook iconv-hook message-hook folder-hook mbox-hook save-hook fcc-hook fcc-save-hook send-hook send2-hook reply-hook crypt-hook +syn keyword muttrcHooks contained skipwhite account-hook charset-hook iconv-hook index-format-hook message-hook folder-hook mbox-hook save-hook fcc-hook fcc-save-hook send-hook send2-hook reply-hook crypt-hook syn keyword muttrcCommand skipwhite - \ alternative_order auto_view exec hdr_order iconv-hook ignore mailboxes - \ mailto_allow mime_lookup my_hdr pgp-hook push score sidebar_whitelist source + \ alternative_order auto_view cd exec hdr_order iconv-hook ignore index-format-hook mailboxes + \ mailto_allow mime_lookup my_hdr pgp-hook push run score sidebar_whitelist source \ unalternative_order unalternative_order unauto_view ungroup unhdr_order \ unignore unmailboxes unmailto_allow unmime_lookup unmono unmy_hdr unscore \ unsidebar_whitelist @@ -470,19 +487,24 @@ syn match muttrcFunction contained "\<link-threads\>" syn match muttrcFunction contained "\<\%(backward\|capitalize\|downcase\|forward\|kill\|upcase\)-word\>" syn match muttrcFunction contained "\<\%(delete\|filter\|first\|last\|next\|pipe\|previous\|print\|save\|select\|tag\|undelete\)-entry\>" syn match muttrcFunction contained "\<attach-\%(file\|key\)\>" +syn match muttrcFunction contained "\<background-compose-menu\>" +syn match muttrcFunction contained "\<browse-mailbox\>" syn match muttrcFunction contained "\<change-\%(dir\|folder\|folder-readonly\)\>" syn match muttrcFunction contained "\<check-\%(new\|traditional-pgp\)\>" syn match muttrcFunction contained "\<current-\%(bottom\|middle\|top\)\>" syn match muttrcFunction contained "\<decode-\%(copy\|save\)\>" syn match muttrcFunction contained "\<delete-\%(char\|pattern\|subthread\)\>" +syn match muttrcFunction contained "\<descend-directory\>" syn match muttrcFunction contained "\<display-\%(address\|toggle-weed\)\>" syn match muttrcFunction contained "\<echo\>" syn match muttrcFunction contained "\<edit\%(-\%(bcc\|cc\|description\|encoding\|fcc\|file\|from\|headers\|label\|mime\|reply-to\|subject\|to\|type\)\)\?\>" syn match muttrcFunction contained "\<enter-\%(command\|mask\)\>" syn match muttrcFunction contained "\<error-history\>" +syn match muttrcFunction contained "\<group-chat-reply\>" syn match muttrcFunction contained "\<half-\%(up\|down\)\>" syn match muttrcFunction contained "\<history-\%(up\|down\|search\)\>" syn match muttrcFunction contained "\<kill-\%(eol\|eow\|line\)\>" +syn match muttrcFunction contained "\<move-\%(down\|up\)\>" syn match muttrcFunction contained "\<next-\%(line\|new\%(-then-unread\)\?\|page\|subthread\|undeleted\|unread\|unread-mailbox\)\>" syn match muttrcFunction contained "\<previous-\%(line\|new\%(-then-unread\)\?\|page\|subthread\|undeleted\|unread\)\>" syn match muttrcFunction contained "\<search\%(-\%(next\|opposite\|reverse\|toggle\)\)\?\>" @@ -490,15 +512,15 @@ syn match muttrcFunction contained "\<show-\%(limit\|version\)\>" syn match muttrcFunction contained "\<sort-\%(mailbox\|reverse\)\>" syn match muttrcFunction contained "\<tag-\%(pattern\|\%(sub\)\?thread\|prefix\%(-cond\)\?\)\>" syn match muttrcFunction contained "\<end-cond\>" -syn match muttrcFunction contained "\<sidebar-\%(next\|next-new\|open\|page-down\|page-up\|prev\|prev-new\|toggle-visible\)\>" +syn match muttrcFunction contained "\<sidebar-\%(first\|last\|next\|next-new\|open\|page-down\|page-up\|prev\|prev-new\|toggle-visible\)\>" syn match muttrcFunction contained "\<toggle-\%(mailboxes\|new\|quoted\|subscribed\|unlink\|write\)\>" syn match muttrcFunction contained "\<undelete-\%(pattern\|subthread\)\>" syn match muttrcFunction contained "\<collapse-\%(parts\|thread\|all\)\>" syn match muttrcFunction contained "\<rename-attachment\>" syn match muttrcFunction contained "\<subjectrx\>" syn match muttrcFunction contained "\<\%(un\)\?setenv\>" -syn match muttrcFunction contained "\<view-\%(attach\|attachments\|file\|mailcap\|name\|text\)\>" -syn match muttrcFunction contained "\<\%(backspace\|backward-char\|bol\|bottom\|bottom-page\|buffy-cycle\|clear-flag\|complete\%(-query\)\?\|copy-file\|create-alias\|detach-file\|eol\|exit\|extract-keys\|\%(imap-\)\?fetch-mail\|forget-passphrase\|forward-char\|group-reply\|help\|ispell\|jump\|limit\|list-reply\|mail\|mail-key\|mark-as-new\|middle-page\|new-mime\|noop\|pgp-menu\|query\|query-append\|quit\|quote-char\|read-subthread\|redraw-screen\|refresh\|rename-file\|reply\|select-new\|set-flag\|shell-escape\|skip-quoted\|sort\|subscribe\|sync-mailbox\|top\|top-page\|transpose-chars\|unsubscribe\|untag-pattern\|verify-key\|what-key\|write-fcc\)\>" +syn match muttrcFunction contained "\<view-\%(alt\|alt-text\|alt-mailcap\|alt-pager\|attach\|attachments\|file\|mailcap\|name\|pager\|text\)\>" +syn match muttrcFunction contained "\<\%(backspace\|backward-char\|bol\|bottom\|bottom-page\|buffy-cycle\|check-stats\|clear-flag\|complete\%(-query\)\?\|compose-to-sender\|copy-file\|create-alias\|detach-file\|eol\|exit\|extract-keys\|\%(imap-\)\?fetch-mail\|forget-passphrase\|forward-char\|group-reply\|help\|ispell\|jump\|limit\|list-action\|list-reply\|mail\|mail-key\|mark-as-new\|middle-page\|new-mime\|noop\|pgp-menu\|query\|query-append\|quit\|quote-char\|read-subthread\|redraw-screen\|refresh\|rename-file\|reply\|select-new\|set-flag\|shell-escape\|skip-headers\|skip-quoted\|sort\|subscribe\|sync-mailbox\|top\|top-page\|transpose-chars\|unsubscribe\|untag-pattern\|verify-key\|what-key\|write-fcc\)\>" syn keyword muttrcFunction contained imap-logout-all if use_mutt_sidebar == 1 syn match muttrcFunction contained "\<sidebar-\%(prev\|next\|open\|scroll-up\|scroll-down\)" @@ -519,6 +541,9 @@ syn match muttrcPatHookNot contained /!\s*/ skipwhite nextgroup=muttrcPattern syn match muttrcPatHooks /\<\%(mbox\|crypt\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcPattern syn match muttrcPatHooks /\<\%(message\|reply\|send\|send2\|save\|\|fcc\%(-save\)\?\)-hook\>/ skipwhite nextgroup=muttrcPatHookNot,muttrcOptPattern +syn match muttrcIndexFormatHookName contained /\S\+/ skipwhite nextgroup=muttrcPattern,muttrcString +syn match muttrcIndexFormatHook /index-format-hook/ skipwhite nextgroup=muttrcIndexFormatHookName,muttrcString + syn match muttrcBindFunction contained /\S\+\>/ skipwhite contains=muttrcFunction syn match muttrcBindFunctionNL contained /\s*\\$/ skipwhite skipnl nextgroup=muttrcBindFunction,muttrcBindFunctionNL syn match muttrcBindKey contained /\S\+/ skipwhite contains=muttrcKey nextgroup=muttrcBindFunction,muttrcBindFunctionNL @@ -751,6 +776,8 @@ hi def link muttrcShellString muttrcEscape hi def link muttrcRXHooks muttrcCommand hi def link muttrcRXHookNot Type hi def link muttrcPatHooks muttrcCommand +hi def link muttrcIndexFormatHookName muttrcCommand +hi def link muttrcIndexFormatHook muttrcCommand hi def link muttrcPatHookNot Type hi def link muttrcFormatConditionals2 Type hi def link muttrcIndexFormatStr muttrcString @@ -761,11 +788,13 @@ hi def link muttrcAliasFormatEscapes muttrcEscape hi def link muttrcAttachFormatStr muttrcString hi def link muttrcAttachFormatEscapes muttrcEscape hi def link muttrcAttachFormatConditionals muttrcFormatConditionals2 +hi def link muttrcBackgroundFormatStr muttrcString hi def link muttrcComposeFormatStr muttrcString hi def link muttrcComposeFormatEscapes muttrcEscape hi def link muttrcFolderFormatStr muttrcString hi def link muttrcFolderFormatEscapes muttrcEscape hi def link muttrcFolderFormatConditionals muttrcFormatConditionals2 +hi def link muttrcMessageIdFormatStr muttrcString hi def link muttrcMixFormatStr muttrcString hi def link muttrcMixFormatEscapes muttrcEscape hi def link muttrcMixFormatConditionals muttrcFormatConditionals2 @@ -787,10 +816,6 @@ hi def link muttrcTimeEscapes muttrcEscape hi def link muttrcPGPTimeEscapes muttrcEscape hi def link muttrcStrftimeEscapes Type hi def link muttrcStrftimeFormatStr muttrcString -hi def link muttrcFormatErrors Error - -hi def link muttrcBindFunctionNL SpecialChar -hi def link muttrcBindKeyNL SpecialChar hi def link muttrcBindMenuListNL SpecialChar hi def link muttrcMacroDescrNL SpecialChar hi def link muttrcMacroBodyNL SpecialChar diff --git a/runtime/syntax/nasm.vim b/runtime/syntax/nasm.vim index d763033225..e1dfc1db12 100644 --- a/runtime/syntax/nasm.vim +++ b/runtime/syntax/nasm.vim @@ -3,8 +3,12 @@ " Maintainer: Andrii Sokolov <andriy145@gmail.com> " Original Author: Manuel M.H. Stol <Manuel.Stol@allieddata.nl> " Former Maintainer: Manuel M.H. Stol <Manuel.Stol@allieddata.nl> -" Contributors: Leonard König <leonard.r.koenig@gmail.com> (C string highlighting), Peter Stanhope <dev.rptr@gmail.com> (Add missing 64-bit mode registers) -" Last Change: 2017 Jan 23 +" Contributors: +" Leonard König <leonard.r.koenig@gmail.com> (C string highlighting), +" Peter Stanhope <dev.rptr@gmail.com> (Add missing 64-bit mode registers) +" Frédéric Hamel <rederic.hamel123@gmail.com> (F16c support, partial AVX +" support, other) +" Last Change: 2023 Sep 7 " NASM Home: http://www.nasm.us/ @@ -246,12 +250,12 @@ syn match nasmSegRegister "\<[C-GS]S\>" syn match nasmSpcRegister "\<E\=IP\>" syn match nasmFpuRegister "\<ST\o\>" syn match nasmMmxRegister "\<MM\o\>" -syn match nasmSseRegister "\<XMM\o\>" +syn match nasmAvxRegister "\<[XYZ]MM\d\{1,2}\>" syn match nasmCtrlRegister "\<CR\o\>" syn match nasmDebugRegister "\<DR\o\>" syn match nasmTestRegister "\<TR\o\>" syn match nasmRegisterError "\<\(CR[15-9]\|DR[4-58-9]\|TR[0-28-9]\)\>" -syn match nasmRegisterError "\<X\=MM[8-9]\>" +syn match nasmRegisterError "\<[XYZ]MM\(3[2-9]\|[04-9]\d\)\>" syn match nasmRegisterError "\<ST\((\d)\|[8-9]\>\)" syn match nasmRegisterError "\<E\([A-D][HL]\|[C-GS]S\)\>" " Memory reference operand (address): @@ -277,7 +281,7 @@ syn match nasmInstrModifier "\<F\(ADD\|MUL\|\(DIV\|SUB\)R\=\)\s\+TO\>"lc=5,ms= " NAsm directives syn keyword nasmRepeat TIMES syn keyword nasmDirective ALIGN[B] INCBIN EQU NOSPLIT SPLIT -syn keyword nasmDirective ABSOLUTE BITS SECTION SEGMENT +syn keyword nasmDirective ABSOLUTE BITS SECTION SEGMENT DEFAULT syn keyword nasmDirective ENDSECTION ENDSEGMENT syn keyword nasmDirective __SECT__ " Macro created standard directives: (requires %include) @@ -309,7 +313,7 @@ syn match nasmStdInstruction "\<\(CMOV\|J\|SET\)\(N\=\([ABGL]E\=\|[CEOSZ]\)\|P syn match nasmStdInstruction "\<POP\>" syn keyword nasmStdInstruction AAA AAD AAM AAS ADC ADD AND syn keyword nasmStdInstruction BOUND BSF BSR BSWAP BT[C] BTR BTS -syn keyword nasmStdInstruction CALL CBW CDQ CLC CLD CMC CMP CMPSB CMPSD CMPSW CMPSQ +syn keyword nasmStdInstruction CALL CBW CDQ CDQE CLC CLD CMC CMP CMPSB CMPSD CMPSW CMPSQ syn keyword nasmStdInstruction CMPXCHG CMPXCHG8B CPUID CWD[E] CQO syn keyword nasmStdInstruction DAA DAS DEC DIV ENTER syn keyword nasmStdInstruction IDIV IMUL INC INT[O] IRET[D] IRETW IRETQ @@ -319,6 +323,7 @@ syn keyword nasmStdInstruction LODSW LOOP[E] LOOPNE LOOPNZ LOOPZ LSS syn keyword nasmStdInstruction MOVSB MOVSD MOVSW MOVSX MOVSQ MOVZX MUL NEG NOP NOT syn keyword nasmStdInstruction OR POPA[D] POPAW POPF[D] POPFW POPFQ syn keyword nasmStdInstruction PUSH[AD] PUSHAW PUSHF[D] PUSHFW PUSHFQ +syn keyword nasmStdInstruction PAUSE syn keyword nasmStdInstruction RCL RCR RETF RET[N] ROL ROR syn keyword nasmStdInstruction SAHF SAL SAR SBB SCASB SCASD SCASW syn keyword nasmStdInstruction SHL[D] SHR[D] STC STD STOSB STOSD STOSW STOSQ SUB @@ -405,6 +410,62 @@ syn keyword nasmSseInstruction ORPS RCPPS RCPSS RSQRTPS RSQRTSS syn keyword nasmSseInstruction SHUFPS SQRTPS SQRTSS STMXCSR SUBPS SUBSS syn keyword nasmSseInstruction UCOMISS UNPCKHPS UNPCKLPS XORPS +" F16c Instructions +syn keyword nasmF16CInstruction VCVTPH2PS VCVTPS2PH + +" AVX Instructions +syn keyword nasmAVXInstruction VCVTDQ2PD VCVTDQ2PS VCVTPD2DQ VCVTPD2P VCVTPD2PS +syn keyword nasmAVXInstruction VCVTPS2DQ VCVTPS2PD +syn keyword nasmAVXInstruction VCVTSD2SI VCVTSD2SS VCVTSI2SD VCVTSI2SS VCVTSS2SD VCVTSS2SI +syn keyword nasmAVXInstruction VMAXPS VMAXSS VMINPS VMINSS VMOVAPS VMOVHLPS VMOVHPS +syn keyword nasmAVXInstruction VMAXPD VMAXSD VMINPD VMINSD VMOVAPD VMOVHLPD VMOVHPD +syn keyword nasmAVXInstruction VMOVLHPS VMOVLPS VMOVMSKPS VMOVNTPS VMOVSS VMOVUPS +syn keyword nasmAVXInstruction VMULPS VMULSS VPXOR + +syn match nasmInstructnError "\<VP\a\{3}R\a\>" +syn match nasmAVXInstruction "\<VP\(INS\|EXT\)R[BDQW]\>" + +syn keyword nasmAVXInstruction VORPS VPABSB VPABSD VPABSW +syn keyword nasmAVXInstruction PACKSSDW VPACKSSWB VPACKUSDW VPACKUSWB VPADDD +syn keyword nasmAVXInstruction PADDQ VPADDSB VPADDSW VPADDUSB VPADDUSW +syn keyword nasmAVXInstruction PADDW VPALIGNR VPAND VPANDN VPAVGB +syn keyword nasmAVXInstruction PAVGW VPBLENDD VPBLENDVB VPBLENDW VPBROADCASTB +syn keyword nasmAVXInstruction PBROADCASTD VPBROADCASTQ VPBROADCASTW VPCLMULQDQ VPCMOV +syn keyword nasmAVXInstruction PCMPEQB VPCMPEQD VPCMPEQQ VPCMPEQW VPCMPESTRI +syn keyword nasmAVXInstruction PCMPESTRM VPCMPGTB VPCMPGTD VPCMPGTQ VPCMPGTW +syn keyword nasmAVXInstruction PCMPISTRI VPCMPISTRM VPCOMB VPCOMD VPCOMQ +syn keyword nasmAVXInstruction PCOMUB VPCOMUD VPCOMUQ VPCOMUW VPCOMW +syn keyword nasmAVXInstruction PERM2FVPERM2IVPERMD VPERMIL2PD VPERMIL2PS VPERMILPD VPERMILPS +syn keyword nasmAVXInstruction PERMPD VPERMPS VPERMQ VPEXTRB VPEXTRD +syn keyword nasmAVXInstruction PEXTRQ VPEXTRW VPGATHERDD VPGATHERDQ VPGATHERQD +syn keyword nasmAVXInstruction PGATHERQQ VPHADDBD VPHADDBQ VPHADDBW VPHADDD +syn keyword nasmAVXInstruction PHADDDQ VPHADDSW VPHADDUBQ VPHADDUBW VPHADDUDQ +syn keyword nasmAVXInstruction PHADDUWD VPHADDUWQ VPHADDW VPHADDWD VPHADDWQ +syn keyword nasmAVXInstruction PHMINPOSUW VPHSUBBW VPHSUBD VPHSUBDQ VPHSUBSW +syn keyword nasmAVXInstruction PHSUBW VPHSUBWD VPINSRB VPINSRD VPINSRQ +syn keyword nasmAVXInstruction PINSRW VPMACSDD VPMACSDQH +syn keyword nasmAVXInstruction VPMACSDQL VPMACSSDD VPMACSSDQL VPMACSSQH VPMACSSWD +syn keyword nasmAVXInstruction VPMACSSWW VPMACSWD VPMACSWW VPMADCSSWD VPMADCSWD +syn keyword nasmAVXInstruction VPMADDUBSW VPMADDWD VPMASKMOVD VPMASKMOVQ VPMAXSB +syn keyword nasmAVXInstruction VPMAXSD VPMAXSW VPMAXUB VPMAXUD VPMAXUW +syn keyword nasmAVXInstruction VPMINSB VPMINSD VPMINSW VPMINUB VPMINUD +syn keyword nasmAVXInstruction VPMINUW VPMOVMSKB VPMOVSXBD VPMOVSXBQ VPMOVSXBW +syn keyword nasmAVXInstruction VPMOVSXDQ VPMOVSXWD VPMOVSXWQ VPMOVZXBD VPMOVZXBQ +syn keyword nasmAVXInstruction VPMOVZXBW VPMOVZXDQ VPMOVZXWD VPMOVZXWQ VPMULDQ +syn keyword nasmAVXInstruction VPMULHRSW VPMULHUW VPMULHW VPMULLD VPMULLW +syn keyword nasmAVXInstruction VPMULUDQ VPOR VPPERM VPROTB VPROTD +syn keyword nasmAVXInstruction VPROTQ VPROTW VPSADBW VPSHAB VPSHAD +syn keyword nasmAVXInstruction VPSHAQ VPSHAW VPSHLB VPSHLD VPSHLQ +syn keyword nasmAVXInstruction VPSHLW VPSHUFB VPSHUFD VPSHUFHW VPSHUFLW +syn keyword nasmAVXInstruction VPSIGNB VPSIGND VPSIGNW VPSLLD VPSLLDQ +syn keyword nasmAVXInstruction VPSLLQ VPSLLVD VPSLLVQ VPSLLW VPSRAD +syn keyword nasmAVXInstruction VPSRAVD VPSRAW VPSRLD VPSRLDQ VPSRLQ +syn keyword nasmAVXInstruction VPSRLVD VPSRLVQ VPSRLW VPSUBB VPSUBD +syn keyword nasmAVXInstruction VPSUBQ VPSUBSB VPSUBSW VPSUBUSB VPSUBUSW +syn keyword nasmAVXInstruction VPSUBW VPTEST VPUNPCKHBW VPUNPCKHDQ VPUNPCKHQDQ +syn keyword nasmAVXInstruction VPUNPCKHWD VPUNPCKLBW VPUNPCKLDQ VPUNPCKLQDQ VPUNPCKLWD +syn keyword nasmAVXInstruction VPXOR VRCPPS + " Three Dimensional Now Packed Instructions: (requires 3DNow! unit) syn keyword nasmNowInstruction FEMMS PAVGUSB PF2ID PFACC PFADD PFCMPEQ PFCMPGE @@ -515,13 +576,14 @@ hi def link nasmDbgInstruction Debug hi def link nasmFpuInstruction Statement hi def link nasmMmxInstruction Statement hi def link nasmSseInstruction Statement +hi def link nasmF16cInstruction Statement +hi def link nasmAVXInstruction Statement hi def link nasmNowInstruction Statement hi def link nasmAmdInstruction Special hi def link nasmCrxInstruction Special hi def link nasmUndInstruction Todo hi def link nasmInstructnError Error - let b:current_syntax = "nasm" " vim:ts=8 sw=4 diff --git a/runtime/syntax/netrc.vim b/runtime/syntax/netrc.vim index 4d068a1b76..567aaa96de 100644 --- a/runtime/syntax/netrc.vim +++ b/runtime/syntax/netrc.vim @@ -2,6 +2,7 @@ " Language: netrc(5) configuration file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Revision: 2010-01-03 +" Last Change: 2023 Feb 27 by Keith Smiley if exists("b:current_syntax") finish @@ -35,6 +36,8 @@ syn keyword netrcSpecial contained anonymous syn match netrcInit contained '\<init$' \ nextgroup=netrcMacro skipwhite skipnl +syn match netrcComment '#.*$' + syn sync fromstart hi def link netrcKeyword Keyword @@ -45,6 +48,7 @@ hi def link netrcPassword String hi def link netrcMacroName String hi def link netrcSpecial Special hi def link netrcInit Special +hi def link netrcComment Comment let b:current_syntax = "netrc" diff --git a/runtime/syntax/nginx.vim b/runtime/syntax/nginx.vim index 18dd50cbb2..d036c123de 100644 --- a/runtime/syntax/nginx.vim +++ b/runtime/syntax/nginx.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: nginx.conf " Maintainer: Chris Aumann <me@chr4.org> -" Last Change: Apr 15, 2017 +" Last Change: Nov 25, 2023 if exists("b:current_syntax") finish @@ -84,6 +84,8 @@ syn keyword ngxListenOptions default_server contained syn keyword ngxListenOptions ssl contained syn keyword ngxListenOptions http2 contained syn keyword ngxListenOptions spdy contained +syn keyword ngxListenOptions http3 contained +syn keyword ngxListenOptions quic contained syn keyword ngxListenOptions proxy_protocol contained syn keyword ngxListenOptions setfib contained syn keyword ngxListenOptions fastopen contained @@ -258,6 +260,7 @@ syn keyword ngxDirective hls_forward_args syn keyword ngxDirective hls_fragment syn keyword ngxDirective hls_mp4_buffer_size syn keyword ngxDirective hls_mp4_max_buffer_size +syn keyword ngxDirective http2 syn keyword ngxDirective http2_chunk_size syn keyword ngxDirective http2_body_preread_size syn keyword ngxDirective http2_idle_timeout @@ -265,8 +268,17 @@ syn keyword ngxDirective http2_max_concurrent_streams syn keyword ngxDirective http2_max_field_size syn keyword ngxDirective http2_max_header_size syn keyword ngxDirective http2_max_requests +syn keyword ngxDirective http2_push +syn keyword ngxDirective http2_push_preload syn keyword ngxDirective http2_recv_buffer_size syn keyword ngxDirective http2_recv_timeout +syn keyword ngxDirective http3 +syn keyword ngxDirective http3_hq +syn keyword ngxDirective http3_max_concurrent_pushes +syn keyword ngxDirective http3_max_concurrent_streams +syn keyword ngxDirective http3_push +syn keyword ngxDirective http3_push_preload +syn keyword ngxDirective http3_stream_buffer_size syn keyword ngxDirective if_modified_since syn keyword ngxDirective ignore_invalid_headers syn keyword ngxDirective image_filter @@ -444,6 +456,10 @@ syn keyword ngxDirective proxy_temp_path syn keyword ngxDirective proxy_timeout syn keyword ngxDirective proxy_upload_rate syn keyword ngxDirective queue +syn keyword ngxDirective quic_gso +syn keyword ngxDirective quic_host_key +syn keyword ngxDirective quic_mtu +syn keyword ngxDirective quic_retry syn keyword ngxDirective random_index syn keyword ngxDirective read_ahead syn keyword ngxDirective real_ip_header @@ -545,8 +561,10 @@ syn keyword ngxDirective ssl_certificate syn keyword ngxDirective ssl_certificate_key syn keyword ngxDirective ssl_ciphers syn keyword ngxDirective ssl_client_certificate +syn keyword ngxDirective ssl_conf_command syn keyword ngxDirective ssl_crl syn keyword ngxDirective ssl_dhparam +syn keyword ngxDirective ssl_early_data syn keyword ngxDirective ssl_ecdh_curve syn keyword ngxDirective ssl_engine syn keyword ngxDirective ssl_handshake_timeout @@ -556,6 +574,7 @@ syn keyword ngxSSLPreferServerCiphersOn on contained syn keyword ngxSSLPreferServerCiphersOff off contained syn keyword ngxDirective ssl_preread syn keyword ngxDirective ssl_protocols nextgroup=ngxSSLProtocol,ngxSSLProtocolDeprecated skipwhite +syn keyword ngxDirective ssl_reject_handshake syn match ngxSSLProtocol 'TLSv1' contained nextgroup=ngxSSLProtocol,ngxSSLProtocolDeprecated skipwhite syn match ngxSSLProtocol 'TLSv1\.1' contained nextgroup=ngxSSLProtocol,ngxSSLProtocolDeprecated skipwhite syn match ngxSSLProtocol 'TLSv1\.2' contained nextgroup=ngxSSLProtocol,ngxSSLProtocolDeprecated skipwhite @@ -622,6 +641,7 @@ syn keyword ngxDirective uwsgi_buffering syn keyword ngxDirective uwsgi_buffers syn keyword ngxDirective uwsgi_busy_buffers_size syn keyword ngxDirective uwsgi_cache +syn keyword ngxDirective uwsgi_cache_background_update syn keyword ngxDirective uwsgi_cache_bypass syn keyword ngxDirective uwsgi_cache_key syn keyword ngxDirective uwsgi_cache_lock @@ -2225,6 +2245,19 @@ syn keyword ngxDirectiveThirdParty xss_override_status syn keyword ngxDirectiveThirdParty xss_check_status syn keyword ngxDirectiveThirdParty xss_input_types +" CT Module <https://github.com/grahamedgecombe/nginx-ct> +" Certificate Transparency module for nginx +syn keyword ngxDirectiveThirdParty ssl_ct +syn keyword ngxDirectiveThirdParty ssl_ct_static_scts + +" Dynamic TLS records patch <https://github.com/cloudflare/sslconfig/blob/master/patches/nginx__dynamic_tls_records.patch> +" TLS Dynamic Record Resizing +syn keyword ngxDirectiveThirdParty ssl_dyn_rec_enable +syn keyword ngxDirectiveThirdParty ssl_dyn_rec_size_hi +syn keyword ngxDirectiveThirdParty ssl_dyn_rec_size_lo +syn keyword ngxDirectiveThirdParty ssl_dyn_rec_threshold +syn keyword ngxDirectiveThirdParty ssl_dyn_rec_timeout + " ZIP Module <https://www.nginx.com/resources/wiki/modules/zip/> " ZIP archiver for nginx diff --git a/runtime/syntax/nix.vim b/runtime/syntax/nix.vim index c07676a4a8..ef52cddf46 100644 --- a/runtime/syntax/nix.vim +++ b/runtime/syntax/nix.vim @@ -1,11 +1,12 @@ " Vim syntax file " Language: Nix -" Maintainer: James Fleming <james@electronic-quill.net> +" Maintainer: James Fleming <james@electronic-quill.net> +" (Github username: equill) " Original Author: Daiderd Jordan <daiderd@gmail.com> " Acknowledgement: Based on vim-nix maintained by Daiderd Jordan <daiderd@gmail.com> " https://github.com/LnL7/vim-nix " License: MIT -" Last Change: 2022 Dec 06 +" Last Change: 2023 Aug 19 if exists("b:current_syntax") finish @@ -68,7 +69,8 @@ syn match nixAttribute "[a-zA-Z_][a-zA-Z0-9_'-]*\ze\%([^a-zA-Z0-9_'.-]\|$\)" con syn region nixAttributeAssignment start="=" end="\ze;" contained contains=@nixExpr syn region nixAttributeDefinition start=/\ze[a-zA-Z_"$]/ end=";" contained contains=nixComment,nixAttribute,nixInterpolation,nixSimpleString,nixAttributeDot,nixAttributeAssignment -syn region nixInheritAttributeScope start="(" end="\ze)" contained contains=@nixExpr +syn region nixInheritAttributeSubExpr start="("ms=e+1 end="\ze)" contained contains=nixAttributeDot,@nixExpr +syn region nixInheritAttributeScope start="\ze(" end=")" contained contains=nixInheritAttributeSubExpr syn region nixAttributeDefinition matchgroup=nixInherit start="\<inherit\>" end=";" contained contains=nixComment,nixInheritAttributeScope,nixAttribute syn region nixAttributeSet start="{" end="}" contains=nixComment,nixAttributeDefinition @@ -97,7 +99,7 @@ syn match nixArgOperator '[a-zA-Z_][a-zA-Z0-9_'-]*\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{ " " "\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*" " -" It is also used throught the whole file and is marked with 'v's as well. +" It is also used throughout the whole file and is marked with 'v's as well. " " Fortunately the matching rules for function arguments are much simpler than " for real attribute sets, because we can stop when we hit the first ellipsis or diff --git a/runtime/syntax/nosyntax.vim b/runtime/syntax/nosyntax.vim index 0ab3412373..a761d712b7 100644 --- a/runtime/syntax/nosyntax.vim +++ b/runtime/syntax/nosyntax.vim @@ -1,6 +1,7 @@ " Vim syntax support file -" Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2006 Apr 16 +" Maintainer: The Vim Project <https://github.com/vim/vim> +" Last Change: 2023 Aug 10 +" Former Maintainer: Bram Moolenaar <Bram@vim.org> " This file is used for ":syntax off". " It removes the autocommands and stops highlighting for all buffers. diff --git a/runtime/syntax/ora.vim b/runtime/syntax/ora.vim index 99034793f2..ab091a2eee 100644 --- a/runtime/syntax/ora.vim +++ b/runtime/syntax/ora.vim @@ -449,7 +449,7 @@ hi def link oraString String "strings hi def link oraSpecial Special "special characters hi def link oraError Error "errors -hi def link oraParenError oraError "errors caused by mismatching parantheses +hi def link oraParenError oraError "errors caused by mismatching parentheses hi def link oraComment Comment "comments diff --git a/runtime/syntax/po.vim b/runtime/syntax/po.vim index 15d09b18bd..08d6baec27 100644 --- a/runtime/syntax/po.vim +++ b/runtime/syntax/po.vim @@ -42,7 +42,7 @@ syn match poHeaderItem "\(Project-Id-Version\|Report-Msgid-Bugs-To\|POT-Crea syn match poHeaderUndefined "\(PACKAGE VERSION\|YEAR-MO-DA HO:MI+ZONE\|FULL NAME <EMAIL@ADDRESS>\|LANGUAGE <LL@li.org>\|CHARSET\|ENCODING\|INTEGER\|EXPRESSION\)" contained syn match poCopyrightUnset "SOME DESCRIPTIVE TITLE\|FIRST AUTHOR <EMAIL@ADDRESS>, YEAR\|Copyright (C) YEAR Free Software Foundation, Inc\|YEAR THE PACKAGE\'S COPYRIGHT HOLDER\|PACKAGE" contained -" Translation comment block including: translator comment, automatic coments, flags and locations +" Translation comment block including: translator comment, automatic comments, flags and locations syn match poComment "^#.*$" syn keyword poFlagFuzzy fuzzy contained syn match poCommentTranslator "^# .*$" contains=poCopyrightUnset diff --git a/runtime/syntax/poefilter.vim b/runtime/syntax/poefilter.vim index f7e92034ee..6561f7a704 100644 --- a/runtime/syntax/poefilter.vim +++ b/runtime/syntax/poefilter.vim @@ -2,7 +2,7 @@ " Language: PoE item filter " Maintainer: ObserverOfTime <chronobserver@disroot.org> " Filenames: *.filter -" Last Change: 2022 Oct 07 +" Last Change: 2023 Feb 10 if exists('b:current_syntax') finish @@ -17,7 +17,7 @@ syn match poefilterCommentTag /\[[0-9A-Z\[\]]\+\]/ contained syn match poefilterComment /#.*$/ contains=poefilterTodo,poefilterCommentTag,@Spell " Blocks -syn keyword poefilterBlock Show Hide +syn keyword poefilterBlock Show Hide Minimal " Conditions syn keyword poefilterCondition diff --git a/runtime/syntax/ppd.vim b/runtime/syntax/ppd.vim index da67e1f39f..6bd57f34e5 100644 --- a/runtime/syntax/ppd.vim +++ b/runtime/syntax/ppd.vim @@ -15,7 +15,7 @@ syn match ppdDefine "\*[a-zA-Z0-9\-_]\+:" syn match ppdUI "\*[a-zA-Z]*\(Open\|Close\)UI" syn match ppdUIGroup "\*[a-zA-Z]*\(Open\|Close\)Group" syn match ppdGUIText "/.*:" -syn match ppdContraints "^*UIConstraints:" +syn match ppdConstraints "^*UIConstraints:" " Define the default highlighting. " Only when an item doesn't have highlighting yet @@ -27,7 +27,7 @@ hi def link ppdUI Function hi def link ppdUIGroup Function hi def link ppdDef String hi def link ppdGUIText Type -hi def link ppdContraints Special +hi def link ppdConstraints Special let b:current_syntax = "ppd" diff --git a/runtime/syntax/pymanifest.vim b/runtime/syntax/pymanifest.vim new file mode 100644 index 0000000000..26bdf797e0 --- /dev/null +++ b/runtime/syntax/pymanifest.vim @@ -0,0 +1,44 @@ +" Vim syntax file +" Language: PyPA manifest +" Maintainer: ObserverOfTime <chronobserver@disroot.org> +" Filenames: MANIFEST.in +" Last Change: 2023 Aug 12 + +if exists('b:current_syntax') + finish +endif + +let s:cpo_save = &cpoptions +set cpoptions&vim + +syn iskeyword @,- + +" Comments +syn keyword pymanifestTodo contained TODO FIXME XXX +syn match pymanifestComment /\\\@1<!#.*/ contains=pymanifestTodo + +" Commands +syn keyword pymanifestCommand + \ include exclude + \ recursive-include recursive-exclude + \ global-include global-exclude + \ graft prune + +" Globs & character ranges +syn match pymanifestGlob /\*\|\*\*\|?/ +syn match pymanifestRange /\\\@1<!\[.\{-}\]/ + +" Line break +syn match pymanifestLinebreak /\\$\|\\\ze\s\+#/ + +hi def link pymanifestCommand Keyword +hi def link pymanifestComment Comment +hi def link pymanifestGlob SpecialChar +hi def link pymanifestLinebreak SpecialKey +hi def link pymanifestRange Special +hi def link pymanifestTodo Todo + +let b:current_syntax = 'pymanifest' + +let &cpoptions = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/python.vim b/runtime/syntax/python.vim index ef4da1b448..043ea6d19b 100644 --- a/runtime/syntax/python.vim +++ b/runtime/syntax/python.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Python " Maintainer: Zvezdan Petkovic <zpetkovic@acm.org> -" Last Change: 2022 Jun 28 +" Last Change: 2023 Feb 28 " Credits: Neil Schemenauer <nas@python.ca> " Dmitry Vasiliev " @@ -35,12 +35,26 @@ " " let python_highlight_all = 1 " +" The use of Python 2 compatible syntax highlighting can be enforced. +" The straddling code (Python 2 and 3 compatible), up to Python 3.5, +" will be also supported. +" +" let python_use_python2_syntax = 1 +" +" This option will exclude all modern Python 3.6 or higher features. +" " quit when a syntax file was already loaded. if exists("b:current_syntax") finish endif +" Use of Python 2 and 3.5 or lower requested. +if exists("python_use_python2_syntax") + runtime! syntax/python2.vim + finish +endif + " We need nocompatible mode in order to continue lines with backslashes. " Original setting will be restored. let s:cpo_save = &cpo @@ -91,8 +105,8 @@ syn keyword pythonInclude from import syn keyword pythonAsync async await " Soft keywords -" These keywords do not mean anything unless used in the right context -" See https://docs.python.org/3/reference/lexical_analysis.html#soft-keywords +" These keywords do not mean anything unless used in the right context. +" See https://docs.python.org/3/reference/lexical_analysis.html#soft-keywords " for more on this. syn match pythonConditional "^\s*\zscase\%(\s\+.*:.*$\)\@=" syn match pythonConditional "^\s*\zsmatch\%(\s\+.*:\s*\%(#.*\)\=$\)\@=" @@ -164,17 +178,17 @@ syn match pythonEscape "\\$" " and so on, as specified in the 'Python Language Reference'. " https://docs.python.org/reference/lexical_analysis.html#numeric-literals if !exists("python_no_number_highlight") - " numbers (including longs and complex) - syn match pythonNumber "\<0[oO]\=\o\+[Ll]\=\>" - syn match pythonNumber "\<0[xX]\x\+[Ll]\=\>" - syn match pythonNumber "\<0[bB][01]\+[Ll]\=\>" - syn match pythonNumber "\<\%([1-9]\d*\|0\)[Ll]\=\>" - syn match pythonNumber "\<\d\+[jJ]\>" - syn match pythonNumber "\<\d\+[eE][+-]\=\d\+[jJ]\=\>" + " numbers (including complex) + syn match pythonNumber "\<0[oO]\%(_\=\o\)\+\>" + syn match pythonNumber "\<0[xX]\%(_\=\x\)\+\>" + syn match pythonNumber "\<0[bB]\%(_\=[01]\)\+\>" + syn match pythonNumber "\<\%([1-9]\%(_\=\d\)*\|0\+\%(_\=0\)*\)\>" + syn match pythonNumber "\<\d\%(_\=\d\)*[jJ]\>" + syn match pythonNumber "\<\d\%(_\=\d\)*[eE][+-]\=\d\%(_\=\d\)*[jJ]\=\>" syn match pythonNumber - \ "\<\d\+\.\%([eE][+-]\=\d\+\)\=[jJ]\=\%(\W\|$\)\@=" + \ "\<\d\%(_\=\d\)*\.\%([eE][+-]\=\d\%(_\=\d\)*\)\=[jJ]\=\%(\W\|$\)\@=" syn match pythonNumber - \ "\%(^\|\W\)\zs\d*\.\d\+\%([eE][+-]\=\d\+\)\=[jJ]\=\>" + \ "\%(^\|\W\)\zs\%(\d\%(_\=\d\)*\)\=\.\d\%(_\=\d\)*\%([eE][+-]\=\d\%(_\=\d\)*\)\=[jJ]\=\>" endif " Group the built-ins in the order in the 'Python Library Reference' for diff --git a/runtime/syntax/python2.vim b/runtime/syntax/python2.vim new file mode 100644 index 0000000000..3b30eabbae --- /dev/null +++ b/runtime/syntax/python2.vim @@ -0,0 +1,345 @@ +" Vim syntax file +" Language: Python 2 +" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org> +" Last Change: 2016 Oct 29 +" Credits: Neil Schemenauer <nas@python.ca> +" Dmitry Vasiliev +" +" This version is a major rewrite by Zvezdan Petkovic. +" +" - introduced highlighting of doctests +" - updated keywords, built-ins, and exceptions +" - corrected regular expressions for +" +" * functions +" * decorators +" * strings +" * escapes +" * numbers +" * space error +" +" - corrected synchronization +" - more highlighting is ON by default, except +" - space error highlighting is OFF by default +" +" Optional highlighting can be controlled using these variables. +" +" let python_no_builtin_highlight = 1 +" let python_no_doctest_code_highlight = 1 +" let python_no_doctest_highlight = 1 +" let python_no_exception_highlight = 1 +" let python_no_number_highlight = 1 +" let python_space_error_highlight = 1 +" +" All the options above can be switched on together. +" +" let python_highlight_all = 1 +" +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" NOTE: This file is a copy of the last commit of runtime/syntax/python.vim +" that still supported Python 2. There is support for Python 3, up to 3.5, +" and it was kept in the file as is, because it supports the straddling code +" (Python 2 and 3 compatible) better. +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +" quit when a syntax file was already loaded. +if exists("b:current_syntax") + finish +endif + +" We need nocompatible mode in order to continue lines with backslashes. +" Original setting will be restored. +let s:cpo_save = &cpo +set cpo&vim + +if exists("python_no_doctest_highlight") + let python_no_doctest_code_highlight = 1 +endif + +if exists("python_highlight_all") + if exists("python_no_builtin_highlight") + unlet python_no_builtin_highlight + endif + if exists("python_no_doctest_code_highlight") + unlet python_no_doctest_code_highlight + endif + if exists("python_no_doctest_highlight") + unlet python_no_doctest_highlight + endif + if exists("python_no_exception_highlight") + unlet python_no_exception_highlight + endif + if exists("python_no_number_highlight") + unlet python_no_number_highlight + endif + let python_space_error_highlight = 1 +endif + +" Keep Python keywords in alphabetical order inside groups for easy +" comparison with the table in the 'Python Language Reference' +" https://docs.python.org/2/reference/lexical_analysis.html#keywords, +" https://docs.python.org/3/reference/lexical_analysis.html#keywords. +" Groups are in the order presented in NAMING CONVENTIONS in syntax.txt. +" Exceptions come last at the end of each group (class and def below). +" +" Keywords 'with' and 'as' are new in Python 2.6 +" (use 'from __future__ import with_statement' in Python 2.5). +" +" Some compromises had to be made to support both Python 3 and 2. +" We include Python 3 features, but when a definition is duplicated, +" the last definition takes precedence. +" +" - 'False', 'None', and 'True' are keywords in Python 3 but they are +" built-ins in 2 and will be highlighted as built-ins below. +" - 'exec' is a built-in in Python 3 and will be highlighted as +" built-in below. +" - 'nonlocal' is a keyword in Python 3 and will be highlighted. +" - 'print' is a built-in in Python 3 and will be highlighted as +" built-in below (use 'from __future__ import print_function' in 2) +" - async and await were added in Python 3.5 and are soft keywords. +" +syn keyword pythonStatement False None True +syn keyword pythonStatement as assert break continue del exec global +syn keyword pythonStatement lambda nonlocal pass print return with yield +syn keyword pythonStatement class def nextgroup=pythonFunction skipwhite +syn keyword pythonConditional elif else if +syn keyword pythonRepeat for while +syn keyword pythonOperator and in is not or +syn keyword pythonException except finally raise try +syn keyword pythonInclude from import +syn keyword pythonAsync async await + +" Decorators (new in Python 2.4) +" A dot must be allowed because of @MyClass.myfunc decorators. +syn match pythonDecorator "@" display contained +syn match pythonDecoratorName "@\s*\h\%(\w\|\.\)*" display contains=pythonDecorator + +" Python 3.5 introduced the use of the same symbol for matrix multiplication: +" https://www.python.org/dev/peps/pep-0465/. We now have to exclude the +" symbol from highlighting when used in that context. +" Single line multiplication. +syn match pythonMatrixMultiply + \ "\%(\w\|[])]\)\s*@" + \ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue + \ transparent +" Multiplication continued on the next line after backslash. +syn match pythonMatrixMultiply + \ "[^\\]\\\s*\n\%(\s*\.\.\.\s\)\=\s\+@" + \ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue + \ transparent +" Multiplication in a parenthesized expression over multiple lines with @ at +" the start of each continued line; very similar to decorators and complex. +syn match pythonMatrixMultiply + \ "^\s*\%(\%(>>>\|\.\.\.\)\s\+\)\=\zs\%(\h\|\%(\h\|[[(]\).\{-}\%(\w\|[])]\)\)\s*\n\%(\s*\.\.\.\s\)\=\s\+@\%(.\{-}\n\%(\s*\.\.\.\s\)\=\s\+@\)*" + \ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue + \ transparent + +syn match pythonFunction "\h\w*" display contained + +syn match pythonComment "#.*$" contains=pythonTodo,@Spell +syn keyword pythonTodo FIXME NOTE NOTES TODO XXX contained + +" Triple-quoted strings can contain doctests. +syn region pythonString matchgroup=pythonQuotes + \ start=+[uU]\=\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1" + \ contains=pythonEscape,@Spell +syn region pythonString matchgroup=pythonTripleQuotes + \ start=+[uU]\=\z('''\|"""\)+ end="\z1" keepend + \ contains=pythonEscape,pythonSpaceError,pythonDoctest,@Spell +syn region pythonRawString matchgroup=pythonQuotes + \ start=+[uU]\=[rR]\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1" + \ contains=@Spell +syn region pythonRawString matchgroup=pythonTripleQuotes + \ start=+[uU]\=[rR]\z('''\|"""\)+ end="\z1" keepend + \ contains=pythonSpaceError,pythonDoctest,@Spell + +syn match pythonEscape +\\[abfnrtv'"\\]+ contained +syn match pythonEscape "\\\o\{1,3}" contained +syn match pythonEscape "\\x\x\{2}" contained +syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained +" Python allows case-insensitive Unicode IDs: http://www.unicode.org/charts/ +syn match pythonEscape "\\N{\a\+\%(\s\a\+\)*}" contained +syn match pythonEscape "\\$" + +" It is very important to understand all details before changing the +" regular expressions below or their order. +" The word boundaries are *not* the floating-point number boundaries +" because of a possible leading or trailing decimal point. +" The expressions below ensure that all valid number literals are +" highlighted, and invalid number literals are not. For example, +" +" - a decimal point in '4.' at the end of a line is highlighted, +" - a second dot in 1.0.0 is not highlighted, +" - 08 is not highlighted, +" - 08e0 or 08j are highlighted, +" +" and so on, as specified in the 'Python Language Reference'. +" https://docs.python.org/2/reference/lexical_analysis.html#numeric-literals +" https://docs.python.org/3/reference/lexical_analysis.html#numeric-literals +if !exists("python_no_number_highlight") + " numbers (including longs and complex) + syn match pythonNumber "\<0[oO]\=\o\+[Ll]\=\>" + syn match pythonNumber "\<0[xX]\x\+[Ll]\=\>" + syn match pythonNumber "\<0[bB][01]\+[Ll]\=\>" + syn match pythonNumber "\<\%([1-9]\d*\|0\)[Ll]\=\>" + syn match pythonNumber "\<\d\+[jJ]\>" + syn match pythonNumber "\<\d\+[eE][+-]\=\d\+[jJ]\=\>" + syn match pythonNumber + \ "\<\d\+\.\%([eE][+-]\=\d\+\)\=[jJ]\=\%(\W\|$\)\@=" + syn match pythonNumber + \ "\%(^\|\W\)\zs\d*\.\d\+\%([eE][+-]\=\d\+\)\=[jJ]\=\>" +endif + +" Group the built-ins in the order in the 'Python Library Reference' for +" easier comparison. +" https://docs.python.org/2/library/constants.html +" https://docs.python.org/3/library/constants.html +" http://docs.python.org/2/library/functions.html +" http://docs.python.org/3/library/functions.html +" http://docs.python.org/2/library/functions.html#non-essential-built-in-functions +" http://docs.python.org/3/library/functions.html#non-essential-built-in-functions +" Python built-in functions are in alphabetical order. +if !exists("python_no_builtin_highlight") + " built-in constants + " 'False', 'True', and 'None' are also reserved words in Python 3 + syn keyword pythonBuiltin False True None + syn keyword pythonBuiltin NotImplemented Ellipsis __debug__ + " built-in functions + syn keyword pythonBuiltin abs all any bin bool bytearray callable chr + syn keyword pythonBuiltin classmethod compile complex delattr dict dir + syn keyword pythonBuiltin divmod enumerate eval filter float format + syn keyword pythonBuiltin frozenset getattr globals hasattr hash + syn keyword pythonBuiltin help hex id input int isinstance + syn keyword pythonBuiltin issubclass iter len list locals map max + syn keyword pythonBuiltin memoryview min next object oct open ord pow + syn keyword pythonBuiltin print property range repr reversed round set + syn keyword pythonBuiltin setattr slice sorted staticmethod str + syn keyword pythonBuiltin sum super tuple type vars zip __import__ + " Python 2 only + syn keyword pythonBuiltin basestring cmp execfile file + syn keyword pythonBuiltin long raw_input reduce reload unichr + syn keyword pythonBuiltin unicode xrange + " Python 3 only + syn keyword pythonBuiltin ascii bytes exec + " non-essential built-in functions; Python 2 only + syn keyword pythonBuiltin apply buffer coerce intern + " avoid highlighting attributes as builtins + syn match pythonAttribute /\.\h\w*/hs=s+1 + \ contains=ALLBUT,pythonBuiltin,pythonFunction,pythonAsync + \ transparent +endif + +" From the 'Python Library Reference' class hierarchy at the bottom. +" http://docs.python.org/2/library/exceptions.html +" http://docs.python.org/3/library/exceptions.html +if !exists("python_no_exception_highlight") + " builtin base exceptions (used mostly as base classes for other exceptions) + syn keyword pythonExceptions BaseException Exception + syn keyword pythonExceptions ArithmeticError BufferError + syn keyword pythonExceptions LookupError + " builtin base exceptions removed in Python 3 + syn keyword pythonExceptions EnvironmentError StandardError + " builtin exceptions (actually raised) + syn keyword pythonExceptions AssertionError AttributeError + syn keyword pythonExceptions EOFError FloatingPointError GeneratorExit + syn keyword pythonExceptions ImportError IndentationError + syn keyword pythonExceptions IndexError KeyError KeyboardInterrupt + syn keyword pythonExceptions MemoryError NameError NotImplementedError + syn keyword pythonExceptions OSError OverflowError ReferenceError + syn keyword pythonExceptions RuntimeError StopIteration SyntaxError + syn keyword pythonExceptions SystemError SystemExit TabError TypeError + syn keyword pythonExceptions UnboundLocalError UnicodeError + syn keyword pythonExceptions UnicodeDecodeError UnicodeEncodeError + syn keyword pythonExceptions UnicodeTranslateError ValueError + syn keyword pythonExceptions ZeroDivisionError + " builtin OS exceptions in Python 3 + syn keyword pythonExceptions BlockingIOError BrokenPipeError + syn keyword pythonExceptions ChildProcessError ConnectionAbortedError + syn keyword pythonExceptions ConnectionError ConnectionRefusedError + syn keyword pythonExceptions ConnectionResetError FileExistsError + syn keyword pythonExceptions FileNotFoundError InterruptedError + syn keyword pythonExceptions IsADirectoryError NotADirectoryError + syn keyword pythonExceptions PermissionError ProcessLookupError + syn keyword pythonExceptions RecursionError StopAsyncIteration + syn keyword pythonExceptions TimeoutError + " builtin exceptions deprecated/removed in Python 3 + syn keyword pythonExceptions IOError VMSError WindowsError + " builtin warnings + syn keyword pythonExceptions BytesWarning DeprecationWarning FutureWarning + syn keyword pythonExceptions ImportWarning PendingDeprecationWarning + syn keyword pythonExceptions RuntimeWarning SyntaxWarning UnicodeWarning + syn keyword pythonExceptions UserWarning Warning + " builtin warnings in Python 3 + syn keyword pythonExceptions ResourceWarning +endif + +if exists("python_space_error_highlight") + " trailing whitespace + syn match pythonSpaceError display excludenl "\s\+$" + " mixed tabs and spaces + syn match pythonSpaceError display " \+\t" + syn match pythonSpaceError display "\t\+ " +endif + +" Do not spell doctests inside strings. +" Notice that the end of a string, either ''', or """, will end the contained +" doctest too. Thus, we do *not* need to have it as an end pattern. +if !exists("python_no_doctest_highlight") + if !exists("python_no_doctest_code_highlight") + syn region pythonDoctest + \ start="^\s*>>>\s" end="^\s*$" + \ contained contains=ALLBUT,pythonDoctest,pythonFunction,@Spell + syn region pythonDoctestValue + \ start=+^\s*\%(>>>\s\|\.\.\.\s\|"""\|'''\)\@!\S\++ end="$" + \ contained + else + syn region pythonDoctest + \ start="^\s*>>>" end="^\s*$" + \ contained contains=@NoSpell + endif +endif + +" Sync at the beginning of class, function, or method definition. +syn sync match pythonSync grouphere NONE "^\%(def\|class\)\s\+\h\w*\s*[(:]" + +" The default highlight links. Can be overridden later. +hi def link pythonStatement Statement +hi def link pythonConditional Conditional +hi def link pythonRepeat Repeat +hi def link pythonOperator Operator +hi def link pythonException Exception +hi def link pythonInclude Include +hi def link pythonAsync Statement +hi def link pythonDecorator Define +hi def link pythonDecoratorName Function +hi def link pythonFunction Function +hi def link pythonComment Comment +hi def link pythonTodo Todo +hi def link pythonString String +hi def link pythonRawString String +hi def link pythonQuotes String +hi def link pythonTripleQuotes pythonQuotes +hi def link pythonEscape Special +if !exists("python_no_number_highlight") + hi def link pythonNumber Number +endif +if !exists("python_no_builtin_highlight") + hi def link pythonBuiltin Function +endif +if !exists("python_no_exception_highlight") + hi def link pythonExceptions Structure +endif +if exists("python_space_error_highlight") + hi def link pythonSpaceError Error +endif +if !exists("python_no_doctest_highlight") + hi def link pythonDoctest Special + hi def link pythonDoctestValue Define +endif + +let b:current_syntax = "python" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim:set sw=2 sts=2 ts=8 noet: diff --git a/runtime/syntax/qf.vim b/runtime/syntax/qf.vim index 5c987a97b6..6f2ea6a92e 100644 --- a/runtime/syntax/qf.vim +++ b/runtime/syntax/qf.vim @@ -1,7 +1,8 @@ " Vim syntax file " Language: Quickfix window -" Maintainer: Bram Moolenaar <Bram@vim.org> -" Last change: 2001 Jan 15 +" Maintainer: The Vim Project <https://github.com/vim/vim> +" Last Change: 2023 Aug 10 +" Former Maintainer: Bram Moolenaar <Bram@vim.org> " Quit when a syntax file was already loaded if exists("b:current_syntax") diff --git a/runtime/syntax/qml.vim b/runtime/syntax/qml.vim new file mode 100644 index 0000000000..d6f2abec37 --- /dev/null +++ b/runtime/syntax/qml.vim @@ -0,0 +1,1130 @@ +" Vim syntax file +" Language: QML +" Previous Maintainer: Peter Hoeg <peter@hoeg.com> +" Maintainer: Chase Knowlden <haroldknowlden@gmail.com> +" Changes: `git log` is your friend +" Last Change: 2023 Aug 16 +" +" This file is bassed on the original work done by Warwick Allison +" <warwick.allison@nokia.com> whose did about 99% of the work here. + +" Based on javascript syntax (as is QML) + +if exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'qml' +endif + +" Drop fold if it set but vim doesn't support it. +if !has("folding") + unlet! qml_fold +endif + +syn case ignore + +syn cluster qmlExpr contains=qmlStringD,qmlStringS,qmlStringT,SqmlCharacter,qmlNumber,qmlObjectLiteralType,qmlBoolean,qmlType,qmlJsType,qmlNull,qmlGlobal,qmlFunction,qmlArrowFunction,qmlNullishCoalescing +syn keyword qmlCommentTodo TODO FIXME XXX TBD contained +syn match qmlLineComment "\/\/.*" contains=@Spell,qmlCommentTodo +syn match qmlCommentSkip "^[ \t]*\*\($\|[ \t]\+\)" +syn region qmlComment start="/\*" end="\*/" contains=@Spell,qmlCommentTodo fold +syn match qmlSpecial "\\\d\d\d\|\\." +syn region qmlStringD start=+"+ skip=+\\\\\|\\"\|\\$+ end=+"+ keepend contains=qmlSpecial,@htmlPreproc,@Spell +syn region qmlStringS start=+'+ skip=+\\\\\|\\'\|\\$+ end=+'+ keepend contains=qmlSpecial,@htmlPreproc,@Spell +syn region qmlStringT start=+`+ skip=+\\\\\|\\`\|\\$+ end=+`+ keepend contains=qmlTemplateExpr,qmlSpecial,@htmlPreproc,@Spell + +syntax region qmlTemplateExpr contained matchgroup=qmlBraces start=+${+ end=+}+ keepend contains=@qmlExpr + +syn match qmlCharacter "'\\.'" +syn match qmlNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" +syn region qmlRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gi]\{0,2\}\s*$+ end=+/[gi]\{0,2\}\s*[;.,)\]}]+me=e-1 contains=@htmlPreproc oneline +syn match qmlObjectLiteralType "[A-Za-z][_A-Za-z0-9]*\s*\({\)\@=" +syn region qmlTernaryColon start="?" end=":" contains=@qmlExpr,qmlBraces,qmlParens,qmlLineComment +syn match qmlBindingProperty "\<[A-Za-z][_A-Za-z.0-9]*\s*:" +syn match qmlNullishCoalescing "??" + +syn keyword qmlConditional if else switch +syn keyword qmlRepeat while for do in +syn keyword qmlBranch break continue +syn keyword qmlOperator new delete instanceof typeof +syn keyword qmlJsType Array Boolean Date Function Number Object String RegExp +syn keyword qmlType action alias bool color date double enumeration font int list point real rect size string time url variant vector2d vector3d vector4d coordinate geocircle geopath geopolygon georectangle geoshape matrix4x4 palette quaternion +syn keyword qmlStatement return with +syn keyword qmlBoolean true false +syn keyword qmlNull null undefined +syn keyword qmlIdentifier arguments this var let const +syn keyword qmlLabel case default +syn keyword qmlException try catch finally throw +syn keyword qmlMessage alert confirm prompt status +syn keyword qmlGlobal self +syn keyword qmlDeclaration property signal component readonly required +syn keyword qmlReserved abstract boolean byte char class debugger enum export extends final float goto implements import interface long native package pragma private protected public short static super synchronized throws transient volatile + +syn case match + +" List extracted in alphabatical order from: https://doc.qt.io/qt-5/qmltypes.html +" Qt v5.15.1 + +" Begin Literal Types {{{ + +syntax keyword qmlObjectLiteralType Abstract3DSeries +syntax keyword qmlObjectLiteralType AbstractActionInput +syntax keyword qmlObjectLiteralType AbstractAnimation +syntax keyword qmlObjectLiteralType AbstractAxis +syntax keyword qmlObjectLiteralType AbstractAxis3D +syntax keyword qmlObjectLiteralType AbstractAxisInput +syntax keyword qmlObjectLiteralType AbstractBarSeries +syntax keyword qmlObjectLiteralType AbstractButton +syntax keyword qmlObjectLiteralType AbstractClipAnimator +syntax keyword qmlObjectLiteralType AbstractClipBlendNode +syntax keyword qmlObjectLiteralType AbstractDataProxy +syntax keyword qmlObjectLiteralType AbstractGraph3D +syntax keyword qmlObjectLiteralType AbstractInputHandler3D +syntax keyword qmlObjectLiteralType AbstractPhysicalDevice +syntax keyword qmlObjectLiteralType AbstractRayCaster +syntax keyword qmlObjectLiteralType AbstractSeries +syntax keyword qmlObjectLiteralType AbstractSkeleton +syntax keyword qmlObjectLiteralType AbstractTexture +syntax keyword qmlObjectLiteralType AbstractTextureImage +syntax keyword qmlObjectLiteralType Accelerometer +syntax keyword qmlObjectLiteralType AccelerometerReading +syntax keyword qmlObjectLiteralType Accessible +syntax keyword qmlObjectLiteralType Action +syntax keyword qmlObjectLiteralType ActionGroup +syntax keyword qmlObjectLiteralType ActionInput +syntax keyword qmlObjectLiteralType AdditiveClipBlend +syntax keyword qmlObjectLiteralType AdditiveColorGradient +syntax keyword qmlObjectLiteralType Address +syntax keyword qmlObjectLiteralType Affector +syntax keyword qmlObjectLiteralType Age +syntax keyword qmlObjectLiteralType AlphaCoverage +syntax keyword qmlObjectLiteralType AlphaTest +syntax keyword qmlObjectLiteralType Altimeter +syntax keyword qmlObjectLiteralType AltimeterReading +syntax keyword qmlObjectLiteralType AluminumAnodizedEmissiveMaterial +syntax keyword qmlObjectLiteralType AluminumAnodizedMaterial +syntax keyword qmlObjectLiteralType AluminumBrushedMaterial +syntax keyword qmlObjectLiteralType AluminumEmissiveMaterial +syntax keyword qmlObjectLiteralType AluminumMaterial +syntax keyword qmlObjectLiteralType AmbientLightReading +syntax keyword qmlObjectLiteralType AmbientLightSensor +syntax keyword qmlObjectLiteralType AmbientTemperatureReading +syntax keyword qmlObjectLiteralType AmbientTemperatureSensor +syntax keyword qmlObjectLiteralType AnalogAxisInput +syntax keyword qmlObjectLiteralType AnchorAnimation +syntax keyword qmlObjectLiteralType AnchorChanges +syntax keyword qmlObjectLiteralType AngleDirection +syntax keyword qmlObjectLiteralType AnimatedImage +syntax keyword qmlObjectLiteralType AnimatedSprite +syntax keyword qmlObjectLiteralType Animation +syntax keyword qmlObjectLiteralType AnimationController +syntax keyword qmlObjectLiteralType AnimationGroup +syntax keyword qmlObjectLiteralType Animator +syntax keyword qmlObjectLiteralType ApplicationWindow +syntax keyword qmlObjectLiteralType ApplicationWindowStyle +syntax keyword qmlObjectLiteralType AreaLight +syntax keyword qmlObjectLiteralType AreaSeries +syntax keyword qmlObjectLiteralType Armature +syntax keyword qmlObjectLiteralType AttenuationModelInverse +syntax keyword qmlObjectLiteralType AttenuationModelLinear +syntax keyword qmlObjectLiteralType Attractor +syntax keyword qmlObjectLiteralType Attribute +syntax keyword qmlObjectLiteralType Audio +syntax keyword qmlObjectLiteralType AudioCategory +syntax keyword qmlObjectLiteralType AudioEngine +syntax keyword qmlObjectLiteralType AudioListener +syntax keyword qmlObjectLiteralType AudioSample +syntax keyword qmlObjectLiteralType AuthenticationDialogRequest +syntax keyword qmlObjectLiteralType Axis +syntax keyword qmlObjectLiteralType AxisAccumulator +syntax keyword qmlObjectLiteralType AxisHelper +syntax keyword qmlObjectLiteralType AxisSetting + +syntax keyword qmlObjectLiteralType BackspaceKey +syntax keyword qmlObjectLiteralType Bar3DSeries +syntax keyword qmlObjectLiteralType BarCategoryAxis +syntax keyword qmlObjectLiteralType BarDataProxy +syntax keyword qmlObjectLiteralType Bars3D +syntax keyword qmlObjectLiteralType BarSeries +syntax keyword qmlObjectLiteralType BarSet +syntax keyword qmlObjectLiteralType BaseKey +syntax keyword qmlObjectLiteralType BasicTableView +syntax keyword qmlObjectLiteralType Behavior +syntax keyword qmlObjectLiteralType Binding +syntax keyword qmlObjectLiteralType Blend +syntax keyword qmlObjectLiteralType BlendedClipAnimator +syntax keyword qmlObjectLiteralType BlendEquation +syntax keyword qmlObjectLiteralType BlendEquationArguments +syntax keyword qmlObjectLiteralType Blending +syntax keyword qmlObjectLiteralType BlitFramebuffer +syntax keyword qmlObjectLiteralType BluetoothDiscoveryModel +syntax keyword qmlObjectLiteralType BluetoothService +syntax keyword qmlObjectLiteralType BluetoothSocket +syntax keyword qmlObjectLiteralType Blur +syntax keyword qmlObjectLiteralType bool +syntax keyword qmlObjectLiteralType BorderImage +syntax keyword qmlObjectLiteralType BorderImageMesh +syntax keyword qmlObjectLiteralType BoundaryRule +syntax keyword qmlObjectLiteralType Bounds +syntax keyword qmlObjectLiteralType BoxPlotSeries +syntax keyword qmlObjectLiteralType BoxSet +syntax keyword qmlObjectLiteralType BrightnessContrast +syntax keyword qmlObjectLiteralType BrushStrokes +syntax keyword qmlObjectLiteralType Buffer +syntax keyword qmlObjectLiteralType BufferBlit +syntax keyword qmlObjectLiteralType BufferCapture +syntax keyword qmlObjectLiteralType BufferInput +syntax keyword qmlObjectLiteralType BusyIndicator +syntax keyword qmlObjectLiteralType BusyIndicatorStyle +syntax keyword qmlObjectLiteralType Button +syntax keyword qmlObjectLiteralType ButtonAxisInput +syntax keyword qmlObjectLiteralType ButtonGroup +syntax keyword qmlObjectLiteralType ButtonStyle + +syntax keyword qmlObjectLiteralType Calendar +syntax keyword qmlObjectLiteralType CalendarModel +syntax keyword qmlObjectLiteralType CalendarStyle +syntax keyword qmlObjectLiteralType Camera +syntax keyword qmlObjectLiteralType Camera3D +syntax keyword qmlObjectLiteralType CameraCapabilities +syntax keyword qmlObjectLiteralType CameraCapture +syntax keyword qmlObjectLiteralType CameraExposure +syntax keyword qmlObjectLiteralType CameraFlash +syntax keyword qmlObjectLiteralType CameraFocus +syntax keyword qmlObjectLiteralType CameraImageProcessing +syntax keyword qmlObjectLiteralType CameraLens +syntax keyword qmlObjectLiteralType CameraRecorder +syntax keyword qmlObjectLiteralType CameraSelector +syntax keyword qmlObjectLiteralType CandlestickSeries +syntax keyword qmlObjectLiteralType CandlestickSet +syntax keyword qmlObjectLiteralType Canvas +syntax keyword qmlObjectLiteralType CanvasGradient +syntax keyword qmlObjectLiteralType CanvasImageData +syntax keyword qmlObjectLiteralType CanvasPixelArray +syntax keyword qmlObjectLiteralType Category +syntax keyword qmlObjectLiteralType CategoryAxis +syntax keyword qmlObjectLiteralType CategoryAxis3D +syntax keyword qmlObjectLiteralType CategoryModel +syntax keyword qmlObjectLiteralType CategoryRange +syntax keyword qmlObjectLiteralType ChangeLanguageKey +syntax keyword qmlObjectLiteralType ChartView +syntax keyword qmlObjectLiteralType CheckBox +syntax keyword qmlObjectLiteralType CheckBoxStyle +syntax keyword qmlObjectLiteralType CheckDelegate +syntax keyword qmlObjectLiteralType ChromaticAberration +syntax keyword qmlObjectLiteralType CircularGauge +syntax keyword qmlObjectLiteralType CircularGaugeStyle +syntax keyword qmlObjectLiteralType ClearBuffers +syntax keyword qmlObjectLiteralType ClipAnimator +syntax keyword qmlObjectLiteralType ClipBlendValue +syntax keyword qmlObjectLiteralType ClipPlane +syntax keyword qmlObjectLiteralType CloseEvent +syntax keyword qmlObjectLiteralType color +syntax keyword qmlObjectLiteralType ColorAnimation +syntax keyword qmlObjectLiteralType ColorDialog +syntax keyword qmlObjectLiteralType ColorDialogRequest +syntax keyword qmlObjectLiteralType ColorGradient +syntax keyword qmlObjectLiteralType ColorGradientStop +syntax keyword qmlObjectLiteralType Colorize +syntax keyword qmlObjectLiteralType ColorMask +syntax keyword qmlObjectLiteralType ColorMaster +syntax keyword qmlObjectLiteralType ColorOverlay +syntax keyword qmlObjectLiteralType Column +syntax keyword qmlObjectLiteralType ColumnLayout +syntax keyword qmlObjectLiteralType ComboBox +syntax keyword qmlObjectLiteralType ComboBoxStyle +syntax keyword qmlObjectLiteralType Command +syntax keyword qmlObjectLiteralType Compass +syntax keyword qmlObjectLiteralType CompassReading +syntax keyword qmlObjectLiteralType Component +syntax keyword qmlObjectLiteralType Component3D +syntax keyword qmlObjectLiteralType ComputeCommand +syntax keyword qmlObjectLiteralType ConeGeometry +syntax keyword qmlObjectLiteralType ConeMesh +syntax keyword qmlObjectLiteralType ConicalGradient +syntax keyword qmlObjectLiteralType Connections +syntax keyword qmlObjectLiteralType ContactDetail +syntax keyword qmlObjectLiteralType ContactDetails +syntax keyword qmlObjectLiteralType Container +syntax keyword qmlObjectLiteralType Context2D +syntax keyword qmlObjectLiteralType ContextMenuRequest +syntax keyword qmlObjectLiteralType Control +syntax keyword qmlObjectLiteralType coordinate +syntax keyword qmlObjectLiteralType CoordinateAnimation +syntax keyword qmlObjectLiteralType CopperMaterial +syntax keyword qmlObjectLiteralType CuboidGeometry +syntax keyword qmlObjectLiteralType CuboidMesh +syntax keyword qmlObjectLiteralType CullFace +syntax keyword qmlObjectLiteralType CullMode +syntax keyword qmlObjectLiteralType CumulativeDirection +syntax keyword qmlObjectLiteralType Custom3DItem +syntax keyword qmlObjectLiteralType Custom3DLabel +syntax keyword qmlObjectLiteralType Custom3DVolume +syntax keyword qmlObjectLiteralType CustomCamera +syntax keyword qmlObjectLiteralType CustomMaterial +syntax keyword qmlObjectLiteralType CustomParticle +syntax keyword qmlObjectLiteralType CylinderGeometry +syntax keyword qmlObjectLiteralType CylinderMesh + +syntax keyword qmlObjectLiteralType Date +syntax keyword qmlObjectLiteralType date +syntax keyword qmlObjectLiteralType DateTimeAxis +syntax keyword qmlObjectLiteralType DayOfWeekRow +syntax keyword qmlObjectLiteralType DebugView +syntax keyword qmlObjectLiteralType DefaultMaterial +syntax keyword qmlObjectLiteralType DelayButton +syntax keyword qmlObjectLiteralType DelayButtonStyle +syntax keyword qmlObjectLiteralType DelegateChoice +syntax keyword qmlObjectLiteralType DelegateChooser +syntax keyword qmlObjectLiteralType DelegateModel +syntax keyword qmlObjectLiteralType DelegateModelGroup +syntax keyword qmlObjectLiteralType DepthInput +syntax keyword qmlObjectLiteralType DepthOfFieldHQBlur +syntax keyword qmlObjectLiteralType DepthRange +syntax keyword qmlObjectLiteralType DepthTest +syntax keyword qmlObjectLiteralType Desaturate +syntax keyword qmlObjectLiteralType Dial +syntax keyword qmlObjectLiteralType Dialog +syntax keyword qmlObjectLiteralType DialogButtonBox +syntax keyword qmlObjectLiteralType DialStyle +syntax keyword qmlObjectLiteralType DiffuseMapMaterial +syntax keyword qmlObjectLiteralType DiffuseSpecularMapMaterial +syntax keyword qmlObjectLiteralType DiffuseSpecularMaterial +syntax keyword qmlObjectLiteralType Direction +syntax keyword qmlObjectLiteralType DirectionalBlur +syntax keyword qmlObjectLiteralType DirectionalLight +syntax keyword qmlObjectLiteralType DispatchCompute +syntax keyword qmlObjectLiteralType Displace +syntax keyword qmlObjectLiteralType DistanceReading +syntax keyword qmlObjectLiteralType DistanceSensor +syntax keyword qmlObjectLiteralType DistortionRipple +syntax keyword qmlObjectLiteralType DistortionSphere +syntax keyword qmlObjectLiteralType DistortionSpiral +syntax keyword qmlObjectLiteralType Dithering +syntax keyword qmlObjectLiteralType double +syntax keyword qmlObjectLiteralType DoubleValidator +syntax keyword qmlObjectLiteralType Drag +syntax keyword qmlObjectLiteralType DragEvent +syntax keyword qmlObjectLiteralType DragHandler +syntax keyword qmlObjectLiteralType Drawer +syntax keyword qmlObjectLiteralType DropArea +syntax keyword qmlObjectLiteralType DropShadow +syntax keyword qmlObjectLiteralType DwmFeatures +syntax keyword qmlObjectLiteralType DynamicParameter + +syntax keyword qmlObjectLiteralType EdgeDetect +syntax keyword qmlObjectLiteralType EditorialModel +syntax keyword qmlObjectLiteralType Effect +syntax keyword qmlObjectLiteralType EllipseShape +syntax keyword qmlObjectLiteralType Emboss +syntax keyword qmlObjectLiteralType Emitter +syntax keyword qmlObjectLiteralType EnterKey +syntax keyword qmlObjectLiteralType EnterKeyAction +syntax keyword qmlObjectLiteralType Entity +syntax keyword qmlObjectLiteralType EntityLoader +syntax keyword qmlObjectLiteralType enumeration +syntax keyword qmlObjectLiteralType EnvironmentLight +syntax keyword qmlObjectLiteralType EventConnection +syntax keyword qmlObjectLiteralType EventPoint +syntax keyword qmlObjectLiteralType EventTouchPoint +syntax keyword qmlObjectLiteralType ExclusiveGroup +syntax keyword qmlObjectLiteralType ExtendedAttributes +syntax keyword qmlObjectLiteralType ExtrudedTextGeometry +syntax keyword qmlObjectLiteralType ExtrudedTextMesh + +syntax keyword qmlObjectLiteralType FastBlur +syntax keyword qmlObjectLiteralType FileDialog +syntax keyword qmlObjectLiteralType FileDialogRequest +syntax keyword qmlObjectLiteralType FillerKey +syntax keyword qmlObjectLiteralType FilterKey +syntax keyword qmlObjectLiteralType FinalState +syntax keyword qmlObjectLiteralType FindTextResult +syntax keyword qmlObjectLiteralType FirstPersonCameraController +syntax keyword qmlObjectLiteralType Flickable +syntax keyword qmlObjectLiteralType Flip +syntax keyword qmlObjectLiteralType Flipable +syntax keyword qmlObjectLiteralType Flow +syntax keyword qmlObjectLiteralType FocusScope +syntax keyword qmlObjectLiteralType FolderDialog +syntax keyword qmlObjectLiteralType FolderListModel +syntax keyword qmlObjectLiteralType font +syntax keyword qmlObjectLiteralType FontDialog +syntax keyword qmlObjectLiteralType FontLoader +syntax keyword qmlObjectLiteralType FontMetrics +syntax keyword qmlObjectLiteralType FormValidationMessageRequest +syntax keyword qmlObjectLiteralType ForwardRenderer +syntax keyword qmlObjectLiteralType Frame +syntax keyword qmlObjectLiteralType FrameAction +syntax keyword qmlObjectLiteralType FrameGraphNode +syntax keyword qmlObjectLiteralType Friction +syntax keyword qmlObjectLiteralType FrontFace +syntax keyword qmlObjectLiteralType FrostedGlassMaterial +syntax keyword qmlObjectLiteralType FrostedGlassSinglePassMaterial +syntax keyword qmlObjectLiteralType FrustumCamera +syntax keyword qmlObjectLiteralType FrustumCulling +syntax keyword qmlObjectLiteralType FullScreenRequest +syntax keyword qmlObjectLiteralType Fxaa + +syntax keyword qmlObjectLiteralType Gamepad +syntax keyword qmlObjectLiteralType GamepadManager +syntax keyword qmlObjectLiteralType GammaAdjust +syntax keyword qmlObjectLiteralType Gauge +syntax keyword qmlObjectLiteralType GaugeStyle +syntax keyword qmlObjectLiteralType GaussianBlur +syntax keyword qmlObjectLiteralType geocircle +syntax keyword qmlObjectLiteralType GeocodeModel +syntax keyword qmlObjectLiteralType Geometry +syntax keyword qmlObjectLiteralType GeometryRenderer +syntax keyword qmlObjectLiteralType geopath +syntax keyword qmlObjectLiteralType geopolygon +syntax keyword qmlObjectLiteralType georectangle +syntax keyword qmlObjectLiteralType geoshape +syntax keyword qmlObjectLiteralType GestureEvent +syntax keyword qmlObjectLiteralType GlassMaterial +syntax keyword qmlObjectLiteralType GlassRefractiveMaterial +syntax keyword qmlObjectLiteralType Glow +syntax keyword qmlObjectLiteralType GoochMaterial +syntax keyword qmlObjectLiteralType Gradient +syntax keyword qmlObjectLiteralType GradientStop +syntax keyword qmlObjectLiteralType GraphicsApiFilter +syntax keyword qmlObjectLiteralType GraphicsInfo +syntax keyword qmlObjectLiteralType Gravity +syntax keyword qmlObjectLiteralType Grid +syntax keyword qmlObjectLiteralType GridGeometry +syntax keyword qmlObjectLiteralType GridLayout +syntax keyword qmlObjectLiteralType GridMesh +syntax keyword qmlObjectLiteralType GridView +syntax keyword qmlObjectLiteralType GroupBox +syntax keyword qmlObjectLiteralType GroupGoal +syntax keyword qmlObjectLiteralType Gyroscope +syntax keyword qmlObjectLiteralType GyroscopeReading + +syntax keyword qmlObjectLiteralType HandlerPoint +syntax keyword qmlObjectLiteralType HandwritingInputPanel +syntax keyword qmlObjectLiteralType HandwritingModeKey +syntax keyword qmlObjectLiteralType HBarModelMapper +syntax keyword qmlObjectLiteralType HBoxPlotModelMapper +syntax keyword qmlObjectLiteralType HCandlestickModelMapper +syntax keyword qmlObjectLiteralType HDRBloomTonemap +syntax keyword qmlObjectLiteralType HeightMapSurfaceDataProxy +syntax keyword qmlObjectLiteralType HideKeyboardKey +syntax keyword qmlObjectLiteralType HistoryState +syntax keyword qmlObjectLiteralType HolsterReading +syntax keyword qmlObjectLiteralType HolsterSensor +syntax keyword qmlObjectLiteralType HorizontalBarSeries +syntax keyword qmlObjectLiteralType HorizontalHeaderView +syntax keyword qmlObjectLiteralType HorizontalPercentBarSeries +syntax keyword qmlObjectLiteralType HorizontalStackedBarSeries +syntax keyword qmlObjectLiteralType Host +syntax keyword qmlObjectLiteralType HoverHandler +syntax keyword qmlObjectLiteralType HPieModelMapper +syntax keyword qmlObjectLiteralType HueSaturation +syntax keyword qmlObjectLiteralType HumidityReading +syntax keyword qmlObjectLiteralType HumiditySensor +syntax keyword qmlObjectLiteralType HXYModelMapper + +syntax keyword qmlObjectLiteralType Icon +syntax keyword qmlObjectLiteralType IdleInhibitManagerV1 +syntax keyword qmlObjectLiteralType Image +syntax keyword qmlObjectLiteralType ImageModel +syntax keyword qmlObjectLiteralType ImageParticle +syntax keyword qmlObjectLiteralType InnerShadow +syntax keyword qmlObjectLiteralType InputChord +syntax keyword qmlObjectLiteralType InputContext +syntax keyword qmlObjectLiteralType InputEngine +syntax keyword qmlObjectLiteralType InputHandler3D +syntax keyword qmlObjectLiteralType InputMethod +syntax keyword qmlObjectLiteralType InputModeKey +syntax keyword qmlObjectLiteralType InputPanel +syntax keyword qmlObjectLiteralType InputSequence +syntax keyword qmlObjectLiteralType InputSettings +syntax keyword qmlObjectLiteralType Instantiator +syntax keyword qmlObjectLiteralType int +syntax keyword qmlObjectLiteralType IntValidator +syntax keyword qmlObjectLiteralType InvokedServices +syntax keyword qmlObjectLiteralType IRProximityReading +syntax keyword qmlObjectLiteralType IRProximitySensor +syntax keyword qmlObjectLiteralType Item +syntax keyword qmlObjectLiteralType ItemDelegate +syntax keyword qmlObjectLiteralType ItemGrabResult +syntax keyword qmlObjectLiteralType ItemModelBarDataProxy +syntax keyword qmlObjectLiteralType ItemModelScatterDataProxy +syntax keyword qmlObjectLiteralType ItemModelSurfaceDataProxy +syntax keyword qmlObjectLiteralType ItemParticle +syntax keyword qmlObjectLiteralType ItemSelectionModel +syntax keyword qmlObjectLiteralType IviApplication +syntax keyword qmlObjectLiteralType IviSurface + +syntax keyword qmlObjectLiteralType JavaScriptDialogRequest +syntax keyword qmlObjectLiteralType Joint +syntax keyword qmlObjectLiteralType JumpList +syntax keyword qmlObjectLiteralType JumpListCategory +syntax keyword qmlObjectLiteralType JumpListDestination +syntax keyword qmlObjectLiteralType JumpListLink +syntax keyword qmlObjectLiteralType JumpListSeparator + +syntax keyword qmlObjectLiteralType Key +syntax keyword qmlObjectLiteralType KeyboardColumn +syntax keyword qmlObjectLiteralType KeyboardDevice +syntax keyword qmlObjectLiteralType KeyboardHandler +syntax keyword qmlObjectLiteralType KeyboardLayout +syntax keyword qmlObjectLiteralType KeyboardLayoutLoader +syntax keyword qmlObjectLiteralType KeyboardRow +syntax keyword qmlObjectLiteralType KeyboardStyle +syntax keyword qmlObjectLiteralType KeyEvent +syntax keyword qmlObjectLiteralType Keyframe +syntax keyword qmlObjectLiteralType KeyframeAnimation +syntax keyword qmlObjectLiteralType KeyframeGroup +syntax keyword qmlObjectLiteralType KeyIcon +syntax keyword qmlObjectLiteralType KeyNavigation +syntax keyword qmlObjectLiteralType KeyPanel +syntax keyword qmlObjectLiteralType Keys + +syntax keyword qmlObjectLiteralType Label +syntax keyword qmlObjectLiteralType Layer +syntax keyword qmlObjectLiteralType LayerFilter +syntax keyword qmlObjectLiteralType Layout +syntax keyword qmlObjectLiteralType LayoutMirroring +syntax keyword qmlObjectLiteralType Legend +syntax keyword qmlObjectLiteralType LerpClipBlend +syntax keyword qmlObjectLiteralType LevelAdjust +syntax keyword qmlObjectLiteralType LevelOfDetail +syntax keyword qmlObjectLiteralType LevelOfDetailBoundingSphere +syntax keyword qmlObjectLiteralType LevelOfDetailLoader +syntax keyword qmlObjectLiteralType LevelOfDetailSwitch +syntax keyword qmlObjectLiteralType LidReading +syntax keyword qmlObjectLiteralType LidSensor +syntax keyword qmlObjectLiteralType Light +syntax keyword qmlObjectLiteralType Light3D +syntax keyword qmlObjectLiteralType LightReading +syntax keyword qmlObjectLiteralType LightSensor +syntax keyword qmlObjectLiteralType LinearGradient +syntax keyword qmlObjectLiteralType LineSeries +syntax keyword qmlObjectLiteralType LineShape +syntax keyword qmlObjectLiteralType LineWidth +syntax keyword qmlObjectLiteralType list +syntax keyword qmlObjectLiteralType ListElement +syntax keyword qmlObjectLiteralType ListModel +syntax keyword qmlObjectLiteralType ListView +syntax keyword qmlObjectLiteralType Loader +syntax keyword qmlObjectLiteralType Loader3D +syntax keyword qmlObjectLiteralType Locale +syntax keyword qmlObjectLiteralType Location +syntax keyword qmlObjectLiteralType LoggingCategory +syntax keyword qmlObjectLiteralType LogicalDevice +syntax keyword qmlObjectLiteralType LogValueAxis +syntax keyword qmlObjectLiteralType LogValueAxis3DFormatter +syntax keyword qmlObjectLiteralType LottieAnimation + +syntax keyword qmlObjectLiteralType Magnetometer +syntax keyword qmlObjectLiteralType MagnetometerReading +syntax keyword qmlObjectLiteralType Map +syntax keyword qmlObjectLiteralType MapCircle +syntax keyword qmlObjectLiteralType MapCircleObject +syntax keyword qmlObjectLiteralType MapCopyrightNotice +syntax keyword qmlObjectLiteralType MapGestureArea +syntax keyword qmlObjectLiteralType MapIconObject +syntax keyword qmlObjectLiteralType MapItemGroup +syntax keyword qmlObjectLiteralType MapItemView +syntax keyword qmlObjectLiteralType MapObjectView +syntax keyword qmlObjectLiteralType MapParameter +syntax keyword qmlObjectLiteralType MapPinchEvent +syntax keyword qmlObjectLiteralType MapPolygon +syntax keyword qmlObjectLiteralType MapPolygonObject +syntax keyword qmlObjectLiteralType MapPolyline +syntax keyword qmlObjectLiteralType MapPolylineObject +syntax keyword qmlObjectLiteralType MapQuickItem +syntax keyword qmlObjectLiteralType MapRectangle +syntax keyword qmlObjectLiteralType MapRoute +syntax keyword qmlObjectLiteralType MapRouteObject +syntax keyword qmlObjectLiteralType MapType +syntax keyword qmlObjectLiteralType Margins +syntax keyword qmlObjectLiteralType MaskedBlur +syntax keyword qmlObjectLiteralType MaskShape +syntax keyword qmlObjectLiteralType Material +syntax keyword qmlObjectLiteralType Matrix4x4 +syntax keyword qmlObjectLiteralType matrix4x4 +syntax keyword qmlObjectLiteralType MediaPlayer +syntax keyword qmlObjectLiteralType mediaplayer-qml-dynamic +syntax keyword qmlObjectLiteralType MemoryBarrier +syntax keyword qmlObjectLiteralType Menu +syntax keyword qmlObjectLiteralType MenuBar +syntax keyword qmlObjectLiteralType MenuBarItem +syntax keyword qmlObjectLiteralType MenuBarStyle +syntax keyword qmlObjectLiteralType MenuItem +syntax keyword qmlObjectLiteralType MenuItemGroup +syntax keyword qmlObjectLiteralType MenuSeparator +syntax keyword qmlObjectLiteralType MenuStyle +syntax keyword qmlObjectLiteralType Mesh +syntax keyword qmlObjectLiteralType MessageDialog +syntax keyword qmlObjectLiteralType MetalRoughMaterial +syntax keyword qmlObjectLiteralType ModeKey +syntax keyword qmlObjectLiteralType Model +syntax keyword qmlObjectLiteralType MonthGrid +syntax keyword qmlObjectLiteralType MorphingAnimation +syntax keyword qmlObjectLiteralType MorphTarget +syntax keyword qmlObjectLiteralType MotionBlur +syntax keyword qmlObjectLiteralType MouseArea +syntax keyword qmlObjectLiteralType MouseDevice +syntax keyword qmlObjectLiteralType MouseEvent +syntax keyword qmlObjectLiteralType MouseHandler +syntax keyword qmlObjectLiteralType MultiPointHandler +syntax keyword qmlObjectLiteralType MultiPointTouchArea +syntax keyword qmlObjectLiteralType MultiSampleAntiAliasing + +syntax keyword qmlObjectLiteralType Navigator +syntax keyword qmlObjectLiteralType NdefFilter +syntax keyword qmlObjectLiteralType NdefMimeRecord +syntax keyword qmlObjectLiteralType NdefRecord +syntax keyword qmlObjectLiteralType NdefTextRecord +syntax keyword qmlObjectLiteralType NdefUriRecord +syntax keyword qmlObjectLiteralType NearField +syntax keyword qmlObjectLiteralType Node +syntax keyword qmlObjectLiteralType NodeInstantiator +syntax keyword qmlObjectLiteralType NoDepthMask +syntax keyword qmlObjectLiteralType NoDraw +syntax keyword qmlObjectLiteralType NoPicking +syntax keyword qmlObjectLiteralType NormalDiffuseMapAlphaMaterial +syntax keyword qmlObjectLiteralType NormalDiffuseMapMaterial +syntax keyword qmlObjectLiteralType NormalDiffuseSpecularMapMaterial +syntax keyword qmlObjectLiteralType Number +syntax keyword qmlObjectLiteralType NumberAnimation +syntax keyword qmlObjectLiteralType NumberKey + +syntax keyword qmlObjectLiteralType Object3D +syntax keyword qmlObjectLiteralType ObjectModel +syntax keyword qmlObjectLiteralType ObjectPicker +syntax keyword qmlObjectLiteralType OpacityAnimator +syntax keyword qmlObjectLiteralType OpacityMask +syntax keyword qmlObjectLiteralType OpenGLInfo +syntax keyword qmlObjectLiteralType OrbitCameraController +syntax keyword qmlObjectLiteralType OrientationReading +syntax keyword qmlObjectLiteralType OrientationSensor +syntax keyword qmlObjectLiteralType OrthographicCamera +syntax keyword qmlObjectLiteralType Overlay + +syntax keyword qmlObjectLiteralType Package +syntax keyword qmlObjectLiteralType Page +syntax keyword qmlObjectLiteralType PageIndicator +syntax keyword qmlObjectLiteralType palette +syntax keyword qmlObjectLiteralType Pane +syntax keyword qmlObjectLiteralType PaperArtisticMaterial +syntax keyword qmlObjectLiteralType PaperOfficeMaterial +syntax keyword qmlObjectLiteralType ParallelAnimation +syntax keyword qmlObjectLiteralType Parameter +syntax keyword qmlObjectLiteralType ParentAnimation +syntax keyword qmlObjectLiteralType ParentChange +syntax keyword qmlObjectLiteralType Particle +syntax keyword qmlObjectLiteralType ParticleExtruder +syntax keyword qmlObjectLiteralType ParticleGroup +syntax keyword qmlObjectLiteralType ParticlePainter +syntax keyword qmlObjectLiteralType ParticleSystem +syntax keyword qmlObjectLiteralType Pass +syntax keyword qmlObjectLiteralType Path +syntax keyword qmlObjectLiteralType PathAngleArc +syntax keyword qmlObjectLiteralType PathAnimation +syntax keyword qmlObjectLiteralType PathArc +syntax keyword qmlObjectLiteralType PathAttribute +syntax keyword qmlObjectLiteralType PathCubic +syntax keyword qmlObjectLiteralType PathCurve +syntax keyword qmlObjectLiteralType PathElement +syntax keyword qmlObjectLiteralType PathInterpolator +syntax keyword qmlObjectLiteralType PathLine +syntax keyword qmlObjectLiteralType PathMove +syntax keyword qmlObjectLiteralType PathMultiline +syntax keyword qmlObjectLiteralType PathPercent +syntax keyword qmlObjectLiteralType PathPolyline +syntax keyword qmlObjectLiteralType PathQuad +syntax keyword qmlObjectLiteralType PathSvg +syntax keyword qmlObjectLiteralType PathText +syntax keyword qmlObjectLiteralType PathView +syntax keyword qmlObjectLiteralType PauseAnimation +syntax keyword qmlObjectLiteralType PdfDocument +syntax keyword qmlObjectLiteralType PdfLinkModel +syntax keyword qmlObjectLiteralType PdfNavigationStack +syntax keyword qmlObjectLiteralType PdfSearchModel +syntax keyword qmlObjectLiteralType PdfSelection +syntax keyword qmlObjectLiteralType PercentBarSeries +syntax keyword qmlObjectLiteralType PerspectiveCamera +syntax keyword qmlObjectLiteralType PerVertexColorMaterial +syntax keyword qmlObjectLiteralType PhongAlphaMaterial +syntax keyword qmlObjectLiteralType PhongMaterial +syntax keyword qmlObjectLiteralType PickEvent +syntax keyword qmlObjectLiteralType PickingSettings +syntax keyword qmlObjectLiteralType PickLineEvent +syntax keyword qmlObjectLiteralType PickPointEvent +syntax keyword qmlObjectLiteralType PickResult +syntax keyword qmlObjectLiteralType PickTriangleEvent +syntax keyword qmlObjectLiteralType Picture +syntax keyword qmlObjectLiteralType PieMenu +syntax keyword qmlObjectLiteralType PieMenuStyle +syntax keyword qmlObjectLiteralType PieSeries +syntax keyword qmlObjectLiteralType PieSlice +syntax keyword qmlObjectLiteralType PinchArea +syntax keyword qmlObjectLiteralType PinchEvent +syntax keyword qmlObjectLiteralType PinchHandler +syntax keyword qmlObjectLiteralType Place +syntax keyword qmlObjectLiteralType PlaceAttribute +syntax keyword qmlObjectLiteralType PlaceSearchModel +syntax keyword qmlObjectLiteralType PlaceSearchSuggestionModel +syntax keyword qmlObjectLiteralType PlaneGeometry +syntax keyword qmlObjectLiteralType PlaneMesh +syntax keyword qmlObjectLiteralType PlasticStructuredRedEmissiveMaterial +syntax keyword qmlObjectLiteralType PlasticStructuredRedMaterial +syntax keyword qmlObjectLiteralType Playlist +syntax keyword qmlObjectLiteralType PlaylistItem +syntax keyword qmlObjectLiteralType PlayVariation +syntax keyword qmlObjectLiteralType Plugin +syntax keyword qmlObjectLiteralType PluginParameter +syntax keyword qmlObjectLiteralType point +syntax keyword qmlObjectLiteralType PointDirection +syntax keyword qmlObjectLiteralType PointerDevice +syntax keyword qmlObjectLiteralType PointerDeviceHandler +syntax keyword qmlObjectLiteralType PointerEvent +syntax keyword qmlObjectLiteralType PointerHandler +syntax keyword qmlObjectLiteralType PointerScrollEvent +syntax keyword qmlObjectLiteralType PointHandler +syntax keyword qmlObjectLiteralType PointLight +syntax keyword qmlObjectLiteralType PointSize +syntax keyword qmlObjectLiteralType PolarChartView +syntax keyword qmlObjectLiteralType PolygonOffset +syntax keyword qmlObjectLiteralType Popup +syntax keyword qmlObjectLiteralType Position +syntax keyword qmlObjectLiteralType Positioner +syntax keyword qmlObjectLiteralType PositionSource +syntax keyword qmlObjectLiteralType PressureReading +syntax keyword qmlObjectLiteralType PressureSensor +syntax keyword qmlObjectLiteralType PrincipledMaterial +syntax keyword qmlObjectLiteralType Product +syntax keyword qmlObjectLiteralType ProgressBar +syntax keyword qmlObjectLiteralType ProgressBarStyle +syntax keyword qmlObjectLiteralType PropertyAction +syntax keyword qmlObjectLiteralType PropertyAnimation +syntax keyword qmlObjectLiteralType PropertyChanges +syntax keyword qmlObjectLiteralType ProximityFilter +syntax keyword qmlObjectLiteralType ProximityReading +syntax keyword qmlObjectLiteralType ProximitySensor + +syntax keyword qmlObjectLiteralType QAbstractState +syntax keyword qmlObjectLiteralType QAbstractTransition +syntax keyword qmlObjectLiteralType QmlSensors +syntax keyword qmlObjectLiteralType QSignalTransition +syntax keyword qmlObjectLiteralType Qt +syntax keyword qmlObjectLiteralType QtMultimedia +syntax keyword qmlObjectLiteralType QtObject +syntax keyword qmlObjectLiteralType QtPositioning +syntax keyword qmlObjectLiteralType QtRemoteObjects +syntax keyword qmlObjectLiteralType quaternion +syntax keyword qmlObjectLiteralType QuaternionAnimation +syntax keyword qmlObjectLiteralType QuotaRequest + +syntax keyword qmlObjectLiteralType RadialBlur +syntax keyword qmlObjectLiteralType RadialGradient +syntax keyword qmlObjectLiteralType Radio +syntax keyword qmlObjectLiteralType RadioButton +syntax keyword qmlObjectLiteralType RadioButtonStyle +syntax keyword qmlObjectLiteralType RadioData +syntax keyword qmlObjectLiteralType RadioDelegate +syntax keyword qmlObjectLiteralType RangeSlider +syntax keyword qmlObjectLiteralType RasterMode +syntax keyword qmlObjectLiteralType Ratings +syntax keyword qmlObjectLiteralType RayCaster +syntax keyword qmlObjectLiteralType real +syntax keyword qmlObjectLiteralType rect +syntax keyword qmlObjectLiteralType Rectangle +syntax keyword qmlObjectLiteralType RectangleShape +syntax keyword qmlObjectLiteralType RectangularGlow +syntax keyword qmlObjectLiteralType RecursiveBlur +syntax keyword qmlObjectLiteralType RegExpValidator +syntax keyword qmlObjectLiteralType RegisterProtocolHandlerRequest +syntax keyword qmlObjectLiteralType RegularExpressionValidator +syntax keyword qmlObjectLiteralType RenderCapabilities +syntax keyword qmlObjectLiteralType RenderCapture +syntax keyword qmlObjectLiteralType RenderCaptureReply +syntax keyword qmlObjectLiteralType RenderPass +syntax keyword qmlObjectLiteralType RenderPassFilter +syntax keyword qmlObjectLiteralType RenderSettings +syntax keyword qmlObjectLiteralType RenderState +syntax keyword qmlObjectLiteralType RenderStateSet +syntax keyword qmlObjectLiteralType RenderStats +syntax keyword qmlObjectLiteralType RenderSurfaceSelector +syntax keyword qmlObjectLiteralType RenderTarget +syntax keyword qmlObjectLiteralType RenderTargetOutput +syntax keyword qmlObjectLiteralType RenderTargetSelector +syntax keyword qmlObjectLiteralType Repeater +syntax keyword qmlObjectLiteralType Repeater3D +syntax keyword qmlObjectLiteralType ReviewModel +syntax keyword qmlObjectLiteralType Rotation +syntax keyword qmlObjectLiteralType RotationAnimation +syntax keyword qmlObjectLiteralType RotationAnimator +syntax keyword qmlObjectLiteralType RotationReading +syntax keyword qmlObjectLiteralType RotationSensor +syntax keyword qmlObjectLiteralType RoundButton +syntax keyword qmlObjectLiteralType Route +syntax keyword qmlObjectLiteralType RouteLeg +syntax keyword qmlObjectLiteralType RouteManeuver +syntax keyword qmlObjectLiteralType RouteModel +syntax keyword qmlObjectLiteralType RouteQuery +syntax keyword qmlObjectLiteralType RouteSegment +syntax keyword qmlObjectLiteralType Row +syntax keyword qmlObjectLiteralType RowLayout + +syntax keyword qmlObjectLiteralType Scale +syntax keyword qmlObjectLiteralType ScaleAnimator +syntax keyword qmlObjectLiteralType Scatter +syntax keyword qmlObjectLiteralType Scatter3D +syntax keyword qmlObjectLiteralType Scatter3DSeries +syntax keyword qmlObjectLiteralType ScatterDataProxy +syntax keyword qmlObjectLiteralType ScatterSeries +syntax keyword qmlObjectLiteralType Scene2D +syntax keyword qmlObjectLiteralType Scene3D +syntax keyword qmlObjectLiteralType Scene3DView +syntax keyword qmlObjectLiteralType SceneEnvironment +syntax keyword qmlObjectLiteralType SceneLoader +syntax keyword qmlObjectLiteralType ScissorTest +syntax keyword qmlObjectLiteralType Screen +syntax keyword qmlObjectLiteralType ScreenRayCaster +syntax keyword qmlObjectLiteralType ScriptAction +syntax keyword qmlObjectLiteralType ScrollBar +syntax keyword qmlObjectLiteralType ScrollIndicator +syntax keyword qmlObjectLiteralType ScrollView +syntax keyword qmlObjectLiteralType ScrollViewStyle +syntax keyword qmlObjectLiteralType SCurveTonemap +syntax keyword qmlObjectLiteralType ScxmlStateMachine +syntax keyword qmlObjectLiteralType SeamlessCubemap +syntax keyword qmlObjectLiteralType SelectionListItem +syntax keyword qmlObjectLiteralType SelectionListModel +syntax keyword qmlObjectLiteralType Sensor +syntax keyword qmlObjectLiteralType SensorGesture +syntax keyword qmlObjectLiteralType SensorReading +syntax keyword qmlObjectLiteralType SequentialAnimation +syntax keyword qmlObjectLiteralType Settings +syntax keyword qmlObjectLiteralType SettingsStore +syntax keyword qmlObjectLiteralType SetUniformValue +syntax keyword qmlObjectLiteralType Shader +syntax keyword qmlObjectLiteralType ShaderEffect +syntax keyword qmlObjectLiteralType ShaderEffectSource +syntax keyword qmlObjectLiteralType ShaderImage +syntax keyword qmlObjectLiteralType ShaderInfo +syntax keyword qmlObjectLiteralType ShaderProgram +syntax keyword qmlObjectLiteralType ShaderProgramBuilder +syntax keyword qmlObjectLiteralType Shape +syntax keyword qmlObjectLiteralType ShapeGradient +syntax keyword qmlObjectLiteralType ShapePath +syntax keyword qmlObjectLiteralType SharedGLTexture +syntax keyword qmlObjectLiteralType ShellSurface +syntax keyword qmlObjectLiteralType ShellSurfaceItem +syntax keyword qmlObjectLiteralType ShiftHandler +syntax keyword qmlObjectLiteralType ShiftKey +syntax keyword qmlObjectLiteralType Shortcut +syntax keyword qmlObjectLiteralType SignalSpy +syntax keyword qmlObjectLiteralType SignalTransition +syntax keyword qmlObjectLiteralType SinglePointHandler +syntax keyword qmlObjectLiteralType size +syntax keyword qmlObjectLiteralType Skeleton +syntax keyword qmlObjectLiteralType SkeletonLoader +syntax keyword qmlObjectLiteralType SkyboxEntity +syntax keyword qmlObjectLiteralType Slider +syntax keyword qmlObjectLiteralType SliderStyle +syntax keyword qmlObjectLiteralType SmoothedAnimation +syntax keyword qmlObjectLiteralType SortPolicy +syntax keyword qmlObjectLiteralType Sound +syntax keyword qmlObjectLiteralType SoundEffect +syntax keyword qmlObjectLiteralType SoundInstance +syntax keyword qmlObjectLiteralType SpaceKey +syntax keyword qmlObjectLiteralType SphereGeometry +syntax keyword qmlObjectLiteralType SphereMesh +syntax keyword qmlObjectLiteralType SpinBox +syntax keyword qmlObjectLiteralType SpinBoxStyle +syntax keyword qmlObjectLiteralType SplineSeries +syntax keyword qmlObjectLiteralType SplitHandle +syntax keyword qmlObjectLiteralType SplitView +syntax keyword qmlObjectLiteralType SpotLight +syntax keyword qmlObjectLiteralType SpringAnimation +syntax keyword qmlObjectLiteralType Sprite +syntax keyword qmlObjectLiteralType SpriteGoal +syntax keyword qmlObjectLiteralType SpriteSequence +syntax keyword qmlObjectLiteralType Stack +syntax keyword qmlObjectLiteralType StackedBarSeries +syntax keyword qmlObjectLiteralType StackLayout +syntax keyword qmlObjectLiteralType StackView +syntax keyword qmlObjectLiteralType StackViewDelegate +syntax keyword qmlObjectLiteralType StandardPaths +syntax keyword qmlObjectLiteralType State +syntax keyword qmlObjectLiteralType StateChangeScript +syntax keyword qmlObjectLiteralType StateGroup +syntax keyword qmlObjectLiteralType StateMachine +syntax keyword qmlObjectLiteralType StateMachineLoader +syntax keyword qmlObjectLiteralType StatusBar +syntax keyword qmlObjectLiteralType StatusBarStyle +syntax keyword qmlObjectLiteralType StatusIndicator +syntax keyword qmlObjectLiteralType StatusIndicatorStyle +syntax keyword qmlObjectLiteralType SteelMilledConcentricMaterial +syntax keyword qmlObjectLiteralType StencilMask +syntax keyword qmlObjectLiteralType StencilOperation +syntax keyword qmlObjectLiteralType StencilOperationArguments +syntax keyword qmlObjectLiteralType StencilTest +syntax keyword qmlObjectLiteralType StencilTestArguments +syntax keyword qmlObjectLiteralType Store +syntax keyword qmlObjectLiteralType String +syntax keyword qmlObjectLiteralType string +syntax keyword qmlObjectLiteralType SubtreeEnabler +syntax keyword qmlObjectLiteralType Supplier +syntax keyword qmlObjectLiteralType Surface3D +syntax keyword qmlObjectLiteralType Surface3DSeries +syntax keyword qmlObjectLiteralType SurfaceDataProxy +syntax keyword qmlObjectLiteralType SwipeDelegate +syntax keyword qmlObjectLiteralType SwipeView +syntax keyword qmlObjectLiteralType Switch +syntax keyword qmlObjectLiteralType SwitchDelegate +syntax keyword qmlObjectLiteralType SwitchStyle +syntax keyword qmlObjectLiteralType SymbolModeKey +syntax keyword qmlObjectLiteralType SystemPalette +syntax keyword qmlObjectLiteralType SystemTrayIcon + +syntax keyword qmlObjectLiteralType Tab +syntax keyword qmlObjectLiteralType TabBar +syntax keyword qmlObjectLiteralType TabButton +syntax keyword qmlObjectLiteralType TableModel +syntax keyword qmlObjectLiteralType TableModelColumn +syntax keyword qmlObjectLiteralType TableView +syntax keyword qmlObjectLiteralType TableViewColumn +syntax keyword qmlObjectLiteralType TableViewStyle +syntax keyword qmlObjectLiteralType TabView +syntax keyword qmlObjectLiteralType TabViewStyle +syntax keyword qmlObjectLiteralType TapHandler +syntax keyword qmlObjectLiteralType TapReading +syntax keyword qmlObjectLiteralType TapSensor +syntax keyword qmlObjectLiteralType TargetDirection +syntax keyword qmlObjectLiteralType TaskbarButton +syntax keyword qmlObjectLiteralType Technique +syntax keyword qmlObjectLiteralType TechniqueFilter +syntax keyword qmlObjectLiteralType TestCase +syntax keyword qmlObjectLiteralType Text +syntax keyword qmlObjectLiteralType Text2DEntity +syntax keyword qmlObjectLiteralType TextArea +syntax keyword qmlObjectLiteralType TextAreaStyle +syntax keyword qmlObjectLiteralType TextEdit +syntax keyword qmlObjectLiteralType TextField +syntax keyword qmlObjectLiteralType TextFieldStyle +syntax keyword qmlObjectLiteralType TextInput +syntax keyword qmlObjectLiteralType TextMetrics +syntax keyword qmlObjectLiteralType Texture +syntax keyword qmlObjectLiteralType Texture1D +syntax keyword qmlObjectLiteralType Texture1DArray +syntax keyword qmlObjectLiteralType Texture2D +syntax keyword qmlObjectLiteralType Texture2DArray +syntax keyword qmlObjectLiteralType Texture2DMultisample +syntax keyword qmlObjectLiteralType Texture2DMultisampleArray +syntax keyword qmlObjectLiteralType Texture3D +syntax keyword qmlObjectLiteralType TextureBuffer +syntax keyword qmlObjectLiteralType TextureCubeMap +syntax keyword qmlObjectLiteralType TextureCubeMapArray +syntax keyword qmlObjectLiteralType TextureImage +syntax keyword qmlObjectLiteralType TextureInput +syntax keyword qmlObjectLiteralType TextureLoader +syntax keyword qmlObjectLiteralType TextureRectangle +syntax keyword qmlObjectLiteralType Theme3D +syntax keyword qmlObjectLiteralType ThemeColor +syntax keyword qmlObjectLiteralType ThresholdMask +syntax keyword qmlObjectLiteralType ThumbnailToolBar +syntax keyword qmlObjectLiteralType ThumbnailToolButton +syntax keyword qmlObjectLiteralType TiltReading +syntax keyword qmlObjectLiteralType TiltSensor +syntax keyword qmlObjectLiteralType TiltShift +syntax keyword qmlObjectLiteralType Timeline +syntax keyword qmlObjectLiteralType TimelineAnimation +syntax keyword qmlObjectLiteralType TimeoutTransition +syntax keyword qmlObjectLiteralType Timer +syntax keyword qmlObjectLiteralType ToggleButton +syntax keyword qmlObjectLiteralType ToggleButtonStyle +syntax keyword qmlObjectLiteralType ToolBar +syntax keyword qmlObjectLiteralType ToolBarStyle +syntax keyword qmlObjectLiteralType ToolButton +syntax keyword qmlObjectLiteralType ToolSeparator +syntax keyword qmlObjectLiteralType ToolTip +syntax keyword qmlObjectLiteralType TooltipRequest +syntax keyword qmlObjectLiteralType Torch +syntax keyword qmlObjectLiteralType TorusGeometry +syntax keyword qmlObjectLiteralType TorusMesh +syntax keyword qmlObjectLiteralType TouchEventSequence +syntax keyword qmlObjectLiteralType TouchInputHandler3D +syntax keyword qmlObjectLiteralType TouchPoint +syntax keyword qmlObjectLiteralType Trace +syntax keyword qmlObjectLiteralType TraceCanvas +syntax keyword qmlObjectLiteralType TraceInputArea +syntax keyword qmlObjectLiteralType TraceInputKey +syntax keyword qmlObjectLiteralType TraceInputKeyPanel +syntax keyword qmlObjectLiteralType TrailEmitter +syntax keyword qmlObjectLiteralType Transaction +syntax keyword qmlObjectLiteralType Transform +syntax keyword qmlObjectLiteralType Transition +syntax keyword qmlObjectLiteralType Translate +syntax keyword qmlObjectLiteralType TreeView +syntax keyword qmlObjectLiteralType TreeViewStyle +syntax keyword qmlObjectLiteralType Tumbler +syntax keyword qmlObjectLiteralType TumblerColumn +syntax keyword qmlObjectLiteralType TumblerStyle +syntax keyword qmlObjectLiteralType Turbulence + +syntax keyword qmlObjectLiteralType UniformAnimator +syntax keyword qmlObjectLiteralType url +syntax keyword qmlObjectLiteralType User + +syntax keyword qmlObjectLiteralType ValueAxis +syntax keyword qmlObjectLiteralType ValueAxis3D +syntax keyword qmlObjectLiteralType ValueAxis3DFormatter +syntax keyword qmlObjectLiteralType var +syntax keyword qmlObjectLiteralType variant +syntax keyword qmlObjectLiteralType VBarModelMapper +syntax keyword qmlObjectLiteralType VBoxPlotModelMapper +syntax keyword qmlObjectLiteralType VCandlestickModelMapper +syntax keyword qmlObjectLiteralType vector2d +syntax keyword qmlObjectLiteralType vector3d +syntax keyword qmlObjectLiteralType Vector3dAnimation +syntax keyword qmlObjectLiteralType vector4d +syntax keyword qmlObjectLiteralType VertexBlendAnimation +syntax keyword qmlObjectLiteralType VerticalHeaderView +syntax keyword qmlObjectLiteralType Video +syntax keyword qmlObjectLiteralType VideoOutput +syntax keyword qmlObjectLiteralType View3D +syntax keyword qmlObjectLiteralType Viewport +syntax keyword qmlObjectLiteralType ViewTransition +syntax keyword qmlObjectLiteralType Vignette +syntax keyword qmlObjectLiteralType VirtualKeyboardSettings +syntax keyword qmlObjectLiteralType VPieModelMapper +syntax keyword qmlObjectLiteralType VXYModelMapper + +syntax keyword qmlObjectLiteralType Wander +syntax keyword qmlObjectLiteralType WasdController +syntax keyword qmlObjectLiteralType WavefrontMesh +syntax keyword qmlObjectLiteralType WaylandClient +syntax keyword qmlObjectLiteralType WaylandCompositor +syntax keyword qmlObjectLiteralType WaylandHardwareLayer +syntax keyword qmlObjectLiteralType WaylandOutput +syntax keyword qmlObjectLiteralType WaylandQuickItem +syntax keyword qmlObjectLiteralType WaylandSeat +syntax keyword qmlObjectLiteralType WaylandSurface +syntax keyword qmlObjectLiteralType WaylandView +syntax keyword qmlObjectLiteralType Waypoint +syntax keyword qmlObjectLiteralType WebChannel +syntax keyword qmlObjectLiteralType WebEngine +syntax keyword qmlObjectLiteralType WebEngineAction +syntax keyword qmlObjectLiteralType WebEngineCertificateError +syntax keyword qmlObjectLiteralType WebEngineClientCertificateOption +syntax keyword qmlObjectLiteralType WebEngineClientCertificateSelection +syntax keyword qmlObjectLiteralType WebEngineDownloadItem +syntax keyword qmlObjectLiteralType WebEngineHistory +syntax keyword qmlObjectLiteralType WebEngineHistoryListModel +syntax keyword qmlObjectLiteralType WebEngineLoadRequest +syntax keyword qmlObjectLiteralType WebEngineNavigationRequest +syntax keyword qmlObjectLiteralType WebEngineNewViewRequest +syntax keyword qmlObjectLiteralType WebEngineNotification +syntax keyword qmlObjectLiteralType WebEngineProfile +syntax keyword qmlObjectLiteralType WebEngineScript +syntax keyword qmlObjectLiteralType WebEngineSettings +syntax keyword qmlObjectLiteralType WebEngineView +syntax keyword qmlObjectLiteralType WebSocket +syntax keyword qmlObjectLiteralType WebSocketServer +syntax keyword qmlObjectLiteralType WebView +syntax keyword qmlObjectLiteralType WebViewLoadRequest +syntax keyword qmlObjectLiteralType WeekNumberColumn +syntax keyword qmlObjectLiteralType WheelEvent +syntax keyword qmlObjectLiteralType WheelHandler +syntax keyword qmlObjectLiteralType Window +syntax keyword qmlObjectLiteralType WlScaler +syntax keyword qmlObjectLiteralType WlShell +syntax keyword qmlObjectLiteralType WlShellSurface +syntax keyword qmlObjectLiteralType WorkerScript + +syntax keyword qmlObjectLiteralType XAnimator +syntax keyword qmlObjectLiteralType XdgDecorationManagerV1 +syntax keyword qmlObjectLiteralType XdgOutputManagerV1 +syntax keyword qmlObjectLiteralType XdgPopup +syntax keyword qmlObjectLiteralType XdgPopupV5 +syntax keyword qmlObjectLiteralType XdgPopupV6 +syntax keyword qmlObjectLiteralType XdgShell +syntax keyword qmlObjectLiteralType XdgShellV5 +syntax keyword qmlObjectLiteralType XdgShellV6 +syntax keyword qmlObjectLiteralType XdgSurface +syntax keyword qmlObjectLiteralType XdgSurfaceV5 +syntax keyword qmlObjectLiteralType XdgSurfaceV6 +syntax keyword qmlObjectLiteralType XdgToplevel +syntax keyword qmlObjectLiteralType XdgToplevelV6 +syntax keyword qmlObjectLiteralType XmlListModel +syntax keyword qmlObjectLiteralType XmlRole +syntax keyword qmlObjectLiteralType XYPoint +syntax keyword qmlObjectLiteralType XYSeries + +syntax keyword qmlObjectLiteralType YAnimator + +syntax keyword qmlObjectLiteralType ZoomBlur + +" }}} + +if get(g:, 'qml_fold', 0) + syn match qmlFunction "\<function\>" + syn region qmlFunctionFold start="^\z(\s*\)\<function\>.*[^};]$" end="^\z1}.*$" transparent fold keepend + + syn sync match qmlSync grouphere qmlFunctionFold "\<function\>" + syn sync match qmlSync grouphere NONE "^}" + + setlocal foldmethod=syntax + setlocal foldtext=getline(v:foldstart) +else + syn keyword qmlFunction function + syn match qmlArrowFunction "=>" + syn match qmlBraces "[{}\[\]]" + syn match qmlParens "[()]" +endif + +syn sync fromstart +syn sync maxlines=100 + +if main_syntax == "qml" + syn sync ccomment qmlComment +endif + +hi def link qmlComment Comment +hi def link qmlLineComment Comment +hi def link qmlCommentTodo Todo +hi def link qmlSpecial Special +hi def link qmlStringS String +hi def link qmlStringD String +hi def link qmlStringT String +hi def link qmlCharacter Character +hi def link qmlNumber Number +hi def link qmlConditional Conditional +hi def link qmlRepeat Repeat +hi def link qmlBranch Conditional +hi def link qmlOperator Operator +hi def link qmlJsType Type +hi def link qmlType Type +hi def link qmlObjectLiteralType Type +hi def link qmlStatement Statement +hi def link qmlFunction Function +hi def link qmlArrowFunction Function +hi def link qmlBraces Function +hi def link qmlError Error +hi def link qmlNull Keyword +hi def link qmlBoolean Boolean +hi def link qmlRegexpString String +hi def link qmlNullishCoalescing Operator + +hi def link qmlIdentifier Identifier +hi def link qmlLabel Label +hi def link qmlException Exception +hi def link qmlMessage Keyword +hi def link qmlGlobal Keyword +hi def link qmlReserved Keyword +hi def link qmlDebug Debug +hi def link qmlConstant Label +hi def link qmlBindingProperty Label +hi def link qmlDeclaration Function + +let b:current_syntax = "qml" +if main_syntax == 'qml' + unlet main_syntax +endif diff --git a/runtime/syntax/quarto.vim b/runtime/syntax/quarto.vim new file mode 100644 index 0000000000..d5d4ee257d --- /dev/null +++ b/runtime/syntax/quarto.vim @@ -0,0 +1,17 @@ +" Language: Quarto (Markdown with chunks of R, Python and other languages) +" Provisory Maintainer: Jakson Aquino <jalvesaq@gmail.com> +" Homepage: https://github.com/jalvesaq/R-Vim-runtime +" Last Change: Fri Feb 24, 2023 08:26AM +" +" The developers of tools for Quarto maintain Vim runtime files in their +" Github repository and, if required, I will hand over the maintenance of +" this script for them. + +runtime syntax/rmd.vim + +syn match quartoShortarg /\S\+/ contained +syn keyword quartoShortkey var meta env pagebreak video include contained +syn region quartoShortcode matchgroup=PreProc start='{{< ' end=' >}}' contains=quartoShortkey,quartoShortarg transparent keepend + +hi def link quartoShortkey Include +hi def link quartoShortarg String diff --git a/runtime/syntax/r.vim b/runtime/syntax/r.vim index a8100cfded..9b3754ae23 100644 --- a/runtime/syntax/r.vim +++ b/runtime/syntax/r.vim @@ -5,7 +5,7 @@ " Tom Payne <tom@tompayne.org> " Contributor: Johannes Ranke <jranke@uni-bremen.de> " Homepage: https://github.com/jalvesaq/R-Vim-runtime -" Last Change: Sun Mar 28, 2021 01:47PM +" Last Change: Thu Nov 17, 2022 10:13PM " Filenames: *.R *.r *.Rhistory *.Rt " " NOTE: The highlighting of R functions might be defined in @@ -65,41 +65,35 @@ if g:r_syntax_hl_roxygen " roxygen line containing only a roxygen comment marker, optionally followed " by whitespace is called an empty roxygen line. + syn match rOCommentKey "^\s*#\{1,2}'" contained + syn region rOExamples start="^\s*#\{1,2}' @examples.*"rs=e+1,hs=e+1 end="^\(#\{1,2}' @.*\)\@=" end="^\(#\{1,2}'\)\@!" contained contains=rOTag fold + + " R6 classes may contain roxygen lines independent of roxygen blocks + syn region rOR6Class start=/R6Class(/ end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError fold + syn match rOR6Block "#\{1,2}'.*" contains=rOTag,rOExamples,@Spell containedin=rOR6Class contained + syn match rOR6Block "^\s*#\{1,2}'.*" contains=rOTag,rOExamples,@Spell containedin=rOR6Class contained + " First we match all roxygen blocks as containing only a title. In case an " empty roxygen line ending the title or a tag is found, this will be " overridden later by the definitions of rOBlock. - syn match rOTitleBlock "\%^\(\s*#\{1,2}' .*\n\)\{1,}" contains=rOCommentKey,rOTitleTag - syn match rOTitleBlock "^\s*\n\(\s*#\{1,2}' .*\n\)\{1,}" contains=rOCommentKey,rOTitleTag + syn match rOTitleBlock "\(\%^\|^\s*\n\)\@<=\(\s*#\{1,2}' .*\n\)\{1,}" contains=rOCommentKey,rOTitleTag " A title as part of a block is always at the beginning of the block, i.e. " either at the start of a file or after a completely empty line. - syn match rOTitle "\%^\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" contained contains=rOCommentKey,rOTitleTag - syn match rOTitle "^\s*\n\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" contained contains=rOCommentKey,rOTitleTag + syn match rOTitle "\(\%^\|^\s*\n\)\@<=\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" contained contains=rOCommentKey,rOTitleTag syn match rOTitleTag contained "@title" " When a roxygen block has a title and additional content, the title " consists of one or more roxygen lines (as little as possible are matched), " followed either by an empty roxygen line - syn region rOBlock start="\%^\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold - syn region rOBlock start="^\s*\n\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold + syn region rOBlock start="\(\%^\|^\s*\n\)\@<=\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold " or by a roxygen tag (we match everything starting with @ but not @@ which is used as escape sequence for a literal @). - syn region rOBlock start="\%^\(\s*#\{1,2}' .*\n\)\{-}\s*#\{1,2}' @\(@\)\@!" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold - syn region rOBlock start="^\s*\n\(\s*#\{1,2}' .*\n\)\{-}\s*#\{1,2}' @\(@\)\@!" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold + syn region rOBlock start="\(\%^\|^\s*\n\)\@<=\(\s*#\{1,2}' .*\n\)\{-}\s*#\{1,2}' @\(@\)\@!" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold " If a block contains an @rdname, @describeIn tag, it may have paragraph breaks, but does not have a title - syn region rOBlockNoTitle start="\%^\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @rdname" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold - syn region rOBlockNoTitle start="^\s*\n\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @rdname" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold - syn region rOBlockNoTitle start="\%^\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @describeIn" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold - syn region rOBlockNoTitle start="^\s*\n\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @describeIn" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold - - syn match rOCommentKey "^\s*#\{1,2}'" contained - syn region rOExamples start="^\s*#\{1,2}' @examples.*"rs=e+1,hs=e+1 end="^\(#\{1,2}' @.*\)\@=" end="^\(#\{1,2}'\)\@!" contained contains=rOTag fold - - " R6 classes may contain roxygen lines independent of roxygen blocks - syn region rOR6Class start=/R6Class(/ end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError fold - syn match rOR6Block "#\{1,2}'.*" contains=rOTag,rOExamples,@Spell containedin=rOR6Class contained - syn match rOR6Block "^\s*#\{1,2}'.*" contains=rOTag,rOExamples,@Spell containedin=rOR6Class contained + syn region rOBlockNoTitle start="\(\%^\|^\s*\n\)\@<=\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @rdname" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold + syn region rOBlockNoTitle start="\(\%^\|^\s*\n\)\@<=\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @describeIn" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold " rOTag list originally generated from the lists that were available in " https://github.com/klutometis/roxygen/R/rd.R and @@ -245,14 +239,15 @@ syn match rOperator "&" syn match rOperator '-' syn match rOperator '\*' syn match rOperator '+' -if &filetype != "rmd" && &filetype != "rrst" - syn match rOperator "[|!<>^~/:]" -else +if &filetype == "quarto" || &filetype == "rmd" || &filetype == "rrst" syn match rOperator "[|!<>^~`/:]" +else + syn match rOperator "[|!<>^~/:]" endif syn match rOperator "%\{2}\|%\S\{-}%" syn match rOperator '\([!><]\)\@<==' syn match rOperator '==' +syn match rOperator '|>' syn match rOpError '\*\{3}' syn match rOpError '//' syn match rOpError '&&&' @@ -318,10 +313,13 @@ if &filetype == "rhelp" endif " Type +syn match rType "\\" syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame " Name of object with spaces -if &filetype != "rmd" && &filetype != "rrst" +if &filetype == "rmd" || &filetype == "rrst" || &filetype == "quarto" + syn region rNameWSpace start="`" end="`" contains=rSpaceFun containedin=rmdrChunk +else syn region rNameWSpace start="`" end="`" contains=rSpaceFun endif diff --git a/runtime/syntax/rapid.vim b/runtime/syntax/rapid.vim new file mode 100644 index 0000000000..ed0da095c0 --- /dev/null +++ b/runtime/syntax/rapid.vim @@ -0,0 +1,687 @@ +" ABB Rapid Command syntax file for Vim +" Language: ABB Rapid Command +" Maintainer: Patrick Meiser-Knosowski <knosowski@graeffrobotics.de> +" Version: 2.3.0 +" Last Change: 21. Jul 2023 +" Credits: Thanks for beta testing to Thomas Baginski +" +" Suggestions of improvement are very welcome. Please email me! +" +" +" +" Note to self: +" for testing perfomance +" open a 1000 lines file. +" :syntime on +" G +" hold down CTRL-U until reaching top +" :syntime report +" +" +" TODO: - highlight rapid constants and maybe constants from common +" technology packages +" - optimize rapidErrorStringTooLong +" - error highlight for missing 2nd point in MoveCirc et al + +" Init {{{ +" Remove any old syntax stuff that was loaded (5.x) or quit when a syntax file +" was already loaded (6.x). +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +let s:keepcpo= &cpo +set cpo&vim + +" if colorscheme is tortus rapidNoHighLink defaults to 1 +if (get(g:,'colors_name'," ")=="tortus" || get(g:,'colors_name'," ")=="tortusless") + \&& !exists("g:rapidGroupName") + let g:rapidGroupName=1 +endif +" rapidGroupName defaults to 0 if it's not initialized yet or 0 +if !get(g:,"rapidGroupName",0) + let g:rapidGroupName=0 +endif + +" Rapid does ignore case +syn case ignore +" spell checking +syn spell notoplevel +" }}} init + +" common highlighting {{{ + +" Error {{{ +if get(g:,'rapidShowError',1) + " + " This error must be defined befor rapidCharCode and rapidEscapedBackSlash + " a string containing a single \ which is not a char code + syn match rapidErrorSingleBackslash /\\/ contained + highlight default link rapidErrorSingleBackslash Error + " +endif +" }}} Error + +" Constant values {{{ +" Boolean +syn keyword rapidBoolean TRUE FALSE Edge High Low +highlight default link rapidBoolean Boolean +" Float (num) +" syn match rapidFloat /\v%(\W|_)@1<=[+-]?\d+\.?\d*%(\s*[eE][+-]?\d+)?/ +syn match rapidFloat /\v\c%(<\d+\.|\.?<\d)\d*%(E[+-]?\d+)?>/ contains=rapidOperator +highlight default link rapidFloat Float +" integer in decimal, hexadecimal, octal and binary +syn match rapidDec /\<[0-9]\+\>/ +highlight default link rapidDec Number +syn match rapidHex /\<0x[0-9a-fA-F]\+\>/ +highlight default link rapidHex Number +syn match rapidOct /\<0o[0-7]\+\>/ +highlight default link rapidOct Number +syn match rapidBin /\<0b[01]\+\>/ +highlight default link rapidBin Number +" String. Note: Don't rename group rapidString. Indent depend on this +syn region rapidString matchgroup=rapidString start=/"/ skip=/""/ end=/"/ oneline contains=rapidStringDoubleQuote,rapidEscapedBackSlash,rapidCharCode,rapidErrorSingleBackslash,rapidErrorStringTooLong,@Spell +highlight default link rapidString String +" two adjacent "" in string for one double quote +syn match rapidStringDoubleQuote /""/ contained +highlight default link rapidStringDoubleQuote SpecialChar +" character code in string +syn match rapidCharCode /\\\x\x/ contained +highlight default link rapidCharCode SpecialChar +" escaped \ in string +syn match rapidEscapedBackSlash /\\\\/ contained +highlight default link rapidEscapedBackSlash SpecialChar +" }}} Constant values + +" }}} common highlighting + +if bufname("%") =~ '\c\.cfg$' +" {{{ highlighting for *.cfg + + " special chars {{{ + " syn match rapidOperator /:\|[+-]\|\*\|\/\|\\/ + syn match rapidOperator /[-+*/:\\]/ + syn match rapidOperator /^#/ + highlight default link rapidOperator Operator + " }}} special chars + + " sections {{{ + syn match rapidException /^\w\+/ + syn match rapidException /CFG_\d\+/ + highlight default link rapidException Exception + " }}} sections + + " Error {{{ + if get(g:,'rapidShowError',1) + " + " This error must be defined after rapidString + " Any Name longer than 32 chars + syn match rapidErrorNameTooLong /-Name "[^"]\{33,}"/ + highlight default link rapidErrorNameTooLong Error + " + endif + " }}} Error + + " }}} highlighting for *.cfg +else + " highlighting for *.mod, *.sys and *.prg {{{ + + " sync for regions from a line comment or the start of a function + syn sync match rapidSync grouphere NONE /\v\c^\s*%(!|%(task\s+|local\s+)?%(module|proc|func|trap|record)>)/ + + " Comment {{{ + " TODO Comment + syn match rapidTodoComment contained /\<TODO\>\|\<FIXME\>\|\<XXX\>/ + highlight default link rapidTodoComment Todo + " Debug comment + syn match rapidDebugComment contained /\<DEBUG\>/ + highlight default link rapidDebugComment Debug + " Line comment + syn match rapidComment /!.*$/ contains=rapidTodoComment,rapidDebugComment,@Spell + highlight default link rapidComment Comment + " }}} Comment + + " Header {{{ + syn match rapidHeader /^%%%/ + highlight default link rapidHeader PreProc + " }}} Header + + " Operator {{{ + " Boolean operator + syn keyword rapidOperator and or xor not div mod + " Arithmetic and compare operator + syn match rapidOperator /[-+*/<>:=]/ + " conditional argument + syn match rapidOperator /?/ + highlight default link rapidOperator Operator + " }}} Operator + + " Type, StorageClass and Typedef {{{ + " anytype (preceded by 'alias|pers|var|const|func' + " TODO: still missing are userdefined types which are part of a parameter: + " PROC message( mystring msMessagePart1{}, + " \ myvar msMsg4{}) + " TODO testing. Problem: does not highlight any type if it's part of an argument list + " syn match rapidAnyType /\v^\s*(global\s+|task\s+|local\s+)?(alias|pers|var|const|func)\s+\w+>/ contains=rapidStorageClass,rapidType,rapidTypeDef + " highlight default link rapidAnyType Type + syn keyword rapidType accdata aiotrigg bool btnres busstate buttondata byte + syn keyword rapidType cfgdomain clock cnvcmd confdata confsupdata corrdescr datapos deflectiondata dionum dir dnum + syn keyword rapidType egmframetype egmident egm_minmax egmstate egmstopmode errdomain errnum ErrorInfo errstr errtype event_type exec_level extjoint handler_type + syn keyword rapidType icondata identno inposdata intnum inttypes iodev iounit_state jointtarget + syn keyword rapidType listitem loaddata loadidnum loadsession mecunit motionprocessmode motsetdata + " syn keyword rapidType num + syn keyword rapidType opcalc opnum orient paridnum paridvalidnum pathrecid pnpdata pos pose proc_times progdisp o_jointtarget o_robtarget + syn keyword rapidType rawbytes restartdata rmqheader rmqmessage rmqslot robjoint robtarget + syn keyword rapidType searchdata sensor sensorstate sensorvardata shapedata signalai signalao signaldi signaldo signalgi signalgo signalorigin singdata socketdev socketstatus speeddata stopmovestartmove_mem stoppoint stoppointdata string stringdig sup_timeouts supervtype switch symnum syncident + syn keyword rapidType taskid tasks tasksatstart testsignal tooldata tpnum trapdata triggdata triggflag triggios triggiosdnum triggmode triggstrgo tsp_status tunegtype tunetype + syn keyword rapidType uishownum veldata visiondata wobjdata wzstationary wztemporary zonedata + " SoftMove data types + syn keyword rapidType css_offset_dir css_soft_dir cssframe + " arc data types + syn keyword rapidType advSeamData arcdata flystartdata seamdata arctrackdata opttrackdata weavedata welddata + " conveyor tracking data types + syn keyword rapidType indcnvdata + " Integrated Vision data types + syn keyword rapidType cameradev cameratarget + " arc Weldguide and MultiPass data types + syn keyword rapidType adaptdata trackdata multidata + " dispense data types + syn keyword rapidType beaddata equipdata + " Spot data types + syn keyword rapidType gundata gunnum spotdata forcedata simdata smeqdata smeqtype + " Tool change data types + syn keyword rapidType standno ToolInfo toolno + " Continuous Application Platform data types + syn keyword rapidType capaptrreferencedata capdata capevent caplatrackdata capmvsttim capspeeddata capspeeddata capstopmode captestno captrackdata capweavedata flypointdata processtimes restartblkdata supervtimeouts weavestartdata + " Bulls Eye data types + syn keyword rapidType be_device be_scan be_tooldesign + " Force Control data types + syn keyword rapidType fcboxvol fccondstatus fccylindervol fcdamping fcforcevector fcframe fclindir fcprocessdata fcplane fcrotdir fcspeedvector fcspherevol fcspdchgtunetype fcxyznum + " Discrete application platform data types + syn keyword rapidType dadescapp dadescprc daintdata + " VW Konzernstandard VWKS_1.07.02 + syn keyword rapidType merker + syn keyword rapidType frgnum frgwert robnum + syn keyword rapidType fmnum applid calibdatavorr stepdata + syn keyword rapidType tsmethode tsdaten teilspeicherdaten + syn keyword rapidType greiferdaten greiferposition bauteildaten bauteilkontrolle g_datenident g_sensor g_signal g_teilident g_ventil + syn keyword rapidType strgnum typnum + syn keyword rapidType hubnum kopfnum + syn keyword rapidType applservicetype + syn keyword rapidType applfraesdaten kwdionum + syn keyword rapidType butechnum + syn keyword rapidType toolnum dbnum + " das folgende sind datentypen aber das kann man doch nicht machen... + " syn keyword rapidType position wert + syn keyword rapidType camdata camlimitdata cammode camprotocoldata camstatus camsequence campositionstatus + syn keyword rapidType saposnum sabereichnum autofocusnum focusposnum lascaledata laleistungnum larobnum laprognum uebwnum dgbanum dgjobnum gasspuelnum davalve gasuebwnum + syn keyword rapidType lsfigurnum lsstarttype + syn keyword rapidType lwprognum lwdiodnum lsstarttype + syn keyword rapidType lztype diskrethubnum lztipnum + syn keyword rapidType gblmethod + syn keyword rapidType buatypenum buatechnum buadirnum + highlight default link rapidType Type + " Storage class + syn keyword rapidStorageClass LOCAL TASK VAR PERS CONST ALIAS NOVIEW NOSTEPIN VIEWONLY READONLY SYSMODULE INOUT + highlight default link rapidStorageClass StorageClass + " Not a typedef but I like to have those highlighted different then types, + " structures or strorage classes + syn keyword rapidTypeDef MODULE ENDMODULE PROC ERROR UNDO BACKWARD ENDPROC RECORD ENDRECORD TRAP ENDTRAP FUNC ENDFUNC + highlight default link rapidTypeDef TypeDef + " }}} Type, StorageClass and Typedef + + " Statements, keywords et al {{{ + " syn keyword rapidStatement + " highlight default link rapidStatement Statement + " Conditional + syn keyword rapidConditional if then elseif else endif test case default endtest + highlight default link rapidConditional Conditional + " Repeat + syn keyword rapidRepeat do + syn match rapidRepeat /\c\v^\s*%(<while>|<for>)%([^!]+<do>)@=/ + syn keyword rapidRepeat from to step endfor endwhile + highlight default link rapidRepeat Repeat + " Label + syn keyword rapidLabel goto + syn match rapidLabel /\c\v^\s*[[:upper:][:lower:]]\k*\:\ze%([^=]|$)/ contains=rapidConditional,rapidOperator + highlight default link rapidLabel Label + " Keyword + syn keyword rapidKeyword AccSet ActEventBuffer ActUnit Add AliasCamera AliasIO AliasIOReset BitClear BitSet BookErrNo BrakeCheck + syn keyword rapidKeyword CallByVar CancelLoad CheckProgRef CirPathMode Clear ClearIOBuff ClearPath ClearRawBytes ClkReset ClkStart ClkStop Close CloseDir ConfJ ConfL CONNECT CopyFile CopyRawBytes CornerPathWarning CorrClear CorrCon CorrDiscon CorrWrite + syn keyword rapidKeyword CSSAct CSSDeact CSSForceOffsetAct CSSForceOffsetDeact CSSOffsetTune CyclicBrakeCheck + syn keyword rapidKeyword DeactEventBuffer DeactUnit Decr DitherAct DitherDeact DropSensor + syn keyword rapidKeyword EGMActJoint EGMActMove EGMActPose EGMGetId EGMReset EGMSetupAI EGMSetupAO EGMSetupGI EGMSetupLTAPP EGMSetupUC EOffsOff EOffsOn EOffsSet EraseModule ErrLog ErrWrite + syn keyword rapidKeyword FitCircle FricIdInit FricIdEvaluate FricIdSetFricLevels + syn keyword rapidKeyword GetDataVal GetGroupSignalInfo GetJointData GetSysData GetTorqueMargin GetTrapData GripLoad HollowWristReset + syn keyword rapidKeyword IDelete IDisable IEnable IError Incr IndReset InvertDO IOBusStart IOBusState IoCtrlAxis_RefSync IoCtrlAxis_RefSyncOff IoCtrlAxis_RefSyncOn IODisable IOEnable IPers IRMQMessage ISignalAI ISignalAO ISignalDI ISignalDO ISignalGI ISignalGO ISleep ITimer IVarValue IWatch + syn keyword rapidKeyword Load LoadId MakeDir ManLoadIdProc MatrixSolve MatrixSolveQR MatrixSVD MechUnitLoad MotionProcessModeSet MotionSup MToolRotCalib MToolTCPCalib Open OpenDir + syn keyword rapidKeyword PackDNHeader PackRawBytes PathAccLim PathLengthReset PathLengthStart PathLengthStop PathRecStart PathRecStop PathResol PDispOff PDispOn PDispSet ProcerrRecovery PrxActivAndStoreRecord PrxActivRecord PrxDbgStoreRecord PrxDeactRecord PrxResetPos PrxResetRecords PrxSetPosOffset PrxSetRecordSampleTime PrxSetSyncalarm PrxStartRecord PrxStopRecord PrxStoreRecord PrxUseFileRecord PulseDO + syn keyword rapidKeyword ReadAnyBin ReadBlock ReadCfgData ReadErrData ReadRawBytes ReadVarArr RemoveAllCyclicBool RemoveCyclicBool RemoveDir RemoveFile RenameFile Reset ResetAxisDistance ResetAxisMoveTime ResetPPMoved ResetRetryCount ResetTorqueMargin RestoPath Rewind RMQEmptyQueue RMQFindSlot RMQGetMessage RMQGetMsgData RMQGetMsgHeader RMQReadWait RMQSendMessage RMQSendWait + syn keyword rapidKeyword SafetyControllerSyncRequest Save SaveCfgData SCWrite SenDevice Set SetAllDataVal SetAO SetDataSearch SetDataVal SetDO SetGO SetLeadThrough SetSysData SetupCyclicBool SiConnect SiClose SiGetCyclic SingArea SiSetCyclic SkipWarn SocketAccept SocketBind SocketClose SocketConnect SocketCreate SocketListen SocketReceive SocketReceiveFrom SocketSend SocketSendTo SoftAct SoftDeact SoftElbow SpeedLimAxis SpeedLimCheckPoint SpeedRefresh SpyStart SpyStop StartLoad STCalib STClose STIndGun STIndGunReset SToolRotCalib SToolTCPCalib STOpen StorePath STTune STTuneReset SupSyncSensorOff SupSyncSensorOn SyncMoveOff SyncMoveOn SyncMoveResume SyncMoveSuspend SyncMoveUndo SyncToSensor SystemStopAction + syn keyword rapidKeyword TestSignDefine TestSignReset TextTabInstall TPErase TPReadDnum TPReadFK TPReadNum TPShow TPWrite TriggCheckIO TriggDataCopy TriggDataReset TriggEquip TriggInt TriggIO TriggRampAO TriggSpeed TriggStopProc TryInt TuneReset TuneServo + syn keyword rapidKeyword UIMsgBox UIMsgWrite UIMsgWriteAbort UIShow UnLoad UnpackRawBytes VelSet WaitAI WaitAO WaitDI WaitDO WaitGI WaitGO WaitLoad WaitRob WaitSensor WaitSyncTask WaitTestAndSet WaitTime WaitUntil WarmStart WITH WorldAccLim Write WriteAnyBin WriteBin WriteBlock WriteCfgData WriteRawBytes WriteStrBin WriteVar WriteVarArr WZBoxDef WZCylDef WZDisable WZDOSet WZEnable WZFree WZHomeJointDef WZLimJointDef WZLimSup WZSphDef + " arc instructions + syn keyword rapidKeyword ArcRefresh RecoveryMenu RecoveryMenuWR RecoveryPosSet RecoveryPosReset SetWRProcName + " conveyor tracking instructions + syn keyword rapidKeyword UseACCProfile WaitWObj DropWObj RecordProfile WaitAndRecProf StoreProfile LoadProfile ActivateProfile DeactProfile CnvGenInstr CnvSync CnvGenInstr IndCnvInit IndCnvEnable IndCnvDisable IndCnvReset IndCnvAddObject + syn keyword rapidKeyword UseReachableTargets GetMaxUsageTime ResetMaxUsageTime CnvPredictReach + " Integrated Vision instructions + syn keyword rapidKeyword CamFlush CamGetParameter CamGetResult CamLoadJob CamReqImage CamSetExposure CamSetParameter CamSetProgramMode CamSetRunMode CamStartLoadJob CamWaitLoadJob + " arc Weldguide and MultiPass instructions + syn keyword rapidKeyword MPSavePath MPLoadPath MPReadInPath MPOffsEaxOnPath + " Paint instructions + syn keyword rapidKeyword ConsoleWrite IpsSetParam PntProdUserLog SetBrush SetBrushFac + " Spot instructions + syn keyword rapidKeyword SetForce Calibrate ReCalcTCP IndGunMove IndGunMoveReset OpenHighLift CloseHighLift SwSetIntSpotData SwSetIntForceData SwSetIntGunData SwSetIntSimData SwGetCalibData SwGetFixTipData + " Tool change instructions + syn keyword rapidKeyword TcCloseCover TcDropOffTool TcLockTool TcOpenCover TcPickupTool TcUnlockTool + " dispense instructions + syn keyword rapidKeyword SetTmSignal SyncWWObj + " Continuous Application Platform instructions + syn keyword rapidKeyword CapAPTrSetup CapAPTrSetupAI CapAPTrSetupAO CapAPTrSetupPERS CapCondSetDO CapEquiDist CapNoProcess CapRefresh CAPSetStopMode CapWeaveSync ICap InitSuperv IPathPos RemoveSuperv SetupSuperv + " Bulls Eye instructions + syn keyword rapidKeyword BECheckTcp BEDebugState BERefPointer BESetupToolJ BETcpExtend BEUpdateTcp + " Force Control instructions + syn keyword rapidKeyword FCAct FCCalib FCCondForce FCCondOrient FCCondPos FCCondReoriSpeed FCCondTCPSpeed FCCondTorque FCCondWaitWhile FCDeact FCPress1LStart FCPressC FCPressEnd FCPressL FCRefCircle FCRefForce FCRefLine FCRefMoveFrame FCRefRot FCRefSpiral FCRefSprForceCart FCRefStart FCRefStop FCRefTorque FCResetDampingTune FCResetLPFilterTune FCSpdChgAct FCSpdChgDeact FCSpdChgTunSet FCSpdChgTunReset FCSetDampingTune FCSetLPFilterTune FCSupvForce FCSupvOrient FCSupvPos FCSupvReoriSpeed FCSupvTCPSpeed FCSupvTorque + " Discrete application platform instructions + syn keyword rapidKeyword DaActProc DaDeactAllProc DaDeactProc DaDefExtSig DaDefProcData DaDefProcSig DaDefUserData DaGetCurrData DaSetCurrData DaSetupAppBehav DaStartManAction DaGetAppDescr DaGetAppIndex DaGetNumOfProcs DaGetNumOfRob DaGetPrcDescr + " Production Manager instructions + syn keyword rapidKeyword ExecEngine PMgrGetNextPart PMgrSetNextPart PMgrRunMenu + " Homepos-Running instructions + syn keyword rapidKeyword HR_Exit HR_ExitCycle HR_SavePos HR_SetMoveToStartPos HR_SetTypeDIndex HR_SetTypeIndex + highlight default link rapidKeyword Keyword + " Exception + syn keyword rapidException Exit ErrRaise ExitCycle Raise RaiseToUser Retry Return TryNext + syn match rapidException /\s\+Stop\s*[\\;]/me=e-1 + highlight default link rapidException Exception + " }}} Statements, keywords et al + + " Special keyword for move command {{{ + " uncategorized yet + syn keyword rapidMovement MovePnP + syn keyword rapidMovement EGMMoveC EGMMoveL EGMRunJoint EGMRunPose EGMStop + syn keyword rapidMovement IndAMove IndCMove IndDMove IndRMove + " common instructions + syn keyword rapidMovement MoveAbsJ MoveC MoveExtJ MoveJ MoveL + syn keyword rapidMovement MoveCAO MoveCDO MoveCGO MoveCSync MoveJAO MoveJDO MoveJGO MoveJSync MoveLAO MoveLDO MoveLGO MoveLSync + syn keyword rapidMovement SearchC SearchExtJ SearchL + syn keyword rapidMovement TriggC TriggJ TriggL TriggJIOs TriggLIOs + " Arc instructions + syn keyword rapidMovement ArcC ArcC1 ArcC2 ArcCEnd ArcC1End ArcC2End ArcCStart ArcC1Start ArcC2Start + syn keyword rapidMovement ArcL ArcL1 ArcL2 ArcLEnd ArcL1End ArcL2End ArcLStart ArcL1Start ArcL2Start ArcMoveExtJ + " Arc Weldguide and MultiPass instructions + syn keyword rapidMovement ArcRepL ArcAdaptLStart ArcAdaptL ArcAdaptC ArcAdaptLEnd ArcAdaptCEnd ArcCalcLStart ArcCalcL ArcCalcC ArcCalcLEnd ArcCalcCEnd ArcAdaptRepL + syn keyword rapidMovement Break + " Continuous Application Platform instructions + syn keyword rapidMovement CapC CapL CapLATrSetup CSSDeactMoveL ContactL + " Dispense instructions + syn keyword rapidMovement DispL DispC + " Nut instructions" + syn keyword rapidMovement NutL NutJ + syn keyword rapidMovement PathRecMoveBwd PathRecMoveFwd + " Paint instructions" + syn keyword rapidMovement PaintL PaintLSig PaintLDO PaintC + syn keyword rapidMovement StartMove StartMoveRetry StepBwdPath StopMove StopMoveReset + " Spot instructions + syn keyword rapidMovement SpotL SpotJ SpotML SpotMJ CalibL CalibJ MeasureWearL + " Homepos-Running instructions + syn keyword rapidMovement SMoveJ SMoveJDO SMoveJGO SMoveJSync SMoveL SMoveLDO SMoveLGO SMoveLSync SSearchL STriggJ STriggL + syn keyword rapidMovement HR_ContMove HR_MoveBack HR_MoveRoutine HR_MoveTo HR_MoveToHome SCSSDeactMoveL + " Discrete application platform instructions + syn keyword rapidMovement DaProcML DaProcMJ + " VW Konzernstandard VWKS_1.07.02 + syn keyword rapidMovement MoveABS MoveABS_FB MoveABS_FRG MoveABS_ROB + syn keyword rapidMovement MoveCIRC MoveCIRC_FB MoveCIRC_FRG MoveCIRC_ROB + syn keyword rapidMovement MoveLIN MoveLIN_FB MoveLIN_FRG MoveLIN_ROB + syn keyword rapidMovement MovePTP MovePTP_FB MovePTP_FRG MovePTP_ROB + syn keyword rapidMovement SearchCIRC SearchCIRC_M + syn keyword rapidMovement SearchLIN SearchLIN_M + syn keyword rapidMovement MoveABS_AO MoveABS_DO MoveABS_GO + syn keyword rapidMovement MoveCIRC_AO MoveCIRC_DO MoveCIRC_GO + syn keyword rapidMovement MoveLIN_AO MoveLIN_DO MoveLIN_GO + syn keyword rapidMovement KW_LoesenLIN + syn keyword rapidMovement SPZ_FraesenLIN SPZ_FraesenPTP SPZ_MessenLIN SPZ_MessenPTP SPZ_LIN SPZ_PTP + syn keyword rapidMovement BZ_LIN BZ_PTP + syn keyword rapidMovement KL_LIN KL_CIRC + syn keyword rapidMovement BP_LIN BP_PTP + syn keyword rapidMovement BU_CIRC BU_LIN + syn keyword rapidMovement CZ_LIN CZ_LIN_V CZ_PTP CZ_PTP_V + syn keyword rapidMovement FD_LIN FD_PTP + syn keyword rapidMovement KG_LIN KG_PTP + syn keyword rapidMovement DA_LIN + syn keyword rapidMovement LK_CIRC LK_LIN + syn keyword rapidMovement LL_CIRC LL_LIN + syn keyword rapidMovement LS_CIRC LS_LIN LS_LIN_F LS_PTP_F + syn keyword rapidMovement LW_CIRC LW_LIN + syn keyword rapidMovement LZ_LIN LZ_PTP LZ_ReinigenLIN LZ_ReinigenPTP + syn keyword rapidMovement MS_CIRC MS_LIN MS_ReinigenLIN MS_SearchLIN MS_PTP_CS MS_LIN_CS GBL_LIN GBL_PTP GBL_RefPointLIN + syn keyword rapidMovement NK_LIN + syn keyword rapidMovement NZ_LIN NZ_LIN_V NZ_PTP NZ_PTP_V + syn keyword rapidMovement PR_LIN PR_PTP + syn keyword rapidMovement RF_CIRC RF_LIN + syn keyword rapidMovement STP_FraesenLIN STP_FraesenPTP STP_LIN STP_PTP + syn keyword rapidMovement SM_LIN SM_PTP + syn keyword rapidMovement BUA_CIRC BUA_LIN BUA_MessenLIN BUA_MessenPTP + syn keyword rapidMovement KE_LIN + if g:rapidGroupName + highlight default link rapidMovement Movement + else + highlight default link rapidMovement Special + endif + " }}} special keyword for move command + + " Any name {{{ + syn match rapidNames /\v[[:upper:][:lower:]](\k|\.)*/ + " }}} Any name + + " Attempt to avoid false highlight of num in case of parameter name: + " TPWrite "goPosNo="\num:=GOutput(goPosNo); + " Must follow after rapidNames in this file + syn match rapidType /\c\v<num>\s*\ze[^ :]/ + + " Structure value {{{ + " rapid structrure values. added to be able to conceal them + syn region rapidConcealableString matchgroup=rapidConcealableString start=/"/ skip=/""/ end=/"/ oneline keepend extend contained contains=rapidStringDoubleQuote,rapidEscapedBackSlash,rapidCharCode,rapidErrorSingleBackslash,rapidErrorStringTooLong,@Spell conceal + highlight default link rapidConcealableString String + syn region rapidStructVal matchgroup=rapidStructDelimiter start=/\[/ end=/\]/ contains=rapidStructVal,rapidBoolean,rapidDec,rapidHex,rapidOct,rapidBin,rapidFloat,rapidConcealableString,rapidDelimiter,rapidConstant,rapidErrNo,rapidIntNo,rapidOperator keepend extend conceal cchar=* + highlight default link rapidStructDelimiter Delimiter + " check edge cases like this one: + " LOCAL CONST listitem lstAuswService{18}:=[["","Service Position"],["","Bremsentest"],["","Referenzfahrt"],["","Manuelles Abfahren"],["","Justagestellung"],["","Transportposition"], + " ["","Spitze-Spitze Greifer 1, [RT]"],["","Spitze-Spitze Greifer 2, [FT]"],["","Spitze-Spitze Pruefspitze"],["","Werkobjekt Ablage"],["","Werkobjekt Modul 1"], + " ["","Werkobjekt Modul 2"],["","TCP von Greifer 1 vermessen, [RT]"],["","TCP von Greifer 2 vermessen, [FT]"],["","TCP von Basisdorn vermessen"], + " ["","Greifer abdocken"],["","Greifer andocken"],["","Kollision Check (Ohne Greifer)"]]; + " }}} Structure value + + " Delimiter {{{ + syn match rapidDelimiter /[\\(){},;|]/ + highlight default link rapidDelimiter Delimiter + " }}} Delimiter + + " BuildInFunction {{{ + " dispense functions + syn keyword rapidBuildInFunction contained GetSignal GetSignalDnum + " Integrated Vision Platform functions + syn keyword rapidBuildInFunction contained CamGetExposure CamGetLoadedJob CamGetName CamNumberOfResults + " Continuous Application Platform functions + syn keyword rapidBuildInFunction contained CapGetFailSigs + syn keyword rapidBuildInFunction contained Abs AbsDnum ACos ACosDnum AInput AOutput ArgName ASin ASinDnum ATan ATanDnum ATan2 ATan2Dnum + syn keyword rapidBuildInFunction contained BitAnd BitAndDnum BitCheck BitCheckDnum BitLSh BitLShDnum BitNeg BitNegDnum BitOr BitOrDnum BitRSh BitRShDnum BitXOr BitXOrDnum ByteToStr + syn keyword rapidBuildInFunction contained CalcJointT CalcRobT CalcRotAxFrameZ CalcRotAxisFrame CDate CJointT ClkRead CorrRead Cos CosDnum CPos CRobT CrossProd CSpeedOverride CTime CTool CWObj + syn keyword rapidBuildInFunction contained DecToHex DefAccFrame DefDFrame DefFrame Dim DInput Distance DnumToNum DnumToStr DotProd DOutput + syn keyword rapidBuildInFunction contained EGMGetState EulerZYX EventType ExecHandler ExecLevel Exp + syn keyword rapidBuildInFunction contained FileSize FileTime FileTimeDnum FSSize + syn keyword rapidBuildInFunction contained GetAxisDistance GetAxisMoveTime GetMaxNumberOfCyclicBool GetMecUnitName GetModalPayLoadMode GetMotorTorque GetNextCyclicBool GetNextMechUnit GetNextSym GetNumberOfCyclicBool GetServiceInfo GetSignalOrigin GetSysInfo GetTaskName GetTime GetTSPStatus GetUASUserName GInput GInputDnum GOutput GOutputDnum + syn keyword rapidBuildInFunction contained HexToDec + syn keyword rapidBuildInFunction contained IndInpos IndSpeed IOUnitState IsBrakeCheckActive IsCyclicBool IsFile IsLeadThrough IsMechUnitActive IsPers IsStopMoveAct IsStopStateEvent IsSyncMoveOn IsSysId IsVar + syn keyword rapidBuildInFunction contained Max MaxExtLinearSpeed MaxExtReorientSpeed MaxRobReorientSpeed MaxRobSpeed Min MirPos ModExist ModTime ModTimeDnum MotionPlannerNo + syn keyword rapidBuildInFunction contained NonMotionMode NOrient NumToDnum NumToStr + syn keyword rapidBuildInFunction contained Offs OpMode OrientZYX ORobT + syn keyword rapidBuildInFunction contained ParIdPosValid ParIdRobValid PathLengthGet PathLevel PathRecValidBwd PathRecValidFwd PFRestart PoseInv PoseMult PoseVect Pow PowDnum PPMovedInManMode Present ProgMemFree PrxGetMaxRecordpos + syn keyword rapidBuildInFunction contained RawBytesLen ReadBin ReadDir ReadMotor ReadNum ReadStr ReadStrBin ReadVar RelTool RemainingRetries RMQGetSlotName RobName RobOS Round RoundDnum RunMode + syn keyword rapidBuildInFunction contained SafetyControllerGetChecksum SafetyControllerGetOpModePinCode SafetyControllerGetSWVersion SafetyControllerGetUserChecksum Sin SinDnum SocketGetStatus SocketPeek Sqrt SqrtDnum STCalcForce STCalcTorque STIsCalib STIsClosed STIsIndGun STIsOpen StrDigCalc StrDigCmp StrFind StrLen StrMap StrMatch StrMemb StrOrder StrPart StrToByte StrToVal + syn keyword rapidBuildInFunction contained Tan TanDnum TaskRunMec TaskRunRob TasksInSync TaskIsActive TaskIsExecuting TestAndSet TestDI TestSignRead TextGet TextTabFreeToUse TextTabGet TriggDataValid Trunc TruncDnum Type + syn keyword rapidBuildInFunction contained UIAlphaEntry UIClientExist UIDnumEntry UIDnumTune UIListView UIMessageBox UINumEntry UINumTune + syn keyword rapidBuildInFunction contained ValidIO ValToStr Vectmagn + " Bulls Eye functions + syn keyword rapidBuildInFunction contained OffsToolXYZ OffsToolPolar + " Force Control functions + syn keyword rapidBuildInFunction contained FCGetForce FCGetProcessData FCIsForceMode FCLoadID + " Discrete application platform functions + syn keyword rapidBuildInFunction contained DaGetFstTimeEvt DaCheckMMSOpt DaGetMP DaGetRobotName DaGetTaskName + " Production Manager functions + syn keyword rapidBuildInFunction contained PMgrAtSafe PMgrAtService PMgrAtState PMgrAtStation PMgrNextStation PMgrTaskNumber PMgrTaskName + " Spot functions + syn keyword rapidBuildInFunction contained SwGetCurrTargetName SwGetCurrSpotName + " Homepos-Running functions + syn keyword rapidBuildInFunction contained HR_RobotInHome HR_GetTypeDIndex HR_GetTypeIndex + " Paint functions + syn keyword rapidBuildInFunction contained IndexLookup IpsCommand IpsGetParam PaintCommand PntQueueExtraGet PntQueueExtraSet PntQueuePeek + if g:rapidGroupName + highlight default link rapidBuildInFunction BuildInFunction + else + highlight default link rapidBuildInFunction Function + endif + " }}} + + " Function {{{ + syn match rapidFunction contains=rapidBuildInFunction /\v\c%(<%(PROC|MODULE)\s+)@10<!<[[:upper:][:lower:]]\k+ *\(/me=e-1 + highlight default link rapidFunction Function + syn match rapidCallByVar /%\ze[^%]/ + highlight default link rapidCallByVar Function + " }}} Function + + " Constants {{{ + " standard rapid constants + syn keyword rapidConstant pi stEmpty + syn keyword rapidConstant STR_DIGIT STR_LOWER STR_UPPER STR_WHITE + syn keyword rapidConstant flp1 diskhome diskram disktemp usbdisk1 usbdisk2 usbdisk3 usbdisk4 usbdisk5 usbdisk6 usbdisk7 usbdisk8 usbdisk9 usbdisk10 + " stoppoint + syn keyword rapidConstant inpos stoptime fllwtime + " stoppointdata + syn keyword rapidConstant inpos20 inpos50 inpos100 + syn keyword rapidConstant stoptime0_5 stoptime1_0 stoptime1_5 + syn keyword rapidConstant fllwtime0_5 fllwtime1_0 fllwtime1_5 + " default tool/wobj/load + syn keyword rapidConstant tool0 wobj0 load0 + " zonedata + syn keyword rapidConstant fine z0 z1 z5 z10 z15 z20 z30 z40 z50 z60 z80 z100 z150 z200 + " speeddata + syn keyword rapidConstant v5 v10 v20 v30 v40 v50 v60 v80 v100 v150 v200 v300 v400 v500 v600 v800 v1000 v1500 v2000 v2500 v3000 v4000 v5000 v6000 v7000 vmax + syn keyword rapidConstant vrot1 vrot2 vrot5 vrot10 vrot20 vrot50 vrot100 vlin10 vlin20 vlin50 vlin100 vlin200 vlin500 vlin1000 + " error code starting with ERR_ + syn keyword rapidConstant ERR_ACC_TOO_LOW ERR_ACTIV_PROF ERR_ADDR_INUSE ERR_ALIASIO_DEF ERR_ALIASIO_TYPE ERR_ALRDYCNT ERR_ALRDY_MOVING ERR_AO_LIM ERR_ARGDUPCND ERR_ARGNAME ERR_ARGNOTPER ERR_ARGNOTVAR ERR_ARGVALERR ERR_ARRAY_SIZE ERR_AXIS_ACT ERR_AXIS_IND ERR_AXIS_MOVING ERR_AXIS_PAR + syn keyword rapidConstant ERR_BUSSTATE ERR_BWDLIMIT + syn keyword rapidConstant ERR_CALC_DIVZERO ERR_CALC_NEG ERR_CALC_OVERFLOW ERR_CALLIO_INTER ERR_CALLPROC ERR_CAM_BUSY ERR_CAM_COM_TIMEOUT ERR_CAM_GET_MISMATCH ERR_CAM_MAXTIME ERR_CAM_NO_MORE_DATA ERR_CAM_NO_PROGMODE ERR_CAM_NO_RUNMODE ERR_CAM_SET_MISMATCH + syn keyword rapidConstant ERR_CFG_ILLTYPE ERR_CFG_ILL_DOMAIN ERR_CFG_INTERNAL ERR_CFG_LIMIT ERR_CFG_NOTFND ERR_CFG_OUTOFBOUNDS ERR_CFG_WRITEFILE + syn keyword rapidConstant ERR_CNTNOTVAR + syn keyword rapidConstant ERR_CNV_CONNECT ERR_CNV_DROPPED ERR_CNV_NOT_ACT + syn keyword rapidConstant ERR_COLL_STOP + syn keyword rapidConstant ERR_COMM_EXT ERR_COMM_INIT ERR_COMM_INIT_FAILED + syn keyword rapidConstant ERR_CONC_MAX ERR_CONTACTL ERR_CSV_INDEX + syn keyword rapidConstant ERR_DA_UNKPROC ERR_DATA_RECV ERR_DEV_MAXTIME ERR_DIPLAG_LIM ERR_DIVZERO ERR_DROP_LOAD ERR_EXCRTYMAX ERR_EXECPHR + syn keyword rapidConstant ERR_FILEACC ERR_FILEEXIST ERR_FILEOPEN ERR_FILESIZE ERR_FILNOTFND + syn keyword rapidConstant ERR_FNCNORET ERR_FRAME ERR_FRICTUNE_FATAL ERR_GLUEFLOW ERR_GO_LIM + syn keyword rapidConstant ERR_HAND_FAILEDGRIPPOS ERR_HAND_FAILEDMOVEPOS ERR_HAND_FAILEDVACUUM ERR_HAND_NOTCALIBRATED + syn keyword rapidConstant ERR_ILLDIM ERR_ILLQUAT ERR_ILLRAISE + syn keyword rapidConstant ERR_INDCNV_ORDER ERR_INOISSAFE ERR_INOMAX ERR_INPAR_RDONLY ERR_INT_MAXVAL ERR_INT_NOTVAL ERR_INVDIM + syn keyword rapidConstant ERR_IODISABLE ERR_IODN_TIMEOUT ERR_IOENABLE ERR_IOERROR ERR_IPSDEVICE_UNKNOWN ERR_IPSILLEGAL_CH_OR_FAC ERR_IPS_PARAM + syn keyword rapidConstant ERR_ITMSRC_UNDEF ERR_LINKREF ERR_LOADED ERR_LOADID_FATAL ERR_LOADID_RETRY ERR_LOADNO_INUSE ERR_LOADNO_NOUSE + syn keyword rapidConstant ERR_MSG_PENDING ERR_MAXINTVAL ERR_MOC_CNV_REC_FILE_UNKNOWN ERR_MODULE ERR_MOD_NOT_LOADED ERR_MOD_NOTLOADED + syn keyword rapidConstant ERR_MT_ABORT ERR_MT_HOME ERR_MT_HOMERUN + syn keyword rapidConstant ERR_NEGARG ERR_NAME_INVALID ERR_NORUNUNIT ERR_NOTARR ERR_NOTEQDIM ERR_NOTINTVAL ERR_NOTPRES ERR_NOTSAVED ERR_NOT_MOVETASK ERR_NO_ALIASIO_DEF ERR_NO_SGUN ERR_NUM_LIMIT + syn keyword rapidConstant ERR_OUTOFBND ERR_OUTSIDE_REACH ERR_OVERFLOW ERR_PATH ERR_PATHDIST ERR_PATH_STOP ERR_PERSSUPSEARCH ERR_PID_MOVESTOP ERR_PID_RAISE_PP ERR_PPA_TIMEOUT ERR_PRGMEMFULL ERR_PROCSIGNAL_OFF ERR_PROGSTOP + syn keyword rapidConstant ERR_RANYBIN_CHK ERR_RANYBIN_EOF ERR_RCVDATA ERR_REFUNKDAT ERR_REFUNKFUN ERR_REFUNKPRC ERR_REFUNKTRP + syn keyword rapidConstant ERR_RMQ_DIM ERR_RMQ_FULL ERR_RMQ_INVALID ERR_RMQ_INVMSG ERR_RMQ_MSGSIZE ERR_RMQ_NAME ERR_RMQ_NOMSG ERR_RMQ_TIMEOUT ERR_RMQ_VALUE + syn keyword rapidConstant ERR_ROBLIMIT ERR_SC_WRITE + syn keyword rapidConstant ERR_SGUN_ESTOP ERR_SGUN_MOTOFF ERR_SGUN_NEGVAL ERR_SGUN_NOTACT ERR_SGUN_NOTINIT ERR_SGUN_NOTOPEN ERR_SGUN_NOTSYNC + syn keyword rapidConstant ERR_SIG_NAME ERR_SIGSUPSEARCH ERR_SIG_NOT_VALID + syn keyword rapidConstant ERR_SOCK_ADDR_INVALID ERR_SOCK_ADDR_INUSE ERR_SOCK_CLOSED ERR_SOCK_IS_BOUND ERR_SOCK_IS_CONN ERR_SOCK_NET_UNREACH ERR_SOCK_NOT_BOUND ERR_SOCK_NOT_CONN ERR_SOCK_TIMEOUT ERR_SOCK_UNSPEC + syn keyword rapidConstant ERR_SPEEDLIM_VALUE ERR_SPEED_REFRESH_LIM + syn keyword rapidConstant ERR_STARTMOVE ERR_STORE_PROF ERR_STRTOOLNG ERR_SYMBOL_TYPE ERR_SYM_ACCESS ERR_SYNCMOVEOFF ERR_SYNCMOVEON ERR_SYNTAX + syn keyword rapidConstant ERR_TASKNAME + syn keyword rapidConstant ERR_TP_DIBREAK ERR_TP_DOBREAK ERR_TP_MAXTIME ERR_TP_NO_CLIENT ERR_TP_PERSBOOLBREAK + syn keyword rapidConstant ERR_TRUSTLEVEL ERR_TXTNOEXIST ERR_UDPUC_COMM + syn keyword rapidConstant ERR_UISHOW_FATAL ERR_UISHOW_FULL ERR_UI_INITVALUE ERR_UI_MAXMIN ERR_UI_NOTINT + syn keyword rapidConstant ERR_UNIT_PAR ERR_UNKINO ERR_UNKPROC ERR_UNLOAD ERR_USE_PROF + syn keyword rapidConstant ERR_WAITSYNCTASK ERR_WAIT_MAX ERR_WAIT_MAXTIME ERR_WHL_SEARCH ERR_WHLSEARCH ERR_WOBJ_MOVING + " error codes starting with CORR_ + syn keyword rapidConstant CORR_NOFREE CORR_NOOBJECT CORR_NOTCONN + " error codes starting with SEN_ + syn keyword rapidConstant SEN_BUSY SEN_CAALARM SEN_CAMCHECK SEN_EXALARM SEN_GENERRO SEN_NO_MEAS SEN_NOREADY SEN_TEMP SEN_TIMEOUT SEN_UNKNOWN SEN_VALUE + " error codes starting with SYS_ + syn keyword rapidConstant SYS_ERR_ARL_INPAR_RDONLY SYS_ERR_HW_SMB_WARNING_BATTERY_LOW SYS_ERR_MOC_CNV_REC_FILE_UNKNOWN SYS_ERR_MOC_CNV_REC_NOT_READY + " error codes starting with TC_ + syn keyword rapidConstant TC_ERR_AIR TC_ERR_CLOSE_COV TC_ERR_DOUNLOCK TC_ERR_IO TC_ERR_IOCFG TC_ERR_LOCK TC_ERR_NOTOOL TC_ERR_OPEN_COV TC_ERR_POWER TC_ERR_PULOCK TC_ERR_ROBPOS TC_ERR_ROBPOS_DROP TC_ERR_ROBPOS_PICK TC_ERR_SERVO_TOOL TC_ERR_STANDNUM TC_ERR_TOOL TC_ERR_TOOLCFG TC_ERR_TOOLNUM TC_ERR_UNLOCK + " long jump error + syn keyword rapidConstant LONG_JMP_ALL_ERR + " Arc and Arc sensor + syn keyword rapidConstant AW_IGNI_ERR AW_EQIP_ERR AW_START_ERR AW_STOP_ERR AW_TRACK_ERR AW_TRACKCORR_ERR AW_TRACKSTA_ERR AW_USERSIG_ERR AW_WELD_ERR AW_WIRE_ERR + " EGM egmframetype + syn keyword rapidConstant EGM_FRAME_BASE EGM_FRAME_TOOL EGM_FRAME_WOBJ EGM_FRAME_WORLD EGM_FRAME_JOINT + " Events + syn keyword rapidConstant EE_START EE_CYCLE_START EE_PROC_START EE_PRE_PROD EE_CLOSE_JIG EE_INDEX EE_PRE_PART EE_POST_PART EE_OPEN_JIG EE_SERVICE EE_POST_PROD EE_ABORT EE_WAIT_ORDER EE_POST_PROC + syn keyword rapidConstant EE_POWERON EE_POWERON_OR_START EE_RESTART EE_START_OR_RESTART EE_STOP EE_QSTOP EE_STOP_OR_QSTOP EE_RESET EE_STEP EE_STEP_FWD EE_STEP_BCK EE_BEFORE_INIT EE_AFTER_INIT EE_BEFORE_PROD EE_AFTER_PROD EE_BEFORE_MENU EE_AFTER_MENU + syn keyword rapidConstant EE_ERROR EE_HOMERUN EE_PROG_END EE_AFTER_PROG_NUMBER EE_PROGNO_UNKNOWN EE_PROD_UNKNOWN EE_MSG_WRITTEN EE_MSG_ACKNOWLEDGED EE_AFTER_PART EE_BEFORE_HOMERUN EE_AFTER_HOMERUN EE_BLOCKED + " motion process mode + syn keyword rapidConstant OPTIMAL_CYCLE_TIME_MODE LOW_SPEED_ACCURACY_MODE LOW_SPEED_STIFF_MODE ACCURACY_MODE MPM_USER_MODE_1 MPM_USER_MODE_2 MPM_USER_MODE_3 MPM_USER_MODE_4 + " inttypes + syn keyword rapidConstant USINT UINT UDINT ULINT SINT INT DINT LINT + " opcalc + syn keyword rapidConstant OpAdd OpSub OpMult OpDiv OpMod + " triggmode + syn keyword rapidConstant TRIGG_MODE1 TRIGG_MODE2 TRIGG_MODE3 + " tunetype + syn keyword rapidConstant TUNE_DF TUNE_KP TUNE_KV TUNE_TI TUNE_FRIC_LEV TUNE_FRIC_RAMP TUNE_DG TUNE_DH TUNE_DI TUNE_DK TUNE_DL + " cellopmode + syn keyword rapidConstant OP_NO_ROBOT OP_SERVICE OP_PRODUCTION + " execution mode + syn keyword rapidConstant CT_CONTINUOUS CT_COUNT_CYCLES CT_COUNT_CYC_ACTION CT_PERIODICAL + " Force Control + syn keyword rapidConstant FC_REFFRAME_TOOL FC_REFFRAME_WOBJ FC_LIN_X FC_LIN_Y FC_LIN_Z FC_ROT_X FC_ROT_Y FC_ROT_Z FC_SPEED_RATIO_MIN FC_NO_OF_SPEED_LEVELS + " tpnum + syn keyword rapidConstant TP_LATEST TP_PROGRAM TP_SCREENVIEWER + " paridvalidnum + syn keyword rapidConstant ROB_LOAD_VAL ROB_NOT_LOAD_VAL ROB_LM1_LOAD_VAL + " paridnum + syn keyword rapidConstant TOOL_LOAD_ID PAY_LOAD_ID IRBP_K IRBP_L IRBP_C IRBP_C_INDEX IRBP_T IRBP_R IRBP_A IRBP_B IRBP_D + " loadidnum + syn keyword rapidConstant MASS_KNOWN MASS_WITH_AX3 + " sensorstate + syn keyword rapidConstant STATE_ERROR STATE_UNDEFINED STATE_CONNECTED STATE_OPERATING STATE_CLOSED + " signalorigin + syn keyword rapidConstant SIGORIG_NONE SIGORIG_CFG SIGORIG_ALIAS + " aiotrigg + syn keyword rapidConstant AIO_ABOVE_HIGH AIO_BELOW_HIGH AIO_ABOVE_LOW AIO_BELOW_LOW AIO_BETWEEN AIO_OUTSIDE AIO_ALWAYS + " socketstatus + syn keyword rapidConstant SOCKET_CREATED SOCKET_CONNECTED SOCKET_BOUND SOCKET_LISTENING SOCKET_CLOSED + " symnum of OpMode() + syn keyword rapidConstant OP_UNDEF OP_AUTO OP_MAN_PROG OP_MAN_TEST + " symnum of RunMode() + syn keyword rapidConstant RUN_UNDEF RUN_CONT_CYCLE RUN_INSTR_FWD RUN_INSTR_BWD RUN_SIM RUN_STEP_MOVE + " event_type of EventType() + syn keyword rapidConstant EVENT_NONE EVENT_POWERON EVENT_START EVENT_STOP EVENT_QSTOP EVENT_RESTART EVENT_RESET EVENT_STEP + " handler_type of ExecHandler() + syn keyword rapidConstant HANDLER_NONE HANDLER_BWD HANDLER_ERR HANDLER_UNDO + " event_level of ExecLevel() + syn keyword rapidConstant LEVEL_NORMAL LEVEL_TRAP LEVEL_SERVICE + " signalorigin of GetSignalOrigin() + syn keyword rapidConstant SIGORIG_NONE SIGORIG_CFG SIGORIG_ALIAS + " opnum + syn keyword rapidConstant LT LTEQ EQ NOTEQ GT GTEQ + " icondata + syn keyword rapidConstant iconNone iconInfo iconWarning iconError + " buttondata + syn keyword rapidConstant btnNone btnOK btnAbrtRtryIgn btnOKCancel btnRetryCancel btnYesNo btnYesNoCancel + " btnres + syn keyword rapidConstant resUnkwn resOK resAbort resRetry resIgnore resCancel resYes resNo + " cfgdomain + syn keyword rapidConstant ALL_DOMAINS EIO_DOMAIN MMC_DOMAIN MOC_DOMAIN PROC_DOMAIN SIO_DOMAIN SYS_DOMAIN + " errdomain + syn keyword rapidConstant COMMON_ERR OP_STATE SYSTEM_ERR HARDWARE_ERR PROGRAM_ERR MOTION_ERR OPERATOR_ERR IO_COM_ERR USER_DEF_ERR SAFETY_ERR PROCESS_ERR CFG_ERR OPTION_PROD_ERR ARCWELD_ERR SPOTWELD_ERR PAINT_ERR PICKWARE_ERR + " errtype + syn keyword rapidConstant TYPE_ALL TYPE_ERR TYPE_STATE TYPE_WARN + " Sensor Interface + syn keyword rapidConstant LTAPP__AGE LTAPP__ANGLE LTAPP__AREA LTAPP__CAMCHECK LTAPP__GAP LTAPP__JOINT_NO LTAPP__LASER_OFF LTAPP__MISMATCH LTAPP__PING LTAPP__POWER_UP LTAPP__RESET LTAPP__STEPDIR LTAPP__THICKNESS LTAPP__UNIT + syn keyword rapidConstant LTAPP__X LTAPP__Y LTAPP__Z LTAPP__APM_P1 LTAPP__APM_P2 LTAPP__APM_P3 LTAPP__APM_P4 LTAPP__APM_P5 LTAPP__APM_P6 LTAPP__ROT_Y LTAPP__ROT_Z LTAPP__X0 LTAPP__Y0 LTAPP__Z0 LTAPP__X1 LTAPP__Y1 LTAPP__Z1 LTAPP__X2 LTAPP__Y2 LTAPP__Z2 + " iounit_state + syn keyword rapidConstant IOUNIT_LOG_STATE_DISABLED IOUNIT_LOG_STATE_ENABLED IOUNIT_PHYS_STATE_DEACTIVATED IOUNIT_PHYS_STATE_RUNNING IOUNIT_PHYS_STATE_ERROR IOUNIT_PHYS_STATE_UNCONNECTED IOUNIT_PHYS_STATE_UNCONFIGURED IOUNIT_PHYS_STATE_STARTUP IOUNIT_PHYS_STATE_INIT IOUNIT_RUNNING IOUNIT_RUNERROR IOUNIT_DISABLE IOUNIT_OTHERERR + " busstate + syn keyword rapidConstant IOBUS_LOG_STATE_STARTED IOBUS_LOG_STATE_STOPPED IOBUS_PHYS_STATE_ERROR IOBUS_PHYS_STATE_HALTED IOBUS_PHYS_STATE_INIT IOBUS_PHYS_STATE_RUNNING IOBUS_PHYS_STATE_STARTUP + syn keyword rapidConstant BUSSTATE_ERROR BUSSTATE_HALTED BUSSTATE_INIT BUSSTATE_RUN BUSSTATE_STARTUP + " SoftMove + syn keyword rapidConstant CSS_POSX CSS_NEGX CSS_POSY CSS_NEGY CSS_POSZ CSS_NEGZ CSS_X CSS_Y CSS_Z CSS_XY CSS_XZ CSS_YZ CSS_XYZ CSS_XYRZ CSS_ARM_ANGLE CSS_REFFRAME_TOOL CSS_REFFRAME_WOBJ + " tsp_status + syn keyword rapidConstant TSP_STATUS_NOT_NORMAL_TASK TSP_STATUS_DEACT TSP_STATUS_DEACT_SERV_ROUT TSP_STATUS_ACT TSP_UNCHECKED_RUN_SERV_ROUT TSP_NORMAL_UNCHECKED TSP_STATIC_UNCHECKED TSP_SEMISTATIC_UNCHECKED TSP_NORMAL_CHECKED TSP_STATIC_CHECKED TSP_SEMISTATIC_CHECKED + " IRC5P (paint controller) + syn keyword rapidConstant PW_EQUIP_ERR + " Bulls Eye + syn keyword rapidConstant BESuccess BENoOverwrite BENoNameMatch BENoBEDataMod BEArrayFull BEToolNotFound BEInvalidSignal BEAliasSet BERangeLimFail BERangeSingFail BERangeTiltFail BEScanPlaneErr BEBFrameNotRead BEScanRadZero BEHeightSrchErr BEBeamNotFound BEBeamSpinErr BESrchErrInBeam BESrchErrNoDet BENumOfScansErr BEDiaZeroOrLess BESliceCountErr BEGetNewTcpMax BEBeamOriFail BEGetTcpDelErr BERefPosSetErr BERefToolSetErr BERefBeamSetErr BEBFrameDefErr BESetupAlready BERefResetErr BESetupFailed BEToolNotSet BEStartChanged BEBeamMoveErr BECheckTcp BECheckErr BESkipUpdate BEStrtningErr BEAllNotSet BEQuikRefNotDef BEConvergErr BEInstFwdErr BEGetGantryErr BEUnknownErr + " Continuous Application Platform constants + syn keyword rapidConstant CAP_START START_PRE PRE_STARTED START_MAIN MAIN_STARTED STOP_WEAVESTART WEAVESTART_REGAIN MOTION_DELAY STARTSPEED_TIME MAIN_MOTION MOVE_STARTED RESTART NEW_INSTR AT_POINT AT_RESTARTPOINT LAST_SEGMENT PROCESS_END_POINT END_MAIN MAIN_ENDED PATH_END_POINT PROCESS_ENDED END_POST1 POST1_ENDED END_POST2 POST2_ENDED CAP_STOP CAP_PF_RESTART EQUIDIST AT_ERRORPOINT FLY_START FLY_END LAST_INSTR_ENDED END_PRE PRE_ENDED START_POST1 POST1_STARTED START_POST2 POST2_STARTED + syn keyword rapidConstant CAP_PRE_ERR CAP_PRESTART_ERR CAP_END_PRE_ERR CAP_START_ERR CAP_MAIN_ERR CAP_ENDMAIN_ERR CAP_START_POST1_ERR CAP_POST1_ERR CAP_POST1END_ERR CAP_START_POST2_ERR CAP_POST2_ERR CAP_POST2END_ERR CAP_TRACK_ERR CAP_TRACKSTA_ERR CAP_TRACKCOR_ERR CAP_TRACKCOM_ERR CAP_TRACKPFR_ERR CAP_SEN_NO_MEAS CAP_SEN_NOREADY CAP_SEN_GENERRO CAP_SEN_BUSY CAP_SEN_UNKNOWN CAP_SEN_ILLEGAL CAP_SEN_EXALARM CAP_SEN_CAALARM CAP_SEN_TEMP CAP_SEN_VALUE CAP_SEN_CAMCHECK CAP_SEN_TIMEOUT + " Machine Tending grppos + syn keyword rapidConstant gsOpen gsVacuumOff gsBackward gsClose gsVacuumOn gsForward gsReset + " Machine Tending grpaction + syn keyword rapidConstant gaSetAndCheck gaSet gaCheck gaCheckClose gaCheckClose + " Palletizing PowerPac + syn keyword rapidConstant PM_ERR_AXLIM PM_ERR_CALCCONF PM_ERR_FLOW_NOT_FOUND PM_ERR_INVALID_FLOW_STOP_OPTION PM_ERR_JOB_EMPTY PM_ERR_LIM_VALUE PM_ERR_NO_RUNNING_PROJECT PM_ERR_NO_TASK PM_ERR_NOT_VALID_RECOVER_ACTION PM_ERR_OPERATION_LOST PM_ERR_PALLET_EMPTY PM_ERR_PALLET_REDUCED PM_ERR_PART_VAL PM_ERR_PROJ_NOT_FOUND PM_ERR_REDO_LAST_PICK_REJECTED PM_ERR_TIMEOUT PM_ERR_WA_NOT_FOUND PM_ERR_WOBJ PM_ERR_WORKAREA_EXPECTED PM_ERR_WRONG_FLOW_STATE + syn keyword rapidConstant PM_ACK PM_NACK PM_LOST PM_RECOVER_CONTINUE_OPERATION PM_RECOVER_REDO_LAYER PM_RECOVER_NEXT_PALLET PM_RECOVER_REDO_LAST_PICK PM_FLOW_ERROR PM_FLOW_FINISH_CYCLE PM_FLOW_FINISH_LAYER PM_FLOW_FINISH_PALLET PM_FLOW_RUNNING PM_FLOW_STOP_IMMEDIATELY PM_FLOW_STOPPED PM_FLOW_STOPPING_AFTER_CYCLE PM_FLOW_STOPPING_AFTER_LAYER PM_FLOW_STOPPING_AFTER_PALLET PM_APPROACH_POS PM_DEPART_POS PM_TARGET_POS PM_EVENT_PROC PM_EVENT_DO PM_EVENT_GO PM_MOVE_JOINT PM_MOVE_LIN PM_SEARCH_X PM_SEARCH_Y PM_SEARCH_Z PM_SING_AREA_OFF PM_SING_AREA_WRI PM_STOP_NOT_USED PM_STOP PM_PSTOP PM_SSTOP PM_PROJECT_STOPPED PM_PROJECT_STOPPING PM_PROJECT_STARTING PM_PROJECT_RUNNING PM_PROJECT_ERROR + syn keyword rapidConstant MaxToolAngle MinToolAngle + " other constants + syn keyword rapidConstant GAP_SERVICE_TYPE GAP_SETUP_TYPE GAP_STATE_IDLE GAP_STATE_PART GAP_STATE_SERV GAP_STATE_SETUP GAP_STATE_UNKN GAP_TASK_NAME GAP_TASK_NO GAP_SHOW_ALWAYS GAP_SHOW_NEVER GAP_SHOW_SAFE GAP_SHOW_SERVICE + syn keyword rapidConstant EOF EOF_BIN EOF_NUM + syn keyword rapidConstant END_OF_LIST WAIT_MAX + syn keyword rapidErrNo ERRNO + syn keyword rapidIntNo INTNO + " VW Konzernstandard VWKS_1.07.02 + syn keyword rapidIntNo KG_UNDEFINIERT KG_LETZTEPOS KG_GREIFPOS KG_ZWISCHENPOS KG_TOOLINFO KG_GREIFPOSKORR + syn keyword rapidIntNo BA1 BA2 + syn keyword rapidIntNo SetupXY SetupZ KorrekturXY KorrekturZ + if g:rapidGroupName + highlight default link rapidConstant Sysvars + highlight default link rapidErrNo Sysvars + highlight default link rapidIntNo Sysvars + endif + " }}} ERRNO Constants + + " Error {{{ + if get(g:,'rapidShowError',1) + " + " vars or funcs >32 chars are not possible in rapid. a234567890123456789012345 + syn match rapidErrorIdentifierNameTooLong /\k\{33,}/ containedin=rapidFunction,rapidNames,rapidLabel + highlight default link rapidErrorIdentifierNameTooLong Error + " + " a == b + 1 + syn match rapidErrorShouldBeColonEqual /\c\v%(^\s*%(%(TASK\s+|LOCAL\s+)?%(VAR|PERS|CONST)\s+\k+\s+)?\k+%(\k|[.{},*/+-])*\s*)@<=\=/ + highlight default link rapidErrorShouldBeColonEqual Error + " + " WaitUntil a==b + syn match rapidErrorShouldBeEqual /\c\v%(^\s*%(Return|WaitUntil|while)>[^!\\]+[^!<>])@<=%(\=|:)\=/ + syn match rapidErrorShouldBeEqual /\c\v%(^\s*%(if|elseif)>[^!\\]+[^!<>])@<=%(\=|:)\=\ze[^!\\]+<then>/ + highlight default link rapidErrorShouldBeEqual Error + " + " WaitUntil a=>b + syn match rapidErrorShoudBeLessOrGreaterEqual /\c\v%(^\s*%(Return|WaitUntil|if|elseif|while)>[^!]+[^!<>])@<=\=[><]/ + highlight default link rapidErrorShoudBeLessOrGreaterEqual Error + " + " WaitUntil a><b + syn match rapidErrorShouldBeLessGreater /\c\v%(^\s*%(Return|WaitUntil|if|elseif|while)[^!]+)@<=\>\s*\</ + highlight default link rapidErrorShouldBeLessGreater Error + " + " if (a==5) (b==6) + syn match rapidErrorMissingOperator /\c\v%(^\s*%(Return|WaitUntil|if|elseif|while)[^!]+[^!])@<=\)\s*\(/ + highlight default link rapidErrorMissingOperator Error + " + " "for" missing "from" + syn match rapidErrorMissingFrom /\c\v^\s*for\s+%([[:upper:][:lower:]]%(\k|[.{},*/+-])*\s+from)@!\S+\s+\S+/ + highlight default link rapidErrorMissingFrom Error + " + " + endif + " }}} Error + +" }}} +endif + +" common Error {{{ +if get(g:,'rapidShowError',1) + " + " This error must be defined after rapidString + " string too long + " syn match rapidErrorStringTooLong /\v%("%(""|\\\\|\\\x\x|[^"\\]){80})@240<=%([^"]|"{2})+/ contained contains=rapidStringDoubleQuote,rapidEscapedBackSlash,rapidCharCode,rapidErrorSingleBackslash + highlight default link rapidErrorStringTooLong Error + " +endif + +" }}} Error + +" Finish {{{ +let &cpo = s:keepcpo +unlet s:keepcpo + +let b:current_syntax = "rapid" +" }}} Finish + +" vim:sw=2 sts=2 et fdm=marker diff --git a/runtime/syntax/rmd.vim b/runtime/syntax/rmd.vim index cccd4110f5..93343dd729 100644 --- a/runtime/syntax/rmd.vim +++ b/runtime/syntax/rmd.vim @@ -1,7 +1,7 @@ -" markdown Text with R statements -" Language: markdown with R code chunks +" Language: Markdown with chunks of R, Python and other languages +" Maintainer: Jakson Aquino <jalvesaq@gmail.com> " Homepage: https://github.com/jalvesaq/R-Vim-runtime -" Last Change: Wed Apr 21, 2021 09:55AM +" Last Change: Wed May 17, 2023 06:34AM " " For highlighting pandoc extensions to markdown like citations and TeX and " many other advanced features like folding of markdown sections, it is @@ -13,126 +13,218 @@ if exists("b:current_syntax") finish endif +let s:cpo_save = &cpo +set cpo&vim + " Highlight the header of the chunks as R code let g:rmd_syn_hl_chunk = get(g:, 'rmd_syn_hl_chunk', 0) " Pandoc-syntax has more features, but it is slower. " https://github.com/vim-pandoc/vim-pandoc-syntax -let g:pandoc#syntax#codeblocks#embeds#langs = get(g:, 'pandoc#syntax#codeblocks#embeds#langs', ['r']) + +" Don't waste time loading syntax that will be discarded: +let s:save_pandoc_lngs = get(g:, 'pandoc#syntax#codeblocks#embeds#langs', []) +let g:pandoc#syntax#codeblocks#embeds#langs = [] + +let g:rmd_dynamic_fenced_languages = get(g:, 'rmd_dynamic_fenced_languages', v:true) + +" Step_1: Source pandoc.vim if it is installed: runtime syntax/pandoc.vim if exists("b:current_syntax") + if hlexists('pandocDelimitedCodeBlock') + syn clear pandocDelimitedCodeBlock + endif + + if len(s:save_pandoc_lngs) > 0 && !exists('g:rmd_fenced_languages') + let g:rmd_fenced_languages = deepcopy(s:save_pandoc_lngs) + endif + " Recognize inline R code - syn region rmdrInline matchgroup=rmdInlineDelim start="`r " end="`" contains=@R containedin=pandocLaTeXRegion,yamlFlowString keepend - hi def link rmdInlineDelim Delimiter - - " Fix recognition of language chunks (code adapted from pandoc, 2021-03-28) - " Knitr requires braces in the block's header - for s:lng in g:pandoc#syntax#codeblocks#embeds#langs - let s:nm = matchstr(s:lng, '^[^=]*') - exe 'syn clear pandocDelimitedCodeBlock_'.s:nm - exe 'syn clear pandocDelimitedCodeBlockinBlockQuote_'.s:nm - if g:rmd_syn_hl_chunk - exe 'syn region rmd'.s:nm.'ChunkDelim matchgroup=rmdCodeDelim start="^\s*```\s*{\s*'.s:nm.'\>" matchgroup=rmdCodeDelim end="}$" keepend containedin=rmd'.s:nm.'Chunk contains=@R' - exe 'syn region rmd'.s:nm.'Chunk start="^\s*```\s*{\s*'.s:nm.'\>.*$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend contains=rmd'.s:nm.'ChunkDelim,@'.toupper(s:nm) + syn region rmdrInline matchgroup=rmdInlineDelim start="`r " end="`" contains=@Rmdr containedin=pandocLaTeXRegion,yamlFlowString keepend +else + " Step_2: Source markdown.vim if pandoc.vim is not installed + + " Configuration if not using pandoc syntax: + " Add syntax highlighting of YAML header + let g:rmd_syn_hl_yaml = get(g:, 'rmd_syn_hl_yaml', 1) + " Add syntax highlighting of citation keys + let g:rmd_syn_hl_citations = get(g:, 'rmd_syn_hl_citations', 1) + + " R chunks will not be highlighted by syntax/markdown because their headers + " follow a non standard pattern: "```{lang" instead of "^```lang". + " Make a copy of g:markdown_fenced_languages to highlight the chunks later: + if exists('g:markdown_fenced_languages') && !exists('g:rmd_fenced_languages') + let g:rmd_fenced_languages = deepcopy(g:markdown_fenced_languages) + endif + + if exists('g:markdown_fenced_languages') && len(g:markdown_fenced_languages) > 0 + let s:save_mfl = deepcopy(g:markdown_fenced_languages) + endif + " Don't waste time loading syntax that will be discarded: + let g:markdown_fenced_languages = [] + runtime syntax/markdown.vim + if exists('s:save_mfl') > 0 + let g:markdown_fenced_languages = deepcopy(s:save_mfl) + unlet s:save_mfl + endif + syn region rmdrInline matchgroup=rmdInlineDelim start="`r " end="`" contains=@Rmdr keepend + + " Step_2a: Add highlighting for both YAML and citations which are pandoc + " specific, but also used in Rmd files + + " You don't need this if either your markdown/syntax.vim already highlights + " the YAML header or you are writing standard markdown + if g:rmd_syn_hl_yaml + " Basic highlighting of YAML header + syn match rmdYamlFieldTtl /^\s*\zs\w\%(-\|\w\)*\ze:/ contained + syn match rmdYamlFieldTtl /^\s*-\s*\zs\w\%(-\|\w\)*\ze:/ contained + syn region yamlFlowString matchgroup=yamlFlowStringDelimiter start='"' skip='\\"' end='"' contains=yamlEscape,rmdrInline contained + syn region yamlFlowString matchgroup=yamlFlowStringDelimiter start="'" skip="''" end="'" contains=yamlSingleEscape,rmdrInline contained + syn match yamlEscape contained '\\\%([\\"abefnrtv\^0_ NLP\n]\|x\x\x\|u\x\{4}\|U\x\{8}\)' + syn match yamlSingleEscape contained "''" + syn match yamlComment /#.*/ contained + " A second colon is a syntax error, unless within a string or following !expr + syn match yamlColonError /:\s*[^'^"^!]*:/ contained + if &filetype == 'quarto' + syn region pandocYAMLHeader matchgroup=rmdYamlBlockDelim start=/\%(\%^\|\_^\s*\n\)\@<=\_^-\{3}\ze\n.\+/ end=/^---$/ keepend contains=rmdYamlFieldTtl,yamlFlowString,yamlComment,yamlColonError else - exe 'syn region rmd'.s:nm.'Chunk matchgroup=rmdCodeDelim start="^\s*```\s*{\s*'.s:nm.'\>.*$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend contains=@'.toupper(s:nm) + syn region pandocYAMLHeader matchgroup=rmdYamlBlockDelim start=/\%(\%^\|\_^\s*\n\)\@<=\_^-\{3}\ze\n.\+/ end=/^\([-.]\)\1\{2}$/ keepend contains=rmdYamlFieldTtl,yamlFlowString,yamlComment,yamlColonError endif - endfor - unlet s:lng - unlet s:nm - hi def link rmdInlineDelim Delimiter - hi def link rmdCodeDelim Delimiter - let b:current_syntax = "rmd" - finish -endif - -" Configuration if not using pandoc syntax: -" Add syntax highlighting of YAML header -let g:rmd_syn_hl_yaml = get(g:, 'rmd_syn_hl_yaml', 1) -" Add syntax highlighting of citation keys -let g:rmd_syn_hl_citations = get(g:, 'rmd_syn_hl_citations', 1) + hi def link rmdYamlBlockDelim Delimiter + hi def link rmdYamlFieldTtl Identifier + hi def link yamlFlowString String + hi def link yamlComment Comment + hi def link yamlColonError Error + endif -let s:cpo_save = &cpo -set cpo&vim + " Conceal char for manual line break + if &encoding ==# 'utf-8' + syn match rmdNewLine ' $' conceal cchar=↵ + endif -" R chunks will not be highlighted by syntax/markdown because their headers -" follow a non standard pattern: "```{lang" instead of "^```lang". -" Make a copy of g:markdown_fenced_languages to highlight the chunks later: -if exists('g:markdown_fenced_languages') - if !exists('g:rmd_fenced_languages') - let g:rmd_fenced_languages = deepcopy(g:markdown_fenced_languages) - let g:markdown_fenced_languages = [] + " You don't need this if either your markdown/syntax.vim already highlights + " citations or you are writing standard markdown + if g:rmd_syn_hl_citations + " From vim-pandoc-syntax + " parenthetical citations + syn match pandocPCite /\^\@<!\[[^\[\]]\{-}-\{0,1}@[[:alnum:]_][[:alnum:]à -öø-ÿÀ-ÖØ-ß_:.#$%&\-+?<>~\/]*.\{-}\]/ contains=pandocEmphasis,pandocStrong,pandocLatex,pandocCiteKey,@Spell,pandocAmpersandEscape display + " in-text citations with location + syn match pandocICite /@[[:alnum:]_][[:alnum:]à -öø-ÿÀ-ÖØ-ß_:.#$%&\-+?<>~\/]*\s\[.\{-1,}\]/ contains=pandocCiteKey,@Spell display + " cite keys + syn match pandocCiteKey /\(-\=@[[:alnum:]_][[:alnum:]à -öø-ÿÀ-ÖØ-ß_:.#$%&\-+?<>~\/]*\)/ containedin=pandocPCite,pandocICite contains=@NoSpell display + syn match pandocCiteAnchor /[-@]/ contained containedin=pandocCiteKey display + syn match pandocCiteLocator /[\[\]]/ contained containedin=pandocPCite,pandocICite + hi def link pandocPCite Operator + hi def link pandocICite Operator + hi def link pandocCiteKey Label + hi def link pandocCiteAnchor Operator + hi def link pandocCiteLocator Operator endif -else - let g:rmd_fenced_languages = ['r'] endif -runtime syntax/markdown.vim +" Step_3: Highlight code blocks. + +syn region rmdCodeBlock matchgroup=rmdCodeDelim start="^\s*```\s*{.*}$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend +syn region rmdCodeBlock matchgroup=rmdCodeDelim start="^\s*```.+$" matchgroup=rmdCodeDelim end="^```$" keepend +hi link rmdCodeBlock Special " Now highlight chunks: -for s:type in g:rmd_fenced_languages - if s:type =~ '=' - let s:ft = substitute(s:type, '.*=', '', '') - let s:nm = substitute(s:type, '=.*', '', '') +syn region knitrBodyOptions start='^#| ' end='$' contained containedin=rComment,pythonComment contains=knitrBodyVar,knitrBodyValue transparent +syn match knitrBodyValue ': \zs.*\ze$' keepend contained containedin=knitrBodyOptions +syn match knitrBodyVar '| \zs\S\{-}\ze:' contained containedin=knitrBodyOptions + +let g:rmd_fenced_languages = get(g:, 'rmd_fenced_languages', ['r']) + +let s:no_syntax_vim = [] +function IncludeLanguage(lng) + if a:lng =~ '=' + let ftpy = substitute(a:lng, '.*=', '', '') + let lnm = substitute(a:lng, '=.*', '', '') else - let s:ft = s:type - let s:nm = s:type + let ftpy = a:lng + let lnm = a:lng endif - unlet! b:current_syntax - exe 'syn include @Rmd'.s:nm.' syntax/'.s:ft.'.vim' - if g:rmd_syn_hl_chunk - exe 'syn region rmd'.s:nm.'ChunkDelim matchgroup=rmdCodeDelim start="^\s*```\s*{\s*'.s:nm.'\>" matchgroup=rmdCodeDelim end="}$" keepend containedin=rmd'.s:nm.'Chunk contains=@Rmdr' - exe 'syn region rmd'.s:nm.'Chunk start="^\s*```\s*{\s*'.s:nm.'\>.*$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend contains=rmd'.s:nm.'ChunkDelim,@Rmd'.s:nm + if index(s:no_syntax_vim, ftpy) >= 0 + return + endif + if len(globpath(&rtp, "syntax/" . ftpy . ".vim")) + unlet! b:current_syntax + exe 'syn include @Rmd'.lnm.' syntax/'.ftpy.'.vim' + let b:current_syntax = "rmd" + if g:rmd_syn_hl_chunk + exe 'syn match knitrChunkDelim /```\s*{\s*'.lnm.'/ contained containedin=knitrChunkBrace contains=knitrChunkLabel' + exe 'syn match knitrChunkLabelDelim /```\s*{\s*'.lnm.',\=\s*[-[:alnum:]]\{-1,}[,}]/ contained containedin=knitrChunkBrace' + syn match knitrChunkDelim /}\s*$/ contained containedin=knitrChunkBrace + exe 'syn match knitrChunkBrace /```\s*{\s*'.lnm.'.*$/ contained containedin=rmd'.lnm.'Chunk contains=knitrChunkDelim,knitrChunkLabelDelim,@Rmd'.lnm + exe 'syn region rmd'.lnm.'Chunk start="^\s*```\s*{\s*=\?'.lnm.'\>.*$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend contains=knitrChunkBrace,@Rmd'.lnm + + hi link knitrChunkLabel Identifier + hi link knitrChunkDelim rmdCodeDelim + hi link knitrChunkLabelDelim rmdCodeDelim + else + exe 'syn region rmd'.lnm.'Chunk matchgroup=rmdCodeDelim start="^\s*```\s*{\s*=\?'.lnm.'\>.*$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend contains=@Rmd'.lnm + endif else - exe 'syn region rmd'.s:nm.'Chunk matchgroup=rmdCodeDelim start="^\s*```\s*{\s*'.s:nm.'\>.*$" matchgroup=rmdCodeDelim end="^\s*```\ze\s*$" keepend contains=@Rmd'.s:nm + " Avoid the cost of running globpath() whenever the buffer is saved + let s:no_syntax_vim += [ftpy] endif +endfunction + +for s:type in g:rmd_fenced_languages + call IncludeLanguage(s:type) endfor unlet! s:type -" Recognize inline R code -syn region rmdrInline matchgroup=rmdInlineDelim start="`r " end="`" contains=@Rmdr keepend +function CheckRmdFencedLanguages() + let alines = getline(1, '$') + call filter(alines, "v:val =~ '^```{'") + call map(alines, "substitute(v:val, '^```{', '', '')") + call map(alines, "substitute(v:val, '\\W.*', '', '')") + for tpy in alines + if len(tpy) == 0 + continue + endif + let has_lng = 0 + for lng in g:rmd_fenced_languages + if tpy == lng + let has_lng = 1 + continue + endif + endfor + if has_lng == 0 + let g:rmd_fenced_languages += [tpy] + call IncludeLanguage(tpy) + endif + endfor +endfunction + +if g:rmd_dynamic_fenced_languages + call CheckRmdFencedLanguages() + augroup RmdSyntax + autocmd! + autocmd BufWritePost <buffer> call CheckRmdFencedLanguages() + augroup END +endif + +" Step_4: Highlight code recognized by pandoc but not defined in pandoc.vim yet: +syn match pandocDivBegin '^:::\+ {.\{-}}' contains=pandocHeaderAttr +syn match pandocDivEnd '^:::\+$' +hi def link knitrBodyVar PreProc +hi def link knitrBodyValue Constant +hi def link knitrBodyOptions rComment +hi def link pandocDivBegin Delimiter +hi def link pandocDivEnd Delimiter hi def link rmdInlineDelim Delimiter hi def link rmdCodeDelim Delimiter -" You don't need this if either your markdown/syntax.vim already highlights -" the YAML header or you are writing standard markdown -if g:rmd_syn_hl_yaml - " Minimum highlighting of yaml header - syn match rmdYamlFieldTtl /^\s*\zs\w*\ze:/ contained - syn match rmdYamlFieldTtl /^\s*-\s*\zs\w*\ze:/ contained - syn region yamlFlowString matchgroup=yamlFlowStringDelimiter start='"' skip='\\"' end='"' contains=yamlEscape,rmdrInline contained - syn region yamlFlowString matchgroup=yamlFlowStringDelimiter start="'" skip="''" end="'" contains=yamlSingleEscape,rmdrInline contained - syn match yamlEscape contained '\\\%([\\"abefnrtv\^0_ NLP\n]\|x\x\x\|u\x\{4}\|U\x\{8}\)' - syn match yamlSingleEscape contained "''" - syn region pandocYAMLHeader matchgroup=rmdYamlBlockDelim start=/\%(\%^\|\_^\s*\n\)\@<=\_^-\{3}\ze\n.\+/ end=/^\([-.]\)\1\{2}$/ keepend contains=rmdYamlFieldTtl,yamlFlowString - hi def link rmdYamlBlockDelim Delimiter - hi def link rmdYamlFieldTtl Identifier - hi def link yamlFlowString String -endif - -" You don't need this if either your markdown/syntax.vim already highlights -" citations or you are writing standard markdown -if g:rmd_syn_hl_citations - " From vim-pandoc-syntax - " parenthetical citations - syn match pandocPCite /\^\@<!\[[^\[\]]\{-}-\{0,1}@[[:alnum:]_][[:alnum:]à -öø-ÿÀ-ÖØ-ß_:.#$%&\-+?<>~\/]*.\{-}\]/ contains=pandocEmphasis,pandocStrong,pandocLatex,pandocCiteKey,@Spell,pandocAmpersandEscape display - " in-text citations with location - syn match pandocICite /@[[:alnum:]_][[:alnum:]à -öø-ÿÀ-ÖØ-ß_:.#$%&\-+?<>~\/]*\s\[.\{-1,}\]/ contains=pandocCiteKey,@Spell display - " cite keys - syn match pandocCiteKey /\(-\=@[[:alnum:]_][[:alnum:]à -öø-ÿÀ-ÖØ-ß_:.#$%&\-+?<>~\/]*\)/ containedin=pandocPCite,pandocICite contains=@NoSpell display - syn match pandocCiteAnchor /[-@]/ contained containedin=pandocCiteKey display - syn match pandocCiteLocator /[\[\]]/ contained containedin=pandocPCite,pandocICite - hi def link pandocPCite Operator - hi def link pandocICite Operator - hi def link pandocCiteKey Label - hi def link pandocCiteAnchor Operator - hi def link pandocCiteLocator Operator +if len(s:save_pandoc_lngs) + let g:pandoc#syntax#codeblocks#embeds#langs = s:save_pandoc_lngs endif - -let b:current_syntax = "rmd" - +unlet s:save_pandoc_lngs let &cpo = s:cpo_save unlet s:cpo_save +let b:current_syntax = "rmd" + " vim: ts=8 sw=2 diff --git a/runtime/syntax/ruby.vim b/runtime/syntax/ruby.vim index c951fcfe1d..e19d61a051 100644 --- a/runtime/syntax/ruby.vim +++ b/runtime/syntax/ruby.vim @@ -3,7 +3,7 @@ " Maintainer: Doug Kearns <dougkearns@gmail.com> " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns <dougkearns@gmail.com> -" Last Change: 2021 Nov 03 +" Last Change: 2023 Mar 16 " ---------------------------------------------------------------------------- " " Previous Maintainer: Mirko Nasato @@ -145,9 +145,9 @@ syn cluster rubyStringSpecial contains=rubyInterpolation,rubyStringEscape syn cluster rubyStringNotTop contains=@rubyStringSpecial,@rubyNestedBrackets,@rubySingleCharEscape " Regular Expression Metacharacters {{{1 -syn region rubyRegexpComment matchgroup=rubyRegexpSpecial start="(?#" skip="\\\\\|\\)" end=")" contained -syn region rubyRegexpParens matchgroup=rubyRegexpSpecial start="(\(?:\|?<\=[=!]\|?>\|?<[a-z_]\w*>\|?[imx]*-[imx]*:\=\|\%(?#\)\@!\)" skip="\\\\\|\\)" end=")" contained transparent contains=@rubyRegexpSpecial -syn region rubyRegexpBrackets matchgroup=rubyRegexpCharClass start="\[\^\=" skip="\\\\\|\\\]" end="\]" contained transparent contains=rubyRegexpBrackets,rubyStringEscape,rubyRegexpEscape,rubyRegexpCharClass,rubyRegexpIntersection oneline +syn region rubyRegexpComment matchgroup=rubyRegexpSpecial start="(?#" skip="\\\\\|\\)" end=")" contained +syn region rubyRegexpParens matchgroup=rubyRegexpSpecial start="(\%(?:\|?<\=[=!]\|?>\|?<[a-z_]\w*>\|?[imx]*-[imx]*:\=\|\%(?#\)\@!\)" skip="\\\\\|\\)" end=")" contained transparent contains=@rubyRegexpSpecial +syn region rubyRegexpBrackets matchgroup=rubyRegexpCharClass start="\[\^\=" skip="\\\\\|\\\]" end="\]" contained transparent contains=rubyRegexpBrackets,rubyStringEscape,rubyRegexpEscape,rubyRegexpCharClass,rubyRegexpIntersection oneline syn match rubyRegexpCharClass "\\[DdHhRSsWw]" contained display syn match rubyRegexpCharClass "\[:\^\=\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|word\|xdigit\):\]" contained syn match rubyRegexpCharClass "\\[pP]{^\=.\{-}}" contained display @@ -346,7 +346,7 @@ syn cluster rubyDeclaration contains=rubyAliasDeclaration,rubyAliasDeclaration2, syn match rubyControl "\%#=1\<\%(break\|in\|next\|redo\|retry\|return\)\>" syn match rubyKeyword "\%#=1\<\%(super\|yield\)\>" syn match rubyBoolean "\%#=1\<\%(true\|false\)\>[?!]\@!" -syn match rubyPseudoVariable "\%#=1\<\(self\|nil\)\>[?!]\@!" +syn match rubyPseudoVariable "\%#=1\<\%(self\|nil\)\>[?!]\@!" syn match rubyPseudoVariable "\%#=1\<__\%(ENCODING\|dir\|FILE\|LINE\|callee\|method\)__\>" syn match rubyBeginEnd "\%#=1\<\%(BEGIN\|END\)\>" @@ -399,11 +399,6 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") SynFold 'for' syn region rubyRepeatExpression start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\@<![!?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat skip="\<end:" end="\<end\>" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine - if !exists("ruby_minlines") - let ruby_minlines = 500 - endif - exe "syn sync minlines=" . ruby_minlines - else syn match rubyControl "\<def\>" nextgroup=rubyMethodDeclaration skipwhite skipnl syn match rubyControl "\<class\>" nextgroup=rubyClassDeclaration skipwhite skipnl @@ -412,13 +407,18 @@ else syn match rubyKeyword "\<\%(alias\|undef\)\>" endif +if !exists("ruby_minlines") + let ruby_minlines = 500 +endif +exe "syn sync minlines=" . ruby_minlines + " Special Methods {{{1 if !exists("ruby_no_special_methods") syn match rubyAccess "\<\%(public\|protected\|private\)\>" " use re=2 syn match rubyAccess "\%#=1\<\%(public\|private\)_class_method\>" syn match rubyAccess "\%#=1\<\%(public\|private\)_constant\>" syn match rubyAccess "\%#=1\<module_function\>" - syn match rubyAttribute "\%#=1\%(\%(^\|;\)\s*\)\@<=attr\>\(\s*[.=]\)\@!" " attr is a common variable name + syn match rubyAttribute "\%#=1\%(\%(^\|;\)\s*\)\@<=attr\>\%(\s*[.=]\)\@!" " attr is a common variable name syn match rubyAttribute "\%#=1\<attr_\%(accessor\|reader\|writer\)\>" syn match rubyControl "\%#=1\<\%(abort\|at_exit\|exit\|fork\|loop\|trap\)\>" syn match rubyEval "\%#=1\<eval\>" @@ -435,8 +435,8 @@ syn match rubySharpBang "\%^#!.*" display syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE HACK REVIEW XXX todo contained syn match rubyEncoding "[[:alnum:]-_]\+" contained display syn match rubyMagicComment "\c\%<3l#\s*\zs\%(coding\|encoding\):" contained nextgroup=rubyEncoding skipwhite -syn match rubyMagicComment "\c\%<10l#\s*\zs\%(frozen_string_literal\|warn_indent\|warn_past_scope\):" contained nextgroup=rubyBoolean skipwhite -syn match rubyMagicComment "\c\%<10l#\s*\zs\%(shareable_constant_value\):" contained nextgroup=rubyEncoding skipwhite +syn match rubyMagicComment "\c\%<10l#\s*\zs\%(frozen[-_]string[-_]literal\|warn[-_]indent\|warn[-_]past[-_]scope\):" contained nextgroup=rubyBoolean skipwhite +syn match rubyMagicComment "\c\%<10l#\s*\zs\%(shareable[-_]constant[-_]value\):" contained nextgroup=rubyEncoding skipwhite syn match rubyComment "#.*" contains=@rubyCommentSpecial,rubySpaceError,@Spell syn cluster rubyCommentSpecial contains=rubySharpBang,rubyTodo,rubyMagicComment diff --git a/runtime/syntax/rust.vim b/runtime/syntax/rust.vim index 57343301e0..55d3f14dc2 100644 --- a/runtime/syntax/rust.vim +++ b/runtime/syntax/rust.vim @@ -3,44 +3,57 @@ " Maintainer: Patrick Walton <pcwalton@mozilla.com> " Maintainer: Ben Blum <bblum@cs.cmu.edu> " Maintainer: Chris Morgan <me@chrismorgan.info> -" Last Change: Feb 24, 2016 +" Last Change: 2023-09-11 " For bugs, patches and license go to https://github.com/rust-lang/rust.vim if version < 600 - syntax clear + syntax clear elseif exists("b:current_syntax") - finish + finish endif " Syntax definitions {{{1 " Basic keywords {{{2 syn keyword rustConditional match if else -syn keyword rustRepeat for loop while +syn keyword rustRepeat loop while +" `:syn match` must be used to prioritize highlighting `for` keyword. +syn match rustRepeat /\<for\>/ +" Highlight `for` keyword in `impl ... for ... {}` statement. This line must +" be put after previous `syn match` line to overwrite it. +syn match rustKeyword /\%(\<impl\>.\+\)\@<=\<for\>/ +syn keyword rustRepeat in syn keyword rustTypedef type nextgroup=rustIdentifier skipwhite skipempty syn keyword rustStructure struct enum nextgroup=rustIdentifier skipwhite skipempty syn keyword rustUnion union nextgroup=rustIdentifier skipwhite skipempty contained syn match rustUnionContextual /\<union\_s\+\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*/ transparent contains=rustUnion syn keyword rustOperator as +syn keyword rustExistential existential nextgroup=rustTypedef skipwhite skipempty contained +syn match rustExistentialContextual /\<existential\_s\+type/ transparent contains=rustExistential,rustTypedef syn match rustAssert "\<assert\(\w\)*!" contained syn match rustPanic "\<panic\(\w\)*!" contained +syn match rustAsync "\<async\%(\s\|\n\)\@=" syn keyword rustKeyword break -syn keyword rustKeyword box nextgroup=rustBoxPlacement skipwhite skipempty +syn keyword rustKeyword box syn keyword rustKeyword continue +syn keyword rustKeyword crate syn keyword rustKeyword extern nextgroup=rustExternCrate,rustObsoleteExternMod skipwhite skipempty syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite skipempty -syn keyword rustKeyword in impl let +syn keyword rustKeyword impl let +syn keyword rustKeyword macro syn keyword rustKeyword pub nextgroup=rustPubScope skipwhite skipempty syn keyword rustKeyword return +syn keyword rustKeyword yield syn keyword rustSuper super -syn keyword rustKeyword unsafe where +syn keyword rustKeyword where +syn keyword rustUnsafeKeyword unsafe syn keyword rustKeyword use nextgroup=rustModPath skipwhite skipempty " FIXME: Scoped impl's name is also fallen in this category syn keyword rustKeyword mod trait nextgroup=rustIdentifier skipwhite skipempty syn keyword rustStorage move mut ref static const -syn match rustDefault /\<default\ze\_s\+\(impl\|fn\|type\|const\)\>/ - -syn keyword rustInvalidBareKeyword crate +syn match rustDefault /\<default\ze\_s\+\(impl\|fn\|type\|const\)\>/ +syn keyword rustAwait await +syn match rustKeyword /\<try\>!\@!/ display syn keyword rustPubScopeCrate crate contained syn match rustPubScopeDelim /[()]/ contained @@ -52,22 +65,14 @@ syn match rustExternCrateString /".*"\_s*as/ contained nextgroup=rustIdentifie syn keyword rustObsoleteExternMod mod contained nextgroup=rustIdentifier skipwhite skipempty syn match rustIdentifier contains=rustIdentifierPrime "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained -syn match rustFuncName "\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained - -syn region rustBoxPlacement matchgroup=rustBoxPlacementParens start="(" end=")" contains=TOP contained -" Ideally we'd have syntax rules set up to match arbitrary expressions. Since -" we don't, we'll just define temporary contained rules to handle balancing -" delimiters. -syn region rustBoxPlacementBalance start="(" end=")" containedin=rustBoxPlacement transparent -syn region rustBoxPlacementBalance start="\[" end="\]" containedin=rustBoxPlacement transparent -" {} are handled by rustFoldBraces - -syn region rustMacroRepeat matchgroup=rustMacroRepeatDelimiters start="$(" end=")" contains=TOP nextgroup=rustMacroRepeatCount -syn match rustMacroRepeatCount ".\?[*+]" contained +syn match rustFuncName "\%(r#\)\=\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" display contained + +syn region rustMacroRepeat matchgroup=rustMacroRepeatDelimiters start="$(" end="),\=[*+]" contains=TOP syn match rustMacroVariable "$\w\+" +syn match rustRawIdent "\<r#\h\w*" contains=NONE " Reserved (but not yet used) keywords {{{2 -syn keyword rustReservedKeyword alignof become do offsetof priv pure sizeof typeof unsized yield abstract virtual final override macro +syn keyword rustReservedKeyword become do priv typeof unsized abstract virtual final override " Built-in types {{{2 syn keyword rustType isize usize char bool u8 u16 u32 u64 u128 f32 @@ -138,18 +143,37 @@ syn match rustMacro '#\w\(\w\)*' contains=rustAssert,rustPanic syn match rustEscapeError display contained /\\./ syn match rustEscape display contained /\\\([nrt0\\'"]\|x\x\{2}\)/ -syn match rustEscapeUnicode display contained /\\u{\x\{1,6}}/ +syn match rustEscapeUnicode display contained /\\u{\%(\x_*\)\{1,6}}/ syn match rustStringContinuation display contained /\\\n\s*/ -syn region rustString start=+b"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeError,rustStringContinuation -syn region rustString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell -syn region rustString start='b\?r\z(#*\)"' end='"\z1' contains=@Spell - -syn region rustAttribute start="#!\?\[" end="\]" contains=rustString,rustDerive,rustCommentLine,rustCommentBlock,rustCommentLineDocError,rustCommentBlockDocError +syn region rustString matchgroup=rustStringDelimiter start=+b"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeError,rustStringContinuation +syn region rustString matchgroup=rustStringDelimiter start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustStringContinuation,@Spell +syn region rustString matchgroup=rustStringDelimiter start='b\?r\z(#*\)"' end='"\z1' contains=@Spell + +" Match attributes with either arbitrary syntax or special highlighting for +" derives. We still highlight strings and comments inside of the attribute. +syn region rustAttribute start="#!\?\[" end="\]" contains=@rustAttributeContents,rustAttributeParenthesizedParens,rustAttributeParenthesizedCurly,rustAttributeParenthesizedBrackets,rustDerive +syn region rustAttributeParenthesizedParens matchgroup=rustAttribute start="\w\%(\w\)*("rs=e end=")"re=s transparent contained contains=rustAttributeBalancedParens,@rustAttributeContents +syn region rustAttributeParenthesizedCurly matchgroup=rustAttribute start="\w\%(\w\)*{"rs=e end="}"re=s transparent contained contains=rustAttributeBalancedCurly,@rustAttributeContents +syn region rustAttributeParenthesizedBrackets matchgroup=rustAttribute start="\w\%(\w\)*\["rs=e end="\]"re=s transparent contained contains=rustAttributeBalancedBrackets,@rustAttributeContents +syn region rustAttributeBalancedParens matchgroup=rustAttribute start="("rs=e end=")"re=s transparent contained contains=rustAttributeBalancedParens,@rustAttributeContents +syn region rustAttributeBalancedCurly matchgroup=rustAttribute start="{"rs=e end="}"re=s transparent contained contains=rustAttributeBalancedCurly,@rustAttributeContents +syn region rustAttributeBalancedBrackets matchgroup=rustAttribute start="\["rs=e end="\]"re=s transparent contained contains=rustAttributeBalancedBrackets,@rustAttributeContents +syn cluster rustAttributeContents contains=rustString,rustCommentLine,rustCommentBlock,rustCommentLineDocError,rustCommentBlockDocError syn region rustDerive start="derive(" end=")" contained contains=rustDeriveTrait " This list comes from src/libsyntax/ext/deriving/mod.rs " Some are deprecated (Encodable, Decodable) or to be removed after a new snapshot (Show). syn keyword rustDeriveTrait contained Clone Hash RustcEncodable RustcDecodable Encodable Decodable PartialEq Eq PartialOrd Ord Rand Show Debug Default FromPrimitive Send Sync Copy +" dyn keyword: It's only a keyword when used inside a type expression, so +" we make effort here to highlight it only when Rust identifiers follow it +" (not minding the case of pre-2018 Rust where a path starting with :: can +" follow). +" +" This is so that uses of dyn variable names such as in 'let &dyn = &2' +" and 'let dyn = 2' will not get highlighted as a keyword. +syn match rustKeyword "\<dyn\ze\_s\+\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)" contains=rustDynKeyword +syn keyword rustDynKeyword dyn contained + " Number literals syn match rustDecNumber display "\<[0-9][0-9_]*\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\=" syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\=" @@ -168,29 +192,31 @@ syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\=\%([eE syn match rustFloat display "\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\=\%([eE][+-]\=[0-9_]\+\)\=\(f32\|f64\)" " For the benefit of delimitMate -syn region rustLifetimeCandidate display start=/&'\%(\([^'\\]\|\\\(['nrt0\\\"]\|x\x\{2}\|u{\x\{1,6}}\)\)'\)\@!/ end=/[[:cntrl:][:space:][:punct:]]\@=\|$/ contains=rustSigil,rustLifetime -syn region rustGenericRegion display start=/<\%('\|[^[cntrl:][:space:][:punct:]]\)\@=')\S\@=/ end=/>/ contains=rustGenericLifetimeCandidate +syn region rustLifetimeCandidate display start=/&'\%(\([^'\\]\|\\\(['nrt0\\\"]\|x\x\{2}\|u{\%(\x_*\)\{1,6}}\)\)'\)\@!/ end=/[[:cntrl:][:space:][:punct:]]\@=\|$/ contains=rustSigil,rustLifetime +syn region rustGenericRegion display start=/<\%('\|[^[:cntrl:][:space:][:punct:]]\)\@=')\S\@=/ end=/>/ contains=rustGenericLifetimeCandidate syn region rustGenericLifetimeCandidate display start=/\%(<\|,\s*\)\@<='/ end=/[[:cntrl:][:space:][:punct:]]\@=\|$/ contains=rustSigil,rustLifetime "rustLifetime must appear before rustCharacter, or chars will get the lifetime highlighting syn match rustLifetime display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" syn match rustLabel display "\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*:" +syn match rustLabel display "\%(\<\%(break\|continue\)\s*\)\@<=\'\%([^[:cntrl:][:space:][:punct:][:digit:]]\|_\)\%([^[:cntrl:][:punct:][:space:]]\|_\)*" syn match rustCharacterInvalid display contained /b\?'\zs[\n\r\t']\ze'/ " The groups negated here add up to 0-255 but nothing else (they do not seem to go beyond ASCII). syn match rustCharacterInvalidUnicode display contained /b'\zs[^[:cntrl:][:graph:][:alnum:][:space:]]\ze'/ syn match rustCharacter /b'\([^\\]\|\\\(.\|x\x\{2}\)\)'/ contains=rustEscape,rustEscapeError,rustCharacterInvalid,rustCharacterInvalidUnicode -syn match rustCharacter /'\([^\\]\|\\\(.\|x\x\{2}\|u{\x\{1,6}}\)\)'/ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustCharacterInvalid +syn match rustCharacter /'\([^\\]\|\\\(.\|x\x\{2}\|u{\%(\x_*\)\{1,6}}\)\)'/ contains=rustEscape,rustEscapeUnicode,rustEscapeError,rustCharacterInvalid syn match rustShebang /\%^#![^[].*/ syn region rustCommentLine start="//" end="$" contains=rustTodo,@Spell syn region rustCommentLineDoc start="//\%(//\@!\|!\)" end="$" contains=rustTodo,@Spell syn region rustCommentLineDocError start="//\%(//\@!\|!\)" end="$" contains=rustTodo,@Spell contained syn region rustCommentBlock matchgroup=rustCommentBlock start="/\*\%(!\|\*[*/]\@!\)\@!" end="\*/" contains=rustTodo,rustCommentBlockNest,@Spell -syn region rustCommentBlockDoc matchgroup=rustCommentBlockDoc start="/\*\%(!\|\*[*/]\@!\)" end="\*/" contains=rustTodo,rustCommentBlockDocNest,@Spell +syn region rustCommentBlockDoc matchgroup=rustCommentBlockDoc start="/\*\%(!\|\*[*/]\@!\)" end="\*/" contains=rustTodo,rustCommentBlockDocNest,rustCommentBlockDocRustCode,@Spell syn region rustCommentBlockDocError matchgroup=rustCommentBlockDocError start="/\*\%(!\|\*[*/]\@!\)" end="\*/" contains=rustTodo,rustCommentBlockDocNestError,@Spell contained syn region rustCommentBlockNest matchgroup=rustCommentBlock start="/\*" end="\*/" contains=rustTodo,rustCommentBlockNest,@Spell contained transparent syn region rustCommentBlockDocNest matchgroup=rustCommentBlockDoc start="/\*" end="\*/" contains=rustTodo,rustCommentBlockDocNest,@Spell contained transparent syn region rustCommentBlockDocNestError matchgroup=rustCommentBlockDocError start="/\*" end="\*/" contains=rustTodo,rustCommentBlockDocNestError,@Spell contained transparent + " FIXME: this is a really ugly and not fully correct implementation. Most " importantly, a case like ``/* */*`` should have the final ``*`` not being in " a comment, but in practice at present it leaves comments open two levels @@ -203,13 +229,67 @@ syn region rustCommentBlockDocNestError matchgroup=rustCommentBlockDocError star " then you must deal with cases like ``/*/**/*/``. And don't try making it " worse with ``\%(/\@<!\*\)\@<!``, either... -syn keyword rustTodo contained TODO FIXME XXX NB NOTE +syn keyword rustTodo contained TODO FIXME XXX NB NOTE SAFETY + +" asm! macro {{{2 +syn region rustAsmMacro matchgroup=rustMacro start="\<asm!\s*(" end=")" contains=rustAsmDirSpec,rustAsmSym,rustAsmConst,rustAsmOptionsGroup,rustComment.*,rustString.* + +" Clobbered registers +syn keyword rustAsmDirSpec in out lateout inout inlateout contained nextgroup=rustAsmReg skipwhite skipempty +syn region rustAsmReg start="(" end=")" contained contains=rustString + +" Symbol operands +syn keyword rustAsmSym sym contained nextgroup=rustAsmSymPath skipwhite skipempty +syn region rustAsmSymPath start="\S" end=",\|)"me=s-1 contained contains=rustComment.*,rustIdentifier + +" Const +syn region rustAsmConstBalancedParens start="("ms=s+1 end=")" contained contains=@rustAsmConstExpr +syn cluster rustAsmConstExpr contains=rustComment.*,rust.*Number,rustString,rustAsmConstBalancedParens +syn region rustAsmConst start="const" end=",\|)"me=s-1 contained contains=rustStorage,@rustAsmConstExpr + +" Options +syn region rustAsmOptionsGroup start="options\s*(" end=")" contained contains=rustAsmOptions,rustAsmOptionsKey +syn keyword rustAsmOptionsKey options contained +syn keyword rustAsmOptions pure nomem readonly preserves_flags noreturn nostack att_syntax contained " Folding rules {{{2 " Trivial folding rules to begin with. " FIXME: use the AST to make really good folding syn region rustFoldBraces start="{" end="}" transparent fold +if !exists("b:current_syntax_embed") + let b:current_syntax_embed = 1 + syntax include @RustCodeInComment <sfile>:p:h/rust.vim + unlet b:current_syntax_embed + + " Currently regions marked as ```<some-other-syntax> will not get + " highlighted at all. In the future, we can do as vim-markdown does and + " highlight with the other syntax. But for now, let's make sure we find + " the closing block marker, because the rules below won't catch it. + syn region rustCommentLinesDocNonRustCode matchgroup=rustCommentDocCodeFence start='^\z(\s*//[!/]\s*```\).\+$' end='^\z1$' keepend contains=rustCommentLineDoc + + " We borrow the rules from rust’s src/librustdoc/html/markdown.rs, so that + " we only highlight as Rust what it would perceive as Rust (almost; it’s + " possible to trick it if you try hard, and indented code blocks aren’t + " supported because Markdown is a menace to parse and only mad dogs and + " Englishmen would try to handle that case correctly in this syntax file). + syn region rustCommentLinesDocRustCode matchgroup=rustCommentDocCodeFence start='^\z(\s*//[!/]\s*```\)[^A-Za-z0-9_-]*\%(\%(should_panic\|no_run\|ignore\|allow_fail\|rust\|test_harness\|compile_fail\|E\d\{4}\|edition201[58]\)\%([^A-Za-z0-9_-]\+\|$\)\)*$' end='^\z1$' keepend contains=@RustCodeInComment,rustCommentLineDocLeader + syn region rustCommentBlockDocRustCode matchgroup=rustCommentDocCodeFence start='^\z(\%(\s*\*\)\?\s*```\)[^A-Za-z0-9_-]*\%(\%(should_panic\|no_run\|ignore\|allow_fail\|rust\|test_harness\|compile_fail\|E\d\{4}\|edition201[58]\)\%([^A-Za-z0-9_-]\+\|$\)\)*$' end='^\z1$' keepend contains=@RustCodeInComment,rustCommentBlockDocStar + " Strictly, this may or may not be correct; this code, for example, would + " mishighlight: + " + " /** + " ```rust + " println!("{}", 1 + " * 1); + " ``` + " */ + " + " … but I don’t care. Balance of probability, and all that. + syn match rustCommentBlockDocStar /^\s*\*\s\?/ contained + syn match rustCommentLineDocLeader "^\s*//\%(//\@!\|!\)" contained +endif + " Default highlighting {{{1 hi def link rustDecNumber rustNumber hi def link rustHexNumber rustNumber @@ -219,7 +299,6 @@ hi def link rustIdentifierPrime rustIdentifier hi def link rustTrait rustType hi def link rustDeriveTrait rustTrait -hi def link rustMacroRepeatCount rustMacroRepeatDelimiters hi def link rustMacroRepeatDelimiters Macro hi def link rustMacroVariable Define hi def link rustSigil StorageClass @@ -228,6 +307,7 @@ hi def link rustEscapeUnicode rustEscape hi def link rustEscapeError Error hi def link rustStringContinuation Special hi def link rustString String +hi def link rustStringDelimiter String hi def link rustCharacterInvalid Error hi def link rustCharacterInvalidUnicode rustCharacterInvalid hi def link rustCharacter Character @@ -241,12 +321,15 @@ hi def link rustFloat Float hi def link rustArrowCharacter rustOperator hi def link rustOperator Operator hi def link rustKeyword Keyword +hi def link rustDynKeyword rustKeyword hi def link rustTypedef Keyword " More precise is Typedef, but it doesn't feel right for Rust hi def link rustStructure Keyword " More precise is Structure hi def link rustUnion rustStructure +hi def link rustExistential rustKeyword hi def link rustPubScopeDelim Delimiter hi def link rustPubScopeCrate rustKeyword hi def link rustSuper rustKeyword +hi def link rustUnsafeKeyword Exception hi def link rustReservedKeyword Error hi def link rustRepeat Conditional hi def link rustConditional Conditional @@ -260,10 +343,13 @@ hi def link rustFuncCall Function hi def link rustShebang Comment hi def link rustCommentLine Comment hi def link rustCommentLineDoc SpecialComment +hi def link rustCommentLineDocLeader rustCommentLineDoc hi def link rustCommentLineDocError Error hi def link rustCommentBlock rustCommentLine hi def link rustCommentBlockDoc rustCommentLineDoc +hi def link rustCommentBlockDocStar rustCommentBlockDoc hi def link rustCommentBlockDocError Error +hi def link rustCommentDocCodeFence rustCommentLineDoc hi def link rustAssert PreCondit hi def link rustPanic PreCondit hi def link rustMacro Macro @@ -276,11 +362,15 @@ hi def link rustStorage StorageClass hi def link rustObsoleteStorage Error hi def link rustLifetime Special hi def link rustLabel Label -hi def link rustInvalidBareKeyword Error hi def link rustExternCrate rustKeyword hi def link rustObsoleteExternMod Error -hi def link rustBoxPlacementParens Delimiter hi def link rustQuestionMark Special +hi def link rustAsync rustKeyword +hi def link rustAwait rustKeyword +hi def link rustAsmDirSpec rustKeyword +hi def link rustAsmSym rustKeyword +hi def link rustAsmOptions rustKeyword +hi def link rustAsmOptionsKey rustAttribute " Other Suggestions: " hi rustAttribute ctermfg=cyan @@ -293,3 +383,5 @@ syn sync minlines=200 syn sync maxlines=500 let b:current_syntax = "rust" + +" vim: set et sw=4 sts=4 ts=8: diff --git a/runtime/syntax/scala.vim b/runtime/syntax/scala.vim index c08e60e55a..cc098ce017 100644 --- a/runtime/syntax/scala.vim +++ b/runtime/syntax/scala.vim @@ -180,7 +180,7 @@ hi def link scalaNumber Number syn region scalaRoundBrackets start="(" end=")" skipwhite contained contains=scalaTypeDeclaration,scalaSquareBrackets,scalaRoundBrackets -syn region scalaSquareBrackets matchgroup=scalaSquareBracketsBrackets start="\[" end="\]" skipwhite nextgroup=scalaTypeExtension contains=scalaTypeDeclaration,scalaSquareBrackets,scalaTypeOperator,scalaTypeAnnotationParameter +syn region scalaSquareBrackets matchgroup=scalaSquareBracketsBrackets start="\[" end="\]" skipwhite nextgroup=scalaTypeExtension contains=scalaTypeDeclaration,scalaSquareBrackets,scalaTypeOperator,scalaTypeAnnotationParameter,scalaString syn match scalaTypeOperator /[-+=:<>]\+/ contained syn match scalaTypeAnnotationParameter /@\<[`_A-Za-z0-9$]\+\>/ contained hi def link scalaSquareBracketsBrackets Type diff --git a/runtime/syntax/sdc.vim b/runtime/syntax/sdc.vim index 0ca9becf73..dbfa35eeb6 100644 --- a/runtime/syntax/sdc.vim +++ b/runtime/syntax/sdc.vim @@ -25,7 +25,7 @@ syn keyword sdcNonIdealities set_load set_min_capacitance set_max_capacitance syn keyword sdcCreateOperations create_clock create_timing_netlist update_timing_netlist " command flags highlighting -syn match sdcFlags "[[:space:]]-[[:alpha:]]*\>" +syn match sdcFlags "[[:space:]]-[[:alpha:]_]*\>" " Define the default highlighting. hi def link sdcCollections Repeat diff --git a/runtime/syntax/sgml.vim b/runtime/syntax/sgml.vim index 00d58d11f2..ed8fa8cf12 100644 --- a/runtime/syntax/sgml.vim +++ b/runtime/syntax/sgml.vim @@ -294,7 +294,7 @@ syn sync minlines=100 hi def link sgmlTodo Todo hi def link sgmlTag Function hi def link sgmlEndTag Identifier -" SGML specifig +" SGML specific hi def link sgmlAbbrEndTag Identifier hi def link sgmlEmptyTag Function hi def link sgmlEntity Statement diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim index 6722d62c89..e2b1947197 100644 --- a/runtime/syntax/sh.vim +++ b/runtime/syntax/sh.vim @@ -2,8 +2,8 @@ " Language: shell (sh) Korn shell (ksh) bash (sh) " Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM> " Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int> -" Last Change: Nov 25, 2022 -" Version: 204 +" Last Change: Feb 28, 2023 +" Version: 208 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH " For options and settings, please use: :help ft-sh-syntax " This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) and heredoc fixes from Felipe Contreras @@ -140,7 +140,7 @@ syn cluster shArithList contains=@shArithParenList,shParenError syn cluster shCaseEsacList contains=shCaseStart,shCaseLabel,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSubBQ,shComment,shDblBrace,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq if exists("b:is_kornshell") || exists("b:is_bash") - syn cluster shCaseList add=shForPP + syn cluster shCaseList add=shForPP,shDblParen endif syn cluster shCommandSubList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shComment,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial @@ -163,10 +163,10 @@ syn cluster shIdList contains=shArithmetic,shCommandSub,shCommandSubBQ,shWrapLin syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shIf,shOption,shSet,shTest,shTestOpr,shTouch if exists("b:is_kornshell") || exists("b:is_bash") - syn cluster shLoopoList add=shForPP + syn cluster shLoopList add=shForPP,shDblParen endif syn cluster shPPSLeftList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable -syn cluster shPPSRightList contains=shComment,shDeref,shDerefSimple,shEscape,shPosnParm +syn cluster shPPSRightList contains=shDeref,shDerefSimple,shEscape,shPosnParm syn cluster shSubShList contains=@shCommandSubList,shCommandSubBQ,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shHereString,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator syn cluster shTestList contains=shArithmetic,shCharClass,shCommandSub,shCommandSubBQ,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shSpecialDQ,shExDoubleQuote,shExpr,shExSingleQuote,shNumber,shOperator,shSingleQuote,shTest,shTestOpr syn cluster shNoZSList contains=shSpecialNoZS @@ -190,8 +190,10 @@ syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" ski " ===== if exists("b:is_kornshell") || exists("b:is_bash") || exists("b:is_posix") syn match shStatement "\<alias\>" - syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+\)\@=" skip="\\$" end="\>\|`" - syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+=\)\@=" skip="\\$" end="=" + syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]*\)\@=" skip="\\$" end="\>\|`" + syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]*=\)\@=" skip="\\$" end="=" +" syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+\)\@=" skip="\\$" end="\>\|`" +" syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+=\)\@=" skip="\\$" end="=" " Touch: {{{1 " ===== @@ -413,21 +415,21 @@ syn match shBQComment contained "#.\{-}\ze`" contains=@shCommentGroup " (modified by Felipe Contreras) " ========================================= ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc01 end="^\z1$" contains=@shDblQuoteList -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc02 start="<<-\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc02 end="^\s*\z1$" contains=@shDblQuoteList +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc02 start="<<-\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc02 end="^\t*\z1$" contains=@shDblQuoteList ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc03 start="<<\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc03 end="^\z1$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc04 end="^\s*\z1$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc04 end="^\t*\z1$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*'\z([^']\+\)'" matchgroup=shHereDoc05 end="^\z1$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*'\z([^']\+\)'" matchgroup=shHereDoc06 end="^\s*\z1$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*'\z([^']\+\)'" matchgroup=shHereDoc06 end="^\t*\z1$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\"\z([^"]\+\)\"" matchgroup=shHereDoc07 end="^\z1$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<-\s*\"\z([^"]\+\)\"" matchgroup=shHereDoc08 end="^\s*\z1$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<-\s*\"\z([^"]\+\)\"" matchgroup=shHereDoc08 end="^\t*\z1$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc09 end="^\z1$" contains=@shDblQuoteList -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc10 end="^\s*\z1$" contains=@shDblQuoteList +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc10 end="^\t*\z1$" contains=@shDblQuoteList ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc11 end="^\z1$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc12 end="^\s*\z1$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc12 end="^\t*\z1$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<\s*\\\_$\_s*'\z([^']\+\)'" matchgroup=shHereDoc13 end="^\z1$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<-\s*\\\_$\_s*'\z([^']\+\)'" matchgroup=shHereDoc14 end="^\s*\z1$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<-\s*\\\_$\_s*'\z([^']\+\)'" matchgroup=shHereDoc14 end="^\t*\z1$" ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<\s*\\\_$\_s*\"\z([^"]\+\)\"" matchgroup=shHereDoc15 end="^\z1$" -ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc16 start="<<-\s*\\\_$\_s*\"\z([^"]\+\)\"" matchgroup=shHereDoc16 end="^\s*\z1$" +ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc16 start="<<-\s*\\\_$\_s*\"\z([^"]\+\)\"" matchgroup=shHereDoc16 end="^\t*\z1$" " Here Strings: {{{1 @@ -483,7 +485,9 @@ endif " Parameter Dereferencing: {{{1 " ======================== -if !exists("g:sh_no_error") && !(exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix")) +" Note: sh04 failure with following line +"if !exists("g:sh_no_error") && !(exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix")) +if !exists("g:sh_no_error") syn match shDerefWordError "[^}$[~]" contained endif syn match shDerefSimple "\$\%(\h\w*\|\d\)" nextgroup=@shNoZSList @@ -499,7 +503,6 @@ endif " ksh: ${.sh.*} variables: {{{1 " ======================================== if exists("b:is_kornshell") -" syn match shDerefVar contained "[.]*" nextgroup=@shDerefVarList syn match shDerefVar contained "\.\+" nextgroup=@shDerefVarList endif @@ -528,7 +531,7 @@ if exists("b:is_kornshell") || exists("b:is_posix") endif " sh ksh bash : ${var[... ]...} array reference: {{{1 -syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError +syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError,shDerefOffset " Special ${parameter OPERATOR word} handling: {{{1 " sh ksh bash : ${parameter:-word} word is default value @@ -544,6 +547,7 @@ syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" co " bash : ${parameter,pattern} Case modification " bash : ${parameter,,pattern} Case modification " bash : ${@:start:qty} display command line arguments from start to start+qty-1 (inferred) +" bash : ${parameter@operator} transforms parameter (operator∈[uULqEPARa]) syn cluster shDerefPatternList contains=shDerefPattern,shDerefString if !exists("g:sh_no_error") syn match shDerefOpError contained ":[[:punct:]]" @@ -559,6 +563,7 @@ if exists("b:is_bash") || exists("b:is_kornshell") || exists("b:is_posix") endif if exists("b:is_bash") syn match shDerefOp contained "[,^]\{1,2}" nextgroup=@shDerefPatternList + syn match shDerefOp contained "@[uULQEPAKa]" endif syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!'+ end=+'+ contains=shStringSpecial syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial diff --git a/runtime/syntax/shared/README.txt b/runtime/syntax/shared/README.txt index f519d44faf..fade4b38a1 100644 --- a/runtime/syntax/shared/README.txt +++ b/runtime/syntax/shared/README.txt @@ -1,2 +1,2 @@ This directory "runtime/syntax/shared" contains Vim script files that are -generated or used by more then one syntax file. +generated or used by more than one syntax file. diff --git a/runtime/syntax/shared/debversions.vim b/runtime/syntax/shared/debversions.vim new file mode 100644 index 0000000000..6c944cd4e1 --- /dev/null +++ b/runtime/syntax/shared/debversions.vim @@ -0,0 +1,29 @@ +" Vim syntax file +" Language: Debian version information +" Maintainer: Debian Vim Maintainers +" Last Change: 2023 Nov 01 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/shared/debversions.vim + +let s:cpo = &cpo +set cpo-=C + +let g:debSharedSupportedVersions = [ + \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', 'sid', 'rc-buggy', + \ 'bullseye', 'bookworm', 'trixie', 'forky', + \ + \ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'lunar', 'mantic', 'noble', + \ 'devel' + \ ] +let g:debSharedUnsupportedVersions = [ + \ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', + \ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy', + \ 'jessie', 'stretch', 'buster', + \ + \ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty', + \ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid', + \ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy', + \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic', + \ 'disco', 'eoan', 'hirsute', 'impish', 'kinetic', 'groovy' + \ ] + +let &cpo=s:cpo diff --git a/runtime/syntax/shared/typescriptcommon.vim b/runtime/syntax/shared/typescriptcommon.vim index ef362fc721..d06525115e 100644 --- a/runtime/syntax/shared/typescriptcommon.vim +++ b/runtime/syntax/shared/typescriptcommon.vim @@ -1,9 +1,9 @@ " Vim syntax file " Language: TypeScript and TypeScriptReact -" Maintainer: Bram Moolenaar, Herrington Darkholme -" Last Change: 2021 Sep 22 +" Maintainer: Herrington Darkholme +" Last Change: 2023 Aug 24 " Based On: Herrington Darkholme's yats.vim -" Changes: See https:github.com/HerringtonDarkholme/yats.vim +" Changes: See https://github.com/HerringtonDarkholme/yats.vim " Credits: See yats.vim on github if &cpo =~ 'C' @@ -149,7 +149,7 @@ syntax match typescriptNumber /\<0[bB][01][01_]*\>/ nextgroup=@typescript syntax match typescriptNumber /\<0[oO][0-7][0-7_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty syntax match typescriptNumber /\<0[xX][0-9a-fA-F][0-9a-fA-F_]*\>/ nextgroup=@typescriptSymbols skipwhite skipempty syntax match typescriptNumber /\<\%(\d[0-9_]*\%(\.\d[0-9_]*\)\=\|\.\d[0-9_]*\)\%([eE][+-]\=\d[0-9_]*\)\=\>/ - \ nextgroup=typescriptSymbols skipwhite skipempty + \ nextgroup=@typescriptSymbols skipwhite skipempty syntax region typescriptObjectLiteral matchgroup=typescriptBraces \ start=/{/ end=/}/ diff --git a/runtime/syntax/slrnrc.vim b/runtime/syntax/slrnrc.vim index cf0734ae85..004bdd1bb1 100644 --- a/runtime/syntax/slrnrc.vim +++ b/runtime/syntax/slrnrc.vim @@ -94,7 +94,7 @@ syn region slrnrcColorObjStr contained matchgroup=slrnrcColorObj start=+"+ end= syn keyword slrnrcColorVal contained default syn keyword slrnrcColorVal contained black blue brightblue brightcyan brightgreen brightmagenta brightred brown cyan gray green lightgray magenta red white yellow syn region slrnrcColorValStr contained matchgroup=slrnrcColorVal start=+"+ end=+"+ oneline contains=slrnrcColorVal,slrnrcSpaceError -" Mathcing a function with three arguments +" Matching a function with three arguments syn keyword slrnrcColor contained color syn match slrnrcColorInit contained "^\s*color\s\+\S\+" skipwhite nextgroup=slrnrcColorVal\(Str\)\= contains=slrnrcColor\(Obj\|ObjStr\)\= syn match slrnrcColorLine "^\s*color\s\+\S\+\s\+\S\+" skipwhite nextgroup=slrnrcColorVal\(Str\)\= contains=slrnrcColor\(Init\|Val\|ValStr\) diff --git a/runtime/syntax/solidity.vim b/runtime/syntax/solidity.vim index e552446e10..a46d041a10 100644 --- a/runtime/syntax/solidity.vim +++ b/runtime/syntax/solidity.vim @@ -1,10 +1,10 @@ " Vim syntax file -" Language: Solidity -" Maintainer: Cothi (jiungdev@gmail.com) -" Original Author: tomlion (https://github.com/tomlion/vim-solidity/blob/master/syntax/solidity.vim) -" Last Changed: 2022 Sep 27 +" Language: Solidity +" Maintainer: Cothi (jiungdev@gmail.com) +" Original Author: tomlion (https://github.com/tomlion/vim-solidity/blob/master/syntax/solidity.vim) +" Last Change: 2022 Sep 27 " -" Additional contributors: +" Contributors: " Modified by thesis (https://github.com/thesis/vim-solidity/blob/main/indent/solidity.vim) if exists("b:current_syntax") diff --git a/runtime/syntax/spec.vim b/runtime/syntax/spec.vim index d7d5877943..aed04bc900 100644 --- a/runtime/syntax/spec.vim +++ b/runtime/syntax/spec.vim @@ -56,7 +56,7 @@ syn match specListedFilesEtc contained '/etc/'me=e-1 syn match specListedFilesShare contained '/share/'me=e-1 syn cluster specListedFiles contains=specListedFilesBin,specListedFilesLib,specListedFilesDoc,specListedFilesEtc,specListedFilesShare,specListedFilesPrefix,specVariables,specSpecialChar -"specComands +"specCommands syn match specConfigure contained '\./configure' syn match specTarCommand contained '\<tar\s\+[cxvpzIf]\{,5}\s*' syn keyword specCommandSpecial contained root @@ -87,7 +87,7 @@ syn region specSectionMacroBracketArea oneline matchgroup=specSectionMacro start "TODO %config valid parameters: missingok\|noreplace "TODO %verify valid parameters: \(not\)\= \(md5\|atime\|...\) syn region specFilesArea matchgroup=specSection start='^%[Ff][Ii][Ll][Ee][Ss]\>' skip='%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|license\|verify\|ghost\|exclude\)\>' end='^%[a-zA-Z]'me=e-2 contains=specFilesOpts,specFilesDirective,@specListedFiles,specComment,specCommandSpecial,specMacroIdentifier -"tip: remember to include new itens in specFilesArea above +"tip: remember to include new items in specFilesArea above syn match specFilesDirective contained '%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|license\|verify\|ghost\|exclude\)\>' "valid options for certain section headers diff --git a/runtime/syntax/spup.vim b/runtime/syntax/spup.vim index 9284abf63f..222caa779e 100644 --- a/runtime/syntax/spup.vim +++ b/runtime/syntax/spup.vim @@ -29,7 +29,7 @@ set cpo&vim "let strict_subsections = 1 " highlight types usually found in DECLARE section -if !exists("hightlight_types") +if !exists("highlight_types") let highlight_types = 1 endif diff --git a/runtime/syntax/sqlinformix.vim b/runtime/syntax/sqlinformix.vim index e01912bc40..71418c556f 100644 --- a/runtime/syntax/sqlinformix.vim +++ b/runtime/syntax/sqlinformix.vim @@ -162,7 +162,7 @@ hi def link sqlNumber Number hi def link sqlBoolean Boolean hi def link sqlString String -" === Statment syntax group === +" === Statement syntax group === hi def link sqlStatement Statement hi def link sqlConditional Conditional hi def link sqlRepeat Repeat diff --git a/runtime/syntax/sqlj.vim b/runtime/syntax/sqlj.vim index c901145c3c..fd0f8f3d76 100644 --- a/runtime/syntax/sqlj.vim +++ b/runtime/syntax/sqlj.vim @@ -16,7 +16,7 @@ endif " Read the Java syntax to start with source <sfile>:p:h/java.vim -" SQLJ extentions +" SQLJ extensions " The SQL reserved words, defined as keywords. syn case ignore diff --git a/runtime/syntax/squid.vim b/runtime/syntax/squid.vim index a8abd180a0..186be91e61 100644 --- a/runtime/syntax/squid.vim +++ b/runtime/syntax/squid.vim @@ -31,7 +31,7 @@ syn keyword squidConf cache_effective_user cache_host cache_host_acl syn keyword squidConf cache_host_domain cache_log cache_mem syn keyword squidConf cache_mem_high cache_mem_low cache_mgr syn keyword squidConf cachemgr_passwd cache_peer cache_peer_access -syn keyword squidConf cahce_replacement_policy cache_stoplist +syn keyword squidConf cache_replacement_policy cache_stoplist syn keyword squidConf cache_stoplist_pattern cache_store_log cache_swap syn keyword squidConf cache_swap_high cache_swap_log cache_swap_low syn keyword squidConf client_db client_lifetime client_netmask diff --git a/runtime/syntax/structurizr.vim b/runtime/syntax/structurizr.vim index ab9e4ee609..363ee70438 100644 --- a/runtime/syntax/structurizr.vim +++ b/runtime/syntax/structurizr.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Structurizr DSL " Maintainer: Bastian Venthur <venthur@debian.org> -" Last Change: 2022-02-15 +" Last Change: 2022-05-22 " Remark: For a language reference, see " https://github.com/structurizr/dsl @@ -26,6 +26,7 @@ syn keyword skeyword configuration syn keyword skeyword container syn keyword skeyword containerinstance syn keyword skeyword custom +syn keyword skeyword default syn keyword skeyword deployment syn keyword skeyword deploymentenvironment syn keyword skeyword deploymentgroup @@ -40,6 +41,7 @@ syn keyword skeyword group syn keyword skeyword healthcheck syn keyword skeyword include syn keyword skeyword infrastructurenode +syn keyword skeyword instances syn keyword skeyword model syn keyword skeyword person syn keyword skeyword perspectives @@ -54,6 +56,7 @@ syn keyword skeyword tags syn keyword skeyword technology syn keyword skeyword terminology syn keyword skeyword theme +syn keyword skeyword themes syn keyword skeyword title syn keyword skeyword url syn keyword skeyword users diff --git a/runtime/syntax/swayconfig.vim b/runtime/syntax/swayconfig.vim index 996b8f596c..7b1c889d6d 100644 --- a/runtime/syntax/swayconfig.vim +++ b/runtime/syntax/swayconfig.vim @@ -1,10 +1,9 @@ " Vim syntax file -" Language: sway window manager config -" Original Author: James Eapen <james.eapen@vai.org> +" Language: sway config file +" Original Author: Josef Litos (JosefLitos/i3config.vim) " Maintainer: James Eapen <james.eapen@vai.org> -" Version: 0.1.6 -" Reference version (jamespeapen/swayconfig.vim): 0.11.6 -" Last Change: 2022 Aug 08 +" Version: 1.0.0 +" Last Change: 2023-09-14 " References: " http://i3wm.org/docs/userguide.html#configuring @@ -19,88 +18,133 @@ endif runtime! syntax/i3config.vim -scriptencoding utf-8 +" i3 extensions +syn keyword i3ConfigActionKeyword opacity urgent shortcuts_inhibitor splitv splith splitt contained +syn keyword i3ConfigOption set plus minus allow deny csd v h t contained -" Error -"syn match swayConfigError /.*/ +syn keyword i3ConfigConditionProp app_id pid shell contained + +syn keyword i3ConfigWorkspaceDir prev_on_output next_on_output contained -" binding syn keyword swayConfigBindKeyword bindswitch bindgesture contained -syn match swayConfigBind /^\s*\(bindswitch\)\s\+.*$/ contains=i3ConfigVariable,i3ConfigBindKeyword,swayConfigBindKeyword,i3ConfigVariableAndModifier,i3ConfigNumber,i3ConfigUnit,i3ConfigUnitOr,i3ConfigBindArgument,i3ConfigModifier,i3ConfigAction,i3ConfigString,i3ConfigGapStyleKeyword,i3ConfigBorderStyleKeyword - -" bindgestures -syn keyword swayConfigBindGestureCommand swipe pinch hold contained -syn keyword swayConfigBindGestureDirection up down left right next prev contained -syn keyword swayConfigBindGesturePinchDirection inward outward clockwise counterclockwise contained -syn match swayConfigBindGestureHold /^\s*\(bindgesture\)\s\+hold\(:[1-5]\)\?\s\+.*$/ contains=swayConfigBindKeyword,swayConfigBindGestureCommand,swayConfigBindGestureDirection,i3ConfigWorkspaceKeyword,i3ConfigAction -syn match swayConfigBindGestureSwipe /^\s*\(bindgesture\)\s\+swipe\(:[3-5]\)\?:\(up\|down\|left\|right\)\s\+.*$/ contains=swayConfigBindKeyword,swayConfigBindGestureCommand,swayConfigBindGestureDirection,i3ConfigWorkspaceKeyword,i3ConfigAction -syn match swayConfigBindGesturePinch /^\s*\(bindgesture\)\s\+pinch\(:[2-5]\)\?:\(up\|down\|left\|right\|inward\|outward\|clockwise\|counterclockwise\)\(+\(up\|down\|left\|right\|inward\|outward\|clockwise\|counterclockwise\)\)\?.*$/ contains=swayConfigBindKeyword,swayConfigBindGestureCommand,swayConfigBindGestureDirection,swayConfigBindGesturePinchDirection,i3ConfigWorkspaceKeyword,i3ConfigAction - -" floating -syn keyword swayConfigFloatingKeyword floating contained -syn match swayConfigFloating /^\s*floating\s\+\(enable\|disable\|toggle\)\s*$/ contains=swayConfigFloatingKeyword - -syn clear i3ConfigFloatingModifier -syn keyword swayConfigFloatingModifier floating_modifier contained -syn match swayConfigFloatingMouseAction /^\s\?.*floating_modifier\s\S\+\s\?\(normal\|inverted\|none\)\?$/ contains=swayConfigFloatingModifier,i3ConfigVariable - -" Gaps -syn clear i3ConfigSmartBorderKeyword -syn clear i3ConfigSmartBorder -syn keyword swayConfigSmartBorderKeyword on no_gaps off contained -syn match swayConfigSmartBorder /^\s*smart_borders\s\+\(on\|no_gaps\|off\)\s\?$/ contains=swayConfigSmartBorderKeyword - -" Changing colors -syn keyword swayConfigClientColorKeyword focused_tab_title contained -syn match swayConfigClientColor /^\s*client.\w\+\s\+.*$/ contains=i3ConfigClientColorKeyword,i3ConfigColor,i3ConfigVariable,i3ConfigClientColorKeyword,swayConfigClientColorKeyword - -" Input config +syn match i3ConfigBindArgument /--\(locked\|to-code\|no-repeat\|input-device=[:0-9a-zA-Z_/-]\+\|no-warn\)/ contained +syn region i3ConfigBind start=/^\s*bind\(switch\|gesture\) / skip=/\\$/ end=/$/ contains=swayConfigBindKeyword,swayConfigBindswitch,swayConfigBindswitchArgument,swayConfigBindgesture,swayConfigBindgestureArgument,i3ConfigCriteria,i3ConfigAction,i3ConfigSeparator,i3ConfigActionKeyword,i3ConfigOption,i3ConfigString,i3ConfigNumber,i3ConfigVariable,i3ConfigBoolean keepend + +syn match swayConfigBindBlockHeader /^\s*bind\(sym\|code\) .*{$/ contained contains=i3ConfigBindKeyword,i3ConfigBindArgument,i3ConfigParen +syn match swayConfigBindBlockCombo /^\s\+\(--[a-z-]\+ \)*[$a-zA-Z0-9_+]\+ [a-z[]\@=/ contained contains=i3ConfigBindArgument,i3ConfigBindCombo +syn region i3ConfigBind start=/^\s*bind\(sym\|code\) .*{$/ end=/^\s*}$/ contains=swayConfigBindBlockHeader,swayConfigBindBlockCombo,i3ConfigCriteria,i3ConfigAction,i3ConfigSeparator,i3ConfigActionKeyword,i3ConfigOption,i3ConfigString,i3ConfigNumber,i3ConfigVariable,i3ConfigBoolean,i3ConfigComment,i3ConfigParen fold keepend extend +" fix for extra long bindsym blocks that would be parsed incorrectly when scrolling up +syn region i3ConfigBlockOrphan start=/^\s\+\S/ skip=/^\s\|^$/ end=/^}\?/ contains=swayConfigBindBlockCombo,i3ConfigCriteria,i3ConfigAction,i3ConfigSeparator,i3ConfigActionKeyword,i3ConfigOption,i3ConfigString,i3ConfigNumber,i3ConfigVariable,i3ConfigBoolean,i3ConfigComment,i3ConfigParen keepend extend + +syn keyword i3ConfigClientOpts focused_tab_title contained + +syn region swayConfigExecBlock start=/exec\(_always\)\? {/ end=/^}$/ contains=i3ConfigExecKeyword,i3ConfigExecAlwaysKeyword,i3ConfigShCommand,i3ConfigShDelim,i3ConfigShOper,i3ConfigShParam,i3ConfigNumber,i3ConfigString,i3ConfigVariable,i3ConfigComment fold keepend extend + +syn keyword swayConfigFloatingModifierOpts normal inverse contained +syn match i3ConfigKeyword /^floating_modifier [$a-zA-Z0-9+]\+ \(normal\|inverse\)$/ contains=i3ConfigVariable,i3ConfigBindModkey,swayConfigFloatingModifierOpts + +syn match i3ConfigKeyword /^hide_edge_borders --i3 \w*$/ contains=i3ConfigEdgeKeyword,i3ConfigShParam + +syn keyword i3ConfigBarOpts swaybar_command gaps height pango_markup status_edge_padding status_padding wrap_scroll tray_bindcode tray_bindsym icon_theme contained +syn keyword i3ConfigBarOptVals overlay contained + +syn keyword i3ConfigExecActionKeyword swaymsg contained + +" Sway-only options +" Xwayland +syn keyword swayConfigXOpt enable disable force contained +syn match i3ConfigKeyword /^xwayland \w*$/ contains=swayConfigXOpt + +" Inhibit idle +syn keyword swayConfigInhibitKeyword inhibit_idle contained +syn keyword swayConfigInhibitOpts focus fullscreen open none visible contained +syn match i3ConfigAction /inhibit_idle \w*/ contained contains=swayConfigInhibitKeyword,swayConfigInhibitOpts + +" Bindswitch +syn match swayConfigBindswitchArgument /--\(locked\|no-warn\|reload\)/ contained +syn keyword swayConfigBindswitchType lid tablet contained +syn keyword swayConfigBindswitchState toggle contained +syn match swayConfigBindswitch /\(lid\|tablet\):\(on\|off\|toggle\) / contained contains=swayConfigBindswitchType,i3ConfigColonOperator,swayConfigBindswitchState,i3ConfigBoolean +syn region i3ConfigBind start=/^\s*bindswitch\s\+.*{$/ end=/^\s*}$/ contains=swayConfigBindKeyword,swayConfigBindswitch,swayConfigBindswitchArgument,i3ConfigNumber,i3ConfigVariable,i3ConfigAction,i3ConfigActionKeyword,i3ConfigOption,i3ConfigSeparator,i3ConfigString,i3ConfigCriteria,swayConfigOutputCommand,i3ConfigBoolean,i3ConfigComment,i3ConfigParen fold keepend extend + +" Bindgesture +syn match swayConfigBindgestureArgument /--\(exact\|input-device=[:0-9a-zA-Z_/-]\+\|no-warn\)/ contained +syn keyword swayConfigBindgestureType hold swipe pinch contained +syn keyword swayConfigBindgestureDir up down left right inward outward clockwise counterclockwise contained +syn match swayConfigBindgesture /\(hold\(:[1-5]\)\?\|swipe\(:[3-5]\)\?\(:up\|:down\|:left\|:right\)\?\|pinch\(:[2-5]\)\?:\(+\?\(inward\|outward\|clockwise\|counterclockwise\|up\|down\|left\|right\)\)\+\) / contained contains=i3ConfigNumber,swayConfigBindgestureType,i3ConfigColonOperator,swayConfigBindgestureDir,i3ConfigBindModifier +syn region i3ConfigBind start=/^\s*bindgesture\s\+.*{$/ end=/^\s*}$/ contains=swayConfigBindKeyword,swayConfigBindgesture,swayConfigBindgestureArgument,i3ConfigCriteria,i3ConfigAction,i3ConfigSeparator,i3ConfigActionKeyword,i3ConfigOption,i3ConfigString,i3ConfigNumber,i3ConfigVariable,i3ConfigBoolean,i3ConfigParen fold keepend extend + +" Tiling drag threshold +syn match i3ConfigKeyword /^tiling_drag_threshold \d\+$/ contains=i3ConfigNumber + +" Titlebar commands +syn match i3ConfigKeyword /^titlebar_border_thickness \(\d\+\|\$\S\+\)$/ contains=i3ConfigNumber,i3ConfigVariable +syn match i3ConfigKeyword /^titlebar_padding \(\d\+\|\$\S\+\)\( \d\+\)\?$/ contains=i3ConfigNumber,i3ConfigVariable + +syn match swayConfigDeviceOps /[*,:;]/ contained + +" Input devices syn keyword swayConfigInputKeyword input contained -syn match swayConfigInput /^\s*input\s\+.*$/ contains=swayConfigInputKeyword - -" set display outputs -syn match swayConfigOutput /^\s*output\s\+.*$/ contains=i3ConfigOutput - -" set display focus -syn keyword swayConfigFocusKeyword focus contained -syn keyword swayConfigFocusType output contained -syn match swayConfigFocus /^\s*focus\soutput\s.*$/ contains=swayConfigFocusKeyword,swayConfigFocusType - -" focus follows mouse -syn clear i3ConfigFocusFollowsMouseType -syn clear i3ConfigFocusFollowsMouse - -syn keyword swayConfigFocusFollowsMouseType yes no always contained -syn match swayConfigFocusFollowsMouse /^\s*focus_follows_mouse\s\+\(yes\|no\|always\)\s\?$/ contains=i3ConfigFocusFollowsMouseKeyword,swayConfigFocusFollowsMouseType - - -" xwayland -syn keyword swayConfigXwaylandKeyword xwayland contained -syn match swayConfigXwaylandModifier /^\s*xwayland\s\+\(enable\|disable\|force\)\s\?$/ contains=swayConfigXwaylandKeyword - -" Group mode/bar -syn clear i3ConfigBlock -syn region swayConfigBlock start=+.*s\?{$+ end=+^}$+ contains=i3ConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigInitializeKeyword,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable,swayConfigInputKeyword,i3ConfigOutput transparent keepend extend - -"hi def link swayConfigError Error -hi def link i3ConfigFloating Error -hi def link swayConfigFloating Type -hi def link swayConfigFloatingMouseAction Type -hi def link swayConfigFocusKeyword Type -hi def link swayConfigSmartBorderKeyword Type -hi def link swayConfigInputKeyword Type -hi def link swayConfigFocusFollowsMouseType Type -hi def link swayConfigBindGestureCommand Identifier -hi def link swayConfigBindGestureDirection Constant -hi def link swayConfigBindGesturePinchDirection Constant -hi def link swayConfigBindKeyword Identifier -hi def link swayConfigClientColorKeyword Identifier -hi def link swayConfigFloatingKeyword Identifier -hi def link swayConfigFloatingModifier Identifier -hi def link swayConfigFocusType Identifier -hi def link swayConfigSmartBorder Identifier -hi def link swayConfigXwaylandKeyword Identifier -hi def link swayConfigXwaylandModifier Type -hi def link swayConfigBindGesture PreProc +syn keyword swayConfigInputType touchpad pointer keyboard touch tablet_tool tablet_pad switch contained +syn match swayConfigInputTypePair /\<type:\w\+\>/ contained contains=i3ConfigColonOperator,swayConfigInputType +syn region swayConfigInputStart start=/^input / end=/\s/ contained contains=swayConfigInputKeyword,swayConfigInputTypePair,i3ConfigString keepend extend +syn keyword swayConfigInputOpts xkb_layout xkb_variant xkb_rules xkb_switch_layout xkb_numlock xkb_file xkb_capslock xkb_model repeat_delay repeat_rate map_to_output map_to_region map_from_region tool_mode accel_profile dwt dwtp drag_lock drag click_method middle_emulation tap events calibration_matrix natural_scroll left_handed pointer_accel scroll_button scroll_factor scroll_method tap_button_map contained +syn keyword swayConfigInputOptVals absolute relative adaptive flat none button_areas clickfinger toggle two_finger edge on_button_down lrm lmr next prev pen eraser brush pencil airbrush disabled_on_external_mouse disable contained +syn match swayConfigXkbOptsPairVal /:[0-9a-z_-]\+/ contained contains=i3ConfigColonOperator +syn match swayConfigXkbOptsPair /[a-z]\+:[0-9a-z_-]\+/ contained contains=swayConfigXkbOptsPairVal +syn match swayConfigInputXkbOpts /xkb_options \([a-z]\+:[0-9a-z_-]\+,\?\)\+/ contained contains=swayConfigXkbOptsPair,swayConfigDeviceOps +syn region i3ConfigAction start=/input/ skip=/\\$/ end=/\([,;]\|$\)/ contained contains=swayConfigInputStart,swayConfigInputXkbOpts,swayConfigInputOpts,swayConfigInputOptVals,i3ConfigVariable,i3ConfigNumber,i3ConfigBoolean,swayConfigDeviceOps keepend transparent +syn region i3ConfigInput start=/^input/ skip=/\\$/ end=/$/ contains=swayConfigInputStart,swayConfigInputXkbOpts,swayConfigInputOpts,swayConfigInputOptVals,i3ConfigVariable,i3ConfigNumber,i3ConfigBoolean,swayConfigDeviceOps keepend +syn region i3ConfigInput start=/^input .* {/ end=/}$/ contains=swayConfigInputStart,swayConfigInputXkbOpts,swayConfigInputOpts,swayConfigInputOptVals,i3ConfigVariable,i3ConfigNumber,i3ConfigBoolean,swayConfigDeviceOps,i3ConfigParen keepend extend + +" Seat +syn keyword swayConfigSeatKeyword seat contained +syn keyword swayConfigSeatOpts attach cursor fallback hide_cursor idle_inhibit idle_wake keyboard_grouping shortcuts_inhibitor pointer_constraint xcursor_theme contained +syn match swayConfigSeatOptVals /when-typing/ contained +syn keyword swayConfigSeatOptVals move set press release none smart activate deactivate toggle escape enable disable contained +syn region i3ConfigAction start=/seat/ skip=/\\$/ end=/\([,;]\|$\)/ contained contains=swayConfigSeatKeyword,i3ConfigString,i3ConfigNumber,i3ConfigBoolean,swayConfigSeatOptVals,swayConfigSeatOpts,swayConfigDeviceOps,swayConfigInputType keepend transparent +syn region swayConfigSeat start=/seat/ skip=/\\$/ end=/$/ contains=swayConfigSeatKeyword,i3ConfigString,i3ConfigNumber,i3ConfigBoolean,swayConfigSeatOptVals,swayConfigSeatOpts,swayConfigDeviceOps,swayConfigInputType keepend +syn region swayConfigSeat start=/seat .* {$/ end=/}$/ contains=swayConfigSeatKeyword,i3ConfigString,i3ConfigNumber,i3ConfigBoolean,swayConfigSeatOptVals,swayConfigSeatOpts,swayConfigDeviceOps,i3ConfigParen,swayConfigInputType keepend extend + +" Output monitors +syn keyword swayConfigOutputKeyword output contained +syn keyword swayConfigOutputOpts mode resolution res modeline position pos scale scale_filter subpixel background bg transform disable enable power dpms max_render_time adaptive_sync render_bit_depth contained +syn keyword swayConfigOutputOptVals linear nearest smart rgb bgr vrgb vbgr none normal flipped fill stretch fit center tile solid_color clockwise anticlockwise toggle contained +syn match swayConfigOutputOptVals /--custom\|flipped-\(90\|180\|270\)/ contained +syn match swayConfigOutputFPS /@[0-9.]\+Hz/ contained +syn match swayConfigOutputMode / [0-9]\+x[0-9]\+\(@[0-9.]\+Hz\)\?/ contained contains=swayConfigOutputFPS +syn region i3ConfigAction start=/output/ skip=/\\$/ end=/\([,;]\|$\)/ contained contains=swayConfigOutputKeyword,swayConfigOutputMode,swayConfigOutputOpts,swayConfigOutputOptVals,i3ConfigVariable,i3ConfigNumber,i3ConfigString,i3ConfigColor,i3ConfigBoolean,swayConfigDeviceOps keepend transparent +syn region swayConfigOutput start=/^output/ skip=/\\$/ end=/$/ contains=swayConfigOutputKeyword,swayConfigOutputMode,swayConfigOutputOpts,swayConfigOutputOptVals,i3ConfigVariable,i3ConfigNumber,i3ConfigString,i3ConfigColor,i3ConfigBoolean,swayConfigDeviceOps keepend +syn region swayConfigOutput start=/^output .* {$/ end=/}$/ contains=swayConfigOutputKeyword,swayConfigOutputMode,swayConfigOutputOpts,swayConfigOutputOptVals,i3ConfigVariable,i3ConfigNumber,i3ConfigString,i3ConfigColor,i3ConfigBoolean,swayConfigDeviceOps,i3ConfigParen keepend extend + +" Define the highlighting. +hi def link swayConfigFloatingModifierOpts i3ConfigOption +hi def link swayConfigBindKeyword i3ConfigBindKeyword +hi def link swayConfigXOpt i3ConfigOption +hi def link swayConfigInhibitKeyword i3ConfigCommand +hi def link swayConfigInhibitOpts i3ConfigOption +hi def link swayConfigBindswitchArgument i3ConfigBindArgument +hi def link swayConfigBindswitchType i3ConfigMoveType +hi def link swayConfigBindswitchState i3ConfigMoveDir +hi def link swayConfigBindgestureArgument i3ConfigBindArgument +hi def link swayConfigBindgestureType i3ConfigMoveType +hi def link swayConfigBindgestureDir i3ConfigMoveDir +hi def link swayConfigDeviceOps i3ConfigOperator +hi def link swayConfigInputKeyword i3ConfigCommand +hi def link swayConfigInputType i3ConfigMoveType +hi def link swayConfigInputTypePair i3ConfigMoveDir +hi def link swayConfigInputOptVals i3ConfigShParam +hi def link swayConfigInputOpts i3ConfigOption +hi def link swayConfigXkbOptsPairVal i3ConfigString +hi def link swayConfigXkbOptsPair i3ConfigShParam +hi def link swayConfigInputXkbOpts i3ConfigOption +hi def link swayConfigSeatKeyword i3ConfigCommand +hi def link swayConfigSeatOptVals swayConfigInputOptVals +hi def link swayConfigSeatOpts swayConfigInputOpts +hi def link swayConfigOutputKeyword i3ConfigCommand +hi def link swayConfigOutputOptVals swayConfigInputOptVals +hi def link swayConfigOutputOpts swayConfigInputOpts +hi def link swayConfigOutputFPS Constant +hi def link swayConfigOutputMode i3ConfigNumber let b:current_syntax = "swayconfig" diff --git a/runtime/syntax/swig.vim b/runtime/syntax/swig.vim new file mode 100644 index 0000000000..b62621264a --- /dev/null +++ b/runtime/syntax/swig.vim @@ -0,0 +1,99 @@ +" Vim syntax file +" Language: SWIG +" Maintainer: Julien Marrec <julien.marrec 'at' gmail com> +" Last Change: 2023 November 23 + +if exists("b:current_syntax") + finish +endif + +" Read the C++ syntax to start with +runtime! syntax/cpp.vim +unlet b:current_syntax + +" SWIG extentions +syn keyword swigInclude %include %import %importfile %includefile %module + +syn keyword swigMostCommonDirective %alias %apply %beginfile %clear %constant %define %echo %enddef %endoffile +syn keyword swigMostCommonDirective %extend %feature %director %fragment %ignore %inline +syn keyword swigMostCommonDirective %keyword %name %namewarn %native %newobject %parms %pragma +syn keyword swigMostCommonDirective %rename %template %typedef %typemap %types %varargs + +" SWIG: Language specific macros +syn keyword swigOtherLanguageSpecific %luacode %go_import + +syn keyword swigCSharp %csattributes %csconst %csconstvalue %csmethodmodifiers %csnothrowexception +syn keyword swigCSharp %dconstvalue %dmanifestconst %dmethodmodifiers + +syn keyword swigJava %javaconstvalue %javaexception %javamethodmodifiers %javaconst %nojavaexception + +syn keyword swigGuile %multiple_values %values_as_list %values_as_vector + +syn keyword swigPHP %rinit %rshutdown %minit %mshutdown + +syn keyword swigPython %pybinoperator %pybuffer_binary %pybuffer_mutable_binary %pybuffer_mutable_string %pybuffer_string +syn keyword swigPython %pythonappend %pythonbegin %pythoncode %pythondynamic %pythonnondynamic %pythonprepend + +syn keyword swigRuby %markfunc %trackobjects %bang +syn keyword swigScilab %scilabconst + +" SWIG: Insertion +syn keyword swigInsertSection %insert %begin %runtime %header %wrapper %init + +" SWIG: Other directives +syn keyword swigCstring %cstring_bounded_mutable %cstring_bounded_output %cstring_chunk_output %cstring_input_binary %cstring_mutable +syn keyword swigCstring %cstring_output_allocate %cstring_output_allocate_size %cstring_output_maxsize %cstring_output_withsize +syn keyword swigCWstring %cwstring_bounded_mutable %cwstring_bounded_output %cwstring_chunk_output %cwstring_input_binary %cwstring_mutable +syn keyword swigCWstring %cwstring_output_allocate %cwstring_output_allocate_size %cwstring_output_maxsize %cwstring_output_withsize +syn keyword swigCMalloc %malloc %calloc %realloc %free %sizeof %allocators + +syn keyword swigExceptionHandling %catches %raise %allowexception %exceptionclass %warn %warnfilter %exception +syn keyword swigContract %contract %aggregate_check + +syn keyword swigDirective %addmethods %array_class %array_functions %attribute %attribute2 %attribute2ref +syn keyword swigDirective %attribute_ref %attributeref %attributestring %attributeval %auto_ptr %callback +syn keyword swigDirective %delete_array %delobject %extend_smart_pointer %factory %fastdispatch %freefunc %immutable +syn keyword swigDirective %implicit %implicitconv %interface %interface_custom %interface_impl %intrusive_ptr %intrusive_ptr_no_wrap +syn keyword swigDirective %mutable %naturalvar %nocallback %nocopyctor %nodefaultctor %nodefaultdtor %nonaturalvar %nonspace +syn keyword swigDirective %nspace %pointer_cast %pointer_class %pointer_functions %predicate %proxycode +syn keyword swigDirective %refobject %set_output %shared_ptr %std_comp_methods +syn keyword swigDirective %std_nodefconst_type %typecheck %typemaps_string %unique_ptr %unrefobject %valuewrapper + +syn match swigVerbatimStartEnd "%[{}]" + +syn match swigUserDef "%\w\+" +syn match swigVerbatimMacro "^\s*%#\w\+\%( .*\)\?$" + +" SWIG: typemap var and typemap macros (eg: $1, $*1_type, $&n_ltype, $self) +syn match swigTypeMapVars "\$[*&_a-zA-Z0-9]\+" + +" Default highlighting +hi def link swigInclude Include +hi def link swigMostCommonDirective Structure +hi def link swigDirective Macro +hi def link swigContract swigExceptionHandling +hi def link swigExceptionHandling Exception +hi def link swigUserDef Function + +hi def link swigCMalloc Statement +hi def link swigCstring Type +hi def link swigCWstring Type + +hi def link swigCSharp swigOtherLanguageSpecific +hi def link swigJava swigOtherLanguageSpecific +hi def link swigGuile swigOtherLanguageSpecific +hi def link swigPHP swigOtherLanguageSpecific +hi def link swigPython swigOtherLanguageSpecific +hi def link swigRuby swigOtherLanguageSpecific +hi def link swigScilab swigOtherLanguageSpecific +hi def link swigOtherLanguageSpecific Special + +hi def link swigInsertSection PreProc + +hi def link swigVerbatimStartEnd Statement +hi def link swigVerbatimMacro Macro + +hi def link swigTypeMapVars SpecialChar + +let b:current_syntax = "swig" +" vim: ts=8 diff --git a/runtime/syntax/synload.vim b/runtime/syntax/synload.vim index 056e38bf79..3182c590b7 100644 --- a/runtime/syntax/synload.vim +++ b/runtime/syntax/synload.vim @@ -1,6 +1,7 @@ " Vim syntax support file -" Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2022 Apr 12 +" Maintainer: The Vim Project <https://github.com/vim/vim> +" Last Change: 2023 Aug 10 +" Former Maintainer: Bram Moolenaar <Bram@vim.org> " This file sets up for syntax highlighting. " It is loaded from "syntax.vim" and "manual.vim". @@ -48,8 +49,8 @@ fun! s:SynSet() " load each in sequence. Skip empty entries. for name in split(s, '\.') if !empty(name) - exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim" - exe "runtime! syntax/" . name . ".lua syntax/" . name . "/*.lua" + " XXX: "[.]" in the first pattern makes it a wildcard on Windows + exe $'runtime! syntax/{name}[.]{{vim,lua}} syntax/{name}/*.{{vim,lua}}' endif endfor endif diff --git a/runtime/syntax/syntax.vim b/runtime/syntax/syntax.vim index 5ec99c7e05..887da05bfe 100644 --- a/runtime/syntax/syntax.vim +++ b/runtime/syntax/syntax.vim @@ -1,6 +1,7 @@ " Vim syntax support file -" Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2022 Apr 12 +" Maintainer: The Vim Project <https://github.com/vim/vim> +" Last Change: 2023 Aug 10 +" Former Maintainer: Bram Moolenaar <Bram@vim.org> " This file is used for ":syntax on". " It installs the autocommands and starts highlighting for all buffers. diff --git a/runtime/syntax/tasm.vim b/runtime/syntax/tasm.vim index 1d6e570752..b8b5e6992b 100644 --- a/runtime/syntax/tasm.vim +++ b/runtime/syntax/tasm.vim @@ -1,6 +1,6 @@ " Vim syntax file " Language: TASM: turbo assembler by Borland -" Maintaner: FooLman of United Force <foolman@bigfoot.com> +" Maintainer: FooLman of United Force <foolman@bigfoot.com> " Last Change: 2012 Feb 03 by Thilo Six, and 2018 Nov 27. " quit when a syntax file was already loaded diff --git a/runtime/syntax/template.vim b/runtime/syntax/template.vim index 5bf580fc11..a59b7b0af9 100644 --- a/runtime/syntax/template.vim +++ b/runtime/syntax/template.vim @@ -1,7 +1,8 @@ " Vim syntax file " Language: Generic template -" Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2019 May 06 +" Maintainer: The Vim Project <https://github.com/vim/vim> +" Last Change: 2023 Aug 10 +" Former Maintainer: Bram Moolenaar <Bram@vim.org> " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") diff --git a/runtime/syntax/tf.vim b/runtime/syntax/tf.vim index 47775b8637..df6adcf819 100644 --- a/runtime/syntax/tf.vim +++ b/runtime/syntax/tf.vim @@ -27,7 +27,7 @@ syn keyword tfVar bamf bg_output borg clearfull cleardone clock connect contai syn keyword tfVar emulation end_color gag gethostbyname gpri hook hilite contained syn keyword tfVar hiliteattr histsize hpri insert isize istrip kecho contained syn keyword tfVar kprefix login lp lpquote maildelay matching max_iter contained -syn keyword tfVar max_recur mecho more mprefix oldslash promt_sec contained +syn keyword tfVar max_recur mecho more mprefix oldslash prompt_sec contained syn keyword tfVar prompt_usec proxy_host proxy_port ptime qecho qprefix contained syn keyword tfVar quite quitdone redef refreshtime scroll shpause snarf sockmload contained syn keyword tfVar start_color tabsize telopt sub time_format visual contained diff --git a/runtime/syntax/tpp.vim b/runtime/syntax/tpp.vim index ca64b5dce1..e2b307b2a2 100644 --- a/runtime/syntax/tpp.vim +++ b/runtime/syntax/tpp.vim @@ -2,8 +2,8 @@ " Language: tpp - Text Presentation Program " Maintainer: Debian Vim Maintainers " Former Maintainer: Gerfried Fuchs <alfie@ist.org> -" Last Change: 2018 Dec 27 -" URL: https://salsa.debian.org/vim-team/vim-debian/master/syntax/tpp.vim +" Last Change: 2023 Jan 16 +" URL: https://salsa.debian.org/vim-team/vim-debian/blob/main/syntax/tpp.vim " Filenames: *.tpp " License: BSD " diff --git a/runtime/syntax/tsalt.vim b/runtime/syntax/tsalt.vim index 8dd2a24df9..6f74ad2eb3 100644 --- a/runtime/syntax/tsalt.vim +++ b/runtime/syntax/tsalt.vim @@ -83,11 +83,11 @@ syn keyword tsaltFunction vGetChrs vGetChrsA vPutChr vPutChrs syn keyword tsaltFunction vPutChrsA vRstrArea vSaveArea " Dynamic Data Exchange (DDE) Operations -syn keyword tsaltFunction DDEExecute DDEInitate DDEPoke DDERequest +syn keyword tsaltFunction DDEExecute DDEInitiate DDEPoke DDERequest syn keyword tsaltFunction DDETerminate DDETerminateAll "END FUNCTIONS -"PREDEFINED VARAIABLES +"PREDEFINED VARIABLES syn keyword tsaltSysVar _add_lf _alarm_on _answerback_str _asc_rcrtrans syn keyword tsaltSysVar _asc_remabort _asc_rlftrans _asc_scpacing syn keyword tsaltSysVar _asc_scrtrans _asc_secho _asc_slpacing @@ -106,7 +106,7 @@ syn keyword tsaltSysVar _scr_chk_key _script_dir _sound_on syn keyword tsaltSysVar _strip_high _swap_bs _telix_dir _up_dir syn keyword tsaltSysVar _usage_fname _zmodauto _zmod_rcrash syn keyword tsaltSysVar _zmod_scrash -"END PREDEFINED VARAIABLES +"END PREDEFINED VARIABLES "TYPE syn keyword tsaltType str int diff --git a/runtime/syntax/tsscl.vim b/runtime/syntax/tsscl.vim index fd2a5e2ba9..df804b2f88 100644 --- a/runtime/syntax/tsscl.vim +++ b/runtime/syntax/tsscl.vim @@ -22,7 +22,7 @@ syn case ignore " " -" Begin syntax definitions for tss geomtery file. +" Begin syntax definitions for tss geometry file. " " Load TSS geometry syntax file diff --git a/runtime/syntax/typescript.vim b/runtime/syntax/typescript.vim index af71938a8e..5389c21497 100644 --- a/runtime/syntax/typescript.vim +++ b/runtime/syntax/typescript.vim @@ -1,9 +1,9 @@ " Vim syntax file " Language: TypeScript -" Maintainer: Bram Moolenaar, Herrington Darkholme -" Last Change: 2019 Nov 30 +" Maintainer: Herrington Darkholme +" Last Change: 2023 Aug 13 " Based On: Herrington Darkholme's yats.vim -" Changes: Go to https:github.com/HerringtonDarkholme/yats.vim for recent changes. +" Changes: Go to https://github.com/HerringtonDarkholme/yats.vim for recent changes. " Origin: https://github.com/othree/yajs " Credits: Kao Wei-Ko(othree), Jose Elera Campana, Zhao Yi, Claudio Fleiner, Scott Shattuck " (This file is based on their hard work), gumnos (From the #vim diff --git a/runtime/syntax/typescriptreact.vim b/runtime/syntax/typescriptreact.vim index c4c2d45745..1c510459f5 100644 --- a/runtime/syntax/typescriptreact.vim +++ b/runtime/syntax/typescriptreact.vim @@ -1,9 +1,9 @@ " Vim syntax file " Language: TypeScript with React (JSX) -" Maintainer: Bram Moolenaar -" Last Change: 2019 Nov 30 +" Maintainer: The Vim Project <https://github.com/vim/vim> +" Last Change: 2023 Aug 13 " Based On: Herrington Darkholme's yats.vim -" Changes: See https:github.com/HerringtonDarkholme/yats.vim +" Changes: See https://github.com/HerringtonDarkholme/yats.vim " Credits: See yats.vim on github if !exists("main_syntax") diff --git a/runtime/syntax/unison.vim b/runtime/syntax/unison.vim new file mode 100644 index 0000000000..fed7551043 --- /dev/null +++ b/runtime/syntax/unison.vim @@ -0,0 +1,103 @@ +" Vim syntax file +" +" Language: unison +" Maintainer: Anton Parkhomenko <anton@chuwy.me> +" Last Change: Aug 7, 2023 +" Original Author: John Williams, Paul Chiusano and Rúnar Bjarnason + +if exists("b:current_syntax") + finish +endif + +syntax include @markdown $VIMRUNTIME/syntax/markdown.vim + +syn cluster markdownLikeDocs contains=markdownBold,markdownItalic,markdownLinkText,markdownListMarker,markdownOrderedListMarker,markdownH1,markdownH2,markdownH3,markdownH4,markdownH5,markdownH6 + +syn match unisonOperator "[-!#$%&\*\+/<=>\?@\\^|~]" +syn match unisonDelimiter "[\[\](){},.]" + +" Strings and constants +syn match unisonSpecialChar contained "\\\([0-9]\+\|o[0-7]\+\|x[0-9a-fA-F]\+\|[\"\\'&\\abfnrtv]\|^[A-Z^_\[\\\]]\)" +syn match unisonSpecialChar contained "\\\(NUL\|SOH\|STX\|ETX\|EOT\|ENQ\|ACK\|BEL\|BS\|HT\|LF\|VT\|FF\|CR\|SO\|SI\|DLE\|DC1\|DC2\|DC3\|DC4\|NAK\|SYN\|ETB\|CAN\|EM\|SUB\|ESC\|FS\|GS\|RS\|US\|SP\|DEL\)" +syn match unisonSpecialCharError contained "\\&\|'''\+" +syn region unisonString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=unisonSpecialChar +syn match unisonCharacter "[^a-zA-Z0-9_']'\([^\\]\|\\[^']\+\|\\'\)'"lc=1 contains=unisonSpecialChar,unisonSpecialCharError +syn match unisonCharacter "^'\([^\\]\|\\[^']\+\|\\'\)'" contains=unisonSpecialChar,unisonSpecialCharError +syn match unisonNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>" +syn match unisonFloat "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>" + +" Keyword definitions. These must be patterns instead of keywords +" because otherwise they would match as keywords at the start of a +" "literate" comment (see lu.vim). +syn match unisonModule "\<namespace\>" +syn match unisonImport "\<use\>" +syn match unisonTypedef "\<\(unique\|structural\|∀\|forall\)\>" +syn match unisonStatement "\<\(ability\|do\|type\|where\|match\|cases\|;\|let\|with\|handle\)\>" +syn match unisonConditional "\<\(if\|else\|then\)\>" + +syn match unisonBoolean "\<\(true\|false\)\>" + +syn match unisonType "\<\C[A-Z][0-9A-Za-z_'!]*\>" +syn match unisonName "\<\C[a-z_][0-9A-Za-z_'!]*\>" + +" Comments +syn match unisonLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$" +syn region unisonBlockComment start="{-" end="-}" contains=unisonBlockComment +syn region unisonBelowFold start="^---" skip="." end="." contains=unisonBelowFold + +" Docs +syn region unisonDocBlock matchgroup=unisonDoc start="{{" end="}}" contains=unisonDocTypecheck,unisonDocQuasiquote,unisonDocDirective,unisonDocCode,unisonDocCodeInline,unisonDocCodeRaw,unisonDocMono,@markdownLikeDocs +syn region unisonDocQuasiquote contained matchgroup=unisonDocQuote start="{{" end= "}}" contains=TOP +syn region unisonDocCode contained matchgroup=unisonDocCode start="^\s*```\s*$" end="^\s*```\s*$" contains=TOP +syn region unisonDocTypecheck contained matchgroup=unisonDocCode start="^\s*@typecheck\s*```\s*$" end="^\s*```\s*$" contains=TOP +syn region unisonDocCodeRaw contained matchgroup=unisonDocCode start="^\s*```\s*raw\s*$" end="^\s*```\s*$" contains=NoSyntax +syn region unisonDocCodeInline contained matchgroup=unisonDocCode start="`\@<!``" end="`\@<!``" contains=TOP +syn match unisonDocMono "''[^']*''" +syn region unisonDocDirective contained matchgroup=unisonDocDirective start="\(@\([a-zA-Z0-9_']*\)\)\?{{\@!" end="}" contains=TOP + +syn match unisonDebug "\<\(todo\|bug\|Debug.trace\|Debug.evalToText\)\>" + +" things like +" > my_func 1 3 +" test> Function.tap.tests.t1 = check let +" use Nat == + +" ( 99, 100 ) === (withInitialValue 0 do +" : : : +syn match unisonWatch "^[A-Za-z]*>" + +hi def link unisonWatch Debug +hi def link unisonDocMono Delimiter +hi def link unisonDocDirective Import +hi def link unisonDocQuote Delimiter +hi def link unisonDocCode Delimiter +hi def link unisonDoc String +hi def link unisonBelowFold Comment +hi def link unisonBlockComment Comment +hi def link unisonBoolean Boolean +hi def link unisonCharacter Character +hi def link unisonComment Comment +hi def link unisonConditional Conditional +hi def link unisonConditional Conditional +hi def link unisonDebug Debug +hi def link unisonDelimiter Delimiter +hi def link unisonDocBlock String +hi def link unisonDocDirective Import +hi def link unisonDocIncluded Import +hi def link unisonFloat Float +hi def link unisonImport Include +hi def link unisonLineComment Comment +hi def link unisonLink Type +hi def link unisonName Identifier +hi def link unisonNumber Number +hi def link unisonOperator Operator +hi def link unisonSpecialChar SpecialChar +hi def link unisonSpecialCharError Error +hi def link unisonStatement Statement +hi def link unisonString String +hi def link unisonType Type +hi def link unisonTypedef Typedef + + +let b:current_syntax = "unison" + +" Options for vi: ts=8 sw=2 sts=2 nowrap noexpandtab ft=vim diff --git a/runtime/syntax/urlshortcut.vim b/runtime/syntax/urlshortcut.vim new file mode 100644 index 0000000000..f6cc3835a2 --- /dev/null +++ b/runtime/syntax/urlshortcut.vim @@ -0,0 +1,14 @@ +" Vim syntax file +" Language: MS Windows URL shortcut file +" Maintainer: ObserverOfTime <chronobserver@disroot.org> +" LastChange: 2023-06-04 + +" Quit when a syntax file was already loaded. +if exists("b:current_syntax") + finish +endif + +" Just use the dosini syntax for now +runtime! syntax/dosini.vim + +let b:current_syntax = "urlshortcut" diff --git a/runtime/syntax/vgrindefs.vim b/runtime/syntax/vgrindefs.vim index 3de31b1437..a194c108cb 100644 --- a/runtime/syntax/vgrindefs.vim +++ b/runtime/syntax/vgrindefs.vim @@ -1,7 +1,8 @@ " Vim syntax file " Language: Vgrindefs -" Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2005 Jun 20 +" Maintainer: The Vim Project <https://github.com/vim/vim> +" Last Change: 2023 Aug 10 +" Former Maintainer: Bram Moolenaar <Bram@vim.org> " The Vgrindefs file is used to specify a language for vgrind diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index a1c39e4dcf..fcd50bccd2 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -53,7 +53,7 @@ syn case ignore syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo " Default highlighting groups {{{2 -syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineFold CursorLineNr CursorLineSign DiffAdd DiffChange DiffDelete DiffText Directory EndOfBuffer ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu MessageWindow ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question QuickFixLine Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual WarningMsg WildMenu +syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineFold CursorLineNr CursorLineSign DiffAdd DiffChange DiffDelete DiffText Directory EndOfBuffer ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu MessageWindow ModeMsg MoreMsg NonText Normal Pmenu PmenuExtra PmenuExtraSel PmenuKind PmenuKindSel PmenuSbar PmenuSel PmenuThumb Question QuickFixLine Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual WarningMsg WildMenu syn match vimHLGroup contained "Conceal" syn keyword vimOnlyHLGroup contained LineNrAbove LineNrBelow StatusLineTerm Terminal VisualNOS syn keyword nvimHLGroup contained Substitute TermCursor TermCursorNC @@ -61,7 +61,7 @@ syn keyword nvimHLGroup contained Substitute TermCursor TermCursorNC syn case match " Special Vim Highlighting (not automatic) {{{1 -" Set up folding commands {{{2 +" Set up folding commands for this syntax highlighting file {{{2 if exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[afhlmpPrt]' if g:vimsyn_folding =~# 'a' com! -nargs=* VimFolda <args> fold @@ -368,7 +368,7 @@ syn match vimSetMod contained "&vim\=\|[!&?<]\|all&" " Let: {{{2 " === syn keyword vimLet let unl[et] skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc -VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s\+\%(trim\s\+\)\=\%(eval\s\+\)\=\s*\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\s*\z1\s*$' +VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s*\%(trim\s\+\%(eval\s\+\)\=\|eval\s\+\%(trim\s\+\)\=\)\=\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\s*\z1\s*$' " Abbreviations: {{{2 " ============= diff --git a/runtime/syntax/viminfo.vim b/runtime/syntax/viminfo.vim index 667e1bab2a..06c59766d7 100644 --- a/runtime/syntax/viminfo.vim +++ b/runtime/syntax/viminfo.vim @@ -1,7 +1,8 @@ " Vim syntax file " Language: Vim .viminfo file -" Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2016 Jun 05 +" Maintainer: The Vim Project <https://github.com/vim/vim> +" Last Change: 2023 Aug 10 +" Former Maintainer: Bram Moolenaar <Bram@vim.org> " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") diff --git a/runtime/syntax/wast.vim b/runtime/syntax/wast.vim deleted file mode 100644 index 245d5f6f19..0000000000 --- a/runtime/syntax/wast.vim +++ /dev/null @@ -1,84 +0,0 @@ -" Vim syntax file -" Language: WebAssembly -" Maintainer: rhysd <lin90162@yahoo.co.jp> -" Last Change: Jul 29, 2018 -" For bugs, patches and license go to https://github.com/rhysd/vim-wasm - -if exists("b:current_syntax") - finish -endif - -let s:cpo_save = &cpo -set cpo&vim - -syn cluster wastCluster contains=wastModule,wastInstWithType,wastInstGeneral,wastParamInst,wastControlInst,wastString,wastNamedVar,wastUnnamedVar,wastFloat,wastNumber,wastComment,wastList,wastType - -" Instructions -" https://webassembly.github.io/spec/core/text/instructions.html -" Note: memarg (align=,offset=) can be added to memory instructions -syn match wastInstWithType "\%((\s*\)\@<=\<\%(i32\|i64\|f32\|f64\|memory\)\.[[:alnum:]_]\+\%(/\%(i32\|i64\|f32\|f64\)\)\=\>\%(\s\+\%(align\|offset\)=\)\=" contained display -syn match wastInstGeneral "\%((\s*\)\@<=\<[[:alnum:]_]\+\>" contained display -" https://webassembly.github.io/spec/core/text/instructions.html#control-instructions -syn match wastControlInst "\%((\s*\)\@<=\<\%(block\|end\|loop\|if\|else\|unreachable\|nop\|br\|br_if\|br_table\|return\|call\|call_indirect\)\>" contained display -" https://webassembly.github.io/spec/core/text/instructions.html#parametric-instructions -syn match wastParamInst "\%((\s*\)\@<=\<\%(drop\|select\)\>" contained display - -" Identifiers -" https://webassembly.github.io/spec/core/text/values.html#text-id -syn match wastNamedVar "$\+[[:alnum:]!#$%&'∗./:=><?@\\^_`~+-]*" contained display -syn match wastUnnamedVar "$\+\d\+[[:alnum:]!#$%&'∗./:=><?@\\^_`~+-]\@!" contained display - -" String literals -" https://webassembly.github.io/spec/core/text/values.html#strings -syn region wastString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=wastStringSpecial -syn match wastStringSpecial "\\\x\x\|\\[tnr'\\\"]\|\\u\x\+" contained containedin=wastString - -" Float literals -" https://webassembly.github.io/spec/core/text/values.html#floating-point -syn match wastFloat "\<-\=\d\%(_\=\d\)*\%(\.\d\%(_\=\d\)*\)\=\%([eE][-+]\=\d\%(_\=\d\)*\)\=" display contained -syn match wastFloat "\<-\=0x\x\%(_\=\d\)*\%(\.\x\%(_\=\x\)*\)\=\%([pP][-+]\=\d\%(_\=\d\)*\)\=" display contained -syn keyword wastFloat inf nan contained - -" Integer literals -" https://webassembly.github.io/spec/core/text/values.html#integers -syn match wastNumber "\<-\=\d\%(_\=\d\)*\>" display contained -syn match wastNumber "\<-\=0x\x\%(_\=\x\)*\>" display contained - -" Comments -" https://webassembly.github.io/spec/core/text/lexical.html#comments -syn region wastComment start=";;" end="$" display -syn region wastComment start="(;;\@!" end=";)" - -syn region wastList matchgroup=wastListDelimiter start="(;\@!" matchgroup=wastListDelimiter end=";\@<!)" contains=@wastCluster - -" Types -" https://webassembly.github.io/spec/core/text/types.html -syn keyword wastType i64 i32 f64 f32 param result anyfunc mut contained -syn match wastType "\%((\_s*\)\@<=func\%(\_s*[()]\)\@=" display contained - -" Modules -" https://webassembly.github.io/spec/core/text/modules.html -syn keyword wastModule module type export import table memory global data elem contained -syn match wastModule "\%((\_s*\)\@<=func\%(\_s\+\$\)\@=" display contained - -syn sync lines=100 - -hi def link wastModule PreProc -hi def link wastListDelimiter Delimiter -hi def link wastInstWithType Operator -hi def link wastInstGeneral Operator -hi def link wastControlInst Statement -hi def link wastParamInst Conditional -hi def link wastString String -hi def link wastStringSpecial Special -hi def link wastNamedVar Identifier -hi def link wastUnnamedVar PreProc -hi def link wastFloat Float -hi def link wastNumber Number -hi def link wastComment Comment -hi def link wastType Type - -let b:current_syntax = "wast" - -let &cpo = s:cpo_save -unlet s:cpo_save diff --git a/runtime/syntax/wat.vim b/runtime/syntax/wat.vim new file mode 100644 index 0000000000..a6b926be98 --- /dev/null +++ b/runtime/syntax/wat.vim @@ -0,0 +1,97 @@ +" Vim syntax file +" Language: WebAssembly +" Maintainer: rhysd <lin90162@yahoo.co.jp> +" Last Change: Nov 14, 2023 +" For bugs, patches and license go to https://github.com/rhysd/vim-wasm + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn cluster watNotTop contains=watModule,watInstWithType,watInstGetSet,watInstGeneral,watParamInst,watControlInst,watSimdInst,watString,watNamedVar,watUnnamedVar,watFloat,watNumber,watComment,watList,watType + +" Instructions +" https://webassembly.github.io/spec/core/text/instructions.html +" Note: memarg (align=,offset=) can be added to memory instructions +syn match watInstWithType "\%((\s*\)\@<=\<\%(i32\|i64\|f32\|f64\|memory\)\.[[:alnum:]_]\+\%(/\%(i32\|i64\|f32\|f64\)\)\=\>\%(\s\+\%(align\|offset\)=\)\=" contained display +syn match watInstGeneral "\%((\s*\)\@<=\<[[:alnum:]_]\+\>" contained display +syn match watInstGetSet "\%((\s*\)\@<=\<\%(local\|global\)\.\%(get\|set\)\>" contained display +" https://webassembly.github.io/spec/core/text/instructions.html#control-instructions +syn match watControlInst "\%((\s*\)\@<=\<\%(block\|end\|loop\|if\|then\|else\|unreachable\|nop\|br\|br_if\|br_table\|return\|call\|call_indirect\)\>" contained display +" https://webassembly.github.io/spec/core/text/instructions.html#parametric-instructions +syn match watParamInst "\%((\s*\)\@<=\<\%(drop\|select\)\>" contained display +" SIMD instructions +" https://webassembly.github.io/simd/core/text/instructions.html#simd-instructions +syn match watSimdInst "\<\%(v128\|i8x16\|i16x8\|i32x4\|i64x2\|f32x4\|f64x2)\)\.[[:alnum:]_]\+\%(\s\+\%(i8x16\|i16x8\|i32x4\|i64x2\|f32x4\|f64x2\)\)\=\>" contained display + +" Identifiers +" https://webassembly.github.io/spec/core/text/values.html#text-id +syn match watNamedVar "$\+[[:alnum:]!#$%&'∗./:=><?@\\^_`~+-]*" contained contains=watEscapeUtf8 +syn match watUnnamedVar "$\+\d\+[[:alnum:]!#$%&'∗./:=><?@\\^_`~+-]\@!" contained display +" Presuming the source text is itself encoded correctly, strings that do not +" contain any uses of hexadecimal byte escapes are always valid names. +" https://webassembly.github.io/spec/core/text/values.html#names +syn match watEscapedUtf8 "\\\x\{1,6}" contained containedin=watNamedVar display + +" String literals +" https://webassembly.github.io/spec/core/text/values.html#strings +syn region watString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=watStringSpecial +syn match watStringSpecial "\\\x\x\|\\[tnr'\\\"]\|\\u\x\+" contained containedin=watString display + +" Float literals +" https://webassembly.github.io/spec/core/text/values.html#floating-point +syn match watFloat "\<-\=\d\%(_\=\d\)*\%(\.\d\%(_\=\d\)*\)\=\%([eE][-+]\=\d\%(_\=\d\)*\)\=" display contained +syn match watFloat "\<-\=0x\x\%(_\=\x\)*\%(\.\x\%(_\=\x\)*\)\=\%([pP][-+]\=\d\%(_\=\d\)*\)\=" display contained +syn keyword watFloat inf nan contained +syn match watFloat "nan:0x\x\%(_\=\x\)*" display contained + +" Integer literals +" https://webassembly.github.io/spec/core/text/values.html#integers +syn match watNumber "\<-\=\d\%(_\=\d\)*\>" display contained +syn match watNumber "\<-\=0x\x\%(_\=\x\)*\>" display contained + +" Comments +" https://webassembly.github.io/spec/core/text/lexical.html#comments +syn region watComment start=";;" end="$" +syn region watComment start="(;;\@!" end=";)" + +syn region watList matchgroup=watListDelimiter start="(;\@!" matchgroup=watListDelimiter end=";\@<!)" contains=@watNotTop + +" Types +" https://webassembly.github.io/spec/core/text/types.html +" Note: `mut` was changed to `const`/`var` at Wasm 2.0 +syn keyword watType i64 i32 f64 f32 param result funcref func externref extern mut v128 const var contained +syn match watType "\%((\_s*\)\@<=func\%(\_s*[()]\)\@=" display contained + +" Modules +" https://webassembly.github.io/spec/core/text/modules.html +syn keyword watModule module type export import table memory global data elem contained +syn match watModule "\%((\_s*\)\@<=func\%(\_s\+\$\)\@=" display contained + +syn sync maxlines=100 + +hi def link watModule PreProc +hi def link watListDelimiter Delimiter +hi def link watInstWithType Operator +hi def link watInstGetSet Operator +hi def link watInstGeneral Operator +hi def link watControlInst Statement +hi def link watSimdInst Operator +hi def link watParamInst Conditional +hi def link watString String +hi def link watStringSpecial Special +hi def link watNamedVar Identifier +hi def link watUnnamedVar PreProc +hi def link watFloat Float +hi def link watNumber Number +hi def link watComment Comment +hi def link watType Type +hi def link watEscapedUtf8 Special + +let b:current_syntax = "wat" + +let &cpo = s:cpo_save +unlet s:cpo_save 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 diff --git a/runtime/syntax/wget2.vim b/runtime/syntax/wget2.vim index a63c336f06..3e9abdf23d 100644 --- a/runtime/syntax/wget2.vim +++ b/runtime/syntax/wget2.vim @@ -1,9 +1,9 @@ " Vim syntax file -" Language: Wget2 configuration file (/etc/wget2rc ~/.wget2rc) +" Language: Wget2 configuration file (/etc/wget2rc ~/.wget2rc) " Maintainer: Doug Kearns <dougkearns@gmail.com> -" Last Change: 2022 Apr 28 +" Last Change: 2023 Nov 05 -" GNU Wget2 2.0.0 - multithreaded metalink/file/website downloader +" GNU Wget2 2.1.0 - multithreaded metalink/file/website downloader if exists("b:current_syntax") finish @@ -12,21 +12,20 @@ endif let s:cpo_save = &cpo set cpo&vim -syn match wgetComment "#.*$" contains=wgetTodo contained +syn match wget2Comment "#.*" contains=wget2Todo contained -syn keyword wgetTodo TODO NOTE FIXME XXX contained +syn keyword wget2Todo TODO NOTE FIXME XXX contained -syn region wgetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline -syn region wgetString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline +syn region wget2String start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline +syn region wget2String start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline syn case ignore -syn keyword wgetBoolean on off yes no y n contained -syn keyword wgetNumber infinity inf contained - -syn match wgetNumber "\<\d\+>" contained -syn match wgetQuota "\<\d\+[kmgt]\>" contained -syn match wgetTime "\<\d\+[smhd]\>" contained +syn keyword wget2Boolean on off yes no y n contained +syn keyword wget2Number infinity inf contained +syn match wget2Number "\<\d\+>" contained +syn match wget2Quota "\<\d\+[kmgt]\>" contained +syn match wget2Time "\<\d\+[smhd]\>" contained "{{{ Commands let s:commands =<< trim EOL @@ -67,6 +66,7 @@ let s:commands =<< trim EOL cut-dirs cut-file-get-vars cut-url-get-vars + dane debug default-http-port default-https-port @@ -85,6 +85,7 @@ let s:commands =<< trim EOL execute filter-mime-type filter-urls + follow-sitemaps follow-tags force-atom force-css @@ -221,28 +222,27 @@ let s:commands =<< trim EOL 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 wget2Command "\<' .. substitute(cmd, '-', '[-_]\\=', "g") .. '\>" nextgroup=wget2AssignmentOperator skipwhite contained' endfor +unlet s:commands syn case match -syn match wgetStart "^" nextgroup=wgetCommand,wgetComment skipwhite -syn match wgetAssignmentOperator "=" nextgroup=wgetString,wgetBoolean,wgetNumber,wgetQuota,wgetTime skipwhite contained +syn match wget2LineStart "^" nextgroup=wget2Command,wget2Comment skipwhite +syn match wget2AssignmentOperator "=" nextgroup=wget2String,wget2Boolean,wget2Number,wget2Quota,wget2Time skipwhite contained -hi def link wgetAssignmentOperator Special -hi def link wgetBoolean Boolean -hi def link wgetCommand Identifier -hi def link wgetComment Comment -hi def link wgetNumber Number -hi def link wgetQuota Number -hi def link wgetString String -hi def link wgetTime Number -hi def link wgetTodo Todo +hi def link wget2AssignmentOperator Special +hi def link wget2Boolean Boolean +hi def link wget2Command Identifier +hi def link wget2Comment Comment +hi def link wget2Number Number +hi def link wget2Quota Number +hi def link wget2String String +hi def link wget2Time Number +hi def link wget2Todo Todo -let b:current_syntax = "wget" +let b:current_syntax = "wget2" let &cpo = s:cpo_save unlet s:cpo_save diff --git a/runtime/syntax/xcompose.vim b/runtime/syntax/xcompose.vim new file mode 100644 index 0000000000..3637b9f3b6 --- /dev/null +++ b/runtime/syntax/xcompose.vim @@ -0,0 +1,37 @@ +" Vim syntax file +" Language: XCompose +" Maintainer: ObserverOfTime <chronobserver@disroot.org> +" Filenames: .XCompose, Compose +" Last Change: 2023 Nov 09 + +" Comments +syn keyword xcomposeTodo contained TODO FIXME XXX +syn match xcomposeComment /#.*/ contains=xcomposeTodo + +" Includes +syn keyword xcomposeInclude include nextgroup=xcomposeFile skipwhite +syn match xcomposeFile /"\([^"]\|\\"\)\+"/ contained +syn match xcomposeSubstitution /%[HLS]/ contained containedin=xcomposeFile + +" Modifiers +syn keyword xcomposeModifier Ctrl Lock Caps Shift Alt Meta None +syn match xcomposeModifierPrefix /\s*\zs[!~]\ze\s*/ + +" Keysyms +syn match xcomposeKeysym /<[A-Za-z0-9_]\+>/ +syn match xcomposeKeysym /[A-Za-z0-9_]\+/ contained +syn match xcomposeString /"\([^"]\|\\"\)\+"/ contained nextgroup=xcomposeKeysym skipwhite +syn match xcomposeColon /:/ nextgroup=xcomposeKeysym,xcomposeString skipwhite + +hi def link xcomposeColon Delimiter +hi def link xcomposeComment Comment +hi def link xcomposeFile String +hi def link xcomposeInclude Include +hi def link xcomposeKeysym Constant +hi def link xcomposeModifier Function +hi def link xcomposeModifierPrefix Operator +hi def link xcomposeString String +hi def link xcomposeSubstitution Special +hi def link xcomposeTodo Todo + +let b:current_syntax = 'xcompose' diff --git a/runtime/syntax/xf86conf.vim b/runtime/syntax/xf86conf.vim index 545eda7db0..e8162f3a35 100644 --- a/runtime/syntax/xf86conf.vim +++ b/runtime/syntax/xf86conf.vim @@ -1,13 +1,12 @@ " Vim syntax file -" This is a GENERATED FILE. Please always refer to source file at the URI below. " Language: XF86Config (XFree86 configuration file) " Former Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> -" Last Change: 2010 Nov 01 -" URL: http://trific.ath.cx/Ftp/vim/syntax/xf86conf.vim +" Last Change By David: 2010 Nov 01 +" Last Change: 2023 Jan 23 " Required Vim Version: 6.0 " " Options: let xf86conf_xfree86_version = 3 or 4 -" to force XFree86 3.x or 4.x XF86Config syntax +" to force XFree86 3.x or 4.x XF86Config syntax " Setup " quit when a syntax file was already loaded @@ -147,6 +146,8 @@ syn keyword xf86confKeyword Hskew HTimings InputDevice IOBase MemBase Mode nextg syn keyword xf86confKeyword Modes Ramdac Screen TextClockFreq UseModes VendorName nextgroup=xf86confComment,xf86confValue syn keyword xf86confKeyword VertRefresh VideoRam ViewPort Virtual VScan VTimings nextgroup=xf86confComment,xf86confValue syn keyword xf86confKeyword Weight White nextgroup=xf86confComment,xf86confValue +syn keyword xf86confMatch MatchDevicePath MatchDriver MatchLayout MatchOS MatchPnPID MatchProduct MatchTag MatchUSBID MatchVendor nextgroup=xf86confComment,xf86confString skipwhite +syn keyword xf86confMatch MatchIsPointer MatchIsKeyboard MatchIsTouchpad MatchIsTouchscreen MatchIsJoystick nextgroup=xf86confComment,xf86confValue skipwhite syn keyword xf86confModeLine ModeLine nextgroup=xf86confComment,xf86confModeLineValue skipwhite skipnl " Constants @@ -185,6 +186,7 @@ hi def link xf86confOctalNumberError xf86confError hi def link xf86confError Error hi def link xf86confOption xf86confKeyword +hi def link xf86confMatch xf86confKeyword hi def link xf86confModeLine xf86confKeyword hi def link xf86confKeyword Type diff --git a/runtime/syntax/xpm.vim b/runtime/syntax/xpm.vim index be9f38723e..b094092b73 100644 --- a/runtime/syntax/xpm.vim +++ b/runtime/syntax/xpm.vim @@ -1,10 +1,12 @@ " Vim syntax file " Language: X Pixmap " Maintainer: Ronald Schild <rs@scutum.de> -" Last Change: 2021 Oct 04 -" Version: 5.4n.1 +" Last Change: 2023 May 24 +" Version: 5.4n.2 " Jemma Nelson added termguicolors support " Dominique Pellé fixed spelling support +" Christian J. Robinson fixed use of global variables, moved +" loop into a function " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -21,108 +23,119 @@ syn region xpmPixelString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@xpmCo if has("gui_running") || has("termguicolors") && &termguicolors -let color = "" -let chars = "" -let colors = 0 -let cpp = 0 -let n = 0 -let i = 1 +function s:CreateSyntax() abort + let color = "" + let chars = "" + let colors = 0 + let cpp = 0 + let n = 0 + let lines = getline(1, '$') -while i <= line("$") " scanning all lines + for line in lines " scanning all lines - let s = matchstr(getline(i), '".\{-1,}"') - if s != "" " does line contain a string? + let s = matchstr(line, '".\{-1,}"') - if n == 0 " first string is the Values string + if s != "" " does line contain a string? - " get the 3rd value: colors = number of colors - let colors = substitute(s, '"\s*\d\+\s\+\d\+\s\+\(\d\+\).*"', '\1', '') - " get the 4th value: cpp = number of character per pixel - let cpp = substitute(s, '"\s*\d\+\s\+\d\+\s\+\d\+\s\+\(\d\+\).*"', '\1', '') - if cpp =~ '[^0-9]' - break " if cpp is not made of digits there must be something wrong - endif + if n == 0 " first string is the Values string - " Highlight the Values string as normal string (no pixel string). - " Only when there is no slash, it would terminate the pattern. - if s !~ '/' - exe 'syn match xpmValues /' . s . '/' - endif - hi link xpmValues String + let values = split(s[1 : -2]) + + " Values string invalid, bail out + if len(values) != 4 && len(values) != 6 && len(values) != 7 + return + endif - let n = 1 " n = color index + " get the 3rd value: colors = number of colors + let colors = str2nr(values[2]) + " get the 4th value: cpp = number of character per pixel + let cpp = str2nr(values[3]) - elseif n <= colors " string is a color specification + " these values must be positive, nonzero + if colors < 1 || cpp < 1 + return + endif + + " Highlight the Values string as normal string (no pixel string). + " Only when there is no slash, it would terminate the pattern. + if s !~ '/' + exe 'syn match xpmValues /' .. s .. '/' + endif + hi link xpmValues String - " get chars = <cpp> length string representing the pixels - " (first incl. the following whitespace) - let chars = substitute(s, '"\(.\{'.cpp.'}\s\).*"', '\1', '') + let n = 1 " n = color index - " now get color, first try 'c' key if any (color visual) - let color = substitute(s, '".*\sc\s\+\(.\{-}\)\s*\(\(g4\=\|[ms]\)\s.*\)*\s*"', '\1', '') - if color == s - " no 'c' key, try 'g' key (grayscale with more than 4 levels) - let color = substitute(s, '".*\sg\s\+\(.\{-}\)\s*\(\(g4\|[ms]\)\s.*\)*\s*"', '\1', '') + elseif n <= colors " string is a color specification + + " get chars = <cpp> length string representing the pixels + " (first incl. the following whitespace) + let chars = substitute(s, '"\(.\{' .. cpp .. '}\s\).*"', '\1', '') + + " now get color, first try 'c' key if any (color visual) + let color = substitute(s, '".*\sc\s\+\(.\{-}\)\s*\(\(g4\=\|[ms]\)\s.*\)*\s*"', '\1', '') if color == s - " next try: 'g4' key (4-level grayscale) - let color = substitute(s, '".*\sg4\s\+\(.\{-}\)\s*\([ms]\s.*\)*\s*"', '\1', '') + " no 'c' key, try 'g' key (grayscale with more than 4 levels) + let color = substitute(s, '".*\sg\s\+\(.\{-}\)\s*\(\(g4\|[ms]\)\s.*\)*\s*"', '\1', '') if color == s - " finally try 'm' key (mono visual) - let color = substitute(s, '".*\sm\s\+\(.\{-}\)\s*\(s\s.*\)*\s*"', '\1', '') + " next try: 'g4' key (4-level grayscale) + let color = substitute(s, '".*\sg4\s\+\(.\{-}\)\s*\([ms]\s.*\)*\s*"', '\1', '') if color == s - let color = "" + " finally try 'm' key (mono visual) + let color = substitute(s, '".*\sm\s\+\(.\{-}\)\s*\(s\s.*\)*\s*"', '\1', '') + if color == s + let color = "" + endif endif endif endif - endif - " Vim cannot handle RGB codes with more than 6 hex digits - if color =~ '#\x\{10,}$' - let color = substitute(color, '\(\x\x\)\x\x', '\1', 'g') - elseif color =~ '#\x\{7,}$' - let color = substitute(color, '\(\x\x\)\x', '\1', 'g') - " nor with 3 digits - elseif color =~ '#\x\{3}$' - let color = substitute(color, '\(\x\)\(\x\)\(\x\)', '0\10\20\3', '') - endif + " Vim cannot handle RGB codes with more than 6 hex digits + if color =~ '#\x\{10,}$' + let color = substitute(color, '\(\x\x\)\x\x', '\1', 'g') + elseif color =~ '#\x\{7,}$' + let color = substitute(color, '\(\x\x\)\x', '\1', 'g') + " nor with 3 digits + elseif color =~ '#\x\{3}$' + let color = substitute(color, '\(\x\)\(\x\)\(\x\)', '0\10\20\3', '') + endif - " escape meta characters in patterns - let s = escape(s, '/\*^$.~[]') - let chars = escape(chars, '/\*^$.~[]') - - " now create syntax items - " highlight the color string as normal string (no pixel string) - exe 'syn match xpmCol'.n.'Def /'.s.'/ contains=xpmCol'.n.'inDef' - exe 'hi link xpmCol'.n.'Def String' - - " but highlight the first whitespace after chars in its color - exe 'syn match xpmCol'.n.'inDef /"'.chars.'/hs=s+'.(cpp+1).' contained' - exe 'hi link xpmCol'.n.'inDef xpmColor'.n - - " remove the following whitespace from chars - let chars = substitute(chars, '.$', '', '') - - " and create the syntax item contained in the pixel strings - exe 'syn match xpmColor'.n.' /'.chars.'/ contained' - exe 'syn cluster xpmColors add=xpmColor'.n - - " if no color or color = "None" show background - if color == "" || substitute(color, '.*', '\L&', '') == 'none' - exe 'hi xpmColor'.n.' guifg=bg' - exe 'hi xpmColor'.n.' guibg=NONE' - elseif color !~ "'" - exe 'hi xpmColor'.n." guifg='".color."'" - exe 'hi xpmColor'.n." guibg='".color."'" + " escape meta characters in patterns + let s = escape(s, '/\*^$.~[]') + let chars = escape(chars, '/\*^$.~[]') + + " now create syntax items + " highlight the color string as normal string (no pixel string) + exe 'syn match xpmCol' .. n .. 'Def /' .. s .. '/ contains=xpmCol' .. n .. 'inDef' + exe 'hi link xpmCol' .. n .. 'Def String' + + " but highlight the first whitespace after chars in its color + exe 'syn match xpmCol' .. n .. 'inDef /"' .. chars .. '/hs=s+' .. (cpp + 1) .. ' contained' + exe 'hi link xpmCol' .. n .. 'inDef xpmColor' .. n + + " remove the following whitespace from chars + let chars = substitute(chars, '.$', '', '') + + " and create the syntax item contained in the pixel strings + exe 'syn match xpmColor' .. n .. ' /' .. chars .. '/ contained' + exe 'syn cluster xpmColors add=xpmColor' .. n + + " if no color or color = "None" show background + if color == "" || substitute(color, '.*', '\L&', '') == 'none' + exe 'hi xpmColor' .. n .. ' guifg=bg' + exe 'hi xpmColor' .. n .. ' guibg=NONE' + elseif color !~ "'" + exe 'hi xpmColor' .. n .. " guifg='" .. color .. "'" + exe 'hi xpmColor' .. n .. " guibg='" .. color .. "'" + endif + let n += 1 + else + break " no more color string endif - let n = n + 1 - else - break " no more color string endif - endif - let i = i + 1 -endwhile + endfor +endfunction -unlet color chars colors cpp n i s +call s:CreateSyntax() endif " has("gui_running") || has("termguicolors") && &termguicolors diff --git a/runtime/syntax/zig.vim b/runtime/syntax/zig.vim index e09b5e8815..121b0195b0 100644 --- a/runtime/syntax/zig.vim +++ b/runtime/syntax/zig.vim @@ -34,6 +34,7 @@ let s:zig_syntax_keywords = { \ , "usize" \ , "comptime_int" \ , "comptime_float" + \ , "c_char" \ , "c_short" \ , "c_ushort" \ , "c_int" @@ -96,6 +97,7 @@ let s:zig_syntax_keywords = { \ , "@atomicStore" \ , "@bitCast" \ , "@breakpoint" + \ , "@trap" \ , "@alignCast" \ , "@alignOf" \ , "@cDefine" @@ -107,6 +109,7 @@ let s:zig_syntax_keywords = { \ , "@cmpxchgStrong" \ , "@compileError" \ , "@compileLog" + \ , "@constCast" \ , "@ctz" \ , "@popCount" \ , "@divExact" @@ -126,9 +129,10 @@ let s:zig_syntax_keywords = { \ , "@unionInit" \ , "@frameAddress" \ , "@import" + \ , "@inComptime" \ , "@newStackCall" \ , "@asyncCall" - \ , "@intToPtr" + \ , "@ptrFromInt" \ , "@max" \ , "@min" \ , "@memcpy" @@ -145,7 +149,7 @@ let s:zig_syntax_keywords = { \ , "@panic" \ , "@prefetch" \ , "@ptrCast" - \ , "@ptrToInt" + \ , "@intFromPtr" \ , "@rem" \ , "@returnAddress" \ , "@setCold" @@ -169,25 +173,26 @@ let s:zig_syntax_keywords = { \ , "@subWithOverflow" \ , "@intCast" \ , "@floatCast" - \ , "@intToFloat" - \ , "@floatToInt" - \ , "@boolToInt" - \ , "@errSetCast" + \ , "@floatFromInt" + \ , "@intFromFloat" + \ , "@intFromBool" + \ , "@errorCast" \ , "@truncate" \ , "@typeInfo" \ , "@typeName" \ , "@TypeOf" \ , "@atomicRmw" - \ , "@intToError" - \ , "@errorToInt" - \ , "@intToEnum" - \ , "@enumToInt" + \ , "@errorFromInt" + \ , "@intFromError" + \ , "@enumFromInt" + \ , "@intFromEnum" \ , "@setAlignStack" \ , "@frame" \ , "@Frame" \ , "@frameSize" \ , "@bitReverse" \ , "@Vector" + \ , "@volatileCast" \ , "@sin" \ , "@cos" \ , "@tan" @@ -196,7 +201,7 @@ let s:zig_syntax_keywords = { \ , "@log" \ , "@log2" \ , "@log10" - \ , "@fabs" + \ , "@abs" \ , "@floor" \ , "@ceil" \ , "@trunc" diff --git a/runtime/syntax/zimbu.vim b/runtime/syntax/zimbu.vim index 1a7a485e6f..472559520e 100644 --- a/runtime/syntax/zimbu.vim +++ b/runtime/syntax/zimbu.vim @@ -1,7 +1,8 @@ " Vim syntax file " Language: Zimbu -" Maintainer: Bram Moolenaar -" Last Change: 2014 Nov 23 +" Maintainer: The·Vim·Project·<https://github.com/vim/vim> +" Last Change: 2023 Aug 13 +" Note: Zimbu seems to be dead :( if exists("b:current_syntax") finish diff --git a/runtime/syntax/zserio.vim b/runtime/syntax/zserio.vim new file mode 100644 index 0000000000..5459915c01 --- /dev/null +++ b/runtime/syntax/zserio.vim @@ -0,0 +1,112 @@ +" Vim syntax file +" Language: Zserio +" Maintainer: Dominique Pellé <dominique.pelle@gmail.com> +" Last Change: 2023 Jun 18 +" +" Zserio is a serialization schema language for modeling binary +" data types, bitstreams or file formats. Based on the zserio +" language it is possible to automatically generate encoders and +" decoders for a given schema in various target languages +" (e.g. Java, C++, Python). +" +" Zserio is an evolution of the DataScript language. +" +" For more information, see: +" - http://zserio.org/ +" - https://github.com/ndsev/zserio + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:keepcpo= &cpo +set cpo&vim + +syn case match + +syn keyword zserioPackage import package zserio_compatibility_version +syn keyword zserioType bit bool string +syn keyword zserioType int int8 int16 int32 int64 +syn keyword zserioType uint8 uint16 uint32 uint64 +syn keyword zserioType float16 float32 float64 +syn keyword zserioType varint varint16 varint32 varint64 +syn keyword zserioType varuint varsize varuint16 varuint32 varuint64 +syn keyword zserioAlign align +syn keyword zserioLabel case default +syn keyword zserioConditional if condition +syn keyword zserioBoolean true false +syn keyword zserioCompound struct union choice on enum bitmask subtype +syn keyword zserioKeyword function return +syn keyword zserioOperator lengthof valueof instanceof numbits isset +syn keyword zserioRpc service pubsub topic publish subscribe +syn keyword zserioRule rule_group rule +syn keyword zserioStorageClass const implicit packed instantiate +syn keyword zserioTodo contained TODO FIXME XXX +syn keyword zserioSql sql sql_table sql_database sql_virtual sql_without_rowid +syn keyword zserioSql explicit using + +" zserioCommentGroup allows adding matches for special things in comments. +syn cluster zserioCommentGroup contains=zserioTodo + +syn match zserioOffset display "^\s*[a-zA-Z_:\.][a-zA-Z0-9_:\.]*\s*:" + +syn match zserioNumber display "\<\d\+\>" +syn match zserioNumberHex display "\<0[xX]\x\+\>" +syn match zserioNumberBin display "\<[01]\+[bB]\>" contains=zserioBinaryB +syn match zserioBinaryB display contained "[bB]\>" +syn match zserioOctal display "\<0\o\+\>" contains=zserioOctalZero +syn match zserioOctalZero display contained "\<0" + +syn match zserioOctalError display "\<0\o*[89]\d*\>" + +syn match zserioCommentError display "\*/" +syn match zserioCommentStartError display "/\*"me=e-1 contained + +syn region zserioCommentL + \ start="//" skip="\\$" end="$" keepend + \ contains=@zserioCommentGroup,@Spell +syn region zserioComment + \ matchgroup=zserioCommentStart start="/\*" end="\*/" + \ contains=@zserioCommentGroup,zserioCommentStartError,@Spell extend + +syn region zserioString + \ start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell + +syn sync ccomment zserioComment + +" Define the default highlighting. +hi def link zserioType Type +hi def link zserioEndian StorageClass +hi def link zserioStorageClass StorageClass +hi def link zserioAlign Label +hi def link zserioLabel Label +hi def link zserioOffset Label +hi def link zserioSql PreProc +hi def link zserioCompound Structure +hi def link zserioConditional Conditional +hi def link zserioBoolean Boolean +hi def link zserioKeyword Statement +hi def link zserioRpc Keyword +hi def link zserioRule Keyword +hi def link zserioString String +hi def link zserioNumber Number +hi def link zserioNumberBin Number +hi def link zserioBinaryB Special +hi def link zserioOctal Number +hi def link zserioOctalZero Special +hi def link zserioOctalError Error +hi def link zserioNumberHex Number +hi def link zserioTodo Todo +hi def link zserioOperator Operator +hi def link zserioPackage Include +hi def link zserioCommentError Error +hi def link zserioCommentStartError Error +hi def link zserioCommentStart zserioComment +hi def link zserioCommentL zserioComment +hi def link zserioComment Comment + +let b:current_syntax = "zserio" + +let &cpo = s:keepcpo +unlet s:keepcpo diff --git a/runtime/syntax/zsh.vim b/runtime/syntax/zsh.vim index 69671c59ca..084f8cdb41 100644 --- a/runtime/syntax/zsh.vim +++ b/runtime/syntax/zsh.vim @@ -88,7 +88,7 @@ syn match zshOperator '||\|&&\|;\|&!\=' syn match zshRedir '\d\=\(<<<\|<&\s*[0-9p-]\=\|<>\?\)' " >, >>, and variants. syn match zshRedir '\d\=\(>&\s*[0-9p-]\=\|&>>\?\|>>\?&\?\)[|!]\=' - " | and |&, but only if it's not preceeded or + " | and |&, but only if it's not preceded or " followed by a | to avoid matching ||. syn match zshRedir '|\@1<!|&\=|\@!' |