diff options
Diffstat (limited to 'runtime/syntax')
408 files changed, 60411 insertions, 0 deletions
diff --git a/runtime/syntax/2html.vim b/runtime/syntax/2html.vim new file mode 100644 index 000000000..2afc09f93 --- /dev/null +++ b/runtime/syntax/2html.vim @@ -0,0 +1,411 @@ +" Vim syntax support file +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last Change: 2004 May 31 +" (modified by David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>) +" (XHTML support by Panagiotis Issaris <takis@lumumba.luc.ac.be>) + +" Transform a file into HTML, using the current syntax highlighting. + +" Number lines when explicitely requested or when `number' is set +if exists("html_number_lines") + let s:numblines = html_number_lines +else + let s:numblines = &number +endif + +" When not in gui we can only guess the colors. +if has("gui_running") + let s:whatterm = "gui" +else + let s:whatterm = "cterm" + if &t_Co == 8 + let s:cterm_color0 = "#808080" + let s:cterm_color1 = "#ff6060" + let s:cterm_color2 = "#00ff00" + let s:cterm_color3 = "#ffff00" + let s:cterm_color4 = "#8080ff" + let s:cterm_color5 = "#ff40ff" + let s:cterm_color6 = "#00ffff" + let s:cterm_color7 = "#ffffff" + else + let s:cterm_color0 = "#000000" + let s:cterm_color1 = "#c00000" + let s:cterm_color2 = "#008000" + let s:cterm_color3 = "#804000" + let s:cterm_color4 = "#0000c0" + let s:cterm_color5 = "#c000c0" + let s:cterm_color6 = "#008080" + let s:cterm_color7 = "#c0c0c0" + let s:cterm_color8 = "#808080" + let s:cterm_color9 = "#ff6060" + let s:cterm_color10 = "#00ff00" + let s:cterm_color11 = "#ffff00" + let s:cterm_color12 = "#8080ff" + let s:cterm_color13 = "#ff40ff" + let s:cterm_color14 = "#00ffff" + let s:cterm_color15 = "#ffffff" + endif +endif + +" Return good color specification: in GUI no transformation is done, in +" terminal return RGB values of known colors and empty string on unknown +if s:whatterm == "gui" + function! s:HtmlColor(color) + return a:color + endfun +else + function! s:HtmlColor(color) + if exists("s:cterm_color" . a:color) + execute "return s:cterm_color" . a:color + else + return "" + endif + endfun +endif + +if !exists("html_use_css") + " Return opening HTML tag for given highlight id + function! s:HtmlOpening(id) + let a = "" + if synIDattr(a: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 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 ) . '">' + else + let x = s:HtmlColor(synIDattr(a:id, "bg#", s:whatterm)) + if x != "" | let a = a . '<span style="background-color: ' . x . '">' | endif + let x = s:HtmlColor(synIDattr(a: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 + return a + endfun + + " Return closing HTML tag for given highlight id + function s:HtmlClosing(id) + 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>' + 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 != "" | let a = a . '</span>' | endif + endif + return a + endfun +endif + +" Return CSS style describing given highlight id (can be empty) +function! s:CSS1(id) + let a = "" + if synIDattr(a: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 ) . "; " + 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)) + if x != "" | let a = a . "background-color: " . x . "; " | 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 + return a +endfun + +" Figure out proper MIME charset from the 'encoding' option. +if exists("html_use_encoding") + let s:html_encoding = html_use_encoding +else + let s:vim_encoding = &encoding + if s:vim_encoding =~ '^8bit\|^2byte' + let s:vim_encoding = substitute(s:vim_encoding, '^8bit-\|^2byte-', '', '') + endif + if s:vim_encoding == 'latin1' + let s:html_encoding = 'iso-8859-1' + elseif s:vim_encoding =~ "^cp12" + let s:html_encoding = substitute(s:vim_encoding, 'cp', 'windows-', '') + elseif s:vim_encoding == 'sjis' + let s:html_encoding = 'Shift_JIS' + elseif s:vim_encoding == 'euc-cn' + let s:html_encoding = 'GB_2312-80' + elseif s:vim_encoding == 'euc-tw' + let s:html_encoding = "" + elseif s:vim_encoding =~ '^euc\|^iso\|^koi' + let s:html_encoding = substitute(s:vim_encoding, '.*', '\U\0', '') + elseif s:vim_encoding == 'cp949' + let s:html_encoding = 'KS_C_5601-1987' + elseif s:vim_encoding == 'cp936' + let s:html_encoding = 'GBK' + elseif s:vim_encoding =~ '^ucs\|^utf' + let s:html_encoding = 'UTF-8' + else + let s:html_encoding = "" + endif +endif + + +" Set some options to make it work faster. +" Expand tabs in original buffer to get 'tabstop' correctly used. +" Don't report changes for :substitute, there will be many of them. +let s:old_title = &title +let s:old_icon = &icon +let s:old_et = &l:et +let s:old_report = &report +let s:old_search = @/ +set notitle noicon +setlocal et +set report=1000000 + +" Split window to create a buffer with the HTML file. +let s:orgbufnr = winbufnr(0) +if expand("%") == "" + new Untitled.html +else + new %.html +endif +let s:newwin = winnr() +let s:orgwin = bufwinnr(s:orgbufnr) + +set modifiable +%d +let s:old_paste = &paste +set paste +let s:old_magic = &magic +set magic + +if exists("use_xhtml") + exe "normal! a<?xml version=\"1.0\"?>\n\e" + let tag_close = '/>' +else + let tag_close = '>' +endif + +" HTML header, with the title and generator ;-). Left free space for the CSS, +" to be filled at the end. +exe "normal! a<html>\n<head>\n<title>\e" +exe "normal! a" . expand("%:p:~") . "</title>\n\e" +exe "normal! a<meta name=\"Generator\" content=\"Vim/" . v:version/100 . "." . v:version %100 . '"' . tag_close . "\n\e" +if s:html_encoding != "" + exe "normal! a<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:html_encoding . '"' . tag_close . "\n\e" +endif +if exists("html_use_css") + exe "normal! a<style type=\"text/css\">\n<!--\n-->\n</style>\n\e" +endif +if exists("html_no_pre") + exe "normal! a</head>\n<body>\n\e" +else + exe "normal! a</head>\n<body>\n<pre>\n\e" +endif + +exe s:orgwin . "wincmd w" + +" List of all id's +let s:idlist = "," + +let s:expandedtab = ' ' +while strlen(s:expandedtab) < &ts + let s:expandedtab = s:expandedtab . ' ' +endwhile + +" Loop over all lines in the original text. +" Use html_start_line and html_end_line if they are set. +if exists("html_start_line") + let s:lnum = html_start_line + if s:lnum < 1 || s:lnum > line("$") + let s:lnum = 1 + endif +else + let s:lnum = 1 +endif +if exists("html_end_line") + let s:end = html_end_line + if s:end < s:lnum || s:end > line("$") + let s:end = line("$") + endif +else + let s:end = line("$") +endif + +while s:lnum <= s:end + + " Get the current line + let s:line = getline(s:lnum) + let s:len = strlen(s:line) + let s:new = "" + + if s:numblines + let s:new = '<span class="lnr">' . strpart(' ', 0, strlen(line("$")) - strlen(s:lnum)) . s:lnum . '</span> ' + endif + + " Loop over each character in the line + let s:col = 1 + while s:col <= s:len + let s:startcol = s:col " The start column for processing text + let s:id = synID(s:lnum, s:col, 1) + let s:col = s:col + 1 + " Speed loop (it's small - that's the trick) + " Go along till we find a change in synID + while s:col <= s:len && s:id == synID(s:lnum, s:col, 1) | let s:col = s:col + 1 | endwhile + + " Output the text with the same synID, with class set to {s:id_name} + let s:id = synIDtrans(s:id) + let s:id_name = synIDattr(s:id, "name", s:whatterm) + let s:new = s:new . '<span class="' . s:id_name . '">' . substitute(substitute(substitute(substitute(substitute(strpart(s:line, s:startcol - 1, s:col - s:startcol), '&', '\&', 'g'), '<', '\<', 'g'), '>', '\>', 'g'), '"', '\"', 'g'), "\x0c", '<hr class="PAGE-BREAK">', 'g') . '</span>' + " Add the class to class list if it's not there yet + if stridx(s:idlist, "," . s:id . ",") == -1 + let s:idlist = s:idlist . s:id . "," + endif + + if s:col > s:len + break + endif + endwhile + + " Expand tabs + let s:pad=0 + let s:start = 0 + let s:idx = stridx(s:line, "\t") + while s:idx >= 0 + let s:i = &ts - ((s:start + s:pad + s:idx) % &ts) + let s:new = substitute(s:new, '\t', strpart(s:expandedtab, 0, s:i), '') + let s:pad = s:pad + s:i - 1 + let s:start = s:start + s:idx + 1 + let s:idx = stridx(strpart(s:line, s:start), "\t") + endwhile + + if exists("html_no_pre") + if exists("use_xhtml") + let s:new = substitute(s:new, ' ', '\ \ ', 'g') . '<br/>' + else + let s:new = substitute(s:new, ' ', '\ \ ', 'g') . '<br>' + endif + endif + exe s:newwin . "wincmd w" + exe "normal! a" . strtrans(s:new) . "\n\e" + exe s:orgwin . "wincmd w" + let s:lnum = s:lnum + 1 + + +endwhile +" Finish with the last line +exe s:newwin . "wincmd w" +if exists("html_no_pre") + exe "normal! a\n</body>\n</html>\e" +else + exe "normal! a</pre>\n</body>\n</html>\e" +endif + + +" Now, when we finally know which, we define the colors and styles +if exists("html_use_css") + 1;/<style type="text/+1 +endif + +" Find out the background and foreground color. +let s:fgc = s:HtmlColor(synIDattr(hlID("Normal"), "fg#", s:whatterm)) +let s:bgc = s:HtmlColor(synIDattr(hlID("Normal"), "bg#", s:whatterm)) +if s:fgc == "" + let s:fgc = ( &background == "dark" ? "#ffffff" : "#000000" ) +endif +if s:bgc == "" + let s:bgc = ( &background == "dark" ? "#000000" : "#ffffff" ) +endif + +" Normal/global attributes +" For Netscape 4, set <body> attributes too, though, strictly speaking, it's +" incorrect. +if exists("html_use_css") + if exists("html_no_pre") + execute "normal! A\nbody { color: " . s:fgc . "; background-color: " . s:bgc . "; font-family: Courier, monospace; }\e" + else + execute "normal! A\npre { color: " . s:fgc . "; background-color: " . s:bgc . "; }\e" + yank + put + execute "normal! ^cwbody\e" + endif +else + if exists("html_no_pre") + execute '%s:<body>:<body ' . 'bgcolor="' . s:bgc . '" text="' . s:fgc . '" style="font-family\: Courier, monospace;">' + else + execute '%s:<body>:<body ' . 'bgcolor="' . s:bgc . '" text="' . s:fgc . '">' + endif +endif + +" Line numbering attributes +if s:numblines + if exists("html_use_css") + execute "normal! A\n.lnr { " . s:CSS1(hlID("LineNr")) . "}\e" + else + execute '%s+<span class="lnr">\([^<]*\)</span>+' . s:HtmlOpening(hlID("LineNr")) . '\1' . s:HtmlClosing(hlID("LineNr")) . '+g' + endif +endif + +" Gather attributes for all other classes +let s:idlist = strpart(s:idlist, 1) +while s:idlist != "" + let s:attr = "" + let s:col = stridx(s:idlist, ",") + let s:id = strpart(s:idlist, 0, s:col) + let s:idlist = strpart(s:idlist, s:col + 1) + let s:attr = s:CSS1(s:id) + let s:id_name = synIDattr(s:id, "name", s:whatterm) + " If the class has some attributes, export the style, otherwise DELETE all + " its occurences to make the HTML shorter + if s:attr != "" + if exists("html_use_css") + execute "normal! A\n." . s:id_name . " { " . s:attr . "}" + else + execute '%s+<span class="' . s:id_name . '">\([^<]*\)</span>+' . s:HtmlOpening(s:id) . '\1' . s:HtmlClosing(s:id) . '+g' + endif + else + execute '%s+<span class="' . s:id_name . '">\([^<]*\)</span>+\1+g' + if exists("html_use_css") + 1;/<style type="text/+1 + endif + endif +endwhile + +" Add hyperlinks +%s+\(http://\S\{-}\)\(\([.,;:}]\=\(\s\|$\)\)\|[\\"'<>]\|>\|<\)+<A HREF="\1">\1</A>\2+ge + +" The DTD +if exists("html_use_css") + exe "normal! gg0i<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\e" +endif + +" Cleanup +%s:\s\+$::e + +" Restore old settings +let &report = s:old_report +let &title = s:old_title +let &icon = s:old_icon +let &paste = s:old_paste +let &magic = s:old_magic +let @/ = s:old_search +exe s:orgwin . "wincmd w" +let &l:et = s:old_et +exe s:newwin . "wincmd w" + +" Save a little bit of memory (worth doing?) +unlet s:old_et s:old_paste s:old_icon s:old_report s:old_title s:old_search +unlet s:whatterm s:idlist s:lnum s:end s:fgc s:bgc s:old_magic +unlet! s:col s:id s:attr s:len s:line s:new s:did_retab s:numblines +unlet s:orgwin s:newwin s:orgbufnr +delfunc s:HtmlColor +delfunc s:CSS1 +if !exists("html_use_css") + delfunc s:HtmlOpening + delfunc s:HtmlClosing +endif diff --git a/runtime/syntax/README.txt b/runtime/syntax/README.txt new file mode 100644 index 000000000..d88bd7ed5 --- /dev/null +++ b/runtime/syntax/README.txt @@ -0,0 +1,38 @@ +This directory contains Vim scripts for syntax highlighting. + +These scripts are not for a language, but are used by Vim itself: + +syntax.vim Used for the ":syntax on" command. Uses synload.vim. + +manual.vim Used for the ":syntax manual" command. Uses synload.vim. + +synload.vim Contains autocommands to load a language file when a certain + file name (extension) is used. And sets up the Syntax menu + for the GUI. + +nosyntax.vim Used for the ":syntax off" command. Undo the loading of + synload.vim. + + +A few special files: + +2html.vim Converts any highlighted file to HTML (GUI only). +colortest.vim Check for color names and actual color on screen. +hitest.vim View the current highlight settings. +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". + +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. + +If you are the maintainer of a syntax file and make improvements, send the new +version to Bram@vim.org. + +For further info see ":help syntax" in Vim. diff --git a/runtime/syntax/a65.vim b/runtime/syntax/a65.vim new file mode 100644 index 000000000..dbf1cdb46 --- /dev/null +++ b/runtime/syntax/a65.vim @@ -0,0 +1,166 @@ +" Vim syntax file +" Language: xa 6502 cross assembler +" Maintainer: Clemens Kirchgatterer <clemens@thf.ath.cx> +" Last Change: 2003 May 03 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" Opcodes +syn match a65Opcode "\<PHP\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<PLA\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<PLX\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<PLY\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<SEC\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<CLD\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<SED\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<CLI\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BVC\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BVS\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BCS\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BCC\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<DEY\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<DEC\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<CMP\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<CPX\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BIT\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<ROL\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<ROR\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<ASL\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<TXA\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<TYA\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<TSX\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<TXS\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<LDA\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<LDX\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<LDY\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<STA\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<PLP\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BRK\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<RTI\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<NOP\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<SEI\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<CLV\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<PHA\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<PHX\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BRA\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<JMP\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<JSR\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<RTS\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<CPY\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BNE\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BEQ\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BMI\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<LSR\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<INX\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<INY\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<INC\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<ADC\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<SBC\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<AND\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<ORA\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<STX\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<STY\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<STZ\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<EOR\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<DEX\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BPL\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<CLC\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<PHY\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<TRB\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BBR\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<BBS\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<RMB\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<SMB\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<TAY\($\|\s\)" nextgroup=a65Address +syn match a65Opcode "\<TAX\($\|\s\)" nextgroup=a65Address + +" Addresses +syn match a65Address "\s*!\=$[0-9A-F]\{2}\($\|\s\)" +syn match a65Address "\s*!\=$[0-9A-F]\{4}\($\|\s\)" +syn match a65Address "\s*!\=$[0-9A-F]\{2},X\($\|\s\)" +syn match a65Address "\s*!\=$[0-9A-F]\{4},X\($\|\s\)" +syn match a65Address "\s*!\=$[0-9A-F]\{2},Y\($\|\s\)" +syn match a65Address "\s*!\=$[0-9A-F]\{4},Y\($\|\s\)" +syn match a65Address "\s*($[0-9A-F]\{2})\($\|\s\)" +syn match a65Address "\s*($[0-9A-F]\{4})\($\|\s\)" +syn match a65Address "\s*($[0-9A-F]\{2},X)\($\|\s\)" +syn match a65Address "\s*($[0-9A-F]\{2}),Y\($\|\s\)" + +" Numbers +syn match a65Number "#\=[0-9]*\>" +syn match a65Number "#\=$[0-9A-F]*\>" +syn match a65Number "#\=&[0-7]*\>" +syn match a65Number "#\=%[01]*\>" + +syn case match + +" Types +syn match a65Type "\(^\|\s\)\.byt\($\|\s\)" +syn match a65Type "\(^\|\s\)\.word\($\|\s\)" +syn match a65Type "\(^\|\s\)\.asc\($\|\s\)" +syn match a65Type "\(^\|\s\)\.dsb\($\|\s\)" +syn match a65Type "\(^\|\s\)\.fopt\($\|\s\)" +syn match a65Type "\(^\|\s\)\.text\($\|\s\)" +syn match a65Type "\(^\|\s\)\.data\($\|\s\)" +syn match a65Type "\(^\|\s\)\.bss\($\|\s\)" +syn match a65Type "\(^\|\s\)\.zero\($\|\s\)" +syn match a65Type "\(^\|\s\)\.align\($\|\s\)" + +" Blocks +syn match a65Section "\(^\|\s\)\.(\($\|\s\)" +syn match a65Section "\(^\|\s\)\.)\($\|\s\)" + +" Strings +syn match a65String "\".*\"" + +" Programm Counter +syn region a65PC start="\*=" end="\>" keepend + +" HI/LO Byte +syn region a65HiLo start="#[<>]" end="$\|\s" contains=a65Comment keepend + +" Comments +syn keyword a65Todo TODO XXX FIXME BUG contained +syn match a65Comment ";.*"hs=s+1 contains=a65Todo +syn region a65Comment start="/\*" end="\*/" contains=a65Todo,a65Comment + +" Preprocessor +syn region a65PreProc start="^#" end="$" contains=a65Comment,a65Continue +syn match a65End excludenl /end$/ contained +syn match a65Continue "\\$" contained + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_a65_syntax_inits") + if version < 508 + let did_a65_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink a65Section Special + HiLink a65Address Special + HiLink a65Comment Comment + HiLink a65PreProc PreProc + HiLink a65Number Number + HiLink a65String String + HiLink a65Type Statement + HiLink a65Opcode Type + HiLink a65PC Error + HiLink a65Todo Todo + HiLink a65HiLo Number + + delcommand HiLink +endif + +let b:current_syntax = "a65" diff --git a/runtime/syntax/aap.vim b/runtime/syntax/aap.vim new file mode 100644 index 000000000..8399a4d22 --- /dev/null +++ b/runtime/syntax/aap.vim @@ -0,0 +1,158 @@ +" Vim syntax file +" Language: A-A-P recipe +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last Change: 2004 Jun 13 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn include @aapPythonScript syntax/python.vim + +syn match aapVariable /$[-+?*="'\\!]*[a-zA-Z0-9_.]*/ +syn match aapVariable /$[-+?*="'\\!]*([a-zA-Z0-9_.]*)/ +syn keyword aapTodo contained TODO Todo +syn match aapString +'[^']\{-}'+ +syn match aapString +"[^"]\{-}"+ + +syn match aapCommand '^\s*:action\>' +syn match aapCommand '^\s*:add\>' +syn match aapCommand '^\s*:addall\>' +syn match aapCommand '^\s*:asroot\>' +syn match aapCommand '^\s*:assertpkg\>' +syn match aapCommand '^\s*:attr\>' +syn match aapCommand '^\s*:attribute\>' +syn match aapCommand '^\s*:autodepend\>' +syn match aapCommand '^\s*:buildcheck\>' +syn match aapCommand '^\s*:cd\>' +syn match aapCommand '^\s*:chdir\>' +syn match aapCommand '^\s*:checkin\>' +syn match aapCommand '^\s*:checkout\>' +syn match aapCommand '^\s*:child\>' +syn match aapCommand '^\s*:chmod\>' +syn match aapCommand '^\s*:commit\>' +syn match aapCommand '^\s*:commitall\>' +syn match aapCommand '^\s*:conf\>' +syn match aapCommand '^\s*:copy\>' +syn match aapCommand '^\s*:del\>' +syn match aapCommand '^\s*:deldir\>' +syn match aapCommand '^\s*:delete\>' +syn match aapCommand '^\s*:delrule\>' +syn match aapCommand '^\s*:dll\>' +syn match aapCommand '^\s*:do\>' +syn match aapCommand '^\s*:error\>' +syn match aapCommand '^\s*:execute\>' +syn match aapCommand '^\s*:exit\>' +syn match aapCommand '^\s*:export\>' +syn match aapCommand '^\s*:fetch\>' +syn match aapCommand '^\s*:fetchall\>' +syn match aapCommand '^\s*:filetype\>' +syn match aapCommand '^\s*:finish\>' +syn match aapCommand '^\s*:global\>' +syn match aapCommand '^\s*:import\>' +syn match aapCommand '^\s*:include\>' +syn match aapCommand '^\s*:installpkg\>' +syn match aapCommand '^\s*:lib\>' +syn match aapCommand '^\s*:local\>' +syn match aapCommand '^\s*:log\>' +syn match aapCommand '^\s*:ltlib\>' +syn match aapCommand '^\s*:mkdir\>' +syn match aapCommand '^\s*:mkdownload\>' +syn match aapCommand '^\s*:move\>' +syn match aapCommand '^\s*:pass\>' +syn match aapCommand '^\s*:popdir\>' +syn match aapCommand '^\s*:produce\>' +syn match aapCommand '^\s*:program\>' +syn match aapCommand '^\s*:progsearch\>' +syn match aapCommand '^\s*:publish\>' +syn match aapCommand '^\s*:publishall\>' +syn match aapCommand '^\s*:pushdir\>' +syn match aapCommand '^\s*:quit\>' +syn match aapCommand '^\s*:recipe\>' +syn match aapCommand '^\s*:refresh\>' +syn match aapCommand '^\s*:remove\>' +syn match aapCommand '^\s*:removeall\>' +syn match aapCommand '^\s*:require\>' +syn match aapCommand '^\s*:revise\>' +syn match aapCommand '^\s*:reviseall\>' +syn match aapCommand '^\s*:route\>' +syn match aapCommand '^\s*:rule\>' +syn match aapCommand '^\s*:start\>' +syn match aapCommand '^\s*:symlink\>' +syn match aapCommand '^\s*:sys\>' +syn match aapCommand '^\s*:sysdepend\>' +syn match aapCommand '^\s*:syspath\>' +syn match aapCommand '^\s*:system\>' +syn match aapCommand '^\s*:tag\>' +syn match aapCommand '^\s*:tagall\>' +syn match aapCommand '^\s*:toolsearch\>' +syn match aapCommand '^\s*:totype\>' +syn match aapCommand '^\s*:touch\>' +syn match aapCommand '^\s*:tree\>' +syn match aapCommand '^\s*:unlock\>' +syn match aapCommand '^\s*:update\>' +syn match aapCommand '^\s*:usetool\>' +syn match aapCommand '^\s*:variant\>' +syn match aapCommand '^\s*:verscont\>' + +syn match aapCommand '^\s*:print\>' nextgroup=aapPipeEnd +syn match aapPipeCmd '\s*:print\>' nextgroup=aapPipeEnd contained +syn match aapCommand '^\s*:cat\>' nextgroup=aapPipeEnd +syn match aapPipeCmd '\s*:cat\>' nextgroup=aapPipeEnd contained +syn match aapCommand '^\s*:syseval\>' nextgroup=aapPipeEnd +syn match aapPipeCmd '\s*:syseval\>' nextgroup=aapPipeEnd contained +syn match aapPipeCmd '\s*:assign\>' contained +syn match aapCommand '^\s*:eval\>' nextgroup=aapPipeEnd +syn match aapPipeCmd '\s*:eval\>' nextgroup=aapPipeEndPy contained +syn match aapPipeCmd '\s*:tee\>' nextgroup=aapPipeEnd contained +syn match aapPipeCmd '\s*:log\>' nextgroup=aapPipeEnd contained +syn match aapPipeEnd '[^|]*|' nextgroup=aapPipeCmd contained skipnl +syn match aapPipeEndPy '[^|]*|' nextgroup=aapPipeCmd contained skipnl contains=@aapPythonScript +syn match aapPipeStart '^\s*|' nextgroup=aapPipeCmd + +" +" A Python line starts with @. Can be continued with a trailing backslash. +syn region aapPythonRegion start="\s*@" skip='\\$' end=+$+ contains=@aapPythonScript keepend +" +" A Python block starts with ":python" and continues so long as the indent is +" bigger. +syn region aapPythonRegion matchgroup=aapCommand start="\z(\s*\):python" skip='\n\z1\s\|\n\s*\n' end=+$+ contains=@aapPythonScript + +" A Python expression is enclosed in backticks. +syn region aapPythonRegion start="`" skip="``" end="`" contains=@aapPythonScript + +" TODO: There is something wrong with line continuation. +syn match aapComment '#.*' contains=aapTodo +syn match aapComment '#.*\(\\\n.*\)' contains=aapTodo + +syn match aapSpecial '$#' +syn match aapSpecial '$\$' +syn match aapSpecial '$(.)' + +" A heredoc assignment. +syn region aapHeredoc start="^\s*\k\+\s*$\=+\=?\=<<\s*\z(\S*\)"hs=e+1 end="^\s*\z1\s*$"he=s-1 + +" Syncing is needed for ":python" and "VAR << EOF". Don't use Python syncing +syn sync clear +syn sync fromstart + +" The default highlighting. +hi def link aapTodo Todo +hi def link aapString String +hi def link aapComment Comment +hi def link aapSpecial Special +hi def link aapVariable Identifier +hi def link aapPipeCmd aapCommand +hi def link aapCommand Statement +hi def link aapHeredoc Constant + +let b:current_syntax = "aap" + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8 diff --git a/runtime/syntax/abaqus.vim b/runtime/syntax/abaqus.vim new file mode 100644 index 000000000..cf4b0828f --- /dev/null +++ b/runtime/syntax/abaqus.vim @@ -0,0 +1,48 @@ +" Vim syntax file +" Language: Abaqus finite element input file (www.hks.com) +" Maintainer: Carl Osterwisch <osterwischc@asme.org> +" Last Change: 2002 Feb 24 +" Remark: Huge improvement in folding performance--see filetype plugin + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Abaqus comment lines +syn match abaqusComment "^\*\*.*$" + +" Abaqus keyword lines +syn match abaqusKeywordLine "^\*\h.*" contains=abaqusKeyword,abaqusParameter,abaqusValue display +syn match abaqusKeyword "^\*\h[^,]*" contained display +syn match abaqusParameter ",[^,=]\+"lc=1 contained display +syn match abaqusValue "=\s*[^,]*"lc=1 contained display + +" Illegal syntax +syn match abaqusBadLine "^\s\+\*.*" display + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_abaqus_syn_inits") + if version < 508 + let did_abaqus_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + HiLink abaqusComment Comment + HiLink abaqusKeyword Statement + HiLink abaqusParameter Identifier + HiLink abaqusValue Constant + HiLink abaqusBadLine Error + + delcommand HiLink +endif + +let b:current_syntax = "abaqus" diff --git a/runtime/syntax/abc.vim b/runtime/syntax/abc.vim new file mode 100644 index 000000000..3dc098e73 --- /dev/null +++ b/runtime/syntax/abc.vim @@ -0,0 +1,64 @@ +" Vim syntax file +" Language: abc music notation language +" Maintainer: James Allwright <J.R.Allwright@westminster.ac.uk> +" URL: http://perun.hscs.wmin.ac.uk/~jra/vim/syntax/abc.vim +" Last Change: 27th April 2001 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" tags +syn region abcGuitarChord start=+"[A-G]+ end=+"+ contained +syn match abcNote "z[1-9]*[0-9]*" contained +syn match abcNote "z[1-9]*[0-9]*/[248]\=" contained +syn match abcNote "[=_\^]\{,2}[A-G],*[1-9]*[0-9]*" contained +syn match abcNote "[=_\^]\{,2}[A-G],*[1-9]*[0-9]*/[248]\=" contained +syn match abcNote "[=_\^]\{,2}[a-g]'*[1-9]*[0-9]*" contained +syn match abcNote "[=_\^]\{,2}[a-g]'*[1-9]*[0-9]*/[248]\=" contained +syn match abcBar "|" contained +syn match abcBar "[:|][:|]" contained +syn match abcBar ":|2" contained +syn match abcBar "|1" contained +syn match abcBar "\[[12]" contained +syn match abcTuple "([1-9]\+:\=[0-9]*:\=[0-9]*" contained +syn match abcBroken "<\|<<\|<<<\|>\|>>\|>>>" contained +syn match abcTie "-" +syn match abcHeadField "^[A-EGHIK-TVWXZ]:.*$" contained +syn match abcBodyField "^[KLMPQWVw]:.*$" contained +syn region abcHeader start="^X:" end="^K:.*$" contained contains=abcHeadField,abcComment keepend +syn region abcTune start="^X:" end="^ *$" contains=abcHeader,abcComment,abcBar,abcNote,abcBodyField,abcGuitarChord,abcTuple,abcBroken,abcTie +syn match abcComment "%.*$" + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_abc_syn_inits") + if version < 508 + let did_abc_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink abcComment Comment + HiLink abcHeadField Type + HiLink abcBodyField Special + HiLink abcBar Statement + HiLink abcTuple Statement + HiLink abcBroken Statement + HiLink abcTie Statement + HiLink abcGuitarChord Identifier + HiLink abcNote Constant + + delcommand HiLink +endif + +let b:current_syntax = "abc" + +" vim: ts=4 diff --git a/runtime/syntax/abel.vim b/runtime/syntax/abel.vim new file mode 100644 index 000000000..fde9be3dd --- /dev/null +++ b/runtime/syntax/abel.vim @@ -0,0 +1,167 @@ +" Vim syntax file +" Language: ABEL +" Maintainer: John Cook <john.cook@kla-tencor.com> +" Last Change: 2001 Sep 2 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" this language is oblivious to case +syn case ignore + +" A bunch of keywords +syn keyword abelHeader module title device options +syn keyword abelSection declarations equations test_vectors end +syn keyword abelDeclaration state truth_table state_diagram property +syn keyword abelType pin node attribute constant macro library + +syn keyword abelTypeId com reg neg pos buffer dc reg_d reg_t contained +syn keyword abelTypeId reg_sr reg_jk reg_g retain xor invert contained + +syn keyword abelStatement when then else if with endwith case endcase +syn keyword abelStatement fuses expr trace + +" option to omit obsolete statements +if exists("abel_obsolete_ok") + syn keyword abelStatement enable flag in +else + syn keyword abelError enable flag in +endif + +" directives +syn match abelDirective "@alternate" +syn match abelDirective "@standard" +syn match abelDirective "@const" +syn match abelDirective "@dcset" +syn match abelDirective "@include" +syn match abelDirective "@page" +syn match abelDirective "@radix" +syn match abelDirective "@repeat" +syn match abelDirective "@irp" +syn match abelDirective "@expr" +syn match abelDirective "@if" +syn match abelDirective "@ifb" +syn match abelDirective "@ifnb" +syn match abelDirective "@ifdef" +syn match abelDirective "@ifndef" +syn match abelDirective "@ifiden" +syn match abelDirective "@ifniden" + +syn keyword abelTodo contained TODO XXX FIXME + +" wrap up type identifiers to differentiate them from normal strings +syn region abelSpecifier start='istype' end=';' contains=abelTypeIdChar,abelTypeId,abelTypeIdEnd keepend +syn match abelTypeIdChar "[,']" contained +syn match abelTypeIdEnd ";" contained + +" string contstants and special characters within them +syn match abelSpecial contained "\\['\\]" +syn region abelString start=+'+ skip=+\\"+ end=+'+ contains=abelSpecial + +" valid integer number formats (decimal, binary, octal, hex) +syn match abelNumber "\<[-+]\=[0-9]\+\>" +syn match abelNumber "\^d[0-9]\+\>" +syn match abelNumber "\^b[01]\+\>" +syn match abelNumber "\^o[0-7]\+\>" +syn match abelNumber "\^h[0-9a-f]\+\>" + +" special characters +" (define these after abelOperator so ?= overrides ?) +syn match abelSpecialChar "[\[\](){},;:?]" + +" operators +syn match abelLogicalOperator "[!#&$]" +syn match abelRangeOperator "\.\." +syn match abelAlternateOperator "[/*+]" +syn match abelAlternateOperator ":[+*]:" +syn match abelArithmeticOperator "[-%]" +syn match abelArithmeticOperator "<<" +syn match abelArithmeticOperator ">>" +syn match abelRelationalOperator "[<>!=]=" +syn match abelRelationalOperator "[<>]" +syn match abelAssignmentOperator "[:?]\==" +syn match abelAssignmentOperator "?:=" +syn match abelTruthTableOperator "->" + +" signal extensions +syn match abelExtension "\.aclr\>" +syn match abelExtension "\.aset\>" +syn match abelExtension "\.clk\>" +syn match abelExtension "\.clr\>" +syn match abelExtension "\.com\>" +syn match abelExtension "\.fb\>" +syn match abelExtension "\.[co]e\>" +syn match abelExtension "\.l[eh]\>" +syn match abelExtension "\.fc\>" +syn match abelExtension "\.pin\>" +syn match abelExtension "\.set\>" +syn match abelExtension "\.[djksrtq]\>" +syn match abelExtension "\.pr\>" +syn match abelExtension "\.re\>" +syn match abelExtension "\.a[pr]\>" +syn match abelExtension "\.s[pr]\>" + +" special constants +syn match abelConstant "\.[ckudfpxz]\." +syn match abelConstant "\.sv[2-9]\." + +" one-line comments +syn region abelComment start=+"+ end=+"\|$+ contains=abelNumber,abelTodo +" option to prevent C++ style comments +if !exists("abel_cpp_comments_illegal") + syn region abelComment start=+//+ end=+$+ contains=abelNumber,abelTodo +endif + +syn sync minlines=1 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_abel_syn_inits") + if version < 508 + let did_abel_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default highlighting. + HiLink abelHeader abelStatement + HiLink abelSection abelStatement + HiLink abelDeclaration abelStatement + HiLink abelLogicalOperator abelOperator + HiLink abelRangeOperator abelOperator + HiLink abelAlternateOperator abelOperator + HiLink abelArithmeticOperator abelOperator + HiLink abelRelationalOperator abelOperator + HiLink abelAssignmentOperator abelOperator + HiLink abelTruthTableOperator abelOperator + HiLink abelSpecifier abelStatement + HiLink abelOperator abelStatement + HiLink abelStatement Statement + HiLink abelIdentifier Identifier + HiLink abelTypeId abelType + HiLink abelTypeIdChar abelType + HiLink abelType Type + HiLink abelNumber abelString + HiLink abelString String + HiLink abelConstant Constant + HiLink abelComment Comment + HiLink abelExtension abelSpecial + HiLink abelSpecialChar abelSpecial + HiLink abelTypeIdEnd abelSpecial + HiLink abelSpecial Special + HiLink abelDirective PreProc + HiLink abelTodo Todo + HiLink abelError Error + + delcommand HiLink +endif + +let b:current_syntax = "abel" +" vim:ts=8 diff --git a/runtime/syntax/acedb.vim b/runtime/syntax/acedb.vim new file mode 100644 index 000000000..114e4aba9 --- /dev/null +++ b/runtime/syntax/acedb.vim @@ -0,0 +1,123 @@ +" Vim syntax file +" Language: AceDB model files +" Maintainer: Stewart Morris (Stewart.Morris@ed.ac.uk) +" Last change: Thu Apr 26 10:38:01 BST 2001 +" URL: http://www.ed.ac.uk/~swmorris/vim/acedb.vim + +" Syntax file to handle all $ACEDB/wspec/*.wrm files, primarily models.wrm +" AceDB software is available from http://www.acedb.org + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn keyword acedbXref XREF +syn keyword acedbModifier UNIQUE REPEAT + +syn case ignore +syn keyword acedbModifier Constraints +syn keyword acedbType DateType Int Text Float + +" Magic tags from: http://genome.cornell.edu/acedocs/magic/summary.html +syn keyword acedbMagic pick_me_to_call No_cache Non_graphic Title +syn keyword acedbMagic Flipped Centre Extent View Default_view +syn keyword acedbMagic From_map Minimal_view Main_Marker Map Includes +syn keyword acedbMagic Mapping_data More_data Position Ends Left Right +syn keyword acedbMagic Multi_Position Multi_Ends With Error Relative +syn keyword acedbMagic Min Anchor Gmap Grid_map Grid Submenus Cambridge +syn keyword acedbMagic No_buttons Columns Colour Surround_colour Tag +syn keyword acedbMagic Scale_unit Cursor Cursor_on Cursor_unit +syn keyword acedbMagic Locator Magnification Projection_lines_on +syn keyword acedbMagic Marker_points Marker_intervals Contigs +syn keyword acedbMagic Physical_genes Two_point Multi_point Likelihood +syn keyword acedbMagic Point_query Point_yellow Point_width +syn keyword acedbMagic Point_pne Point_pe Point_nne Point_ne +syn keyword acedbMagic Derived_tags DT_query DT_width DT_no_duplicates +syn keyword acedbMagic RH_data RH_query RH_spacing RH_show_all +syn keyword acedbMagic Names_on Width Symbol Colours Pne Pe Nne pMap +syn keyword acedbMagic Sequence Gridded FingerPrint In_Situ Cosmid_grid +syn keyword acedbMagic Layout Lines_at Space_at No_stagger A1_labelling +syn keyword acedbMagic DNA Structure From Source Source_Exons +syn keyword acedbMagic Coding CDS Transcript Assembly_tags Allele +syn keyword acedbMagic Display Colour Frame_sensitive Strand_sensitive +syn keyword acedbMagic Score_bounds Percent Bumpable Width Symbol +syn keyword acedbMagic Blixem_N Address E_mail Paper Reference Title +syn keyword acedbMagic Point_1 Point_2 Calculation Full One_recombinant +syn keyword acedbMagic Tested Selected_trans Backcross Back_one +syn keyword acedbMagic Dom_semi Dom_let Direct Complex_mixed Calc +syn keyword acedbMagic Calc_upper_conf Item_1 Item_2 Results A_non_B +syn keyword acedbMagic Score Score_by_offset Score_by_width +syn keyword acedbMagic Right_priority Blastn Blixem Blixem_X +syn keyword acedbMagic Journal Year Volume Page Author +syn keyword acedbMagic Selected One_all Recs_all One_let +syn keyword acedbMagic Sex_full Sex_one Sex_cis Dom_one Dom_selected +syn keyword acedbMagic Calc_distance Calc_lower_conf Canon_for_cosmid +syn keyword acedbMagic Reversed_physical Points Positive Negative +syn keyword acedbMagic Point_error_scale Point_segregate_ordered +syn keyword acedbMagic Point_symbol Interval_JTM Interval_RD +syn keyword acedbMagic EMBL_feature Homol Feature +syn keyword acedbMagic DT_tag Spacer Spacer_colour Spacer_width +syn keyword acedbMagic RH_positive RH_negative RH_contradictory Query +syn keyword acedbMagic Clone Y_remark PCR_remark Hybridizes_to +syn keyword acedbMagic Row Virtual_row Mixed In_pool Subpool B_non_A +syn keyword acedbMagic Interval_SRK Point_show_marginal Subsequence +syn keyword acedbMagic Visible Properties Transposon + +syn match acedbClass "^?\w\+\|^#\w\+" +syn match acedbComment "//.*" +syn region acedbComment start="/\*" end="\*/" +syn match acedbComment "^#\W.*" +syn match acedbHelp "^\*\*\w\+$" +syn match acedbTag "[^^]?\w\+\|[^^]#\w\+" +syn match acedbBlock "//#.\+#$" +syn match acedbOption "^_[DVH]\S\+" +syn match acedbFlag "\s\+-\h\+" +syn match acedbSubclass "^Class" +syn match acedbSubtag "^Visible\|^Is_a_subclass_of\|^Filter\|^Hidden" +syn match acedbNumber "\<\d\+\>" +syn match acedbNumber "\<\d\+\.\d\+\>" +syn match acedbHyb "\<Positive_\w\+\>\|\<Negative\w\+\>" +syn region acedbString start=/"/ end=/"/ skip=/\\"/ oneline + +" Rest of syntax highlighting rules start here + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_acedb_syn_inits") + if version < 508 + let did_acedb_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink acedbMagic Special + HiLink acedbHyb Special + HiLink acedbType Type + HiLink acedbOption Type + HiLink acedbSubclass Type + HiLink acedbSubtag Include + HiLink acedbFlag Include + HiLink acedbTag Include + HiLink acedbClass Todo + HiLink acedbHelp Todo + HiLink acedbXref Identifier + HiLink acedbModifier Label + HiLink acedbComment Comment + HiLink acedbBlock ModeMsg + HiLink acedbNumber Number + HiLink acedbString String + + delcommand HiLink +endif + +let b:current_syntax = "acedb" + +" The structure of the model.wrm file is sensitive to mixed tab and space +" indentation and assumes tabs are 8 so... +se ts=8 diff --git a/runtime/syntax/ada.vim b/runtime/syntax/ada.vim new file mode 100644 index 000000000..7a7b2a077 --- /dev/null +++ b/runtime/syntax/ada.vim @@ -0,0 +1,287 @@ +" Vim syntax file +" Language: Ada (95) +" Maintainer: David A. Wheeler <dwheeler@dwheeler.com> +" URL: http://www.dwheeler.com/vim +" Last Change: 2001-11-02 + +" Former Maintainer: Simon Bradley <simon.bradley@pitechnology.com> +" (was <sib93@aber.ac.uk>) +" Other contributors: Preben Randhol. +" The formal spec of Ada95 (ARM) is the "Ada95 Reference Manual". +" For more Ada95 info, see http://www.gnuada.org and http://www.adapower.com. + +" This vim syntax file works on vim 5.6, 5.7, 5.8 and 6.x. +" It implements Bram Moolenaar's April 25, 2001 recommendations to make +" the syntax file maximally portable across different versions of vim. +" If vim 6.0+ is available, +" this syntax file takes advantage of the vim 6.0 advanced pattern-matching +" functions to avoid highlighting uninteresting leading spaces in +" some expressions containing "with" and "use". + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Ada is entirely case-insensitive. +syn case ignore + +" We don't need to look backwards to highlight correctly; +" this speeds things up greatly. +syn sync minlines=1 maxlines=1 + +" Highlighting commands. There are 69 reserved words in total in Ada95. +" Some keywords are used in more than one way. For example: +" 1. "end" is a general keyword, but "end if" ends a Conditional. +" 2. "then" is a conditional, but "and then" is an operator. + + +" Standard Exceptions (including I/O). +" We'll highlight the standard exceptions, similar to vim's Python mode. +" It's possible to redefine the standard exceptions as something else, +" but doing so is very bad practice, so simply highlighting them makes sense. +syn keyword adaException Constraint_Error Program_Error Storage_Error +syn keyword adaException Tasking_Error +syn keyword adaException Status_Error Mode_Error Name_Error Use_Error +syn keyword adaException Device_Error End_Error Data_Error Layout_Error +syn keyword adaException Length_Error Pattern_Error Index_Error +syn keyword adaException Translation_Error +syn keyword adaException Time_Error Argument_Error +syn keyword adaException Tag_Error +syn keyword adaException Picture_Error +" Interfaces +syn keyword adaException Terminator_Error Conversion_Error +syn keyword adaException Pointer_Error Dereference_Error Update_Error +" This isn't in the Ada spec, but a GNAT extension. +syn keyword adaException Assert_Failure +" We don't list ALL exceptions defined in particular compilers (e.g., GNAT), +" because it's quite reasonable to define those phrases as non-exceptions. + + +" We don't normally highlight types in package Standard +" (Integer, Character, Float, etc.). I don't think it looks good +" with the other type keywords, and many Ada programs define +" so many of their own types that it looks inconsistent. +" However, if you want this highlighting, turn on "ada_standard_types". +" For package Standard's definition, see ARM section A.1. + +if exists("ada_standard_types") + syn keyword adaBuiltinType Boolean Integer Natural Positive Float + syn keyword adaBuiltinType Character Wide_Character + syn keyword adaBuiltinType String Wide_String + syn keyword adaBuiltinType Duration + " These aren't listed in ARM section A.1's code, but they're noted as + " options in ARM sections 3.5.4 and 3.5.7: + syn keyword adaBuiltinType Short_Integer Short_Short_Integer + syn keyword adaBuiltinType Long_Integer Long_Long_Integer + syn keyword adaBuiltinType Short_Float Short_Short_Float + syn keyword adaBuiltinType Long_Float Long_Long_Float +endif + +" There are MANY other predefined types; they've not been added, because +" determining when they're a type requires context in general. +" One potential addition would be Unbounded_String. + + +syn keyword adaLabel others + +syn keyword adaOperator abs mod not rem xor +syn match adaOperator "\<and\>" +syn match adaOperator "\<and\s\+then\>" +syn match adaOperator "\<or\>" +syn match adaOperator "\<or\s\+else\>" +syn match adaOperator "[-+*/<>&]" +syn keyword adaOperator ** +syn match adaOperator "[/<>]=" +syn keyword adaOperator => +syn match adaOperator "\.\." +syn match adaOperator "=" + +" We won't map "adaAssignment" by default, but we need to map ":=" to +" something or the "=" inside it will be mislabelled as an operator. +" Note that in Ada, assignment (:=) is not considered an operator. +syn match adaAssignment ":=" + +" Handle the box, <>, specially: +syn keyword adaSpecial <> + +" Numbers, including floating point, exponents, and alternate bases. +syn match adaNumber "\<\d[0-9_]*\(\.\d[0-9_]*\)\=\([Ee][+-]\=\d[0-9_]*\)\=\>" +syn match adaNumber "\<\d\d\=#\x[0-9A-Fa-f_]*\(\.\x[0-9A-Fa-f_]*\)\=#\([Ee][+-]\=\d[0-9_]*\)\=" + +" Identify leading numeric signs. In "A-5" the "-" is an operator, +" but in "A:=-5" the "-" is a sign. This handles "A3+-5" (etc.) correctly. +" This assumes that if you put a don't put a space after +/- when it's used +" as an operator, you won't put a space before it either -- which is true +" in code I've seen. +syn match adaSign "[[:space:]<>=(,|:;&*/+-][+-]\d"lc=1,hs=s+1,he=e-1,me=e-1 + +" Labels for the goto statement. +syn region adaLabel start="<<" end=">>" + +" Boolean Constants. +syn keyword adaBoolean true false + +" Warn people who try to use C/C++ notation erroneously: +syn match adaError "//" +syn match adaError "/\*" +syn match adaError "==" + + +if exists("ada_space_errors") + if !exists("ada_no_trail_space_error") + syn match adaSpaceError excludenl "\s\+$" + endif + if !exists("ada_no_tab_space_error") + syn match adaSpaceError " \+\t"me=e-1 + endif +endif + +" Unless special ("end loop", "end if", etc.), "end" marks the end of a +" begin, package, task etc. Assiging it to adaEnd. +syn match adaEnd "\<end\>" + +syn keyword adaPreproc pragma + +syn keyword adaRepeat exit for loop reverse while +syn match adaRepeat "\<end\s\+loop\>" + +syn keyword adaStatement accept delay goto raise requeue return +syn keyword adaStatement terminate +syn match adaStatement "\<abort\>" + +" Handle Ada's record keywords. +" 'record' usually starts a structure, but "with null record;" does not, +" and 'end record;' ends a structure. The ordering here is critical - +" 'record;' matches a "with null record", so make it a keyword (this can +" match when the 'with' or 'null' is on a previous line). +" We see the "end" in "end record" before the word record, so we match that +" pattern as adaStructure (and it won't match the "record;" pattern). +syn match adaStructure "\<record\>" +syn match adaStructure "\<end\s\+record\>" +syn match adaKeyword "\<record;"me=e-1 + +syn keyword adaStorageClass abstract access aliased array at constant delta +syn keyword adaStorageClass digits limited of private range tagged +syn keyword adaTypedef subtype type + +" Conditionals. "abort" after "then" is a conditional of its own. +syn match adaConditional "\<then\>" +syn match adaConditional "\<then\s\+abort\>" +syn match adaConditional "\<else\>" +syn match adaConditional "\<end\s\+if\>" +syn match adaConditional "\<end\s\+case\>" +syn match adaConditional "\<end\s\+select\>" +syn keyword adaConditional if case select +syn keyword adaConditional elsif when + +syn keyword adaKeyword all do exception in is new null out +syn keyword adaKeyword separate until + +" These keywords begin various constructs, and you _might_ want to +" highlight them differently. +syn keyword adaBegin begin body declare entry function generic +syn keyword adaBegin package procedure protected renames task + + +if exists("ada_withuse_ordinary") +" Don't be fancy. Display "with" and "use" as ordinary keywords in all cases. + syn keyword adaKeyword with use +else + " Highlight "with" and "use" clauses like C's "#include" when they're used + " to reference other compilation units; otherwise they're ordinary keywords. + " If we have vim 6.0 or later, we'll use its advanced pattern-matching + " capabilities so that we won't match leading spaces. + syn match adaKeyword "\<with\>" + syn match adaKeyword "\<use\>" + if version < 600 + syn match adaBeginWith "^\s*\(\(with\(\s\+type\)\=\)\|\(use\)\)\>" contains=adaInc + syn match adaSemiWith ";\s*\(\(with\(\s\+type\)\=\)\|\(use\)\)\>"lc=1 contains=adaInc + else + syn match adaBeginWith "^\s*\zs\(\(with\(\s\+type\)\=\)\|\(use\)\)\>" contains=adaInc + syn match adaSemiWith ";\s*\zs\(\(with\(\s\+type\)\=\)\|\(use\)\)\>" contains=adaInc + endif + syn match adaInc "\<with\>" contained contains=NONE + syn match adaInc "\<with\s\+type\>" contained contains=NONE + syn match adaInc "\<use\>" contained contains=NONE + " Recognize "with null record" as a keyword (even the "record"). + syn match adaKeyword "\<with\s\+null\s\+record\>" + " Consider generic formal parameters of subprograms and packages as keywords. + if version < 600 + syn match adaKeyword ";\s*with\s\+\(function\|procedure\|package\)\>" + syn match adaKeyword "^\s*with\s\+\(function\|procedure\|package\)\>" + else + syn match adaKeyword ";\s*\zswith\s\+\(function\|procedure\|package\)\>" + syn match adaKeyword "^\s*\zswith\s\+\(function\|procedure\|package\)\>" + endif +endif + + +" String and character constants. +syn region adaString start=+"+ skip=+""+ end=+"+ +syn match adaCharacter "'.'" + +" Todo (only highlighted in comments) +syn keyword adaTodo contained TODO FIXME XXX + +" Comments. +syn region adaComment oneline contains=adaTodo start="--" end="$" + + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_ada_syn_inits") + if version < 508 + let did_ada_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later. + HiLink adaCharacter Character + HiLink adaComment Comment + HiLink adaConditional Conditional + HiLink adaKeyword Keyword + HiLink adaLabel Label + HiLink adaNumber Number + HiLink adaSign Number + HiLink adaOperator Operator + HiLink adaPreproc PreProc + HiLink adaRepeat Repeat + HiLink adaSpecial Special + HiLink adaStatement Statement + HiLink adaString String + HiLink adaStructure Structure + HiLink adaTodo Todo + HiLink adaType Type + HiLink adaTypedef Typedef + HiLink adaStorageClass StorageClass + HiLink adaBoolean Boolean + HiLink adaException Exception + HiLink adaInc Include + HiLink adaError Error + HiLink adaSpaceError Error + HiLink adaBuiltinType Type + + if exists("ada_begin_preproc") + " This is the old default display: + HiLink adaBegin PreProc + HiLink adaEnd PreProc + else + " This is the new default display: + HiLink adaBegin Keyword + HiLink adaEnd Keyword + endif + + delcommand HiLink +endif + +let b:current_syntax = "ada" + +" vim: ts=8 diff --git a/runtime/syntax/aflex.vim b/runtime/syntax/aflex.vim new file mode 100644 index 000000000..592c98e4f --- /dev/null +++ b/runtime/syntax/aflex.vim @@ -0,0 +1,100 @@ + +" Vim syntax file +" Language: AfLex (from Lex syntax file) +" Maintainer: Mathieu Clabaut <mathieu.clabaut@free.fr> +" LastChange: 02 May 2001 +" Original: Lex, maintained by Dr. Charles E. Campbell, Jr. +" Comment: Replaced sourcing c.vim file by ada.vim and rename lex* +" in aflex* + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the Ada syntax to start with +if version < 600 + so <sfile>:p:h/ada.vim +else + runtime! syntax/ada.vim + unlet b:current_syntax +endif + + +" --- AfLex stuff --- + +"I'd prefer to use aflex.* , but it doesn't handle forward definitions yet +syn cluster aflexListGroup contains=aflexAbbrvBlock,aflexAbbrv,aflexAbbrv,aflexAbbrvRegExp,aflexInclude,aflexPatBlock,aflexPat,aflexBrace,aflexPatString,aflexPatTag,aflexPatTag,aflexPatComment,aflexPatCodeLine,aflexMorePat,aflexPatSep,aflexSlashQuote,aflexPatCode,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2 +syn cluster aflexListPatCodeGroup contains=aflexAbbrvBlock,aflexAbbrv,aflexAbbrv,aflexAbbrvRegExp,aflexInclude,aflexPatBlock,aflexPat,aflexBrace,aflexPatTag,aflexPatTag,aflexPatComment,aflexPatCodeLine,aflexMorePat,aflexPatSep,aflexSlashQuote,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2 + +" Abbreviations Section +syn region aflexAbbrvBlock start="^\([a-zA-Z_]\+\t\|%{\)" end="^%%$"me=e-2 skipnl nextgroup=aflexPatBlock contains=aflexAbbrv,aflexInclude,aflexAbbrvComment +syn match aflexAbbrv "^\I\i*\s"me=e-1 skipwhite contained nextgroup=aflexAbbrvRegExp +syn match aflexAbbrv "^%[sx]" contained +syn match aflexAbbrvRegExp "\s\S.*$"lc=1 contained nextgroup=aflexAbbrv,aflexInclude +syn region aflexInclude matchgroup=aflexSep start="^%{" end="%}" contained contains=ALLBUT,@aflexListGroup +syn region aflexAbbrvComment start="^\s\+/\*" end="\*/" + +"%% : Patterns {Actions} +syn region aflexPatBlock matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=aflexPat,aflexPatTag,aflexPatComment +syn region aflexPat start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 contained nextgroup=aflexMorePat,aflexPatSep contains=aflexPatString,aflexSlashQuote,aflexBrace +syn region aflexBrace start="\[" skip=+\\\\\|\\+ end="]" contained +syn region aflexPatString matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ contained +syn match aflexPatTag "^<\I\i*\(,\I\i*\)*>*" contained nextgroup=aflexPat,aflexPatTag,aflexMorePat,aflexPatSep +syn match aflexPatTag +^<\I\i*\(,\I\i*\)*>*\(\\\\\)*\\"+ contained nextgroup=aflexPat,aflexPatTag,aflexMorePat,aflexPatSep +syn region aflexPatComment start="^\s*/\*" end="\*/" skipnl contained contains=cTodo nextgroup=aflexPatComment,aflexPat,aflexPatString,aflexPatTag +syn match aflexPatCodeLine ".*$" contained contains=ALLBUT,@aflexListGroup +syn match aflexMorePat "\s*|\s*$" skipnl contained nextgroup=aflexPat,aflexPatTag,aflexPatComment +syn match aflexPatSep "\s\+" contained nextgroup=aflexMorePat,aflexPatCode,aflexPatCodeLine +syn match aflexSlashQuote +\(\\\\\)*\\"+ contained +syn region aflexPatCode matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" skipnl contained contains=ALLBUT,@aflexListPatCodeGroup + +syn keyword aflexCFunctions BEGIN input unput woutput yyleng yylook yytext +syn keyword aflexCFunctions ECHO output winput wunput yyless yymore yywrap + +" <c.vim> includes several ALLBUTs; these have to be treated so as to exclude aflex* groups +syn cluster cParenGroup add=aflex.* +syn cluster cDefineGroup add=aflex.* +syn cluster cPreProcGroup add=aflex.* +syn cluster cMultiGroup add=aflex.* + +" Synchronization +syn sync clear +syn sync minlines=300 +syn sync match aflexSyncPat grouphere aflexPatBlock "^%[a-zA-Z]" +syn sync match aflexSyncPat groupthere aflexPatBlock "^<$" +syn sync match aflexSyncPat groupthere aflexPatBlock "^%%$" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet + +if version >= 508 || !exists("did_aflex_syntax_inits") + if version < 508 + let did_aflex_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + HiLink aflexSlashQuote aflexPat + HiLink aflexBrace aflexPat + HiLink aflexAbbrvComment aflexPatComment + + HiLink aflexAbbrv SpecialChar + HiLink aflexAbbrvRegExp Macro + HiLink aflexCFunctions Function + HiLink aflexMorePat SpecialChar + HiLink aflexPat Function + HiLink aflexPatComment Comment + HiLink aflexPatString Function + HiLink aflexPatTag Special + HiLink aflexSep Delimiter + delcommand HiLink +endif + +let b:current_syntax = "aflex" + +" vim:ts=10 diff --git a/runtime/syntax/ahdl.vim b/runtime/syntax/ahdl.vim new file mode 100644 index 000000000..b1417c374 --- /dev/null +++ b/runtime/syntax/ahdl.vim @@ -0,0 +1,94 @@ +" Vim syn file +" Language: Altera AHDL +" Maintainer: John Cook <john.cook@kla-tencor.com> +" Last Change: 2001 Apr 25 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +"this language is oblivious to case. +syn case ignore + +" a bunch of keywords +syn keyword ahdlKeyword assert begin bidir bits buried case clique +syn keyword ahdlKeyword connected_pins constant defaults define design +syn keyword ahdlKeyword device else elsif end for function generate +syn keyword ahdlKeyword gnd help_id if in include input is machine +syn keyword ahdlKeyword node of options others output parameters +syn keyword ahdlKeyword returns states subdesign table then title to +syn keyword ahdlKeyword tri_state_node variable vcc when with + +" a bunch of types +syn keyword ahdlIdentifier carry cascade dffe dff exp global +syn keyword ahdlIdentifier jkffe jkff latch lcell mcell memory opendrn +syn keyword ahdlIdentifier soft srffe srff tffe tff tri wire x + +syn keyword ahdlMegafunction lpm_and lpm_bustri lpm_clshift lpm_constant +syn keyword ahdlMegafunction lpm_decode lpm_inv lpm_mux lpm_or lpm_xor +syn keyword ahdlMegafunction busmux mux + +syn keyword ahdlMegafunction divide lpm_abs lpm_add_sub lpm_compare +syn keyword ahdlMegafunction lpm_counter lpm_mult + +syn keyword ahdlMegafunction altdpram csfifo dcfifo scfifo csdpram lpm_ff +syn keyword ahdlMegafunction lpm_latch lpm_shiftreg lpm_ram_dq lpm_ram_io +syn keyword ahdlMegafunction lpm_rom lpm_dff lpm_tff clklock pll ntsc + +syn keyword ahdlTodo contained TODO + +" String contstants +syn region ahdlString start=+"+ skip=+\\"+ end=+"+ + +" valid integer number formats (decimal, binary, octal, hex) +syn match ahdlNumber '\<\d\+\>' +syn match ahdlNumber '\<b"\(0\|1\|x\)\+"' +syn match ahdlNumber '\<\(o\|q\)"\o\+"' +syn match ahdlNumber '\<\(h\|x\)"\x\+"' + +" operators +syn match ahdlOperator "[!&#$+\-<>=?:\^]" +syn keyword ahdlOperator not and nand or nor xor xnor +syn keyword ahdlOperator mod div log2 used ceil floor + +" one line and multi-line comments +" (define these after ahdlOperator so -- overrides -) +syn match ahdlComment "--.*" contains=ahdlNumber,ahdlTodo +syn region ahdlComment start="%" end="%" contains=ahdlNumber,ahdlTodo + +" other special characters +syn match ahdlSpecialChar "[\[\]().,;]" + +syn sync minlines=1 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_ahdl_syn_inits") + if version < 508 + let did_ahdl_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default highlighting. + HiLink ahdlNumber ahdlString + HiLink ahdlMegafunction ahdlIdentifier + HiLink ahdlSpecialChar SpecialChar + HiLink ahdlKeyword Statement + HiLink ahdlString String + HiLink ahdlComment Comment + HiLink ahdlIdentifier Identifier + HiLink ahdlOperator Operator + HiLink ahdlTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "ahdl" +" vim:ts=8 diff --git a/runtime/syntax/amiga.vim b/runtime/syntax/amiga.vim new file mode 100644 index 000000000..21e88aeab --- /dev/null +++ b/runtime/syntax/amiga.vim @@ -0,0 +1,101 @@ +" Vim syntax file +" Language: AmigaDos +" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> +" Last Change: Sep 02, 2003 +" Version: 4 +" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" Amiga Devices +syn match amiDev "\(par\|ser\|prt\|con\|nil\):" + +" Amiga aliases and paths +syn match amiAlias "\<[a-zA-Z][a-zA-Z0-9]\+:" +syn match amiAlias "\<[a-zA-Z][a-zA-Z0-9]\+:[a-zA-Z0-9/]*/" + +" strings +syn region amiString start=+"+ end=+"+ oneline + +" numbers +syn match amiNumber "\<\d\+\>" + +" Logic flow +syn region amiFlow matchgroup=Statement start="if" matchgroup=Statement end="endif" contains=ALL +syn keyword amiFlow skip endskip +syn match amiError "else\|endif" +syn keyword amiElse contained else + +syn keyword amiTest contained not warn error fail eq gt ge val exists + +" echo exception +syn region amiEcho matchgroup=Statement start="\<echo\>" end="$" oneline contains=amiComment +syn region amiEcho matchgroup=Statement start="^\.[bB][rR][aA]" end="$" oneline +syn region amiEcho matchgroup=Statement start="^\.[kK][eE][tT]" end="$" oneline + +" commands +syn keyword amiKey addbuffers copy fault join pointer setdate +syn keyword amiKey addmonitor cpu filenote keyshow printer setenv +syn keyword amiKey alias date fixfonts lab printergfx setfont +syn keyword amiKey ask delete fkey list printfiles setmap +syn keyword amiKey assign dir font loadwb prompt setpatch +syn keyword amiKey autopoint diskchange format lock protect sort +syn keyword amiKey avail diskcopy get magtape quit stack +syn keyword amiKey binddrivers diskdoctor getenv makedir relabel status +syn keyword amiKey bindmonitor display graphicdump makelink remrad time +syn keyword amiKey blanker iconedit more rename type +syn keyword amiKey break ed icontrol mount resident unalias +syn keyword amiKey calculator edit iconx newcli run unset +syn keyword amiKey cd endcli ihelp newshell say unsetenv +syn keyword amiKey changetaskpri endshell info nocapslock screenmode version +syn keyword amiKey clock eval initprinter nofastmem search wait +syn keyword amiKey cmd exchange input overscan serial wbpattern +syn keyword amiKey colors execute install palette set which +syn keyword amiKey conclip failat iprefs path setclock why + +" comments +syn cluster amiCommentGroup contains=amiTodo,@Spell +syn case ignore +syn keyword amiTodo contained todo +syn case match +syn match amiComment ";.*$" contains=amiCommentGroup + +" sync +syn sync lines=50 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_amiga_syn_inits") + if version < 508 + let did_amiga_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink amiAlias Type + HiLink amiComment Comment + HiLink amiDev Type + HiLink amiEcho String + HiLink amiElse Statement + HiLink amiError Error + HiLink amiKey Statement + HiLink amiNumber Number + HiLink amiString String + HiLink amiTest Special + + delcommand HiLink +endif + +let b:current_syntax = "amiga" + +" vim:ts=15 diff --git a/runtime/syntax/aml.vim b/runtime/syntax/aml.vim new file mode 100644 index 000000000..7cb16f1c1 --- /dev/null +++ b/runtime/syntax/aml.vim @@ -0,0 +1,157 @@ +" Vim syntax file +" Language: AML (ARC/INFO Arc Macro Language) +" Written By: Nikki Knuit <Nikki.Knuit@gems3.gov.bc.ca> +" Maintainer: Todd Glover <todd.glover@gems9.gov.bc.ca> +" Last Change: 2001 May 10 + +" FUTURE CODING: Bold application commands after &sys, &tty +" Only highlight aml Functions at the beginning +" of [], in order to avoid -read highlighted, +" or [quote] strings highlighted + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" ARC, ARCEDIT, ARCPLOT, LIBRARIAN, GRID, SCHEMAEDIT reserved words, +" defined as keywords. + +syn keyword amlArcCmd contained 2button abb abb[reviations] abs ac acos acosh add addc[ogoatt] addcogoatt addf[eatureclass] addh[istory] addi addim[age] addindexatt addit[em] additem addressb[uild] addressc[reate] addresse[rrors] addressedit addressm[atch] addressp[arse] addresst[est] addro[utemeasure] addroutemeasure addte[xt] addto[stack] addw[orktable] addx[y] adj[ust] adm[inlicense] adr[ggrid] ads adsa[rc] ae af ag[gregate] ai ai[request] airequest al alia[s] alig[n] alt[erarchive] am[sarc] and annoa[lignment] annoadd annocapture annocl[ip] annoco[verage] annocurve annoe[dit] annoedit annof annofeature annofit annoitem annola[yer] annole[vel] annolevel annoline annooffset annop[osition] annoplace annos[ize] annoselectfeatur annoset annosum annosymbol annot annot[ext] annotext annotype ao ap apm[ode] app[end] arc arcad[s] arcar[rows] arcc[ogo] arcdf[ad] arcdi[me] arcdl[g] arcdx[f] arced[it] arcedit arcen[dtext] arcf[ont] arcigd[s] arcige[s] arcla[bel] arcli[nes] arcma[rkers] arcmo[ss] +syn keyword amlArcCmd contained arcpl[ot] arcplot arcpo[int] arcr[oute] arcs arcsc[itex] arcse[ction] arcsh[ape] arcsl[f] arcsn[ap] arcsp[ot] arcte[xt] arctig[er] arctin arcto[ols] arctools arcty[pe] area areaq[uery] arm arrow arrows[ize] arrowt[ype] as asc asciig[rid] asciih[elp] asciihelp asco[nnect] asconnect asd asda[tabase] asdi[sconnect] asdisconnect asel[ect] asex[ecute] asf asin asinh asp[ect] asr[eadlocks] ast[race] at atan atan2 atanh atusage aud[ittrail] autoi[ncrement] autol[ink] axis axish[atch] axisl[abels] axisr[uler] axist[ext] bac[klocksymbol] backcoverage backenvironment backnodeangleite backsymbolitem backtextitem base[select] basi[n] bat[ch] bc be be[lls] blackout blockmaj[ority] blockmax blockmea[n] blockmed[ian] blockmin blockmino[rity] blockr[ange] blockst[d] blocksu[m] blockv[ariety] bnai bou[ndaryclean] box br[ief] bsi bti buf[fer] bug[form] bugform build builds[ta] buildv[at] calco[mp] calcomp calcu[late] cali[brateroutes] calibrateroutes can[d] cartr[ead] cartread +syn keyword amlArcCmd contained cartw[rite] cartwrite cei[l] cel[lvalue] cen[troidlabels] cgm cgme[scape] cha[nge] checkin checkinrel checkout checkoutrel chm[od] chown chownt[ransaction] chowntran chowntransaction ci ci[rcle] cir class classp[rob] classs[ig] classsample clean clear clears[elect] clip clipg[raphextent] clipm[apextent] clo[sedatabase] cntvrt co cod[efind] cog[oinverse] cogocom cogoenv cogomenu coll[ocate] color color2b[lue] color2g[reen] color2h[ue] color2r[ed] color2s[at] color2v[al] colorchart coloredit colorh[cbs] colorhcbs colu[mns] comb[ine] comm[ands] commands con connect connectu[ser] cons[ist] conto[ur] contr[olpoints] convertd[oc] convertdoc converti[mage] convertla[yer] convertli[brary] convertr[emap] convertw[orkspace] coo[rdinate] coordinate coordinates copy copyf[eatures] copyi[nfo] copyl[ayer] copyo copyo[ut] copyout copys[tack] copyw[orkspace] copyworkspace cor corr[idor] correlation cos cosh costa[llocation] costb[acklink] costd[istance] costp[ath] cou[ntvertices] +syn keyword amlArcCmd contained countvertices cpw cr create create2[dindex] createa[ttributes] createca[talog] createco[go] createcogo createf[eature] createind[ex] createinf[otable] createlab[els] createlay[er] createli[brary] createn[etindex] creater[emap] creates[ystables] createta[blespace] createti[n] createw[orkspace] createworkspace cs culdesac curs[or] curv[ature] curve3pt cut[fill] cutoff cw cx[or] da dar[cyflow] dat[aset] dba[seinfo] dbmsc dbmsc[ursor] dbmscursor dbmse[xecute] dbmsi[nfo] dbmss[et] de delete deletea[rrows] deletet[ic] deletew[orkspace] deleteworkspace demg[rid] deml[attice] dend[rogram] densify densifya[rc] describe describea[rchive] describel[attice] describeti[n] describetr[ans] describetrans dev df[adarc] dg dif[f] digi[tizer] digt[est] dim[earc] dir dir[ectory] directory disa[blepanzoom] disconnect disconnectu[ser] disp disp[lay] display dissolve dissolvee[vents] dissolveevents dista[nce] distr[ibutebuild] div dl[garc] do doce[ll] docu[ment] document dogroup drag +syn keyword amlArcCmd contained draw drawenvironment draworder draws[ig] drawselect drawt[raverses] drawz[oneshape] drop2[dindex] dropa[rchive] dropfeaturec[lass] dropfeatures dropfr[omstack] dropgroup droph[istory] dropind[ex] dropinf[otable] dropit[em] dropla[yer] droplib[rary] droplin[e] dropline dropn[etindex] dropt[ablespace] dropw[orktable] ds dt[edgrid] dtrans du[plicate] duplicatearcs dw dxf dxfa[rc] dxfi[nfo] dynamicpan dynpan ebe ec ed edg[esnap] edgematch editboundaryerro edit[coverage] editdistance editf editfeature editp[lot] editplot edits[ig] editsymbol ef el[iminate] em[f] en[d] envrst envsav ep[s] eq equ[alto] er[ase] es et et[akarc] euca[llocation] eucdir[ection] eucdis[tance] eval eventa[rc] evente[nds] eventh[atch] eventi[nfo] eventlinee[ndtext] eventlines eventlinet[ext] eventlis[t] eventma[rkers] eventme[nu] eventmenu eventpoint eventpointt[ext] eventse[ction] eventso[urce] eventt[ransform] eventtransform exi[t] exp exp1[0] exp2 expa[nd] expo[rt] exten[d] external externala[ll] +syn keyword amlArcCmd contained fd[convert] featuregroup fg fie[lddata] file fill filt[er] fix[ownership] flip flipa[ngle] float floatg[rid] floo[r] flowa[ccumulation] flowd[irection] flowl[ength] fm[od] focalf[low] focalmaj[ority] focalmax focalmea[n] focalmed[ian] focalmin focalmino[rity] focalr[ange] focalst[d] focalsu[m] focalv[ariety] fonta[rc] fontco[py] fontcr[eate] fontd[elete] fontdump fontl[oad] fontload forc[e] form[edit] formedit forms fr[equency] ge geary general[ize] generat[e] gerbera[rc] gerberr[ead] gerberread gerberw[rite] gerberwrite get getz[factor] gi gi[rasarc] gnds grai[n] graphb[ar] graphe[xtent] graphi[cs] graphicimage graphicview graphlim[its] graphlin[e] graphp[oint] graphs[hade] gray[shade] gre[aterthan] grid grida[scii] gridcl[ip] gridclip gridco[mposite] griddesk[ew] griddesp[eckle] griddi[rection] gride[dit] gridfli[p] gridflo[at] gridim[age] gridin[sert] gridl[ine] gridma[jority] gridmi[rror] gridmo[ss] gridn[et] gridnodatasymbol gridpa[int] gridpoi[nt] gridpol[y] +syn keyword amlArcCmd contained gridq[uery] gridr[otate] gridshad[es] gridshap[e] gridshi[ft] gridw[arp] group groupb[y] gt gv gv[tolerance] ha[rdcopy] he[lp] help hid[densymbol] hig[hlow] hil[lshade] his[togram] historicalview ho[ldadjust] hpgl hpgl2 hsv2b[lue] hsv2g[reen] hsv2r[ed] ht[ml] hview ia ided[it] identif[y] identit[y] idw if igdsa[rc] igdsi[nfo] ige[sarc] il[lustrator] illustrator image imageg[rid] imagep[lot] imageplot imageview imp[ort] in index indexi[tem] info infodba[se] infodbm[s] infof[ile] init90[00] init9100 init9100b init91[00] init95[00] int intersect intersectarcs intersecte[rr] isn[ull] iso[cluster] it[ems] iview j[oinitem] join keeps keepselect keyan[gle] keyar[ea] keyb[ox] keyf[orms] keyl[ine] keym keym[arker] keymap keyp[osition] keyse[paration] keysh[ade] keyspot kill killm[ap] kr[iging] la labela[ngle] labele[rrors] labelm[arkers] labels labelsc[ale] labelsp[ot] labelt[ext] lal latticecl[ip] latticeco[ntour] latticed[em] latticem[erge] latticemarkers latticeo[perate] +syn keyword amlArcCmd contained latticep[oly] latticerep[lace] latticeres[ample] lattices[pot] latticet[in] latticetext layer layera[nno] layerca[lculate] layerco[lumns] layerde[lete] layerdo[ts] layerdr[aw] layere[xport] layerf[ilter] layerid[entify] layerim[port] layerio[mode] layerli[st] layerloc[k] layerlog[file] layerq[uery] layerse[arch] layersp[ot] layert[ext] lc ldbmst le leadera[rrows] leaders leadersy[mbol] leadert[olerance] len[gth] les[sthan] lf lg lh li lib librari[an] library limitadjust limitautolink line line2pt linea[djustment] linecl[osureangle] linecolor linecolorr[amp] linecopy linecopyl[ayer] linedelete linedeletel[ayer] lineden[sity] linedir[ection] linedis[t] lineedit lineg[rid] lineh[ollow] lineinf[o] lineint[erval] linel[ayer] linelist linem[iterangle] lineo[ffset] linepa[ttern] linepe[n] linepu[t] linesa[ve] linesc[ale] linese[t] linesi[ze] linest[ats] linesy[mbol] linete[mplate] +syn keyword amlArcCmd contained linety[pe] link[s] linkfeatures list listarchives listatt listc[overages] listcoverages listdbmstables listg[rids] listgrids listhistory listi[mages] listimages listinfotables listlayers listlibraries listo[utput] listse[lect] listst[acks] liststacks listtablespaces listti[ns] listtins listtr[averses] listtran listtransactions listw[orkspaces] listworkspaces lit ll ll[sfit] lla lm ln load loada[djacent] loadcolormap locko[nly] locks[ymbol] log log1[0] log2 logf[ile] logg[ing] loo[kup] lot[area] lp[os] lstk lt lts lw madditem majority majorityf[ilter] makere[gion] makero[ute] makese[ction] makest[ack] mal[ign] map mapa[ngle] mape[xtent] mapextent mapi[nfo] mapj[oin] mapl[imits] mappo[sition] mappr[ojection] mapsc[ale] mapsh[ift] mapu[nits] mapw[arp] mapz[oom] marker markera[ngle] markercolor markercolorr[amp] markercopy markercopyl[ayer] markerdelete markerdeletel[aye] markeredit markerf[ont] markeri[nfo] markerl[ayer] markerlist markerm[ask] markero[ffset] +syn keyword amlArcCmd contained markerpa[ttern] markerpe[n] markerpu[t] markersa[ve] markersc[ale] markerse[t] markersi[ze] markersy[mbol] mas[elect] matchc[over] matchn[ode] max mb[egin] mc[opy] md[elete] me mean measure measurer[oute] measureroute med mend menu[cover] menuedit menv[ironment] merge mergeh[istory] mergev[at] mfi[t] mfr[esh] mg[roup] miadsa[rc] miadsr[ead] miadsread min minf[o] mino[rity] mir[ror] mitems mjoin ml[classify] mma[sk] mmo[ve] mn[select] mod mor[der] moran mosa[ic] mossa[rc] mossg[rid] move movee[nd] movei[tem] mp[osition] mr mr[otate] msc[ale] mse[lect] mselect mt[olerance] mu[nselect] multcurve multinv multipleadditem multipleitems multiplejoin multipleselect multprop mw[ho] nai ne near neatline neatlineg[rid] neatlineh[atch] neatlinel[abels] neatlinet[ics] new next ni[bble] nodeangleitem nodec[olor] nodee[rrors] nodem[arkers] nodep[oint] nodes nodesi[ze] nodesn[ap] nodesp[ot] nodet[ext] nor[mal] not ns[elect] oe ogrid ogridt[ool] oldwindow oo[ps] op[endatabase] or +syn keyword amlArcCmd contained osymbol over overflow overflowa[rea] overflowp[osition] overflows[eparati] overl[ayevents] overlapsymbol overlayevents overp[ost] pagee[xtent] pages[ize] pageu[nits] pal[info] pan panview par[ticletrack] patc[h] path[distance] pe[nsize] pi[ck] pli[st] plot plotcopy plotg[erber] ploti[con] plotmany plotpanel plotsc[itex] plotsi[f] pointde[nsity] pointdist pointdista[nce] pointdo[ts] pointg[rid] pointi[nterp] pointm[arkers] pointn[ode] points pointsp[ot] pointst[ats] pointt[ext] polygonb[ordertex] polygond[ots] polygone[vents] polygonevents polygonl[ines] polygons polygonsh[ades] polygonsi[zelimit] polygonsp[ot] polygont[ext] polygr[id] polyr[egion] pop[ularity] por[ouspuff] pos pos[tscript] positions postscript pow prec[ision] prep[are] princ[omp] print product producti[nfo] project projectcom[pare] projectcop[y] projectd[efine] pul[litems] pur[gehistory] put pv q q[uit] quit rand rang[e] rank rb rc re readg[raphic] reads[elect] reb[ox] recl[ass] recoverdb rect[ify] +syn keyword amlArcCmd contained red[o] refreshview regionb[uffer] regioncla[ss] regioncle[an] regiondi[ssolve] regiondo[ts] regione[rrors] regiong[roup] regionj[oin] regionl[ines] regionpoly regionpolyc[ount] regionpolycount regionpolyl[ist] regionpolylist regionq[uery] regions regionse[lect] regionsh[ades] regionsp[ot] regiont[ext] regionxa[rea] regionxarea regionxt[ab] regionxtab register registerd[bms] regr[ession] reindex rej[ects] rela[te] rele[ase] rem remapgrid reme[asure] remo[vescalar] remove removeback removecover removeedit removesnap removetransfer rename renamew[orkspace] renameworkspace reno[de] rep[lace] reposition resa[mple] resel[ect] reset resh[ape] restore restorearce[dit] restorearch[ive] resu[me] rgb2h[ue] rgb2s[at] rgb2v[al] rotate rotatep[lot] routea[rc] routeends routeendt[ext] routeer[rors] routeev[entspot] routeh[atch] routel[ines] routes routesp[ot] routest[ats] routet[ext] rp rs rt rt[l] rtl rv rw sa sai sample samples[ig] sav[e] savecolormap sc scal[ar] scat[tergram] +syn keyword amlArcCmd contained scenefog sceneformat scenehaze sceneoversample sceneroll scenesave scenesize scenesky scitexl[ine] scitexpoi[nt] scitexpol[y] scitexr[ead] scitexread scitexw[rite] scitexwrite sco screenr[estore] screens[ave] sd sds sdtse[xport] sdtsim[port] sdtsin[fo] sdtsl[ist] se sea[rchtolerance] sectiona[rc] sectionends sectionendt[ext] sectionh[atch] sectionl[ines] sections sectionsn[ap] sectionsp[ot] sectiont[ext] sel select selectb[ox] selectc[ircle] selectg[et] selectm[ask] selectmode selectpoi[nt] selectpol[ygon] selectpu[t] selectt[ype] selectw[ithin] semivariogram sep[arator] separator ser[verstatus] setan[gle] setar[row] setce[ll] setcoa[lesce] setcon[nectinfo] setd[bmscheckin] setdrawsymbol sete[ditmode] setincrement setm[ask] setn[ull] setools setreference setsymbol setturn setw[indow] sext sf sfmt sfo sha shade shadea[ngle] shadeb[ackcolor] shadecolor shadecolorr[amp] shadecopy shadecopyl[ayer] shadedelete shadedeletel[ayer] shadeedit shadegrid shadei[nfo] shadela[yer] +syn keyword amlArcCmd contained shadeli[nepattern] shadelist shadeo[ffset] shadepa[ttern] shadepe[n] shadepu[t] shadesa[ve] shadesc[ale] shadesep[aration] shadeset shadesi[ze] shadesy[mbol] shadet[ype] shapea[rc] shapef[ile] shapeg[rid] shi[ft] show showconstants showe[ditmode] shr[ink] si sin sinfo sing[leuser] sinh sink sit[e] sl slf[arc] sli[ce] slo[pe] sm smartanno snap snapc[over] snapcover snapcoverage snapenvironment snapfeatures snapitems snapo[rder] snappi[ng] snappo[ur] so[rt] sobs sos spi[der] spiraltrans spline splinem[ethod] split spot spoto[ffset] spots[ize] sproj sqr sqrt sra sre srl ss ssc ssh ssi ssky ssz sta stackh[istogram] stackprofile stacksc[attergram] stackshade stackst[ats] stati[stics] statu[s] statuscogo std stra[ighten] streamline streamlink streamo[rder] stri[pmap] subm[it] subs[elect] sum surface surfaceabbrev surfacecontours surfacedefaults surfacedrape surfaceextent surfaceinfo surfacel[ength] surfacelimits surfacemarker surfacemenu surfaceobserver surfaceprofile +syn keyword amlArcCmd contained surfaceprojectio surfacerange surfaceresolutio surfacesave surfacescene surfaceshade surfacesighting surfacetarget surfacevalue surfaceviewfield surfaceviewshed surfacevisibility surfacexsection surfacezoom surfacezscale sv svfd svs sxs symboldump symboli[tem] symbolsa[ve] symbolsc[ale] symbolse[t] symbolset sz tab[les] tal[ly] tan tanh tc te tes[t] text textal[ignment] textan[gle] textcolor textcolorr[amp] textcop[y] textde[lete] textdi[rection] textedit textfil[e] textfit textfo[nt] textin[fo] textit[em] textj[ustificatio] textlist textm[ask] texto[ffset] textpe[n] textpr[ecision] textpu[t] textq[uality] textsa[ve] textsc[ale] textse[t] textset textsi[ze] textsl[ant] textspa[cing] textspl[ine] textst[yle] textsy[mbol] tf th thie[ssen] thin ti tics tict[ext] tigera[rc] tigert[ool] tigertool til[es] timped tin tina[rc] tinc[ontour] tinerrors tinhull tinl[attice] tinlines tinmarkers tins[pot] tinshades tintext tinv[rml] tl tm tol[erance] top[ogrid] topogridtool +syn keyword amlArcCmd contained transa[ction] transfe[r] transfercoverage transferfeature transferitems transfersymbol transfo[rm] travrst travsav tre[nd] ts tsy tt tur[ntable] turnimpedance tut[orial] una[ry] unde[lete] undo ungenerate ungeneratet[in] unio[n] unit[s] unr[egisterdbms] unse[lect] unsp[lit] update updatei[nfoschema] updatel[abels] upo[s] us[age] v va[riety] vcgl vcgl2 veri[fy] vers[ion] vertex viewrst viewsav vip visd[ecode] visdecode vise[ncode] visencode visi[bility] vo[lume] vpfe[xport] vpfi[mport] vpfl[ist] vpft[ile] w war[p] wat[ershed] weedd[raw] weedo[perator] weedt[olerance] weedtolerance whe[re] whi[le] who wi[ndows] wm[f] wo[rkspace] workspace writec[andidates] writeg[raphic] writes[elect] wt x[or] ze[ta] zeta zi zo zonala[rea] zonalc[entroid] zonalf[ill] zonalg[eometry] zonalmaj[ority] zonalmax zonalmea[n] zonalmed[ian] zonalmin zonalmino[rity] zonalp[erimeter] zonalr[ange] zonalsta[ts] zonalstd zonalsu[m] zonalt[hickness] zonalv[ariety] zoomview zv + +" FORMEDIT reserved words, defined as keywords. + +syn keyword amlFormedCmd contained button choice display help input slider text + +" TABLES reserved words, defined as keywords. + +syn keyword amlTabCmd contained add additem alter asciihelp aselect at calc calculate change commands commit copy define directory dropindex dropitem erase external get help indexitem items kill list move nselect purge quit redefine rename reselect rollback save select show sort statistics unload update usagecontained + +" INFO reserved words, defined as keywords. + +syn keyword amlInfoCmd contained accept add adir alter dialog alter alt directory aret arithmetic expressions aselect automatic return calculate cchr change options change comi cominput commands list como comoutput compile concatenate controlling defaults copy cursor data delete data entry data manipulate data retrieval data update date format datafile create datafile management decode define delimiter dfmt directory management directory display do doend documentation done end environment erase execute exiting expand export external fc files first format forms control get goto help import input form ipf internal item types items label lchar list logical expressions log merge modify options modify move next nselect output password prif print programming program protect purge query quit recase redefine relate relate release notes remark rename report options reporting report reselect reserved words restrictions run save security select set sleep sort special form spool stop items system variables take terminal types terminal time topics list type update upf + +" VTRACE reserved words, defined as keywords. + +syn keyword amlVtrCmd contained add al arcscan arrowlength arrowwidth as aw backtrack branch bt cj clearjunction commands cs dash endofline endofsession eol eos fan fg foreground gap generalizetolerance gtol help hole js junctionsensitivity linesymbol linevariation linewidth ls lv lw markersymbol mode ms raster regionofinterest reset restore retrace roi save searchradius skip sr sta status stc std str straightenangle straightencorner straightendistance straightenrange vt vtrace + +" The AML reserved words, defined as keywords. + +syn keyword amlFunction contained abs access acos after angrad asin atan before calc close copy cos cover coverage cvtdistance date delete dignum dir directory entryname exist[s] exp extract file filelist format formatdate full getchar getchoice getcover getdatabase getdeflayers getfile getgrid getimage getitem getlayercols getlibrary getstack getsymbol gettin getunique iacclose iacconnect iacdisconnect iacopen iacrequest index indexed info invangle invdistance iteminfo joinfile keyword length listfile listitem listunique locase log max menu min mod noecho null okangle okdistance open pathname prefix query quote quoteexists r radang random read rename response round scratchname search show sin sort sqrt subst substr suffix tan task token translate trim truncate type unquote upcase username value variable verify write + +syn keyword amlDir contained abbreviations above all aml amlpath append arc args atool brief by call canvas cc center cl codepage commands conv_watch_to_aml coordinates cr create current cursor cwta dalines data date_format delete delvar describe dfmt digitizer display do doend dv echo else enable encode encrypt end error expansion fail file flushpoints force form format frame fullscreen function getlastpoint getpoint goto iacreturn if ignore info inform key keypad label lc left lf lg list listchar listfiles listglobal listheader listlocal listprogram listvar ll lp lr lv map matrix menu menupath menutype mess message[s] modal mouse nopaging off on others page pause pinaction popup position pt pulldown push pushpoint r repeat return right routine run runwatch rw screen seconds select self setchar severity show sidebar single size staggered station stop stripe sys system tablet tb terminal test then thread to top translate tty ty type uc ul until ur usage w warning watch when while window workspace + +syn keyword amlDir2 contained delvar dv s set setvar sv + +syn keyword amlOutput contained inform warning error pause stop tty ty type + + +" AML Directives: +syn match amlDirSym "&" +syn match amlDirective "&[a-zA-Z]*" contains=amlDir,amlDir2,amlDirSym + +" AML Functions +syn region amlFunc start="\[ *[a-zA-Z]*" end="\]" contains=amlFunction,amlVar +syn match amlFunc2 "\[.*\[.*\].*\]" contains=amlFunction,amlVar + +" Numbers: +"syn match amlNumber "-\=\<[0-9]*\.\=[0-9_]\>" + +" Quoted Strings: +syn region amlQuote start=+"+ skip=+\\"+ end=+"+ contains=amlVar +syn region amlQuote start=+'+ skip=+\\'+ end=+'+ + +" ARC Application Commands only selected at the beginning of the line, +" or after a one line &if &then statement +syn match amlAppCmd "^ *[a-zA-Z]*" contains=amlArcCmd,amlInfoCmd,amlTabCmd,amlVtrCmd,amlFormedCmd +syn region amlAppCmd start="&then" end="$" contains=amlArcCmd,amlFormedCmd,amlInfoCmd,amlTabCmd,amlVtrCmd,amlFunction,amlDirective,amlVar2,amlSkip,amlVar,amlComment + +" Variables +syn region amlVar start="%" end="%" +syn region amlVar start="%" end="%" contained +syn match amlVar2 "&s [a-zA-Z_.0-9]*" contains=amlDir2,amlDirSym +syn match amlVar2 "&sv [a-zA-Z_.0-9]*" contains=amlDir2,amlDirSym +syn match amlVar2 "&set [a-zA-Z_.0-9]*" contains=amlDir2,amlDirSym +syn match amlVar2 "&setvar [a-zA-Z_.0-9]*" contains=amlDir2,amlDirSym +syn match amlVar2 "&dv [a-zA-Z_.0-9]*" contains=amlDir2,amlDirSym +syn match amlVar2 "&delvar [a-zA-Z_.0-9]*" contains=amlDir2,amlDirSym + +" Formedit 2 word commands +syn match amlFormed "^ *check box" +syn match amlFormed "^ *data list" +syn match amlFormed "^ *symbol list" + +" Tables 2 word commands +syn match amlTab "^ *q stop" +syn match amlTab "^ *quit stop" + +" Comments: +syn match amlComment "/\*.*" + +" Regions for skipping over (not highlighting) program output strings: +syn region amlSkip matchgroup=amlOutput start="&call" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&routine" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&inform" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&return &inform" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&return &warning" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&return &error" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&pause" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&stop" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&tty" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&ty" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&typ" end="$" contains=amlVar +syn region amlSkip matchgroup=amlOutput start="&type" end="$" contains=amlVar + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_aml_syntax_inits") + if version < 508 + let did_aml_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink amlComment Comment + HiLink amlNumber Number + HiLink amlQuote String + HiLink amlVar Identifier + HiLink amlVar2 Identifier + HiLink amlFunction PreProc + HiLink amlDir Statement + HiLink amlDir2 Statement + HiLink amlDirSym Statement + HiLink amlOutput Statement + HiLink amlArcCmd ModeMsg + HiLink amlFormedCmd amlArcCmd + HiLink amlTabCmd amlArcCmd + HiLink amlInfoCmd amlArcCmd + HiLink amlVtrCmd amlArcCmd + HiLink amlFormed amlArcCmd + HiLink amlTab amlArcCmd + + delcommand HiLink +endif + +let b:current_syntax = "aml" diff --git a/runtime/syntax/ampl.vim b/runtime/syntax/ampl.vim new file mode 100644 index 000000000..7f4dfa994 --- /dev/null +++ b/runtime/syntax/ampl.vim @@ -0,0 +1,150 @@ +" Language: ampl (A Mathematical Programming Language) +" Maintainer: Krief David <david.krief@etu.enseeiht.fr> or <david_krief@hotmail.com> +" Last Change: 2003 May 11 + + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + + + +"-- +syn match amplEntityKeyword "\(subject to\)\|\(subj to\)\|\(s\.t\.\)" +syn keyword amplEntityKeyword minimize maximize objective + +syn keyword amplEntityKeyword coeff coef cover obj default +syn keyword amplEntityKeyword from to to_come net_in net_out +syn keyword amplEntityKeyword dimen dimension + + + +"-- +syn keyword amplType integer binary set param var +syn keyword amplType node ordered circular reversed symbolic +syn keyword amplType arc + + + +"-- +syn keyword amplStatement check close \display drop include +syn keyword amplStatement print printf quit reset restore +syn keyword amplStatement solve update write shell model +syn keyword amplStatement data option let solution fix +syn keyword amplStatement unfix end function pipe format + + + +"-- +syn keyword amplConditional if then else and or +syn keyword amplConditional exists forall in not within + + + +"-- +syn keyword amplRepeat while repeat for + + + +"-- +syn keyword amplOperators union diff difference symdiff sum +syn keyword amplOperators inter intersect intersection cross setof +syn keyword amplOperators by less mod div product +"syn keyword amplOperators min max +"conflict between functions max, min and operators max, min + +syn match amplBasicOperators "||\|<=\|==\|\^\|<\|=\|!\|-\|\.\.\|:=" +syn match amplBasicOperators "&&\|>=\|!=\|\*\|>\|:\|/\|+\|\*\*" + + + + +"-- +syn match amplComment "\#.*" +syn region amplComment start=+\/\*+ end=+\*\/+ + +syn region amplStrings start=+\'+ skip=+\\'+ end=+\'+ +syn region amplStrings start=+\"+ skip=+\\"+ end=+\"+ + +syn match amplNumerics "[+-]\=\<\d\+\(\.\d\+\)\=\([dDeE][-+]\=\d\+\)\=\>" +syn match amplNumerics "[+-]\=Infinity" + + +"-- +syn keyword amplSetFunction card next nextw prev prevw +syn keyword amplSetFunction first last member ord ord0 + +syn keyword amplBuiltInFunction abs acos acosh alias asin +syn keyword amplBuiltInFunction asinh atan atan2 atanh ceil +syn keyword amplBuiltInFunction cos exp floor log log10 +syn keyword amplBuiltInFunction max min precision round sin +syn keyword amplBuiltInFunction sinh sqrt tan tanh trunc + +syn keyword amplRandomGenerator Beta Cauchy Exponential Gamma Irand224 +syn keyword amplRandomGenerator Normal Poisson Uniform Uniform01 + + + +"-- to highlight the 'dot-suffixes' +syn match amplDotSuffix "\h\w*\.\(lb\|ub\)"hs=e-2 +syn match amplDotSuffix "\h\w*\.\(lb0\|lb1\|lb2\|lrc\|ub0\)"hs=e-3 +syn match amplDotSuffix "\h\w*\.\(ub1\|ub2\|urc\|val\|lbs\|ubs\)"hs=e-3 +syn match amplDotSuffix "\h\w*\.\(init\|body\|dinit\|dual\)"hs=e-4 +syn match amplDotSuffix "\h\w*\.\(init0\|ldual\|slack\|udual\)"hs=e-5 +syn match amplDotSuffix "\h\w*\.\(lslack\|uslack\|dinit0\)"hs=e-6 + + + +"-- +syn match amplPiecewise "<<\|>>" + + + +"-- Todo. +syn keyword amplTodo contained TODO FIXME XXX + + + + + + + + + + +if version >= 508 || !exists("did_ampl_syntax_inits") + if version < 508 + let did_ampl_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later. + HiLink amplEntityKeyword Keyword + HiLink amplType Type + HiLink amplStatement Statement + HiLink amplOperators Operator + HiLink amplBasicOperators Operator + HiLink amplConditional Conditional + HiLink amplRepeat Repeat + HiLink amplStrings String + HiLink amplNumerics Number + HiLink amplSetFunction Function + HiLink amplBuiltInFunction Function + HiLink amplRandomGenerator Function + HiLink amplComment Comment + HiLink amplDotSuffix Special + HiLink amplPiecewise Special + + delcommand HiLink +endif + +let b:current_syntax = "ampl" + +" vim: ts=8 + + diff --git a/runtime/syntax/ant.vim b/runtime/syntax/ant.vim new file mode 100644 index 000000000..6846ec6bd --- /dev/null +++ b/runtime/syntax/ant.vim @@ -0,0 +1,97 @@ +" Vim syntax file +" Language: ANT build file (xml) +" Maintainer: Johannes Zellner <johannes@zellner.org> +" Last Change: Tue Apr 27 13:05:59 CEST 2004 +" Filenames: build.xml +" $Id$ + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:ant_cpo_save = &cpo +set cpo&vim + +runtime! syntax/xml.vim + +syn case ignore + +if !exists('*AntSyntaxScript') + fun AntSyntaxScript(tagname, synfilename) + unlet b:current_syntax + let s:include = expand("<sfile>:p:h").'/'.a:synfilename + if filereadable(s:include) + exe 'syn include @ant'.a:tagname.' '.s:include + else + exe 'syn include @ant'.a:tagname." $VIMRUNTIME/syntax/".a:synfilename + endif + + exe 'syn region ant'.a:tagname + \." start=#<script[^>]\\{-}language\\s*=\\s*['\"]".a:tagname."['\"]\\(>\\|[^>]*[^/>]>\\)#" + \.' end=#</script>#' + \.' fold' + \.' contains=@ant'.a:tagname.',xmlCdataStart,xmlCdataEnd,xmlTag,xmlEndTag' + \.' keepend' + exe 'syn cluster xmlRegionHook add=ant'.a:tagname + endfun +endif + +" TODO: add more script languages here ? +call AntSyntaxScript('javascript', 'javascript.vim') +call AntSyntaxScript('jpython', 'python.vim') + + +syn cluster xmlTagHook add=antElement + +syn keyword antElement display WsdlToDotnet addfiles and ant antcall antstructure apply archives arg argument +syn keyword antElement display assertions attrib attribute available basename bcc blgenclient bootclasspath +syn keyword antElement display borland bottom buildnumber buildpath buildpathelement bunzip2 bzip2 cab +syn keyword antElement display catalogpath cc cccheckin cccheckout cclock ccmcheckin ccmcheckintask ccmcheckout +syn keyword antElement display ccmcreatetask ccmkattr ccmkbl ccmkdir ccmkelem ccmklabel ccmklbtype +syn keyword antElement display ccmreconfigure ccrmtype ccuncheckout ccunlock ccupdate checksum chgrp chmod +syn keyword antElement display chown classconstants classes classfileset classpath commandline comment +syn keyword antElement display compilerarg compilerclasspath concat concatfilter condition copy copydir +syn keyword antElement display copyfile coveragepath csc custom cvs cvschangelog cvspass cvstagdiff cvsversion +syn keyword antElement display daemons date defaultexcludes define delete deletecharacters deltree depend +syn keyword antElement display depends dependset depth description different dirname dirset disable dname +syn keyword antElement display doclet doctitle dtd ear echo echoproperties ejbjar element enable entity entry +syn keyword antElement display env equals escapeunicode exclude excludepackage excludesfile exec execon +syn keyword antElement display existing expandproperties extdirs extension extensionSet extensionset factory +syn keyword antElement display fail filelist filename filepath fileset filesmatch filetokenizer filter +syn keyword antElement display filterchain filterreader filters filterset filtersfile fixcrlf footer format +syn keyword antElement display from ftp generic genkey get gjdoc grant group gunzip gzip header headfilter http +syn keyword antElement display ignoreblank ilasm ildasm import importtypelib include includesfile input iplanet +syn keyword antElement display iplanet-ejbc isfalse isreference isset istrue jar jarlib-available +syn keyword antElement display jarlib-manifest jarlib-resolve java javac javacc javadoc javadoc2 jboss jdepend +syn keyword antElement display jjdoc jjtree jlink jonas jpcoverage jpcovmerge jpcovreport jsharpc jspc +syn keyword antElement display junitreport jvmarg lib libfileset linetokenizer link loadfile loadproperties +syn keyword antElement display location macrodef mail majority manifest map mapper marker mergefiles message +syn keyword antElement display metainf method mimemail mkdir mmetrics modified move mparse none not options or +syn keyword antElement display os outputproperty package packageset parallel param patch path pathconvert +syn keyword antElement display pathelement patternset permissions prefixlines present presetdef project +syn keyword antElement display property propertyfile propertyref propertyset pvcs pvcsproject record reference +syn keyword antElement display regexp rename renameext replace replacefilter replaceregex replaceregexp +syn keyword antElement display replacestring replacetoken replacetokens replacevalue replyto report resource +syn keyword antElement display revoke rmic root rootfileset rpm scp section selector sequential serverdeploy +syn keyword antElement display setproxy signjar size sleep socket soscheckin soscheckout sosget soslabel source +syn keyword antElement display sourcepath sql src srcfile srcfilelist srcfiles srcfileset sshexec stcheckin +syn keyword antElement display stcheckout stlabel stlist stringtokenizer stripjavacomments striplinebreaks +syn keyword antElement display striplinecomments style subant substitution support symlink sync sysproperty +syn keyword antElement display syspropertyset tabstospaces tag taglet tailfilter tar tarfileset target +syn keyword antElement display targetfile targetfilelist targetfileset taskdef tempfile test testlet text title +syn keyword antElement display to token tokenfilter touch transaction translate triggers trim tstamp type +syn keyword antElement display typedef unjar untar unwar unzip uptodate url user vbc vssadd vsscheckin +syn keyword antElement display vsscheckout vsscp vsscreate vssget vsshistory vsslabel waitfor war wasclasspath +syn keyword antElement display webapp webinf weblogic weblogictoplink websphere whichresource wlclasspath +syn keyword antElement display wljspc wsdltodotnet xmlcatalog xmlproperty xmlvalidate xslt zip zipfileset +syn keyword antElement display zipgroupfileset + +hi def link antElement Statement + +let b:current_syntax = "ant" + +let &cpo = s:ant_cpo_save +unlet s:ant_cpo_save + +" vim: ts=8 diff --git a/runtime/syntax/antlr.vim b/runtime/syntax/antlr.vim new file mode 100644 index 000000000..19000293f --- /dev/null +++ b/runtime/syntax/antlr.vim @@ -0,0 +1,70 @@ +" Vim syntax file +" Antlr: ANTLR, Another Tool For Language Recognition <www.antlr.org> +" Maintainer: Mathieu Clabaut <mathieu.clabaut@free.fr> +" LastChange: 02 May 2001 +" Original: Comes from JavaCC.vim + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" This syntac file is a first attempt. It is far from perfect... + +" Uses java.vim, and adds a few special things for JavaCC Parser files. +" Those files usually have the extension *.jj + +" source the java.vim file +if version < 600 + so <sfile>:p:h/java.vim +else + runtime! syntax/java.vim + unlet b:current_syntax +endif + +"remove catching errors caused by wrong parenthesis (does not work in antlr +"files) (first define them in case they have not been defined in java) +syn match javaParen "--" +syn match javaParenError "--" +syn match javaInParen "--" +syn match javaError2 "--" +syn clear javaParen +syn clear javaParenError +syn clear javaInParen +syn clear javaError2 + +" remove function definitions (they look different) (first define in +" in case it was not defined in java.vim) +"syn match javaFuncDef "--" +"syn clear javaFuncDef +"syn match javaFuncDef "[a-zA-Z][a-zA-Z0-9_. \[\]]*([^-+*/()]*)[ \t]*:" contains=javaType +" syn region javaFuncDef start=+t[a-zA-Z][a-zA-Z0-9_. \[\]]*([^-+*/()]*,[ ]*+ end=+)[ \t]*:+ + +syn keyword antlrPackages options language buildAST +syn match antlrPackages "PARSER_END([^)]*)" +syn match antlrPackages "PARSER_BEGIN([^)]*)" +syn match antlrSpecToken "<EOF>" +" the dot is necessary as otherwise it will be matched as a keyword. +syn match antlrSpecToken ".LOOKAHEAD("ms=s+1,me=e-1 +syn match antlrSep "[|:]\|\.\." +syn keyword antlrActionToken TOKEN SKIP MORE SPECIAL_TOKEN +syn keyword antlrError DEBUG IGNORE_IN_BNF + +if version >= 508 || !exists("did_antlr_syntax_inits") + if version < 508 + let did_antlr_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + HiLink antlrSep Statement + HiLink antlrPackages Statement + delcommand HiLink +endif + +let b:current_syntax = "antlr" + +" vim: ts=8 diff --git a/runtime/syntax/apache.vim b/runtime/syntax/apache.vim new file mode 100644 index 000000000..4fe9e8e0b --- /dev/null +++ b/runtime/syntax/apache.vim @@ -0,0 +1,275 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: Apache configuration (httpd.conf, srm.conf, access.conf, .htaccess) +" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> +" Last Change: 2002-10-15 +" URL: http://trific.ath.cx/Ftp/vim/syntax/apache.vim +" Note: define apache_version to your Apache version, e.g. "1.3", "2", "2.0.39" + +" Setup +if version >= 600 + if exists("b:current_syntax") + finish + endif +else + syntax clear +endif + +if exists("apache_version") + let s:av = apache_version +else + let s:av = "1.3" +endif +let s:av = substitute(s:av, "[^.0-9]", "", "g") +let s:av = substitute(s:av, "^\\d\\+$", "\\0.999", "") +let s:av = substitute(s:av, "^\\d\\+\\.\\d\\+$", "\\0.999", "") +let s:av = substitute(s:av, "\\<\\d\\>", "0\\0", "g") +let s:av = substitute(s:av, "\\<\\d\\d\\>", "0\\0", "g") +let s:av = substitute(s:av, "[.]", "", "g") + +syn case ignore + +" Base constructs +syn match apacheComment "^\s*#.*$" contains=apacheFixme +if s:av >= "002000000" + syn match apacheUserID "#-\?\d\+\>" +endif +syn case match +syn keyword apacheFixme FIXME TODO XXX NOT +syn case ignore +syn match apacheAnything "\s[^>]*" contained +syn match apacheError "\w\+" contained +syn region apacheString start=+"+ end=+"+ skip=+\\\\\|\\\"+ + +" Core and mpm +syn keyword apacheDeclaration AccessFileName AddDefaultCharset AllowOverride AuthName AuthType ContentDigest DefaultType DocumentRoot ErrorDocument ErrorLog HostNameLookups IdentityCheck Include KeepAlive KeepAliveTimeout LimitRequestBody LimitRequestFields LimitRequestFieldsize LimitRequestLine LogLevel MaxKeepAliveRequests NameVirtualHost Options Require RLimitCPU RLimitMEM RLimitNPROC Satisfy ScriptInterpreterSource ServerAdmin ServerAlias ServerName ServerPath ServerRoot ServerSignature ServerTokens TimeOut UseCanonicalName +if s:av < "002000000" + syn keyword apacheDeclaration AccessConfig AddModule BindAddress BS2000Account ClearModuleList CoreDumpDirectory Group Listen ListenBacklog LockFile MaxClients MaxRequestsPerChild MaxSpareServers MinSpareServers PidFile Port ResourceConfig ScoreBoardFile SendBufferSize ServerType StartServers ThreadsPerChild ThreadStackSize User +endif +if s:av >= "002000000" + syn keyword apacheDeclaration AcceptPathInfo CGIMapExtension EnableMMAP FileETag ForceType LimitXMLRequestBody SetHandler SetInputFilter SetOutputFilter + syn keyword apacheOption INode MTime Size +endif +syn keyword apacheOption Any All On Off Double EMail DNS Min Minimal OS Prod ProductOnly Full +syn keyword apacheOption emerg alert crit error warn notice info debug +syn keyword apacheOption registry script inetd standalone +syn match apacheOptionOption "[+-]\?\<\(ExecCGI\|FollowSymLinks\|Includes\|IncludesNoExec\|Indexes\|MultiViews\|SymLinksIfOwnerMatch\)\>" +syn keyword apacheOption user group valid-user +syn case match +syn keyword apacheMethodOption GET POST PUT DELETE CONNECT OPTIONS TRACE PATCH PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK contained +syn case ignore +syn match apacheSection "<\/\=\(Directory\|DirectoryMatch\|Files\|FilesMatch\|IfModule\|IfDefine\|Location\|LocationMatch\|VirtualHost\)\+.*>" contains=apacheAnything +syn match apacheLimitSection "<\/\=\(Limit\|LimitExcept\)\+.*>" contains=apacheLimitSectionKeyword,apacheMethodOption,apacheError +syn keyword apacheLimitSectionKeyword Limit LimitExcept contained +syn match apacheAuthType "AuthType\s.*$" contains=apacheAuthTypeValue +syn keyword apacheAuthTypeValue Basic Digest +syn match apacheAllowOverride "AllowOverride\s.*$" contains=apacheAllowOverrideValue,apacheComment +syn keyword apacheAllowOverrideValue AuthConfig FileInfo Indexes Limit Options contained +if s:av >= "002000000" + syn keyword apacheDeclaration CoreDumpDirectory Group Listen ListenBacklog LockFile MaxClients MaxMemFree MaxRequestsPerChild MaxSpareThreads MaxSpareThreadsPerChild MinSpareThreads NumServers PidFile ScoreBoardFile SendBufferSize ServerLimit StartServers StartThreads ThreadLimit ThreadsPerChild User + syn keyword apacheDeclaration MaxThreads ThreadStackSize + syn keyword apacheDeclaration AssignUserId ChildPerUserId + syn keyword apacheDeclaration AcceptMutex MaxSpareServers MinSpareServers + syn keyword apacheOption flock fcntl sysvsem pthread +endif + +" Modules +syn match apacheAllowDeny "Allow\s\+from.*$" contains=apacheAllowDenyValue,apacheComment +syn match apacheAllowDeny "Deny\s\+from.*$" contains=apacheAllowDenyValue,apacheComment +syn keyword apacheAllowDenyValue All None contained +syn match apacheOrder "^\s*Order\s.*$" contains=apacheOrderValue,apacheComment +syn keyword apacheOrderValue Deny Allow contained +syn keyword apacheDeclaration Action Script +syn keyword apacheDeclaration Alias AliasMatch Redirect RedirectMatch RedirectTemp RedirectPermanent ScriptAlias ScriptAliasMatch +syn keyword apacheOption permanent temp seeother gone +syn keyword apacheDeclaration AuthAuthoritative AuthGroupFile AuthUserFile +syn keyword apacheDeclaration Anonymous Anonymous_Authoritative Anonymous_LogEmail Anonymous_MustGiveEmail Anonymous_NoUserID Anonymous_VerifyEmail +if s:av < "002000000" + syn keyword apacheDeclaration AuthDBGroupFile AuthDBUserFile AuthDBAuthoritative +endif +syn keyword apacheDeclaration AuthDBMGroupFile AuthDBMUserFile AuthDBMAuthoritative +if s:av >= "002000000" + syn keyword apacheDeclaration AuthDBMType + syn keyword apacheOption default SDBM GDBM NDBM DB +endif +syn keyword apacheDeclaration AuthDigestAlgorithm AuthDigestDomain AuthDigestFile AuthDigestGroupFile AuthDigestNcCheck AuthDigestNonceFormat AuthDigestNonceLifetime AuthDigestQop +syn keyword apacheOption none auth auth-int MD5 MD5-sess +if s:av >= "002000000" + syn keyword apacheDeclaration AuthLDAPAuthoritative AuthLDAPBindON AuthLDAPBindPassword AuthLDAPCompareDNOnServer AuthLDAPDereferenceAliases AuthLDAPEnabled AuthLDAPFrontPageHack AuthLDAPGroupAttribute AuthLDAPGroupAttributeIsDN AuthLDAPRemoteUserIsDN AuthLDAPStartTLS AuthLDAPUrl + syn keyword apacheOption always never searching finding +endif +if s:av < "002000000" + syn keyword apacheDeclaration FancyIndexing +endif +syn keyword apacheDeclaration AddAlt AddAltByEncoding AddAltByType AddDescription AddIcon AddIconByEncoding AddIconByType DefaultIcon HeaderName IndexIgnore IndexOptions IndexOrderDefault ReadmeName +syn keyword apacheOption DescriptionWidth FancyIndexing FoldersFirst IconHeight IconsAreLinks IconWidth NameWidth ScanHTMLTitles SuppressColumnSorting SuppressDescription SuppressHTMLPreamble SuppressLastModified SuppressSize TrackModified +syn keyword apacheOption Ascending Descending Name Date Size Description +if s:av >= "002000000" + syn keyword apacheOption HTMLTable SupressIcon SupressRules VersionSort +endif +if s:av < "002000000" + syn keyword apacheDeclaration BrowserMatch BrowserMatchNoCase +endif +if s:av >= "002000000" + syn keyword apacheDeclaration CacheDefaultExpire CacheEnable CacheForceCompletion CacheIgnoreCacheControl CacheIgnoreNoLastMod CacheLastModifiedFactor CacheMaxExpire CacheMaxStreamingBuffer +endif +syn keyword apacheDeclaration MetaFiles MetaDir MetaSuffix +syn keyword apacheDeclaration ScriptLog ScriptLogLength ScriptLogBuffer +if s:av >= "002000000" + syn keyword apacheDeclaration ScriptStock + syn keyword apacheDeclaration CharsetDefault CharsetOptions CharsetSourceEnc + syn keyword apacheOption DebugLevel ImplicitAdd NoImplicitAdd +endif +syn keyword apacheDeclaration Dav DavDepthInfinity DavLockDB DavMinTimeout +if s:av < "002000000" + syn keyword apacheDeclaration Define +end +if s:av >= "002000000" + syn keyword apacheDeclaration DeflateBufferSize DeflateFilterNote DeflateMemLevel DeflateWindowSize +endif +if s:av < "002000000" + syn keyword apacheDeclaration AuthDigestFile +endif +syn keyword apacheDeclaration DirectoryIndex +if s:av >= "002000000" + syn keyword apacheDeclaration ProtocolEcho +endif +syn keyword apacheDeclaration PassEnv SetEnv UnsetEnv +syn keyword apacheDeclaration Example +syn keyword apacheDeclaration ExpiresActive ExpiresByType ExpiresDefault +if s:av >= "002000000" + syn keyword apacheDeclaration ExtFilterDefine ExtFilterOptions + syn keyword apacheOption PreservesContentLength DebugLevel LogStderr NoLogStderr + syn keyword apacheDeclaration CacheFile MMapFile +endif +syn keyword apacheDeclaration Header +if s:av >= "002000000" + syn keyword apacheDeclaration RequestHeader +endif +syn keyword apacheOption set unset append add +syn keyword apacheDeclaration ImapMenu ImapDefault ImapBase +syn keyword apacheOption none formatted semiformatted unformatted +syn keyword apacheOption nocontent referer error map +syn keyword apacheDeclaration XBitHack +if s:av >= "002000000" + syn keyword apacheDeclaration SSIEndTag SSIErrorMsg SSIStartTag SSITimeFormat SSIUndefinedEcho +endif +syn keyword apacheOption on off full +syn keyword apacheDeclaration AddModuleInfo +syn keyword apacheDeclaration ISAPIReadAheadBuffer ISAPILogNotSupported ISAPIAppendLogToErrors ISAPIAppendLogToQuery +if s:av >= "002000000" + syn keyword apacheDeclaration ISAPICacheFile ISAIPFakeAsync + syn keyword apacheDeclaration LDAPCacheEntries LDAPCacheTTL LDAPCertDBPath LDAPOpCacheEntries LDAPOpCacheTTL LDAPSharedCacheSize +endif +if s:av < "002000000" + syn keyword apacheDeclaration AgentLog +endif +syn keyword apacheDeclaration CookieLog CustomLog LogFormat TransferLog +if s:av < "002000000" + syn keyword apacheDeclaration RefererIgnore RefererLog +endif +if s:av >= "002000000" +endif +syn keyword apacheDeclaration AddCharset AddEncoding AddHandler AddLanguage AddType DefaultLanguage RemoveEncoding RemoveHandler RemoveType TypesConfig +if s:av < "002000000" + syn keyword apacheDeclaration ForceType SetHandler +endif +if s:av >= "002000000" + syn keyword apacheDeclaration AddInputFilter AddOutputFilter ModMimeUsePathInfo MultiviewsMatch RemoveInputFilter RemoveOutputFilter +endif +syn keyword apacheDeclaration MimeMagicFile +syn keyword apacheDeclaration MMapFile +syn keyword apacheDeclaration CacheNegotiatedDocs LanguagePriority +if s:av >= "002000000" + syn keyword apacheDeclaration ForceLanguagePriority +endif +syn keyword apacheDeclaration PerlModule PerlRequire PerlTaintCheck PerlWarn +syn keyword apacheDeclaration PerlSetVar PerlSetEnv PerlPassEnv PerlSetupEnv +syn keyword apacheDeclaration PerlInitHandler PerlPostReadRequestHandler PerlHeaderParserHandler +syn keyword apacheDeclaration PerlTransHandler PerlAccessHandler PerlAuthenHandler PerlAuthzHandler +syn keyword apacheDeclaration PerlTypeHandler PerlFixupHandler PerlHandler PerlLogHandler +syn keyword apacheDeclaration PerlCleanupHandler PerlChildInitHandler PerlChildExitHandler +syn keyword apacheDeclaration PerlRestartHandler PerlDispatchHandler +syn keyword apacheDeclaration PerlFreshRestart PerlSendHeader +syn keyword apacheDeclaration php_value php_flag php_admin_value php_admin_flag +syn keyword apacheDeclaration AllowCONNECT NoProxy ProxyBlock ProxyDomain ProxyPass ProxyPassReverse ProxyReceiveBufferSize ProxyRemote ProxyRequests ProxyVia +if s:av < "002000000" + syn keyword apacheDeclaration CacheRoot CacheSize CacheMaxExpire CacheDefaultExpire CacheLastModifiedFactor CacheGcInterval CacheDirLevels CacheDirLength CacheForceCompletion NoCache + syn keyword apacheOption block +endif +if s:av >= "002000000" + syn match apacheSection "<\/\=\(Proxy\|ProxyMatch\)\+.*>" contains=apacheAnything + syn keyword apacheDeclaration ProxyErrorOverride ProxyIOBufferSize ProxyMaxForwards ProxyPreserveHost ProxyRemoteMatch ProxyTimeout +endif +syn keyword apacheDeclaration RewriteEngine RewriteOptions RewriteLog RewriteLogLevel RewriteLock RewriteMap RewriteBase RewriteCond RewriteRule +syn keyword apacheOption inherit +if s:av < "002000000" + syn keyword apacheDeclaration RoamingAlias +endif +syn keyword apacheDeclaration BrowserMatch BrowserMatchNoCase SetEnvIf SetEnvIfNoCase +syn keyword apacheDeclaration LoadFile LoadModule +syn keyword apacheDeclaration CheckSpelling +syn keyword apacheDeclaration SSLCACertificateFile SSLCACertificatePath SSLCARevocationFile SSLCARevocationPath SSLCertificateChainFile SSLCertificateFile SSLCertificateKeyFile SSLCipherSuite SSLEngine SSLMutex SSLOptions SSLPassPhraseDialog SSLProtocol SSLRandomSeed SSLRequire SSLRequireSSL SSLSessionCache SSLSessionCacheTimeout SSLVerifyClient SSLVerifyDepth +if s:av < "002000000" + syn keyword apacheDeclaration SSLLog SSLLogLevel +endif +if s:av >= "002000000" + syn keyword apacheDeclaration SSLProxyCACertificateFile SSLProxyCACertificatePath SSLProxyCARevocationFile SSLProxyCARevocationPath SSLProxyCipherSuite SSLProxyEngine SSLProxyMachineCertificateFile SSLProxyMachineCertificatePath SSLProxyProtocol SSLProxyVerify SSLProxyVerifyDepth +endif +syn match apacheOption "[+-]\?\<\(StdEnvVars\|CompatEnvVars\|ExportCertData\|FakeBasicAuth\|StrictRequire\|OptRenegotiate\)\>" +syn keyword apacheOption builtin sem +syn match apacheOption "\(file\|exec\|egd\|dbm\|shm\):" +if s:av < "002000000" + syn match apacheOption "[+-]\?\<\(SSLv2\|SSLv3\|TLSv1\)\>" +endif +if s:av >= "002000000" + syn match apacheOption "[+-]\?\<\(SSLv2\|SSLv3\|TLSv1\|kRSA\|kHDr\|kDHd\|kEDH\|aNULL\|aRSA\|aDSS\|aRH\|eNULL\|DES\|3DES\|RC2\|RC4\|IDEA\|MD5\|SHA1\|SHA\|EXP\|EXPORT40\|EXPORT56\|LOW\|MEDIUM\|HIGH\|RSA\|DH\|EDH\|ADH\|DSS\|NULL\)\>" +endif +syn keyword apacheOption optional require optional_no_ca +syn keyword apacheDeclaration ExtendedStatus +if s:av >= "002000000" + syn keyword apacheDeclaration SuexecUserGroup +endif +syn keyword apacheDeclaration UserDir +syn keyword apacheDeclaration CookieExpires CookieName CookieTracking +if s:av >= "002000000" + syn keyword apacheDeclaration CookieDomain CookieStyle + syn keyword apacheOption Netscape Cookie Cookie2 RFC2109 RFC2965 +endif +syn keyword apacheDeclaration VirtualDocumentRoot VirtualDocumentRootIP VirtualScriptAlias VirtualScriptAliasIP + +" Define the default highlighting +if version >= 508 || !exists("did_apache_syntax_inits") + if version < 508 + let did_apache_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink apacheAllowOverride apacheDeclaration + HiLink apacheAllowOverrideValue apacheOption + HiLink apacheAuthType apacheDeclaration + HiLink apacheAuthTypeValue apacheOption + HiLink apacheOptionOption apacheOption + HiLink apacheDeclaration Function + HiLink apacheAnything apacheOption + HiLink apacheOption Number + HiLink apacheComment Comment + HiLink apacheFixme Todo + HiLink apacheLimitSectionKeyword apacheLimitSection + HiLink apacheLimitSection apacheSection + HiLink apacheSection Label + HiLink apacheMethodOption Type + HiLink apacheAllowDeny Include + HiLink apacheAllowDenyValue Identifier + HiLink apacheOrder Special + HiLink apacheOrderValue String + HiLink apacheString String + HiLink apacheError Error + HiLink apacheUserID Number + + delcommand HiLink +endif + +let b:current_syntax = "apache" diff --git a/runtime/syntax/apachestyle.vim b/runtime/syntax/apachestyle.vim new file mode 100644 index 000000000..375fc70a9 --- /dev/null +++ b/runtime/syntax/apachestyle.vim @@ -0,0 +1,65 @@ +" Vim syntax file +" Language: Apache-Style configuration files (proftpd.conf/apache.conf/..) +" Maintainer: Christian Hammers <ch@westend.com> +" URL: none +" ChangeLog: +" 2001-05-04,ch +" adopted Vim 6.0 syntax style +" 1999-10-28,ch +" initial release + +" The following formats are recognised: +" Apache-style .conf +" # Comment +" Option value +" Option value1 value2 +" Option = value1 value2 #not apache but also allowed +" <Section Name?> +" Option value +" <SubSection Name?> +" </SubSection> +" </Section> + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +syn match apComment /^\s*#.*$/ +syn match apOption /^\s*[^ \t#<=]*/ +"syn match apLastValue /[^ \t<=#]*$/ contains=apComment ugly + +" tags +syn region apTag start=/</ end=/>/ contains=apTagOption,apTagError +" the following should originally be " [^<>]+" but this didn't work :( +syn match apTagOption contained / [-\/_\.:*a-zA-Z0-9]\+/ms=s+1 +syn match apTagError contained /[^>]</ms=s+1 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_apachestyle_syn_inits") + if version < 508 + let did_apachestyle_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink apComment Comment + HiLink apOption Keyword + "HiLink apLastValue Identifier ugly? + HiLink apTag Special + HiLink apTagOption Identifier + HiLink apTagError Error + + delcommand HiLink +endif + +let b:current_syntax = "apachestyle" +" vim: ts=8 diff --git a/runtime/syntax/arch.vim b/runtime/syntax/arch.vim new file mode 100644 index 000000000..d2593fd7e --- /dev/null +++ b/runtime/syntax/arch.vim @@ -0,0 +1,60 @@ +" Vim syntax file +" Language: GNU Arch inventory file. +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/arch/ +" Latest Revision: 2004-05-22 +" arch-tag: 529d60c4-53d8-4d3a-80d6-54ada86d9932 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Set iskeyword since we need `-' (and potentially others) in keywords. +" For version 5.x: Set it globally +" For version 6.x: Set it locally +if version >= 600 + command -nargs=1 SetIsk setlocal iskeyword=<args> +else + command -nargs=1 SetIsk set iskeyword=<args> +endif +SetIsk @,48-57,_,- +delcommand SetIsk + +" Todo +syn keyword archTodo TODO FIXME XXX NOTE + +" Comment +syn region archComment matchgroup=archComment start='^\%(#\|\s\)' end='$' contains=archTodo + +" Keywords +syn keyword archKeyword implicit tagline explicit names +syn keyword archKeyword untagged-source +syn keyword archKeyword exclude junk backup precious unrecognized source skipwhite nextgroup=archRegex + +" Regexes +syn match archRegex contained '\s*\zs.*' + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_arch_syn_inits") + if version < 508 + let did_arch_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink archTodo Todo + HiLink archComment Comment + HiLink archKeyword Keyword + HiLink archRegex String + + delcommand HiLink +endif + +let b:current_syntax = "arch" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/art.vim b/runtime/syntax/art.vim new file mode 100644 index 000000000..c1faddb1e --- /dev/null +++ b/runtime/syntax/art.vim @@ -0,0 +1,44 @@ +" Vim syntax file +" Language: ART-IM and ART*Enterprise +" Maintainer: Dorai Sitaram <ds26@gte.com> +" URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html +" Last Change: Nov 6, 2002 + +if exists("b:current_syntax") + finish +endif + +syn case ignore + +syn keyword artspform => and assert bind +syn keyword artspform declare def-art-fun deffacts defglobal defrule defschema do +syn keyword artspform else for if in$ not or +syn keyword artspform progn retract salience schema test then while + +syn match artvariable "?[^ \t";()|&~]\+" + +syn match artglobalvar "?\*[^ \t";()|&~]\+\*" + +syn match artinstance "![^ \t";()|&~]\+" + +syn match delimiter "[()|&~]" + +syn region string start=/"/ skip=/\\[\\"]/ end=/"/ + +syn match number "\<[-+]\=\([0-9]\+\(\.[0-9]*\)\=\|\.[0-9]\+\)\>" + +syn match comment ";.*$" + +syn match comment "#+:\=ignore" nextgroup=artignore skipwhite skipnl + +syn region artignore start="(" end=")" contained contains=artignore,comment + +syn region artignore start=/"/ skip=/\\[\\"]/ end=/"/ contained + +hi def link artinstance type +hi def link artglobalvar preproc +hi def link artignore comment +hi def link artspform statement +hi def link artvariable function + +let b:current_syntax = "art" diff --git a/runtime/syntax/asm.vim b/runtime/syntax/asm.vim new file mode 100644 index 000000000..09bfe4fac --- /dev/null +++ b/runtime/syntax/asm.vim @@ -0,0 +1,103 @@ +" Vim syntax file +" Language: GNU Assembler +" Maintainer: Kevin Dahlhausen <kdahlhaus@yahoo.com> +" Last Change: 2002 Sep 19 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + + +" storage types +syn match asmType "\.long" +syn match asmType "\.ascii" +syn match asmType "\.asciz" +syn match asmType "\.byte" +syn match asmType "\.double" +syn match asmType "\.float" +syn match asmType "\.hword" +syn match asmType "\.int" +syn match asmType "\.octa" +syn match asmType "\.quad" +syn match asmType "\.short" +syn match asmType "\.single" +syn match asmType "\.space" +syn match asmType "\.string" +syn match asmType "\.word" + +syn match asmLabel "[a-z_][a-z0-9_]*:"he=e-1 +syn match asmIdentifier "[a-z_][a-z0-9_]*" + +" Various #'s as defined by GAS ref manual sec 3.6.2.1 +" Technically, the first decNumber def is actually octal, +" since the value of 0-7 octal is the same as 0-7 decimal, +" I prefer to map it as decimal: +syn match decNumber "0\+[1-7]\=[\t\n$,; ]" +syn match decNumber "[1-9]\d*" +syn match octNumber "0[0-7][0-7]\+" +syn match hexNumber "0[xX][0-9a-fA-F]\+" +syn match binNumber "0[bB][0-1]*" + + +syn match asmSpecialComment ";\*\*\*.*" +syn match asmComment ";.*"hs=s+1 + +syn match asmInclude "\.include" +syn match asmCond "\.if" +syn match asmCond "\.else" +syn match asmCond "\.endif" +syn match asmMacro "\.macro" +syn match asmMacro "\.endm" + +syn match asmDirective "\.[a-z][a-z]\+" + + +syn case match + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_asm_syntax_inits") + if version < 508 + let did_asm_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + HiLink asmSection Special + HiLink asmLabel Label + HiLink asmComment Comment + HiLink asmDirective Statement + + HiLink asmInclude Include + HiLink asmCond PreCondit + HiLink asmMacro Macro + + HiLink hexNumber Number + HiLink decNumber Number + HiLink octNumber Number + HiLink binNumber Number + + HiLink asmSpecialComment Comment + HiLink asmIdentifier Identifier + HiLink asmType Type + + " My default color overrides: + " hi asmSpecialComment ctermfg=red + " hi asmIdentifier ctermfg=lightcyan + " hi asmType ctermbg=black ctermfg=brown + + delcommand HiLink +endif + +let b:current_syntax = "asm" + +" vim: ts=8 diff --git a/runtime/syntax/asm68k.vim b/runtime/syntax/asm68k.vim new file mode 100644 index 000000000..8463e487e --- /dev/null +++ b/runtime/syntax/asm68k.vim @@ -0,0 +1,391 @@ +" Vim syntax file +" Language: Motorola 68000 Assembler +" Maintainer: Steve Wall +" 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. +" Feel free to contribute... +" + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" Partial list of register symbols +syn keyword asm68kReg a0 a1 a2 a3 a4 a5 a6 a7 d0 d1 d2 d3 d4 d5 d6 d7 +syn keyword asm68kReg pc sr ccr sp usp ssp + +" MC68010 +syn keyword asm68kReg vbr sfc sfcr dfc dfcr + +" MC68020 +syn keyword asm68kReg msp isp zpc cacr caar +syn keyword asm68kReg za0 za1 za2 za3 za4 za5 za6 za7 +syn keyword asm68kReg zd0 zd1 zd2 zd3 zd4 zd5 zd6 zd7 + +" MC68030 +syn keyword asm68kReg crp srp tc ac0 ac1 acusr tt0 tt1 mmusr + +" MC68040 +syn keyword asm68kReg dtt0 dtt1 itt0 itt1 urp + +" MC68851 registers +syn keyword asm68kReg cal val scc crp srp drp tc ac psr pcsr +syn keyword asm68kReg bac0 bac1 bac2 bac3 bac4 bac5 bac6 bac7 +syn keyword asm68kReg bad0 bad1 bad2 bad3 bad4 bad5 bad6 bad7 + +" MC68881/82 registers +syn keyword asm68kReg fp0 fp1 fp2 fp3 fp4 fp5 fp6 fp7 +syn keyword asm68kReg control status iaddr fpcr fpsr fpiar + +" M68000 opcodes - order is important! +syn match asm68kOpcode "\<abcd\(\.b\)\=\s" +syn match asm68kOpcode "\<adda\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<addi\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<addq\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<addx\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<add\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<andi\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<and\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<as[lr]\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<b[vc][cs]\(\.[bwls]\)\=\s" +syn match asm68kOpcode "\<beq\(\.[bwls]\)\=\s" +syn match asm68kOpcode "\<bg[et]\(\.[bwls]\)\=\s" +syn match asm68kOpcode "\<b[hm]i\(\.[bwls]\)\=\s" +syn match asm68kOpcode "\<bl[est]\(\.[bwls]\)\=\s" +syn match asm68kOpcode "\<bne\(\.[bwls]\)\=\s" +syn match asm68kOpcode "\<bpl\(\.[bwls]\)\=\s" +syn match asm68kOpcode "\<bchg\(\.[bl]\)\=\s" +syn match asm68kOpcode "\<bclr\(\.[bl]\)\=\s" +syn match asm68kOpcode "\<bfchg\s" +syn match asm68kOpcode "\<bfclr\s" +syn match asm68kOpcode "\<bfexts\s" +syn match asm68kOpcode "\<bfextu\s" +syn match asm68kOpcode "\<bfffo\s" +syn match asm68kOpcode "\<bfins\s" +syn match asm68kOpcode "\<bfset\s" +syn match asm68kOpcode "\<bftst\s" +syn match asm68kOpcode "\<bkpt\s" +syn match asm68kOpcode "\<bra\(\.[bwls]\)\=\s" +syn match asm68kOpcode "\<bset\(\.[bl]\)\=\s" +syn match asm68kOpcode "\<bsr\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<btst\(\.[bl]\)\=\s" +syn match asm68kOpcode "\<callm\s" +syn match asm68kOpcode "\<cas2\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<cas\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<chk2\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<chk\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<clr\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<cmpa\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<cmpi\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<cmpm\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<cmp2\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<cmp\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<db[cv][cs]\(\.w\)\=\s" +syn match asm68kOpcode "\<dbeq\(\.w\)\=\s" +syn match asm68kOpcode "\<db[ft]\(\.w\)\=\s" +syn match asm68kOpcode "\<dbg[et]\(\.w\)\=\s" +syn match asm68kOpcode "\<db[hm]i\(\.w\)\=\s" +syn match asm68kOpcode "\<dbl[est]\(\.w\)\=\s" +syn match asm68kOpcode "\<dbne\(\.w\)\=\s" +syn match asm68kOpcode "\<dbpl\(\.w\)\=\s" +syn match asm68kOpcode "\<dbra\(\.w\)\=\s" +syn match asm68kOpcode "\<div[su]\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<div[su]l\(\.l\)\=\s" +syn match asm68kOpcode "\<eori\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<eor\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<exg\(\.l\)\=\s" +syn match asm68kOpcode "\<extb\(\.l\)\=\s" +syn match asm68kOpcode "\<ext\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<illegal\>" +syn match asm68kOpcode "\<jmp\(\.[ls]\)\=\s" +syn match asm68kOpcode "\<jsr\(\.[ls]\)\=\s" +syn match asm68kOpcode "\<lea\(\.l\)\=\s" +syn match asm68kOpcode "\<link\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<ls[lr]\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<movea\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<movec\(\.l\)\=\s" +syn match asm68kOpcode "\<movem\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<movep\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<moveq\(\.l\)\=\s" +syn match asm68kOpcode "\<moves\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<move\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<mul[su]\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<nbcd\(\.b\)\=\s" +syn match asm68kOpcode "\<negx\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<neg\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<nop\>" +syn match asm68kOpcode "\<not\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<ori\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<or\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<pack\s" +syn match asm68kOpcode "\<pea\(\.l\)\=\s" +syn match asm68kOpcode "\<reset\>" +syn match asm68kOpcode "\<ro[lr]\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<rox[lr]\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<rt[dm]\s" +syn match asm68kOpcode "\<rt[ers]\>" +syn match asm68kOpcode "\<sbcd\(\.b\)\=\s" +syn match asm68kOpcode "\<s[cv][cs]\(\.b\)\=\s" +syn match asm68kOpcode "\<seq\(\.b\)\=\s" +syn match asm68kOpcode "\<s[ft]\(\.b\)\=\s" +syn match asm68kOpcode "\<sg[et]\(\.b\)\=\s" +syn match asm68kOpcode "\<s[hm]i\(\.b\)\=\s" +syn match asm68kOpcode "\<sl[est]\(\.b\)\=\s" +syn match asm68kOpcode "\<sne\(\.b\)\=\s" +syn match asm68kOpcode "\<spl\(\.b\)\=\s" +syn match asm68kOpcode "\<suba\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<subi\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<subq\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<subx\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<sub\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<swap\(\.w\)\=\s" +syn match asm68kOpcode "\<tas\(\.b\)\=\s" +syn match asm68kOpcode "\<tdiv[su]\(\.l\)\=\s" +syn match asm68kOpcode "\<t\(rap\)\=[cv][cs]\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<t\(rap\)\=eq\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<t\(rap\)\=[ft]\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<t\(rap\)\=g[et]\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<t\(rap\)\=[hm]i\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<t\(rap\)\=l[est]\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<t\(rap\)\=ne\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<t\(rap\)\=pl\(\.[wl]\)\=\s" +syn match asm68kOpcode "\<t\(rap\)\=v\>" +syn match asm68kOpcode "\<t\(rap\)\=[cv][cs]\>" +syn match asm68kOpcode "\<t\(rap\)\=eq\>" +syn match asm68kOpcode "\<t\(rap\)\=[ft]\>" +syn match asm68kOpcode "\<t\(rap\)\=g[et]\>" +syn match asm68kOpcode "\<t\(rap\)\=[hm]i\>" +syn match asm68kOpcode "\<t\(rap\)\=l[est]\>" +syn match asm68kOpcode "\<t\(rap\)\=ne\>" +syn match asm68kOpcode "\<t\(rap\)\=pl\>" +syn match asm68kOpcode "\<trap\s" +syn match asm68kOpcode "\<tst\(\.[bwl]\)\=\s" +syn match asm68kOpcode "\<unlk\s" +syn match asm68kOpcode "\<unpk\s" + +" Valid labels +syn match asm68kLabel "^[a-z_?.][a-z0-9_?.$]*$" +syn match asm68kLabel "^[a-z_?.][a-z0-9_?.$]*\s"he=e-1 +syn match asm68kLabel "^\s*[a-z_?.][a-z0-9_?.$]*:"he=e-1 + +" Various number formats +syn match hexNumber "\$[0-9a-fA-F]\+\>" +syn match hexNumber "\<[0-9][0-9a-fA-F]*H\>" +syn match octNumber "@[0-7]\+\>" +syn match octNumber "\<[0-7]\+[QO]\>" +syn match binNumber "%[01]\+\>" +syn match binNumber "\<[01]\+B\>" +syn match decNumber "\<[0-9]\+D\=\>" +syn match floatE "_*E_*" contained +syn match floatExponent "_*E_*[-+]\=[0-9]\+" contained contains=floatE +syn match floatNumber "[-+]\=[0-9]\+_*E_*[-+]\=[0-9]\+" contains=floatExponent +syn match floatNumber "[-+]\=[0-9]\+\.[0-9]\+\(E[-+]\=[0-9]\+\)\=" contains=floatExponent +syn match floatNumber ":\([0-9a-f]\+_*\)\+" + +" Character string constants +syn match asm68kStringError "'[ -~]*'" +syn match asm68kStringError "'[ -~]*$" +syn region asm68kString start="'" skip="''" end="'" oneline contains=asm68kCharError +syn match asm68kCharError "[^ -~]" contained + +" Immediate data +syn match asm68kImmediate "#\$[0-9a-fA-F]\+" contains=hexNumber +syn match asm68kImmediate "#[0-9][0-9a-fA-F]*H" contains=hexNumber +syn match asm68kImmediate "#@[0-7]\+" contains=octNumber +syn match asm68kImmediate "#[0-7]\+[QO]" contains=octNumber +syn match asm68kImmediate "#%[01]\+" contains=binNumber +syn match asm68kImmediate "#[01]\+B" contains=binNumber +syn match asm68kImmediate "#[0-9]\+D\=" contains=decNumber +syn match asm68kSymbol "[a-z_?.][a-z0-9_?.$]*" contained +syn match asm68kImmediate "#[a-z_?.][a-z0-9_?.]*" contains=asm68kSymbol + +" Special items for comments +syn keyword asm68kTodo contained TODO + +" Operators +syn match asm68kOperator "[-+*/]" " Must occur before Comments +syn match asm68kOperator "\.SIZEOF\." +syn match asm68kOperator "\.STARTOF\." +syn match asm68kOperator "<<" " shift left +syn match asm68kOperator ">>" " shift right +syn match asm68kOperator "&" " bit-wise logical and +syn match asm68kOperator "!" " bit-wise logical or +syn match asm68kOperator "!!" " exclusive or +syn match asm68kOperator "<>" " inequality +syn match asm68kOperator "=" " must be before other ops containing '=' +syn match asm68kOperator ">=" +syn match asm68kOperator "<=" +syn match asm68kOperator "==" " operand existance - used in macro definitions + +" Condition code style operators +syn match asm68kOperator "<[CV][CS]>" +syn match asm68kOperator "<EQ>" +syn match asm68kOperator "<G[TE]>" +syn match asm68kOperator "<[HM]I>" +syn match asm68kOperator "<L[SET]>" +syn match asm68kOperator "<NE>" +syn match asm68kOperator "<PL>" + +" Comments +syn match asm68kComment ";.*" contains=asm68kTodo +syn match asm68kComment "\s!.*"ms=s+1 contains=asm68kTodo +syn match asm68kComment "^\s*[*!].*" contains=asm68kTodo + +" Include +syn match asm68kInclude "\<INCLUDE\s" + +" Standard macros +syn match asm68kCond "\<IF\(\.[BWL]\)\=\s" +syn match asm68kCond "\<THEN\(\.[SL]\)\=\>" +syn match asm68kCond "\<ELSE\(\.[SL]\)\=\>" +syn match asm68kCond "\<ENDI\>" +syn match asm68kCond "\<BREAK\(\.[SL]\)\=\>" +syn match asm68kRepeat "\<FOR\(\.[BWL]\)\=\s" +syn match asm68kRepeat "\<DOWNTO\s" +syn match asm68kRepeat "\<TO\s" +syn match asm68kRepeat "\<BY\s" +syn match asm68kRepeat "\<DO\(\.[SL]\)\=\>" +syn match asm68kRepeat "\<ENDF\>" +syn match asm68kRepeat "\<NEXT\(\.[SL]\)\=\>" +syn match asm68kRepeat "\<REPEAT\>" +syn match asm68kRepeat "\<UNTIL\(\.[BWL]\)\=\s" +syn match asm68kRepeat "\<WHILE\(\.[BWL]\)\=\s" +syn match asm68kRepeat "\<ENDW\>" + +" Macro definition +syn match asm68kMacro "\<MACRO\>" +syn match asm68kMacro "\<LOCAL\s" +syn match asm68kMacro "\<MEXIT\>" +syn match asm68kMacro "\<ENDM\>" +syn match asm68kMacroParam "\\[0-9]" + +" Conditional assembly +syn match asm68kPreCond "\<IFC\s" +syn match asm68kPreCond "\<IFDEF\s" +syn match asm68kPreCond "\<IFEQ\s" +syn match asm68kPreCond "\<IFGE\s" +syn match asm68kPreCond "\<IFGT\s" +syn match asm68kPreCond "\<IFLE\s" +syn match asm68kPreCond "\<IFLT\s" +syn match asm68kPreCond "\<IFNC\>" +syn match asm68kPreCond "\<IFNDEF\s" +syn match asm68kPreCond "\<IFNE\s" +syn match asm68kPreCond "\<ELSEC\>" +syn match asm68kPreCond "\<ENDC\>" + +" Loop control +syn match asm68kPreCond "\<REPT\s" +syn match asm68kPreCond "\<IRP\s" +syn match asm68kPreCond "\<IRPC\s" +syn match asm68kPreCond "\<ENDR\>" + +" Directives +syn match asm68kDirective "\<ALIGN\s" +syn match asm68kDirective "\<CHIP\s" +syn match asm68kDirective "\<COMLINE\s" +syn match asm68kDirective "\<COMMON\(\.S\)\=\s" +syn match asm68kDirective "\<DC\(\.[BWLSDXP]\)\=\s" +syn match asm68kDirective "\<DC\.\\[0-9]\s"me=e-3 " Special use in a macro def +syn match asm68kDirective "\<DCB\(\.[BWLSDXP]\)\=\s" +syn match asm68kDirective "\<DS\(\.[BWLSDXP]\)\=\s" +syn match asm68kDirective "\<END\>" +syn match asm68kDirective "\<EQU\s" +syn match asm68kDirective "\<FEQU\(\.[SDXP]\)\=\s" +syn match asm68kDirective "\<FAIL\>" +syn match asm68kDirective "\<FOPT\s" +syn match asm68kDirective "\<\(NO\)\=FORMAT\>" +syn match asm68kDirective "\<IDNT\>" +syn match asm68kDirective "\<\(NO\)\=LIST\>" +syn match asm68kDirective "\<LLEN\s" +syn match asm68kDirective "\<MASK2\>" +syn match asm68kDirective "\<NAME\s" +syn match asm68kDirective "\<NOOBJ\>" +syn match asm68kDirective "\<OFFSET\s" +syn match asm68kDirective "\<OPT\>" +syn match asm68kDirective "\<ORG\(\.[SL]\)\=\>" +syn match asm68kDirective "\<\(NO\)\=PAGE\>" +syn match asm68kDirective "\<PLEN\s" +syn match asm68kDirective "\<REG\s" +syn match asm68kDirective "\<RESTORE\>" +syn match asm68kDirective "\<SAVE\>" +syn match asm68kDirective "\<SECT\(\.S\)\=\s" +syn match asm68kDirective "\<SECTION\(\.S\)\=\s" +syn match asm68kDirective "\<SET\s" +syn match asm68kDirective "\<SPC\s" +syn match asm68kDirective "\<TTL\s" +syn match asm68kDirective "\<XCOM\s" +syn match asm68kDirective "\<XDEF\s" +syn match asm68kDirective "\<XREF\(\.S\)\=\s" + +syn case match + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_asm68k_syntax_inits") + if version < 508 + let did_asm68k_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + " Comment Constant Error Identifier PreProc Special Statement Todo Type + " + " Constant Boolean Character Number String + " Identifier Function + " PreProc Define Include Macro PreCondit + " Special Debug Delimiter SpecialChar SpecialComment Tag + " Statement Conditional Exception Keyword Label Operator Repeat + " Type StorageClass Structure Typedef + + HiLink asm68kComment Comment + HiLink asm68kTodo Todo + + HiLink hexNumber Number " Constant + HiLink octNumber Number " Constant + HiLink binNumber Number " Constant + HiLink decNumber Number " Constant + HiLink floatNumber Number " Constant + HiLink floatExponent Number " Constant + HiLink floatE SpecialChar " Statement + "HiLink floatE Number " Constant + + HiLink asm68kImmediate SpecialChar " Statement + "HiLink asm68kSymbol Constant + + HiLink asm68kString String " Constant + HiLink asm68kCharError Error + HiLink asm68kStringError Error + + HiLink asm68kReg Identifier + HiLink asm68kOperator Identifier + + HiLink asm68kInclude Include " PreProc + HiLink asm68kMacro Macro " PreProc + HiLink asm68kMacroParam Keyword " Statement + + HiLink asm68kDirective Special + HiLink asm68kPreCond Special + + + HiLink asm68kOpcode Statement + HiLink asm68kCond Conditional " Statement + HiLink asm68kRepeat Repeat " Statement + + HiLink asm68kLabel Type + delcommand HiLink +endif + +let b:current_syntax = "asm68k" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/asmh8300.vim b/runtime/syntax/asmh8300.vim new file mode 100644 index 000000000..48699d89c --- /dev/null +++ b/runtime/syntax/asmh8300.vim @@ -0,0 +1,85 @@ +" Vim syntax file +" Language: Hitachi H-8300h specific syntax for GNU Assembler +" Maintainer: Kevin Dahlhausen <kdahlhaus@yahoo.com> +" Last Change: 2002 Sep 19 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +syn match asmDirective "\.h8300[h]*" + +"h8300[h] registers +syn match asmReg "e\=r[0-7][lh]\=" + +"h8300[h] opcodes - order is important! +syn match asmOpcode "add\.[lbw]" +syn match asmOpcode "add[sx :]" +syn match asmOpcode "and\.[lbw]" +syn match asmOpcode "bl[deots]" +syn match asmOpcode "cmp\.[lbw]" +syn match asmOpcode "dec\.[lbw]" +syn match asmOpcode "divx[us].[bw]" +syn match asmOpcode "ext[su]\.[lw]" +syn match asmOpcode "inc\.[lw]" +syn match asmOpcode "mov\.[lbw]" +syn match asmOpcode "mulx[su]\.[bw]" +syn match asmOpcode "neg\.[lbw]" +syn match asmOpcode "not\.[lbw]" +syn match asmOpcode "or\.[lbw]" +syn match asmOpcode "pop\.[wl]" +syn match asmOpcode "push\.[wl]" +syn match asmOpcode "rotx\=[lr]\.[lbw]" +syn match asmOpcode "sha[lr]\.[lbw]" +syn match asmOpcode "shl[lr]\.[lbw]" +syn match asmOpcode "sub\.[lbw]" +syn match asmOpcode "xor\.[lbw]" +syn keyword asmOpcode "andc" "band" "bcc" "bclr" "bcs" "beq" "bf" "bge" "bgt" +syn keyword asmOpcode "bhi" "bhs" "biand" "bild" "bior" "bist" "bixor" "bmi" +syn keyword asmOpcode "bne" "bnot" "bnp" "bor" "bpl" "bpt" "bra" "brn" "bset" +syn keyword asmOpcode "bsr" "btst" "bst" "bt" "bvc" "bvs" "bxor" "cmp" "daa" +syn keyword asmOpcode "das" "eepmov" "eepmovw" "inc" "jmp" "jsr" "ldc" "movfpe" +syn keyword asmOpcode "movtpe" "mov" "nop" "orc" "rte" "rts" "sleep" "stc" +syn keyword asmOpcode "sub" "trapa" "xorc" + +syn case match + + +" Read the general asm syntax +if version < 600 + source <sfile>:p:h/asm.vim +else + runtime! syntax/asm.vim +endif + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_hitachi_syntax_inits") + if version < 508 + let did_hitachi_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink asmOpcode Statement + HiLink asmRegister Identifier + + " My default-color overrides: + "hi asmOpcode ctermfg=yellow + "hi asmReg ctermfg=lightmagenta + + delcommand HiLink +endif + +let b:current_syntax = "asmh8300" + +" vim: ts=8 diff --git a/runtime/syntax/asn.vim b/runtime/syntax/asn.vim new file mode 100644 index 000000000..9fc3d2468 --- /dev/null +++ b/runtime/syntax/asn.vim @@ -0,0 +1,81 @@ +" Vim syntax file +" Language: ASN.1 +" Maintainer: Claudio Fleiner <claudio@fleiner.com> +" URL: http://www.fleiner.com/vim/syntax/asn.vim +" Last Change: 2001 Apr 26 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" keyword definitions +syn keyword asnExternal DEFINITIONS BEGIN END IMPORTS EXPORTS FROM +syn match asnExternal "\<IMPLICIT\s\+TAGS\>" +syn match asnExternal "\<EXPLICIT\s\+TAGS\>" +syn keyword asnFieldOption DEFAULT OPTIONAL +syn keyword asnTagModifier IMPLICIT EXPLICIT +syn keyword asnTypeInfo ABSENT PRESENT SIZE UNIVERSAL APPLICATION PRIVATE +syn keyword asnBoolValue TRUE FALSE +syn keyword asnNumber MIN MAX +syn match asnNumber "\<PLUS-INFINITY\>" +syn match asnNumber "\<MINUS-INFINITY\>" +syn keyword asnType INTEGER REAL STRING BIT BOOLEAN OCTET NULL EMBEDDED PDV +syn keyword asnType BMPString IA5String TeletexString GeneralString GraphicString ISO646String NumericString PrintableString T61String UniversalString VideotexString VisibleString +syn keyword asnType ANY DEFINED +syn match asnType "\.\.\." +syn match asnType "OBJECT\s\+IDENTIFIER" +syn match asnType "TYPE-IDENTIFIER" +syn keyword asnType UTF8String +syn keyword asnStructure CHOICE SEQUENCE SET OF ENUMERATED CONSTRAINED BY WITH COMPONENTS CLASS + +" Strings and constants +syn match asnSpecial contained "\\\d\d\d\|\\." +syn region asnString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=asnSpecial +syn match asnCharacter "'[^\\]'" +syn match asnSpecialCharacter "'\\.'" +syn match asnNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" +syn match asnLineComment "--.*" +syn match asnLineComment "--.*--" + +syn match asnDefinition "^\s*[a-zA-Z][-a-zA-Z0-9_.\[\] \t{}]* *::="me=e-3 contains=asnType +syn match asnBraces "[{}]" + +syn sync ccomment asnComment + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_asn_syn_inits") + if version < 508 + let did_asn_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + HiLink asnDefinition Function + HiLink asnBraces Function + HiLink asnStructure Statement + HiLink asnBoolValue Boolean + HiLink asnSpecial Special + HiLink asnString String + HiLink asnCharacter Character + HiLink asnSpecialCharacter asnSpecial + HiLink asnNumber asnValue + HiLink asnComment Comment + HiLink asnLineComment asnComment + HiLink asnType Type + HiLink asnTypeInfo PreProc + HiLink asnValue Number + HiLink asnExternal Include + HiLink asnTagModifier Function + HiLink asnFieldOption Type + delcommand HiLink +endif + +let b:current_syntax = "asn" + +" vim: ts=8 diff --git a/runtime/syntax/aspperl.vim b/runtime/syntax/aspperl.vim new file mode 100644 index 000000000..0f7ef4687 --- /dev/null +++ b/runtime/syntax/aspperl.vim @@ -0,0 +1,33 @@ +" Vim syntax file +" Language: Active State's PerlScript (ASP) +" Maintainer: Aaron Hope <edh@brioforge.com> +" URL: http://nim.dhs.org/~edh/aspperl.vim +" Last Change: 2001 May 09 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'perlscript' +endif + +if version < 600 + so <sfile>:p:h/html.vim + syn include @AspPerlScript <sfile>:p:h/perl.vim +else + runtime! syntax/html.vim + unlet b:current_syntax + syn include @AspPerlScript syntax/perl.vim +endif + +syn cluster htmlPreproc add=AspPerlScriptInsideHtmlTags + +syn region AspPerlScriptInsideHtmlTags keepend matchgroup=Delimiter start=+<%=\=+ skip=+".*%>.*"+ end=+%>+ contains=@AspPerlScript +syn region AspPerlScriptInsideHtmlTags keepend matchgroup=Delimiter start=+<script\s\+language="\=perlscript"\=[^>]*>+ end=+</script>+ contains=@AspPerlScript + +let b:current_syntax = "aspperl" diff --git a/runtime/syntax/aspvbs.vim b/runtime/syntax/aspvbs.vim new file mode 100644 index 000000000..502791c75 --- /dev/null +++ b/runtime/syntax/aspvbs.vim @@ -0,0 +1,196 @@ +" Vim syntax file +" Language: Microsoft VBScript Web Content (ASP) +" Maintainer: Devin Weaver <ktohg@tritarget.com> +" URL: http://tritarget.com/pub/vim/syntax/aspvbs.vim +" Last Change: 2003 Apr 25 +" Version: $Revision$ +" Thanks to Jay-Jay <vim@jay-jay.net> for a syntax sync hack, hungarian +" notation, and extra highlighting. +" Thanks to patrick dehne <patrick@steidle.net> for the folding code. +" Thanks to Dean Hall <hall@apt7.com> for testing the use of classes in +" VBScripts which I've been too scared to do. + +" Quit when a syntax file was already loaded +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'aspvbs' +endif + +if version < 600 + source <sfile>:p:h/html.vim +else + runtime! syntax/html.vim +endif +unlet b:current_syntax + +syn cluster htmlPreProc add=AspVBScriptInsideHtmlTags + + +" Colored variable names, if written in hungarian notation +hi def AspVBSVariableSimple term=standout ctermfg=3 guifg=#99ee99 +hi def AspVBSVariableComplex term=standout ctermfg=3 guifg=#ee9900 +syn match AspVBSVariableSimple contained "\<\(bln\|byt\|dtm\=\|dbl\|int\|str\)\u\w*" +syn match AspVBSVariableComplex contained "\<\(arr\|obj\)\u\w*" + + +" Functions and methods that are in VB but will cause errors in an ASP page +" This is helpfull if your porting VB code to ASP +" I removed (Count, Item) because these are common variable names in AspVBScript +syn keyword AspVBSError contained Val Str CVar CVDate DoEvents GoSub Return GoTo +syn keyword AspVBSError contained Stop LinkExecute Add Type LinkPoke +syn keyword AspVBSError contained LinkRequest LinkSend Declare Optional Sleep +syn keyword AspVBSError contained ParamArray Static Erl TypeOf Like LSet RSet Mid StrConv +" It may seem that most of these can fit into a keyword clause but keyword takes +" priority over all so I can't get the multi-word matches +syn match AspVBSError contained "\<Def[a-zA-Z0-9_]\+\>" +syn match AspVBSError contained "^\s*Open\s\+" +syn match AspVBSError contained "Debug\.[a-zA-Z0-9_]*" +syn match AspVBSError contained "^\s*[a-zA-Z0-9_]\+:" +syn match AspVBSError contained "[a-zA-Z0-9_]\+![a-zA-Z0-9_]\+" +syn match AspVBSError contained "^\s*#.*$" +syn match AspVBSError contained "\<As\s\+[a-zA-Z0-9_]*" +syn match AspVBSError contained "\<End\>\|\<Exit\>" +syn match AspVBSError contained "\<On\s\+Error\>\|\<On\>\|\<Error\>\|\<Resume\s\+Next\>\|\<Resume\>" +syn match AspVBSError contained "\<Option\s\+\(Base\|Compare\|Private\s\+Module\)\>" +" This one I want 'cause I always seem to mis-spell it. +syn match AspVBSError contained "Respon\?ce\.\S*" +syn match AspVBSError contained "Respose\.\S*" +" When I looked up the VBScript syntax it mentioned that Property Get/Set/Let +" statements are illegal, however, I have recived reports that they do work. +" So I commented it out for now. +" syn match AspVBSError contained "\<Property\s\+\(Get\|Let\|Set\)\>" + +" AspVBScript Reserved Words. +syn match AspVBSStatement contained "\<On\s\+Error\s\+\(Resume\s\+Next\|goto\s\+0\)\>\|\<Next\>" +syn match AspVBSStatement contained "\<End\s\+\(If\|For\|Select\|Class\|Function\|Sub\|With\)\>" +syn match AspVBSStatement contained "\<Exit\s\+\(Do\|For\|Sub\|Function\)\>" +syn match AspVBSStatement contained "\<Option\s\+Explicit\>" +syn match AspVBSStatement contained "\<For\s\+Each\>\|\<For\>" +syn match AspVBSStatement contained "\<Set\>" +syn keyword AspVBSStatement contained Call Class Const Default Dim Do Loop Erase And +syn keyword AspVBSStatement contained Function If Then Else ElseIf Or +syn keyword AspVBSStatement contained Private Public Randomize ReDim +syn keyword AspVBSStatement contained Select Case Sub While With Wend Not + +" AspVBScript Functions +syn keyword AspVBSFunction contained Abs Array Asc Atn CBool CByte CCur CDate CDbl +syn keyword AspVBSFunction contained Chr CInt CLng Cos CreateObject CSng CStr Date +syn keyword AspVBSFunction contained DateAdd DateDiff DatePart DateSerial DateValue +syn keyword AspVBSFunction contained Date Day Exp Filter Fix FormatCurrency +syn keyword AspVBSFunction contained FormatDateTime FormatNumber FormatPercent +syn keyword AspVBSFunction contained GetObject Hex Hour InputBox InStr InStrRev Int +syn keyword AspVBSFunction contained IsArray IsDate IsEmpty IsNull IsNumeric +syn keyword AspVBSFunction contained IsObject Join LBound LCase Left Len LoadPicture +syn keyword AspVBSFunction contained Log LTrim Mid Minute Month MonthName MsgBox Now +syn keyword AspVBSFunction contained Oct Replace RGB Right Rnd Round RTrim +syn keyword AspVBSFunction contained ScriptEngine ScriptEngineBuildVersion +syn keyword AspVBSFunction contained ScriptEngineMajorVersion +syn keyword AspVBSFunction contained ScriptEngineMinorVersion Second Sgn Sin Space +syn keyword AspVBSFunction contained Split Sqr StrComp StrReverse String Tan Time Timer +syn keyword AspVBSFunction contained TimeSerial TimeValue Trim TypeName UBound UCase +syn keyword AspVBSFunction contained VarType Weekday WeekdayName Year + +" AspVBScript Methods +syn keyword AspVBSMethods contained Add AddFolders BuildPath Clear Close Copy +syn keyword AspVBSMethods contained CopyFile CopyFolder CreateFolder CreateTextFile +syn keyword AspVBSMethods contained Delete DeleteFile DeleteFolder DriveExists +syn keyword AspVBSMethods contained Exists FileExists FolderExists +syn keyword AspVBSMethods contained GetAbsolutePathName GetBaseName GetDrive +syn keyword AspVBSMethods contained GetDriveName GetExtensionName GetFile +syn keyword AspVBSMethods contained GetFileName GetFolder GetParentFolderName +syn keyword AspVBSMethods contained GetSpecialFolder GetTempName Items Keys Move +syn keyword AspVBSMethods contained MoveFile MoveFolder OpenAsTextStream +syn keyword AspVBSMethods contained OpenTextFile Raise Read ReadAll ReadLine Remove +syn keyword AspVBSMethods contained RemoveAll Skip SkipLine Write WriteBlankLines +syn keyword AspVBSMethods contained WriteLine +syn match AspVBSMethods contained "Response\.\S*" +" Colorize boolean constants: +syn keyword AspVBSMethods contained true false + +" AspVBScript Number Contstants +" Integer number, or floating point number without a dot. +syn match AspVBSNumber contained "\<\d\+\>" +" Floating point number, with dot +syn match AspVBSNumber contained "\<\d\+\.\d*\>" +" Floating point number, starting with a dot +syn match AspVBSNumber contained "\.\d\+\>" + +" String and Character Contstants +" removed (skip=+\\\\\|\\"+) because VB doesn't have backslash escaping in +" strings (or does it?) +syn region AspVBSString contained start=+"+ end=+"+ keepend + +" AspVBScript Comments +syn region AspVBSComment contained start="^REM\s\|\sREM\s" end="$" contains=AspVBSTodo keepend +syn region AspVBSComment contained start="^'\|\s'" end="$" contains=AspVBSTodo keepend +" misc. Commenting Stuff +syn keyword AspVBSTodo contained TODO FIXME + +" Cosmetic syntax errors commanly found in VB but not in AspVBScript +" AspVBScript doesn't use line numbers +syn region AspVBSError contained start="^\d" end="\s" keepend +" AspVBScript also doesn't have type defining variables +syn match AspVBSError contained "[a-zA-Z0-9_][\$&!#]"ms=s+1 +" Since 'a%' is a VB variable with a type and in AspVBScript you can have 'a%>' +" I have to make a special case so 'a%>' won't show as an error. +syn match AspVBSError contained "[a-zA-Z0-9_]%\($\|[^>]\)"ms=s+1 + +" Top Cluster +syn cluster AspVBScriptTop contains=AspVBSStatement,AspVBSFunction,AspVBSMethods,AspVBSNumber,AspVBSString,AspVBSComment,AspVBSError,AspVBSVariableSimple,AspVBSVariableComplex + +" Folding +syn region AspVBSFold start="^\s*\(class\)\s\+.*$" end="^\s*end\s\+\(class\)\>.*$" fold contained transparent keepend +syn region AspVBSFold start="^\s*\(private\|public\)\=\(\s\+default\)\=\s\+\(sub\|function\)\s\+.*$" end="^\s*end\s\+\(function\|sub\)\>.*$" fold contained transparent keepend + +" Define AspVBScript delimeters +" <%= func("string_with_%>_in_it") %> This is illegal in ASP syntax. +syn region AspVBScriptInsideHtmlTags keepend matchgroup=Delimiter start=+<%=\=+ end=+%>+ contains=@AspVBScriptTop, AspVBSFold +syn region AspVBScriptInsideHtmlTags keepend matchgroup=Delimiter start=+<script\s\+language="\=vbscript"\=[^>]*\s\+runatserver[^>]*>+ end=+</script>+ contains=@AspVBScriptTop + + +" Synchronization +" syn sync match AspVBSSyncGroup grouphere AspVBScriptInsideHtmlTags "<%" +" This is a kludge so the HTML will sync properly +syn sync match htmlHighlight grouphere htmlTag "%>" + + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_aspvbs_syn_inits") + if version < 508 + let did_aspvbs_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + "HiLink AspVBScript Special + HiLink AspVBSLineNumber Comment + HiLink AspVBSNumber Number + HiLink AspVBSError Error + HiLink AspVBSStatement Statement + HiLink AspVBSString String + HiLink AspVBSComment Comment + HiLink AspVBSTodo Todo + HiLink AspVBSFunction Identifier + HiLink AspVBSMethods PreProc + HiLink AspVBSEvents Special + HiLink AspVBSTypeSpecifier Type + + delcommand HiLink +endif + +let b:current_syntax = "aspvbs" + +if main_syntax == 'aspvbs' + unlet main_syntax +endif + +" vim: ts=8:sw=2:sts=0:noet diff --git a/runtime/syntax/atlas.vim b/runtime/syntax/atlas.vim new file mode 100644 index 000000000..b8fe4356b --- /dev/null +++ b/runtime/syntax/atlas.vim @@ -0,0 +1,98 @@ +" Vim syntax file +" Language: ATLAS +" Maintainer: Inaki Saez <jisaez@sfe.indra.es> +" Last Change: 2001 May 09 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +syn keyword atlasStatement begin terminate +syn keyword atlasStatement fill calculate compare +syn keyword atlasStatement setup connect close open disconnect reset +syn keyword atlasStatement initiate read fetch +syn keyword atlasStatement apply measure verify remove +syn keyword atlasStatement perform leave finish output delay +syn keyword atlasStatement prepare execute +syn keyword atlasStatement do +syn match atlasStatement "\<go[ ]\+to\>" +syn match atlasStatement "\<wait[ ]\+for\>" + +syn keyword atlasInclude include +syn keyword atlasDefine define require declare identify + +"syn keyword atlasReserved true false go nogo hi lo via +syn keyword atlasReserved true false + +syn keyword atlasStorageClass external global + +syn keyword atlasConditional if then else end +syn keyword atlasRepeat while for thru + +" Flags BEF and statement number +syn match atlasSpecial "^[BE ][ 0-9]\{,6}\>" + +" Number formats +syn match atlasHexNumber "\<X'[0-9A-F]\+'" +syn match atlasOctalNumber "\<O'[0-7]\+'" +syn match atlasBinNumber "\<B'[01]\+'" +syn match atlasNumber "\<\d\+\>" +"Floating point number part only +syn match atlasDecimalNumber "\.\d\+\([eE][-+]\=\d\)\=\>" + +syn region atlasFormatString start=+((+ end=+\())\)\|\()[ ]*\$\)+me=e-1 +syn region atlasString start=+\<C'+ end=+'+ oneline + +syn region atlasComment start=+^C+ end=+\$+ +syn region atlasComment2 start=+\$.\++ms=s+1 end=+$+ oneline + +syn match atlasIdentifier "'[A-Za-z0-9 ._-]\+'" + +"Synchronization with Statement terminator $ +syn sync match atlasTerminator grouphere atlasComment "^C" +syn sync match atlasTerminator groupthere NONE "\$" +syn sync maxlines=100 + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_atlas_syntax_inits") + if version < 508 + let did_atlas_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink atlasConditional Conditional + HiLink atlasRepeat Repeat + HiLink atlasStatement Statement + HiLink atlasNumber Number + HiLink atlasHexNumber Number + HiLink atlasOctalNumber Number + HiLink atlasBinNumber Number + HiLink atlasDecimalNumber Float + HiLink atlasFormatString String + HiLink atlasString String + HiLink atlasComment Comment + HiLink atlasComment2 Comment + HiLink atlasInclude Include + HiLink atlasDefine Macro + HiLink atlasReserved PreCondit + HiLink atlasStorageClass StorageClass + HiLink atlasIdentifier NONE + HiLink atlasSpecial Special + + delcommand HiLink +endif + +let b:current_syntax = "atlas" + +" vim: ts=8 diff --git a/runtime/syntax/automake.vim b/runtime/syntax/automake.vim new file mode 100644 index 000000000..ea09927e2 --- /dev/null +++ b/runtime/syntax/automake.vim @@ -0,0 +1,79 @@ +" Vim syntax file +" Language: automake Makefile.am +" Maintainer: John Williams <jrw@pobox.com> +" Last change: 2001 May 09 + + +" This script adds support for automake's Makefile.am format. It highlights +" Makefile variables significant to automake as well as highlighting +" autoconf-style @variable@ substitutions . Subsitutions are marked as errors +" when they are used in an inappropriate place, such as in defining +" EXTRA_SOURCES. + + +" Read the Makefile syntax to start with +if version < 600 + source <sfile>:p:h/make.vim +else + runtime! syntax/make.vim +endif + +syn match automakePrimary "^[A-Za-z0-9_]\+\(_PROGRAMS\|LIBRARIES\|_LIST\|_SCRIPTS\|_DATA\|_HEADERS\|_MANS\|_TEXINFOS\|_JAVA\|_LTLIBRARIES\)\s*="me=e-1 +syn match automakePrimary "^TESTS\s*="me=e-1 +syn match automakeSecondary "^[A-Za-z0-9_]\+\(_SOURCES\|_LDADD\|_LIBADD\|_LDFLAGS\|_DEPENDENCIES\)\s*="me=e-1 +syn match automakeSecondary "^OMIT_DEPENDENCIES\s*="me=e-1 +syn match automakeExtra "^EXTRA_[A-Za-z0-9_]\+\s*="me=e-1 +syn match automakeOptions "^\(AUTOMAKE_OPTIONS\|ETAGS_ARGS\|TAGS_DEPENDENCIES\)\s*="me=e-1 +syn match automakeClean "^\(MOSTLY\|DIST\|MAINTAINER\)\=CLEANFILES\s*="me=e-1 +syn match automakeSubdirs "^\(DIST_\)\=SUBDIRS\s*="me=e-1 +syn match automakeConditional "^\(if\s*[a-zA-Z0-9_]\+\|else\|endif\)\s*$" + +syn match automakeSubst "@[a-zA-Z0-9_]\+@" +syn match automakeSubst "^\s*@[a-zA-Z0-9_]\+@" +syn match automakeComment1 "#.*$" contains=automakeSubst +syn match automakeComment2 "##.*$" + +syn match automakeMakeError "$[{(][^})]*[^a-zA-Z0-9_})][^})]*[})]" " GNU make function call + +syn region automakeNoSubst start="^EXTRA_[a-zA-Z0-9_]*\s*=" end="$" contains=ALLBUT,automakeNoSubst transparent +syn region automakeNoSubst start="^DIST_SUBDIRS\s*=" end="$" contains=ALLBUT,automakeNoSubst transparent +syn region automakeNoSubst start="^[a-zA-Z0-9_]*_SOURCES\s*=" end="$" contains=ALLBUT,automakeNoSubst transparent +syn match automakeBadSubst "@\([a-zA-Z0-9_]*@\=\)\=" contained + +syn region automakeMakeDString start=+"+ skip=+\\"+ end=+"+ contains=makeIdent,automakeSubstitution +syn region automakeMakeSString start=+'+ skip=+\\'+ end=+'+ contains=makeIdent,automakeSubstitution +syn region automakeMakeBString start=+`+ skip=+\\`+ end=+`+ contains=makeIdent,makeSString,makeDString,makeNextLine,automakeSubstitution + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_automake_syntax_inits") + if version < 508 + let did_automake_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink automakePrimary Statement + HiLink automakeSecondary Type + HiLink automakeExtra Special + HiLink automakeOptions Special + HiLink automakeClean Special + HiLink automakeSubdirs Statement + HiLink automakeConditional PreProc + HiLink automakeSubst PreProc + HiLink automakeComment1 makeComment + HiLink automakeComment2 makeComment + HiLink automakeMakeError makeError + HiLink automakeBadSubst makeError + HiLink automakeMakeDString makeDString + HiLink automakeMakeSString makeSString + HiLink automakeMakeBString makeBString + + delcommand HiLink +endif + +let b:current_syntax = "automake" + +" vi: ts=8 sw=4 sts=4 diff --git a/runtime/syntax/ave.vim b/runtime/syntax/ave.vim new file mode 100644 index 000000000..2a0a9d85a --- /dev/null +++ b/runtime/syntax/ave.vim @@ -0,0 +1,92 @@ +" Vim syntax file +" Copyright by Jan-Oliver Wagner +" Language: avenue +" Maintainer: Jan-Oliver Wagner <Jan-Oliver.Wagner@intevation.de> +" Last change: 2001 May 10 + +" Avenue is the ArcView built-in language. ArcView is +" a desktop GIS by ESRI. Though it is a built-in language +" and a built-in editor is provided, the use of VIM increases +" development speed. +" I use some technologies to automatically load avenue scripts +" into ArcView. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Avenue is entirely case-insensitive. +syn case ignore + +" The keywords + +syn keyword aveStatement if then elseif else end break exit return +syn keyword aveStatement for each in continue while + +" String + +syn region aveString start=+"+ end=+"+ + +" Integer number +syn match aveNumber "[+-]\=\<[0-9]\+\>" + +" Operator + +syn keyword aveOperator or and max min xor mod by +" 'not' is a kind of a problem: Its an Operator as well as a method +" 'not' is only marked as an Operator if not applied as method +syn match aveOperator "[^\.]not[^a-zA-Z]" + +" Variables + +syn keyword aveFixVariables av nil self false true nl tab cr tab +syn match globalVariables "_[a-zA-Z][a-zA-Z0-9]*" +syn match aveVariables "[a-zA-Z][a-zA-Z0-9_]*" +syn match aveConst "#[A-Z][A-Z_]+" + +" Comments + +syn match aveComment "'.*" + +" Typical Typos + +" for C programmers: +syn match aveTypos "==" +syn match aveTypos "!=" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting+yet +if version >= 508 || !exists("did_ave_syn_inits") + if version < 508 + let did_ave_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink aveStatement Statement + + HiLink aveString String + HiLink aveNumber Number + + HiLink aveFixVariables Special + HiLink aveVariables Identifier + HiLink globalVariables Special + HiLink aveConst Special + + HiLink aveClassMethods Function + + HiLink aveOperator Operator + HiLink aveComment Comment + + HiLink aveTypos Error + + delcommand HiLink +endif + +let b:current_syntax = "ave" diff --git a/runtime/syntax/awk.vim b/runtime/syntax/awk.vim new file mode 100644 index 000000000..00a689d46 --- /dev/null +++ b/runtime/syntax/awk.vim @@ -0,0 +1,216 @@ +" Vim syntax file +" Language: awk, nawk, gawk, mawk +" Maintainer: Antonio Colombo <antonio.colombo@jrc.it> +" Last Change: 2002 Jun 23 + +" AWK ref. is: Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger +" The AWK Programming Language, Addison-Wesley, 1988 + +" GAWK ref. is: Arnold D. Robbins +" Effective AWK Programming, Third Edition, O'Reilly, 2001 + +" MAWK is a "new awk" meaning it implements AWK ref. +" mawk conforms to the Posix 1003.2 (draft 11.3) +" definition of the AWK language which contains a few features +" not described in the AWK book, and mawk provides a small number of extensions. + +" TODO: +" Dig into the commented out syntax expressions below. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +" A bunch of useful Awk keywords +" AWK ref. p. 188 +syn keyword awkStatement break continue delete exit +syn keyword awkStatement function getline next +syn keyword awkStatement print printf return +" GAWK ref. p. 117 +syn keyword awkStatement nextfile +" AWK ref. p. 42, GAWK ref. p. 142-166 +syn keyword awkFunction atan2 close cos exp fflush int log rand sin sqrt srand +syn keyword awkFunction gsub index length match split sprintf sub +syn keyword awkFunction substr system +" GAWK ref. p. 142-166 +syn keyword awkFunction asort gensub mktime strftime strtonum systime +syn keyword awkFunction tolower toupper +syn keyword awkFunction and or xor compl lshift rshift +syn keyword awkFunction dcgettext bindtextdomain + +syn keyword awkConditional if else +syn keyword awkRepeat while for + +syn keyword awkTodo contained TODO + +syn keyword awkPatterns BEGIN END +" AWK ref. p. 36 +syn keyword awkVariables ARGC ARGV FILENAME FNR FS NF NR +syn keyword awkVariables OFMT OFS ORS RLENGTH RS RSTART SUBSEP +" GAWK ref. p. 120-126 +syn keyword awkVariables ARGIND BINMODE CONVFMT ENVIRON ERRNO +syn keyword awkVariables FIELDWIDTHS IGNORECASE LINT PROCINFO +syn keyword awkVariables RT RLENGTH TEXTDOMAIN + +syn keyword awkRepeat do + +" Octal format character. +syn match awkSpecialCharacter display contained "\\[0-7]\{1,3\}" +syn keyword awkStatement func nextfile +" Hex format character. +syn match awkSpecialCharacter display contained "\\x[0-9A-Fa-f]\+" + +syn match awkFieldVars "\$\d\+" + +"catch errors caused by wrong parenthesis +syn region awkParen transparent start="(" end=")" contains=ALLBUT,awkParenError,awkSpecialCharacter,awkArrayElement,awkArrayArray,awkTodo,awkRegExp,awkBrktRegExp,awkBrackets,awkCharClass +syn match awkParenError display ")" +syn match awkInParen display contained "[{}]" + +" 64 lines for complex &&'s, and ||'s in a big "if" +syn sync ccomment awkParen maxlines=64 + +" Search strings & Regular Expressions therein. +syn region awkSearch oneline start="^[ \t]*/"ms=e start="\(,\|!\=\~\)[ \t]*/"ms=e skip="\\\\\|\\/" end="/" contains=awkBrackets,awkRegExp,awkSpecialCharacter +syn region awkBrackets contained start="\[\^\]\="ms=s+2 start="\[[^\^]"ms=s+1 end="\]"me=e-1 contains=awkBrktRegExp,awkCharClass +syn region awkSearch oneline start="[ \t]*/"hs=e skip="\\\\\|\\/" end="/" contains=awkBrackets,awkRegExp,awkSpecialCharacter + +syn match awkCharClass contained "\[:[^:\]]*:\]" +syn match awkBrktRegExp contained "\\.\|.\-[^]]" +syn match awkRegExp contained "/\^"ms=s+1 +syn match awkRegExp contained "\$/"me=e-1 +syn match awkRegExp contained "[?.*{}|+]" + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn region awkString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=awkSpecialCharacter,awkSpecialPrintf +syn match awkSpecialCharacter contained "\\." + +" Some of these combinations may seem weird, but they work. +syn match awkSpecialPrintf contained "%[-+ #]*\d*\.\=\d*[cdefgiosuxEGX%]" + +" Numbers, allowing signs (both -, and +) +" Integer number. +syn match awkNumber display "[+-]\=\<\d\+\>" +" Floating point number. +syn match awkFloat display "[+-]\=\<\d\+\.\d+\>" +" Floating point number, starting with a dot. +syn match awkFloat display "[+-]\=\<.\d+\>" +syn case ignore +"floating point number, with dot, optional exponent +syn match awkFloat display "\<\d\+\.\d*\(e[-+]\=\d\+\)\=\>" +"floating point number, starting with a dot, optional exponent +syn match awkFloat display "\.\d\+\(e[-+]\=\d\+\)\=\>" +"floating point number, without dot, with exponent +syn match awkFloat display "\<\d\+e[-+]\=\d\+\>" +syn case match + +"syn match awkIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" + +" Arithmetic operators: +, and - take care of ++, and -- +"syn match awkOperator "+\|-\|\*\|/\|%\|=" +"syn match awkOperator "+=\|-=\|\*=\|/=\|%=" +"syn match awkOperator "^\|^=" + +" Comparison expressions. +"syn match awkExpression "==\|>=\|=>\|<=\|=<\|\!=" +"syn match awkExpression "\~\|\!\~" +"syn match awkExpression "?\|:" +"syn keyword awkExpression in + +" Boolean Logic (OR, AND, NOT) +"syn match awkBoolLogic "||\|&&\|\!" + +" This is overridden by less-than & greater-than. +" Put this above those to override them. +" Put this in a 'match "\<printf\=\>.*;\="' to make it not override +" less/greater than (most of the time), but it won't work yet because +" keywords allways have precedence over match & region. +" File I/O: (print foo, bar > "filename") & for nawk (getline < "filename") +"syn match awkFileIO contained ">" +"syn match awkFileIO contained "<" + +" Expression separators: ';' and ',' +syn match awkSemicolon ";" +syn match awkComma "," + +syn match awkComment "#.*" contains=awkTodo + +syn match awkLineSkip "\\$" + +" Highlight array element's (recursive arrays allowed). +" Keeps nested array names' separate from normal array elements. +" Keeps numbers separate from normal array elements (variables). +syn match awkArrayArray contained "[^][, \t]\+\["me=e-1 +syn match awkArrayElement contained "[^][, \t]\+" +syn region awkArray transparent start="\[" end="\]" contains=awkArray,awkArrayElement,awkArrayArray,awkNumber,awkFloat + +" 10 should be enough. +" (for the few instances where it would be more than "oneline") +syn sync ccomment awkArray maxlines=10 + +" define the default highlighting +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlightling yet +if version >= 508 || !exists("did_awk_syn_inits") + if version < 508 + let did_awk_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink awkConditional Conditional + HiLink awkFunction Function + HiLink awkRepeat Repeat + HiLink awkStatement Statement + + HiLink awkString String + HiLink awkSpecialPrintf Special + HiLink awkSpecialCharacter Special + + HiLink awkSearch String + HiLink awkBrackets awkRegExp + HiLink awkBrktRegExp awkNestRegExp + HiLink awkCharClass awkNestRegExp + HiLink awkNestRegExp Keyword + HiLink awkRegExp Special + + HiLink awkNumber Number + HiLink awkFloat Float + + HiLink awkFileIO Special + "HiLink awkOperator Special + "HiLink awkExpression Special + HiLink awkBoolLogic Special + + HiLink awkPatterns Special + HiLink awkVariables Special + HiLink awkFieldVars Special + + HiLink awkLineSkip Special + HiLink awkSemicolon Special + HiLink awkComma Special + "HiLink awkIdentifier Identifier + + HiLink awkComment Comment + HiLink awkTodo Todo + + " Change this if you want nested array names to be highlighted. + HiLink awkArrayArray awkArray + HiLink awkArrayElement Special + + HiLink awkParenError awkError + HiLink awkInParen awkError + HiLink awkError Error + + delcommand HiLink +endif + +let b:current_syntax = "awk" + +" vim: ts=8 diff --git a/runtime/syntax/ayacc.vim b/runtime/syntax/ayacc.vim new file mode 100644 index 000000000..be91e2f7e --- /dev/null +++ b/runtime/syntax/ayacc.vim @@ -0,0 +1,86 @@ +" Vim syntax file +" Language: AYacc +" Maintainer: Mathieu Clabaut <mathieu.clabaut@free.fr> +" LastChange: 02 May 2001 +" Original: Yacc, maintained by Dr. Charles E. Campbell, Jr. +" Comment: Replaced sourcing c.vim file by ada.vim and rename yacc* +" in ayacc* + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the Ada syntax to start with +if version < 600 + so <sfile>:p:h/ada.vim +else + runtime! syntax/ada.vim + unlet b:current_syntax +endif + +" Clusters +syn cluster ayaccActionGroup contains=ayaccDelim,cInParen,cTodo,cIncluded,ayaccDelim,ayaccCurlyError,ayaccUnionCurly,ayaccUnion,cUserLabel,cOctalZero,cCppOut2,cCppSkip,cErrInBracket,cErrInParen,cOctalError +syn cluster ayaccUnionGroup contains=ayaccKey,cComment,ayaccCurly,cType,cStructure,cStorageClass,ayaccUnionCurly + +" Yacc stuff +syn match ayaccDelim "^[ \t]*[:|;]" +syn match ayaccOper "@\d\+" + +syn match ayaccKey "^[ \t]*%\(token\|type\|left\|right\|start\|ident\)\>" +syn match ayaccKey "[ \t]%\(prec\|expect\|nonassoc\)\>" +syn match ayaccKey "\$\(<[a-zA-Z_][a-zA-Z_0-9]*>\)\=[\$0-9]\+" +syn keyword ayaccKeyActn yyerrok yyclearin + +syn match ayaccUnionStart "^%union" skipwhite skipnl nextgroup=ayaccUnion +syn region ayaccUnion contained matchgroup=ayaccCurly start="{" matchgroup=ayaccCurly end="}" contains=@ayaccUnionGroup +syn region ayaccUnionCurly contained matchgroup=ayaccCurly start="{" matchgroup=ayaccCurly end="}" contains=@ayaccUnionGroup +syn match ayaccBrkt contained "[<>]" +syn match ayaccType "<[a-zA-Z_][a-zA-Z0-9_]*>" contains=ayaccBrkt +syn match ayaccDefinition "^[A-Za-z][A-Za-z0-9_]*[ \t]*:" + +" special Yacc separators +syn match ayaccSectionSep "^[ \t]*%%" +syn match ayaccSep "^[ \t]*%{" +syn match ayaccSep "^[ \t]*%}" + +" I'd really like to highlight just the outer {}. Any suggestions??? +syn match ayaccCurlyError "[{}]" +syn region ayaccAction matchgroup=ayaccCurly start="{" end="}" contains=ALLBUT,@ayaccActionGroup + +if version >= 508 || !exists("did_ayacc_syntax_inits") + if version < 508 + let did_ayacc_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " Internal ayacc highlighting links + HiLink ayaccBrkt ayaccStmt + HiLink ayaccKey ayaccStmt + HiLink ayaccOper ayaccStmt + HiLink ayaccUnionStart ayaccKey + + " External ayacc highlighting links + HiLink ayaccCurly Delimiter + HiLink ayaccCurlyError Error + HiLink ayaccDefinition Function + HiLink ayaccDelim Function + HiLink ayaccKeyActn Special + HiLink ayaccSectionSep Todo + HiLink ayaccSep Delimiter + HiLink ayaccStmt Statement + HiLink ayaccType Type + + " since Bram doesn't like my Delimiter :| + HiLink Delimiter Type + delcommand HiLink +endif + +let b:current_syntax = "ayacc" + +" vim: ts=15 diff --git a/runtime/syntax/b.vim b/runtime/syntax/b.vim new file mode 100644 index 000000000..e97669175 --- /dev/null +++ b/runtime/syntax/b.vim @@ -0,0 +1,142 @@ +" Vim syntax file +" Language: B (A Formal Method with refinement and mathematical proof) +" Maintainer: Mathieu Clabaut <mathieu.clabaut@free.fr> +" LastChange: 25 Apr 2001 + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + +" A bunch of useful B keywords +syn keyword bStatement MACHINE SEES OPERATIONS INCLUDES DEFINITIONS CONSTRAINTS CONSTANTS VARIABLES CONCRETE_CONSTANTS CONCRETE_VARIABLES ABSTRACT_CONSTANTS ABSTRACT_VARIABLES HIDDEN_CONSTANTS HIDDEN_VARIABLES ASSERT ASSERTIONS EXTENDS IMPLEMENTATION REFINEMENT IMPORTS USES INITIALISATION INVARIANT PROMOTES PROPERTIES REFINES SETS VALUES VARIANT VISIBLE_CONSTANTS VISIBLE_VARIABLES THEORY +syn keyword bLabel CASE IN EITHER OR CHOICE DO OF +syn keyword bConditional IF ELSE SELECT ELSIF THEN WHEN +syn keyword bRepeat WHILE FOR +syn keyword bOps bool card conc closure closure1 dom first fnc front not or id inter iseq iseq1 iterate last max min mod perm pred prj1 prj2 ran rel rev seq seq1 size skip succ tail union +syn keyword bKeywords LET VAR BE IN BEGIN END POW POW1 FIN FIN1 PRE SIGMA STRING UNION IS ANY WHERE +syn match bKeywords "||" + +syn keyword bBoolean TRUE FALSE bfalse btrue +syn keyword bConstant PI MAXINT MININT User_Pass PatchProver PatchProverH0 PatchProverB0 FLAT ARI DED SUB RES +syn keyword bGuard binhyp band bnot bguard bsearch bflat bfresh bguardi bget bgethyp barith bgetresult bresult bgoal bmatch bmodr bnewv bnum btest bpattern bprintf bwritef bsubfrm bvrb blvar bcall bappend bclose + +syn keyword bLogic or not +syn match bLogic "\&\|=>\|<=>" + +syn keyword cTodo contained TODO FIXME XXX + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match bSpecial contained "\\[0-7][0-7][0-7]\=\|\\." +syn region bString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=bSpecial +syn match bCharacter "'[^\\]'" +syn match bSpecialCharacter "'\\.'" +syn match bSpecialCharacter "'\\[0-7][0-7]'" +syn match bSpecialCharacter "'\\[0-7][0-7][0-7]'" + +"catch errors caused by wrong parenthesis +syn region bParen transparent start='(' end=')' contains=ALLBUT,bParenError,bIncluded,bSpecial,bTodo,bUserLabel,bBitField +syn match bParenError ")" +syn match bInParen contained "[{}]" + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match bNumber "\<[0-9]\+\>" +"syn match bIdentifier "\<[a-z_][a-z0-9_]*\>" +syn case match + +if exists("b_comment_strings") + " A comment can contain bString, bCharacter and bNumber. + " But a "*/" inside a bString in a bComment DOES end the comment! So we + " need to use a special type of bString: bCommentString, which also ends on + " "*/", and sees a "*" at the start of the line as comment again. + " Unfortunately this doesn't very well work for // type of comments :-( + syntax match bCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region bCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=bSpecial,bCommentSkip + syntax region bComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=bSpecial + syntax region bComment start="/\*" end="\*/" contains=bTodo,bCommentString,bCharacter,bNumber,bFloat + syntax region bComment start="/\?\*" end="\*\?/" contains=bTodo,bCommentString,bCharacter,bNumber,bFloat + syntax match bComment "//.*" contains=bTodo,bComment2String,bCharacter,bNumber +else + syn region bComment start="/\*" end="\*/" contains=bTodo + syn region bComment start="/\?\*" end="\*\?/" contains=bTodo + syn match bComment "//.*" contains=bTodo +endif +syntax match bCommentError "\*/" + +syn keyword bType INT INTEGER BOOL NAT NATURAL NAT1 NATURAL1 + +syn region bPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=bComment,bString,bCharacter,bNumber,bCommentError +syn region bIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match bIncluded contained "<[^>]*>" +syn match bInclude "^\s*#\s*include\>\s*["<]" contains=bIncluded + +syn region bDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,bPreCondit,bIncluded,bInclude,bDefine,bInParen +syn region bPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,bPreCondit,bIncluded,bInclude,bDefine,bInParen + + +syn sync ccomment bComment minlines=10 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet + +if version >= 508 || !exists("did_b_syntax_inits") + if version < 508 + let did_b_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + HiLink bLabel Label + HiLink bUserLabel Label + HiLink bConditional Conditional + HiLink bRepeat Repeat + HiLink bLogic Special + HiLink bCharacter Character + HiLink bSpecialCharacter bSpecial + HiLink bNumber Number + HiLink bFloat Float + HiLink bOctalError bError + HiLink bParenError bError +" HiLink bInParen bError + HiLink bCommentError bError + HiLink bBoolean Identifier + HiLink bConstant Identifier + HiLink bGuard Identifier + HiLink bOperator Operator + HiLink bKeywords Operator + HiLink bOps Identifier + HiLink bStructure Structure + HiLink bStorageClass StorageClass + HiLink bInclude Include + HiLink bPreProc PreProc + HiLink bDefine Macro + HiLink bIncluded bString + HiLink bError Error + HiLink bStatement Statement + HiLink bPreCondit PreCondit + HiLink bType Type + HiLink bCommentError bError + HiLink bCommentString bString + HiLink bComment2String bString + HiLink bCommentSkip bComment + HiLink bString String + HiLink bComment Comment + HiLink bSpecial SpecialChar + HiLink bTodo Todo + "hi link bIdentifier Identifier + delcommand HiLink +endif + +let current_syntax = "b" + +" vim: ts=8 diff --git a/runtime/syntax/baan.vim b/runtime/syntax/baan.vim new file mode 100644 index 000000000..2efa8dea6 --- /dev/null +++ b/runtime/syntax/baan.vim @@ -0,0 +1,247 @@ +" Vim syntax file" +" Language: Baan +" Maintainer: Erwin Smit / Her van de Vliert +" Last change: 30-10-2001" + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +"************************************* 3GL ************************************" +syn match baan3gl "#ident" +syn match baan3gl "#include" +syn match baan3gl "#define" +syn match baan3gl "#undef" +syn match baan3gl "#pragma" +syn keyword baanConditional if then else case endif while endwhile endfor endcase +syn keyword baan3gl at based break bset call common const continue default double +syn keyword baan3gl empty extern fixed function ge global goto gt le lt mb +syn keyword baan3gl multibyte ne ofr prompt ref repeat static step stop string +syn keyword baan3gl true false until void wherebind +syn keyword baan3gl and or to not in +syn keyword baan3gl domain table eq input end long dim return at base print +syn match baan3gl "\<for\>" contains=baansql +syn match baan3gl "on case" +syn match baan3gl "e\=n\=d\=dllusage" + +"************************************* SQL ************************************" +syn keyword baansqlh where reference selecterror selectbind selectdo selectempty +syn keyword baansqlh selecteos whereused endselect unref setunref clearunref +syn keyword baansqlh from select clear skip rows +syn keyword baansql between inrange having +syn match baansql "as set with \d\+ rows" +syn match baansql "as prepared set" +syn match baansql "as prepared set with \d\+ rows" +syn match baansql "refers to" +syn match baansql "with retry" +syn match baansql "with retry repeat last row" +syn match baansql "for update" +syn match baansql "order by" +syn match baansql "group by" +syn match baansql "commit\.transaction()" +syn match baansql "abort\.transaction()" +syn match baansql "db\.columns\.to\.record" +syn match baansql "db\.record\.to\.columns" +syn match baansql "db\.bind" +syn match baansql "db\.change\.order" +syn match baansql "\<db\.eq" +syn match baansql "\<db\.first" +syn match baansql "\<db\.gt" +syn match baansql "\<db\.ge" +syn match baansql "\<db\.le" +syn match baansql "\<db\.next" +syn match baansql "\<db\.prev" +syn match baansql "\<db\.insert" +syn match baansql "\<db\.delete" +syn match baansql "\<db\.update" +syn match baansql "\<db\.create\.table" +syn match baansql "db\.set\.to\.default" +syn match baansql "db\.retry" +syn match baansql "DB\.RETRY" +syn match baansql "db\.delayed\.lock" +syn match baansql "db\.retry\.point()" +syn match baansql "db\.retry\.hit()" +syn match baansql "db\.return\.dupl" +syn match baansql "db\.skip\.dupl" +syn match baansql "db\.row\.length" + +"************************************* 4GL ************************************" +" Program section +syn match baan4glh "declaration:" +syn match baan4glh "functions:" +syn match baan4glh "before\.program:" +syn match baan4glh "on\.error:" +syn match baan4glh "after\.program:" +syn match baan4glh "after\.update.db.commit:" +syn match baan4glh "before\.display\.object:" + +" Form section +syn match baan4glh "form\.\d\+:" +syn match baan4glh "form\.all:" +syn match baan4glh "form\.other:" +syn match baan4gl "init\.form:" +syn match baan4gl "before\.form:" +syn match baan4gl "after\.form:" + +" Choice section +syn match baan4glh "choice\.start\.set:" +syn match baan4glh "choice\.first\.view:" +syn match baan4glh "choice\.next\.view:" +syn match baan4glh "choice\.prev\.view:" +syn match baan4glh "choice\.last\.view:" +syn match baan4glh "choice\.def\.find:" +syn match baan4glh "choice\.find\.data:" +syn match baan4glh "choice\.first\.set:" +syn match baan4glh "choice\.next\.set:" +syn match baan4glh "choice\.display\.set:" +syn match baan4glh "choice\.prev\.set:" +syn match baan4glh "choice\.rotate\.curr:" +syn match baan4glh "choice\.last\.set:" +syn match baan4glh "choice\.add\.set:" +syn match baan4glh "choice\.update\.db:" +syn match baan4glh "choice\.dupl\.occur:" +syn match baan4glh "choice\.recover\.set:" +syn match baan4glh "choice\.mark\.delete:" +syn match baan4glh "choice\.mark\.occur:" +syn match baan4glh "choice\.change\.order:" +syn match baan4glh "choice\.modify\.set:" +syn match baan4glh "choice\.restart\.input:" +syn match baan4glh "choice\.print\.data:" +syn match baan4glh "choice\.create\.job:" +syn match baan4glh "choice\.form\.tab\.change:" +syn match baan4glh "choice\.first\.frm:" +syn match baan4glh "choice\.next\.frm:" +syn match baan4glh "choice\.prev\.frm:" +syn match baan4glh "choice\.last\.frm:" +syn match baan4glh "choice\.resize\.frm:" +syn match baan4glh "choice\.cmd\.options:" +syn match baan4glh "choice\.zoom:" +syn match baan4glh "choice\.interrupt:" +syn match baan4glh "choice\.end\.program:" +syn match baan4glh "choice\.abort\.program:" +syn match baan4glh "choice\.cont\.process:" +syn match baan4glh "choice\.text\.manager:" +syn match baan4glh "choice\.run\.job:" +syn match baan4glh "choice\.global\.delete:" +syn match baan4glh "choice\.global\.copy:" +syn match baan4glh "choice\.save\.defaults" +syn match baan4glh "choice\.get\.defaults:" +syn match baan4glh "choice\.start\.chart:" +syn match baan4glh "choice\.start\.query:" +syn match baan4glh "choice\.user\.\d:" +syn match baan4glh "choice\.ask\.helpinfo:" +syn match baan4glh "choice\.calculator:" +syn match baan4glh "choice\.calendar:" +syn match baan4glh "choice\.bms:" +syn match baan4glh "choice\.cmd\.whats\.this:" +syn match baan4glh "choice\.help\.index:" +syn match baan4gl "before\.choice:" +syn match baan4gl "on\.choice:" +syn match baan4gl "after\.choice:" + +" Field section +syn match baan4glh "field\.\l\{5}\d\{3}\.\l\{4}\.\=c\=:" +syn match baan4glh "field\.e\..\+:" +syn match baan4glh "field\.all:" +syn match baan4glh "field\.other:" +syn match baan4gl "init\.field:" +syn match baan4gl "before\.field:" +syn match baan4gl "before\.input:" +syn match baan4gl "before\.display:" +syn match baan4gl "before\.zoom:" +syn match baan4gl "before\.checks:" +syn match baan4gl "domain\.error:" +syn match baan4gl "ref\.input:" +syn match baan4gl "ref\.display:" +syn match baan4gl "check\.input:" +syn match baan4gl "on\.input:" +syn match baan4gl "when\.field\.changes:" +syn match baan4gl "after\.zoom:" +syn match baan4gl "after\.input:" +syn match baan4gl "after\.display:" +syn match baan4gl "after\.field:" + +" Group section +syn match baan4glh "group\.\d\+:" +syn match baan4gl "init\.group:" +syn match baan4gl "before\.group:" +syn match baan4gl "after\.group:" + +" Zoom section +syn match baan4glh "zoom\.from\..\+:" +syn match baan4gl "on\.entry:" +syn match baan4gl "on\.exit:" +" Main table section +syn match baan4glh "main\.table\.io:" +syn match baan4gl "before\.read:" +syn match baan4gl "after\.read:" +syn match baan4gl "before\.write:" +syn match baan4gl "after\.write:" +syn match baan4gl "after\.skip\.write:" +syn match baan4gl "before\.rewrite:" +syn match baan4gl "after\.rewrite:" +syn match baan4gl "after\.skip\.rewrite:" +syn match baan4gl "before\.delete:" +syn match baan4gl "after\.delete:" +syn match baan4gl "after\.skip\.delete:" +syn match baan4gl "read\.view:" + +"number without a dot." +syn match baanNumber "\<\-\=\d\+\>" +"number with dot" +syn match baanNumber "\<\-\=\d\+\.\d*\>" +"number starting with a dot" +syn match baanNumber "\<\-\=\.\d\+\>" + +" String" +syn region baanString start=+"+ skip=+""+ end=+"+ +" Comment" +syn match baanComment "|$" +syn match baanComment "|.$" +syn match baanComment "|[^ ]" +syn match baanComment "|[^#].*[^ ]" +syn match baanCommenth "^|#lra.*$" +syn match baanCommenth "^|#mdm.*$" +syn match baanCommenth "^|#[0-9][0-9][0-9][0-9][0-9].*$" +syn match baanCommenth "^|#N\=o\=Include.*$" +syn region baanComment start="dllusage" end="enddllusage" +" Oldcode" +syn match baanUncommented "^|[^*#].*[^ ]" +" SpaceError" +syn match BaanSpaces " " +syn match baanSpaceError "\s*$" +syn match baanSpaceError " " + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_baan_syn_inits") + if version < 508 + let did_c_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink baanConditional Conditional + HiLink baan3gl Statement + HiLink baan4gl Statement + HiLink baan4glh Statement + HiLink baansql Statement + HiLink baansqlh Statement + HiLink baanNumber Number + HiLink baanString String + HiLink baanComment Comment + HiLink baanCommenth Comment + HiLink baanUncommented Comment + + delcommand HiLink +endif + +let b:current_syntax = "baan" + +" vim: ts=8 diff --git a/runtime/syntax/basic.vim b/runtime/syntax/basic.vim new file mode 100644 index 000000000..ee500178c --- /dev/null +++ b/runtime/syntax/basic.vim @@ -0,0 +1,174 @@ +" Vim syntax file +" Language: BASIC +" Maintainer: Allan Kelly <allan@fruitloaf.co.uk> +" Last Change: Tue Sep 14 14:24:23 BST 1999 + +" First version based on Micro$soft QBASIC circa 1989, as documented in +" 'Learn BASIC Now' by Halvorson&Rygmyr. Microsoft Press 1989. +" This syntax file not a complete implementation yet. Send suggestions to the +" maintainer. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" A bunch of useful BASIC keywords +syn keyword basicStatement BEEP beep Beep BLOAD bload Bload BSAVE bsave Bsave +syn keyword basicStatement CALL call Call ABSOLUTE absolute Absolute +syn keyword basicStatement CHAIN chain Chain CHDIR chdir Chdir +syn keyword basicStatement CIRCLE circle Circle CLEAR clear Clear +syn keyword basicStatement CLOSE close Close CLS cls Cls COLOR color Color +syn keyword basicStatement COM com Com COMMON common Common +syn keyword basicStatement CONST const Const DATA data Data +syn keyword basicStatement DECLARE declare Declare DEF def Def +syn keyword basicStatement DEFDBL defdbl Defdbl DEFINT defint Defint +syn keyword basicStatement DEFLNG deflng Deflng DEFSNG defsng Defsng +syn keyword basicStatement DEFSTR defstr Defstr DIM dim Dim +syn keyword basicStatement DO do Do LOOP loop Loop +syn keyword basicStatement DRAW draw Draw END end End +syn keyword basicStatement ENVIRON environ Environ ERASE erase Erase +syn keyword basicStatement ERROR error Error EXIT exit Exit +syn keyword basicStatement FIELD field Field FILES files Files +syn keyword basicStatement FOR for For NEXT next Next +syn keyword basicStatement FUNCTION function Function GET get Get +syn keyword basicStatement GOSUB gosub Gosub GOTO goto Goto +syn keyword basicStatement IF if If THEN then Then ELSE else Else +syn keyword basicStatement INPUT input Input INPUT# input# Input# +syn keyword basicStatement IOCTL ioctl Ioctl KEY key Key +syn keyword basicStatement KILL kill Kill LET let Let +syn keyword basicStatement LINE line Line LOCATE locate Locate +syn keyword basicStatement LOCK lock Lock UNLOCK unlock Unlock +syn keyword basicStatement LPRINT lprint Lprint USING using Using +syn keyword basicStatement LSET lset Lset MKDIR mkdir Mkdir +syn keyword basicStatement NAME name Name ON on On +syn keyword basicStatement ERROR error Error OPEN open Open +syn keyword basicStatement OPTION option Option BASE base Base +syn keyword basicStatement OUT out Out PAINT paint Paint +syn keyword basicStatement PALETTE palette Palette PCOPY pcopy Pcopy +syn keyword basicStatement PEN pen Pen PLAY play Play +syn keyword basicStatement PMAP pmap Pmap POKE poke Poke +syn keyword basicStatement PRESET preset Preset PRINT print Print +syn keyword basicStatement PRINT# print# Print# USING using Using +syn keyword basicStatement PSET pset Pset PUT put Put +syn keyword basicStatement RANDOMIZE randomize Randomize READ read Read +syn keyword basicStatement REDIM redim Redim RESET reset Reset +syn keyword basicStatement RESTORE restore Restore RESUME resume Resume +syn keyword basicStatement RETURN return Return RMDIR rmdir Rmdir +syn keyword basicStatement RSET rset Rset RUN run Run +syn keyword basicStatement SEEK seek Seek SELECT select Select +syn keyword basicStatement CASE case Case SHARED shared Shared +syn keyword basicStatement SHELL shell Shell SLEEP sleep Sleep +syn keyword basicStatement SOUND sound Sound STATIC static Static +syn keyword basicStatement STOP stop Stop STRIG strig Strig +syn keyword basicStatement SUB sub Sub SWAP swap Swap +syn keyword basicStatement SYSTEM system System TIMER timer Timer +syn keyword basicStatement TROFF troff Troff TRON tron Tron +syn keyword basicStatement TYPE type Type UNLOCK unlock Unlock +syn keyword basicStatement VIEW view View WAIT wait Wait +syn keyword basicStatement WHILE while While WEND wend Wend +syn keyword basicStatement WIDTH width Width WINDOW window Window +syn keyword basicStatement WRITE write Write DATE$ date$ Date$ +syn keyword basicStatement MID$ mid$ Mid$ TIME$ time$ Time$ + +syn keyword basicFunction ABS abs Abs ASC asc Asc +syn keyword basicFunction ATN atn Atn CDBL cdbl Cdbl +syn keyword basicFunction CINT cint Cint CLNG clng Clng +syn keyword basicFunction COS cos Cos CSNG csng Csng +syn keyword basicFunction CSRLIN csrlin Csrlin CVD cvd Cvd +syn keyword basicFunction CVDMBF cvdmbf Cvdmbf CVI cvi Cvi +syn keyword basicFunction CVL cvl Cvl CVS cvs Cvs +syn keyword basicFunction CVSMBF cvsmbf Cvsmbf EOF eof Eof +syn keyword basicFunction ERDEV erdev Erdev ERL erl Erl +syn keyword basicFunction ERR err Err EXP exp Exp +syn keyword basicFunction FILEATTR fileattr Fileattr FIX fix Fix +syn keyword basicFunction FRE fre Fre FREEFILE freefile Freefile +syn keyword basicFunction INP inp Inp INSTR instr Instr +syn keyword basicFunction INT int Int LBOUND lbound Lbound +syn keyword basicFunction LEN len Len LOC loc Loc +syn keyword basicFunction LOF lof Lof LOG log Log +syn keyword basicFunction LPOS lpos Lpos PEEK peek Peek +syn keyword basicFunction PEN pen Pen POINT point Point +syn keyword basicFunction POS pos Pos RND rnd Rnd +syn keyword basicFunction SADD sadd Sadd SCREEN screen Screen +syn keyword basicFunction SEEK seek Seek SETMEM setmem Setmem +syn keyword basicFunction SGN sgn Sgn SIN sin Sin +syn keyword basicFunction SPC spc Spc SQR sqr Sqr +syn keyword basicFunction STICK stick Stick STRIG strig Strig +syn keyword basicFunction TAB tab Tab TAN tan Tan +syn keyword basicFunction UBOUND ubound Ubound VAL val Val +syn keyword basicFunction VALPTR valptr Valptr VALSEG valseg Valseg +syn keyword basicFunction VARPTR varptr Varptr VARSEG varseg Varseg +syn keyword basicFunction CHR$ Chr$ chr$ COMMAND$ command$ Command$ +syn keyword basicFunction DATE$ date$ Date$ ENVIRON$ environ$ Environ$ +syn keyword basicFunction ERDEV$ erdev$ Erdev$ HEX$ hex$ Hex$ +syn keyword basicFunction INKEY$ inkey$ Inkey$ INPUT$ input$ Input$ +syn keyword basicFunction IOCTL$ ioctl$ Ioctl$ LCASES$ lcases$ Lcases$ +syn keyword basicFunction LAFT$ laft$ Laft$ LTRIM$ ltrim$ Ltrim$ +syn keyword basicFunction MID$ mid$ Mid$ MKDMBF$ mkdmbf$ Mkdmbf$ +syn keyword basicFunction MKD$ mkd$ Mkd$ MKI$ mki$ Mki$ +syn keyword basicFunction MKL$ mkl$ Mkl$ MKSMBF$ mksmbf$ Mksmbf$ +syn keyword basicFunction MKS$ mks$ Mks$ OCT$ oct$ Oct$ +syn keyword basicFunction RIGHT$ right$ Right$ RTRIM$ rtrim$ Rtrim$ +syn keyword basicFunction SPACE$ space$ Space$ STR$ str$ Str$ +syn keyword basicFunction STRING$ string$ String$ TIME$ time$ Time$ +syn keyword basicFunction UCASE$ ucase$ Ucase$ VARPTR$ varptr$ Varptr$ +syn keyword basicTodo contained TODO + +"integer number, or floating point number without a dot. +syn match basicNumber "\<\d\+\>" +"floating point number, with dot +syn match basicNumber "\<\d\+\.\d*\>" +"floating point number, starting with a dot +syn match basicNumber "\.\d\+\>" + +" String and Character contstants +syn match basicSpecial contained "\\\d\d\d\|\\." +syn region basicString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=basicSpecial + +syn region basicComment start="REM" end="$" contains=basicTodo +syn region basicComment start="^[ \t]*'" end="$" contains=basicTodo +syn region basicLineNumber start="^\d" end="\s" +syn match basicTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1 +" Used with OPEN statement +syn match basicFilenumber "#\d\+" +"syn sync ccomment basicComment +" syn match basicMathsOperator "[<>+\*^/\\=-]" +syn match basicMathsOperator "-\|=\|[:<>+\*^/\\]\|AND\|OR" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_basic_syntax_inits") + if version < 508 + let did_basic_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink basicLabel Label + HiLink basicConditional Conditional + HiLink basicRepeat Repeat + HiLink basicLineNumber Comment + HiLink basicNumber Number + HiLink basicError Error + HiLink basicStatement Statement + HiLink basicString String + HiLink basicComment Comment + HiLink basicSpecial Special + HiLink basicTodo Todo + HiLink basicFunction Identifier + HiLink basicTypeSpecifier Type + HiLink basicFilenumber basicTypeSpecifier + "hi basicMathsOperator term=bold cterm=bold gui=bold + + delcommand HiLink +endif + +let b:current_syntax = "basic" + +" vim: ts=8 diff --git a/runtime/syntax/bc.vim b/runtime/syntax/bc.vim new file mode 100644 index 000000000..dcfaf486a --- /dev/null +++ b/runtime/syntax/bc.vim @@ -0,0 +1,78 @@ +" Vim syntax file +" Language: bc - An arbitrary precision calculator language +" Maintainer: Vladimir Scholtz <vlado@gjh.sk> +" Last change: 2001 Sep 02 +" Available on: www.gjh.sk/~vlado/bc.vim + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" Keywords +syn keyword bcKeyword if else while for break continue return limits halt quit +syn keyword bcKeyword define +syn keyword bcKeyword length read sqrt print + +" Variable +syn keyword bcType auto + +" Constant +syn keyword bcConstant scale ibase obase last +syn keyword bcConstant BC_BASE_MAX BC_DIM_MAX BC_SCALE_MAX BC_STRING_MAX +syn keyword bcConstant BC_ENV_ARGS BC_LINE_LENGTH + +" Any other stuff +syn match bcIdentifier "[a-z_][a-z0-9_]*" + +" String + syn match bcString "\"[^"]*\"" + +" Number +syn match bcNumber "[0-9]\+" + +" Comment +syn match bcComment "\#.*" +syn region bcComment start="/\*" end="\*/" + +" Parent () +syn cluster bcAll contains=bcList,bcIdentifier,bcNumber,bcKeyword,bcType,bcConstant,bcString,bcParentError +syn region bcList matchgroup=Delimiter start="(" skip="|.\{-}|" matchgroup=Delimiter end=")" contains=@bcAll +syn region bcList matchgroup=Delimiter start="\[" skip="|.\{-}|" matchgroup=Delimiter end="\]" contains=@bcAll +syn match bcParenError "]" +syn match bcParenError ")" + + + +syn case match + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_bc_syntax_inits") + if version < 508 + let did_bc_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink bcKeyword Statement + HiLink bcType Type + HiLink bcConstant Constant + HiLink bcNumber Number + HiLink bcComment Comment + HiLink bcString String + HiLink bcSpecialChar SpecialChar + HiLink bcParenError Error + + delcommand HiLink +endif + +let b:current_syntax = "bc" +" vim: ts=8 diff --git a/runtime/syntax/bdf.vim b/runtime/syntax/bdf.vim new file mode 100644 index 000000000..3fc404a86 --- /dev/null +++ b/runtime/syntax/bdf.vim @@ -0,0 +1,86 @@ +" Vim syntax file +" Language: BDF Font definition +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/bdf/ +" Latest Revision: 2004-05-06 +" arch-tag: b696b6ba-af24-41ba-b4eb-d248495eca68 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" numbers +syn match bdfNumber display "\<\(\x\+\|\d\+\.\d\+\)\>" + +" comments +syn region bdfComment start="^COMMENT\>" end="$" contains=bdfTodo + +" todo +syn keyword bdfTodo contained TODO FIXME XXX NOTE + +" strings +syn region bdfString start=+"+ skip=+""+ end=+"+ + +" properties +syn keyword bdfProperties contained FONT SIZE FONTBOUNDINGBOX CHARS + +" X11 properties +syn keyword bdfXProperties contained FONT_ASCENT FONT_DESCENT DEFAULT_CHAR +syn keyword bdfXProperties contained FONTNAME_REGISTRY FOUNDRY FAMILY_NAME +syn keyword bdfXProperties contained WEIGHT_NAME SLANT SETWIDTH_NAME PIXEL_SIZE +syn keyword bdfXProperties contained POINT_SIZE RESOLUTION_X RESOLUTION_Y SPACING +syn keyword bdfXProperties contained CHARSET_REGISTRY CHARSET_ENCODING COPYRIGHT +syn keyword bdfXProperties contained ADD_STYLE_NAME WEIGHT RESOLUTION X_HEIGHT +syn keyword bdfXProperties contained QUAD_WIDTH FONT AVERAGE_WIDTH + +syn region bdfDefinition transparent matchgroup=bdfDelim start="^STARTPROPERTIES\>" end="^ENDPROPERTIES\>" contains=bdfXProperties,bdfNumber,bdfString + +" characters +syn keyword bdfCharProperties contained ENCODING SWIDTH DWIDTH BBX ATTRIBUTES BITMAP + +syn match bdfCharName contained display "\<[0-9a-zA-Z]\{1,14}\>" +syn match bdfCharNameError contained display "\<[0-9a-zA-Z]\{15,}\>" + +syn region bdfStartChar transparent matchgroup=bdfDelim start="\<STARTCHAR\>" end="$" contains=bdfCharName,bdfCharNameError + +syn region bdfCharDefinition transparent start="^STARTCHAR\>" matchgroup=bdfDelim end="^ENDCHAR\>" contains=bdfCharProperties,bdfNumber,bdfStartChar + +" font +syn region bdfFontDefinition transparent matchgroup=bdfDelim start="^STARTFONT\>" end="^ENDFONT\>" contains=bdfProperties,bdfDefinition,bdfCharDefinition,bdfNumber,bdfComment + +if exists("bdf_minlines") + let b:bdf_minlines = bdf_minlines +else + let b:bdf_minlines = 50 +endif +exec "syn sync minlines=" . b:bdf_minlines + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_bdf_syn_inits") + if version < 508 + let did_bdf_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink bdfComment Comment + HiLink bdfTodo Todo + HiLink bdfNumber Number + HiLink bdfString String + HiLink bdfProperties Keyword + HiLink bdfXProperties Keyword + HiLink bdfCharProperties Structure + HiLink bdfDelim Delimiter + HiLink bdfCharName String + HiLink bdfCharNameError Error + delcommand HiLink +endif + +let b:current_syntax = "bdf" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/bib.vim b/runtime/syntax/bib.vim new file mode 100644 index 000000000..a98f281d3 --- /dev/null +++ b/runtime/syntax/bib.vim @@ -0,0 +1,92 @@ +" Vim syntax file +" Language: BibTeX (bibliographic database format for (La)TeX) +" Maintainer: Bernd Feige <Bernd.Feige@gmx.net> +" Filenames: *.bib +" Last Change: Apr 26, 2001 +" URL: http://home.t-online.de/home/Bernd.Feige/bib.vim + +" Thanks to those who pointed out problems with this file or supplied fixes! + +" Initialization +" ============== +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Ignore case +syn case ignore + +" Keywords +" ======== +syn keyword bibType contained article book booklet conference inbook +syn keyword bibType contained incollection inproceedings manual +syn keyword bibType contained mastersthesis misc phdthesis +syn keyword bibType contained proceedings techreport unpublished +syn keyword bibType contained string + +syn keyword bibEntryKw contained address annote author booktitle chapter +syn keyword bibEntryKw contained crossref edition editor howpublished +syn keyword bibEntryKw contained institution journal key month note +syn keyword bibEntryKw contained number organization pages publisher +syn keyword bibEntryKw contained school series title type volume year +" Non-standard: +syn keyword bibNSEntryKw contained abstract isbn issn keywords url + +" Clusters +" ======== +syn cluster bibVarContents contains=bibUnescapedSpecial,bibBrace,bibParen +" This cluster is empty but things can be added externally: +"syn cluster bibCommentContents + +" Matches +" ======= +syn match bibUnescapedSpecial contained /[^\\][%&]/hs=s+1 +syn match bibKey contained /\s*[^ \t}="]\+,/hs=s,he=e-1 nextgroup=bibField +syn match bibVariable contained /[^{}," \t=]/ +syn region bibComment start=/^/ end=/^\s*@/me=e-1 contains=@bibCommentContents nextgroup=bibEntry +syn region bibQuote contained start=/"/ end=/"/ skip=/\(\\"\)/ contains=@bibVarContents +syn region bibBrace contained start=/{/ end=/}/ skip=/\(\\[{}]\)/ contains=@bibVarContents +syn region bibParen contained start=/(/ end=/)/ skip=/\(\\[()]\)/ contains=@bibVarContents +syn region bibField contained start="\S\+\s*=\s*" end=/[}),]/me=e-1 contains=bibEntryKw,bibNSEntryKw,bibBrace,bibParen,bibQuote,bibVariable +syn region bibEntryData contained start=/[{(]/ms=e+1 end=/[})]/me=e-1 contains=bibKey,bibField +" Actually, 5.8 <= Vim < 6.0 would ignore the `fold' keyword anyway, but Vim<5.8 would produce +" an error, so we explicitly distinguish versions with and without folding functionality: +if version < 600 + syn region bibEntry start=/@\S\+[{(]/ end=/^\s*[})]/ transparent contains=bibType,bibEntryData nextgroup=bibComment +else + syn region bibEntry start=/@\S\+[{(]/ end=/^\s*[})]/ transparent fold contains=bibType,bibEntryData nextgroup=bibComment +endif + +" Synchronization +" =============== +syn sync match All grouphere bibEntry /^\s*@/ +syn sync maxlines=200 +syn sync minlines=50 + +" Highlighting defaults +" ===================== +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_bib_syn_inits") + if version < 508 + let did_bib_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + HiLink bibType Identifier + HiLink bibEntryKw Statement + HiLink bibNSEntryKw PreProc + HiLink bibKey Special + HiLink bibVariable Constant + HiLink bibUnescapedSpecial Error + HiLink bibComment Comment + delcommand HiLink +endif + +let b:current_syntax = "bib" diff --git a/runtime/syntax/bindzone.vim b/runtime/syntax/bindzone.vim new file mode 100644 index 000000000..3c23e219f --- /dev/null +++ b/runtime/syntax/bindzone.vim @@ -0,0 +1,98 @@ +" Vim syntax file +" Language: BIND 8.x zone files (RFC1035) +" Maintainer: glory hump <rnd@web-drive.ru> +" Last change: Thu Apr 26 02:16:18 SAMST 2001 +" Filenames: /var/named/* +" URL: http://rnd.web-drive.ru/vim/syntax/bindzone.vim +" $Id$ + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case match + +if version >= 600 + setlocal iskeyword=.,-,48-58,A-Z,a-z,_ +else + set iskeyword=.,-,48-58,A-Z,a-z,_ +endif + + +" Master File Format (rfc 1035) + +" directives +syn region zoneRRecord start=+^+ end=+$+ contains=zoneLHSDomain,zoneLHSIP,zoneIllegalDom,zoneWhitespace,zoneComment,zoneParen,zoneSpecial +syn match zoneDirective /\$ORIGIN\s\+/ nextgroup=zoneDomain,zoneIllegalDom +syn match zoneDirective /\$TTL\s\+/ nextgroup=zoneTTL +syn match zoneDirective /\$INCLUDE\s\+/ +syn match zoneDirective /\$GENERATE\s/ + +syn match zoneWhitespace contained /^\s\+/ nextgroup=zoneTTL,zoneClass,zoneRRType +syn match zoneError "\s\+$" +syn match zoneSpecial contained /^[@.]\s\+/ nextgroup=zoneTTL,zoneClass,zoneRRType +syn match zoneSpecial contained /@$/ + +" domains and IPs +syn match zoneLHSDomain contained /^[-0-9A-Za-z.]\+\s\+/ nextgroup=zoneTTL,zoneClass,zoneRRType +syn match zoneLHSIP contained /^[0-9]\{1,3}\(\.[0-9]\{1,3}\)\{,3}\s\+/ nextgroup=zoneTTL,zoneClass,zoneRRType +syn match zoneIPaddr contained /\<[0-9]\{1,3}\(\.[0-9]\{1,3}\)\{,3}\>/ +syn match zoneDomain contained /\<[0-9A-Za-z][-0-9A-Za-z.]\+\>/ + +syn match zoneIllegalDom contained /\S*[^-A-Za-z0-9.[:space:]]\S*\>/ +"syn match zoneIllegalDom contained /[0-9]\S*[-A-Za-z]\S*/ + +" keywords +syn keyword zoneClass IN CHAOS nextgroup=zoneRRType + +syn match zoneTTL contained /\<[0-9HhWwDd]\+\s\+/ nextgroup=zoneClass,zoneRRType +syn match zoneRRType contained /\s*\<\(NS\|HINFO\)\s\+/ nextgroup=zoneSpecial,zoneDomain +syn match zoneRRType contained /\s*\<CNAME\s\+/ nextgroup=zoneDomain,zoneSpecial +syn match zoneRRType contained /\s*\<SOA\s\+/ nextgroup=zoneDomain,zoneIllegalDom +syn match zoneRRType contained /\s*\<PTR\s\+/ nextgroup=zoneDomain,zoneIllegalDom +syn match zoneRRType contained /\s*\<MX\s\+/ nextgroup=zoneMailPrio +syn match zoneRRType contained /\s*\<A\s\+/ nextgroup=zoneIPaddr,zoneIllegalDom + +" FIXME: catchup serial number +syn match zoneSerial contained /\<[0-9]\{9}\>/ + +syn match zoneMailPrio contained /\<[0-9]\+\s*/ nextgroup=zoneDomain,zoneIllegalDom +syn match zoneErrParen /)/ +syn region zoneParen contained start=+(+ end=+)+ contains=zoneSerial,zoneTTL,zoneComment +syn match zoneComment ";.*" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_bind_zone_syn_inits") + if version < 508 + let did_bind_zone_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink zoneComment Comment + HiLink zoneDirective Macro + HiLink zoneLHSDomain Statement + HiLink zoneLHSIP Statement + HiLink zoneClass Include + HiLink zoneSpecial Special + HiLink zoneRRType Type + HiLink zoneError Error + HiLink zoneErrParen Error + HiLink zoneIllegalDom Error + HiLink zoneSerial Todo + HiLink zoneIPaddr Number + HiLink zoneDomain Identifier + + delcommand HiLink +endif + +let b:current_syntax = "bindzone" + +" vim: ts=17 diff --git a/runtime/syntax/blank.vim b/runtime/syntax/blank.vim new file mode 100644 index 000000000..855433995 --- /dev/null +++ b/runtime/syntax/blank.vim @@ -0,0 +1,46 @@ +" Vim syntax file +" Language: Blank 1.4.1 +" Maintainer: Rafal M. Sulejman <unefunge@friko2.onet.pl> +" Last change: 21 Jul 2000 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" Blank instructions +syn match blankInstruction "{[:;,\.+\-*$#@/\\`'"!\|><{}\[\]()?xspo\^&\~=_%]}" + +" Common strings +syn match blankString "\~[^}]" + +" Numbers +syn match blankNumber "\[[0-9]\+\]" + +syn case match + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_blank_syntax_inits") + if version < 508 + let did_blank_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink blankInstruction Statement + HiLink blankNumber Number + HiLink blankString String + + delcommand HiLink +endif + +let b:current_syntax = "blank" +" vim: ts=8 diff --git a/runtime/syntax/btm.vim b/runtime/syntax/btm.vim new file mode 100644 index 000000000..4fd5b2db9 --- /dev/null +++ b/runtime/syntax/btm.vim @@ -0,0 +1,229 @@ +" Vim syntax file +" Language: 4Dos batch file +" Maintainer: John Leo Spetz <jls11@po.cwru.edu> +" Last Change: 2001 May 09 + +"//Issues to resolve: +"//- Boolean operators surrounded by period are recognized but the +"// periods are not highlighted. The only way to do that would +"// be separate synmatches for each possibility otherwise a more +"// general \.\i\+\. will highlight anything delimited by dots. +"//- After unary operators like "defined" can assume token type. +"// Should there be more of these? + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +syn keyword btmStatement call off +syn keyword btmConditional if iff endiff then else elseiff not errorlevel +syn keyword btmConditional gt lt eq ne ge le +syn match btmConditional transparent "\.\i\+\." contains=btmDotBoolOp +syn keyword btmDotBoolOp contained and or xor +syn match btmConditional "==" +syn match btmConditional "!=" +syn keyword btmConditional defined errorlevel exist isalias +syn keyword btmConditional isdir direxist isinternal islabel +syn keyword btmRepeat for in do enddo + +syn keyword btmTodo contained TODO + +" String +syn cluster btmVars contains=btmVariable,btmArgument,btmBIFMatch +syn region btmString start=+"+ end=+"+ contains=@btmVars +syn match btmNumber "\<\d\+\>" + +"syn match btmIdentifier "\<\h\w*\>" + +" If you don't like tabs +"syn match btmShowTab "\t" +"syn match btmShowTabc "\t" +"syn match btmComment "^\ *rem.*$" contains=btmTodo,btmShowTabc + +" Some people use this as a comment line +" In fact this is a Label +"syn match btmComment "^\ *:\ \+.*$" contains=btmTodo + +syn match btmComment "^\ *rem.*$" contains=btmTodo +syn match btmComment "^\ *::.*$" contains=btmTodo + +syn match btmLabelMark "^\ *:[0-9a-zA-Z_\-]\+\>" +syn match btmLabelMark "goto [0-9a-zA-Z_\-]\+\>"lc=5 +syn match btmLabelMark "gosub [0-9a-zA-Z_\-]\+\>"lc=6 + +" syn match btmCmdDivider ">[>&][>&]\=" +syn match btmCmdDivider ">[>&]*" +syn match btmCmdDivider ">>&>" +syn match btmCmdDivider "|&\=" +syn match btmCmdDivider "%+" +syn match btmCmdDivider "\^" + +syn region btmEcho start="echo" skip="echo" matchgroup=btmCmdDivider end="%+" end="$" end="|&\=" end="\^" end=">[>&]*" contains=@btmEchos oneline +syn cluster btmEchos contains=@btmVars,btmEchoCommand,btmEchoParam +syn keyword btmEchoCommand contained echo echoerr echos echoserr +syn keyword btmEchoParam contained on off + +" this is also a valid Label. I don't use it. +"syn match btmLabelMark "^\ *:\ \+[0-9a-zA-Z_\-]\+\>" + +" //Environment variable can be expanded using notation %var in 4DOS +syn match btmVariable "%[0-9a-z_\-]\+" contains=@btmSpecialVars +" //Environment variable can be expanded using notation %var% +syn match btmVariable "%[0-9a-z_\-]*%" contains=@btmSpecialVars +" //The following are special variable in 4DOS +syn match btmVariable "%[=#]" contains=@btmSpecialVars +syn match btmVariable "%??\=" contains=@btmSpecialVars +" //Environment variable can be expanded using notation %[var] in 4DOS +syn match btmVariable "%\[[0-9a-z_\-]*\]" +" //After some keywords next word should be an environment variable +syn match btmVariable "defined\s\i\+"lc=8 +syn match btmVariable "set\s\i\+"lc=4 +" //Parameters to batchfiles take the format %<digit> +syn match btmArgument "%\d\>" +" //4DOS allows format %<digit>& meaning batchfile parameters digit and up +syn match btmArgument "%\d\>&" +" //Variable used by FOR loops sometimes use %%<letter> in batchfiles +syn match btmArgument "%%\a\>" + +" //Show 4DOS built-in functions specially +syn match btmBIFMatch "%@\w\+\["he=e-1 contains=btmBuiltInFunc +syn keyword btmBuiltInFunc contained alias ascii attrib cdrom +syn keyword btmBuiltInFunc contained char clip comma convert +syn keyword btmBuiltInFunc contained date day dec descript +syn keyword btmBuiltInFunc contained device diskfree disktotal +syn keyword btmBuiltInFunc contained diskused dosmem dow dowi +syn keyword btmBuiltInFunc contained doy ems eval exec execstr +syn keyword btmBuiltInFunc contained expand ext extended +syn keyword btmBuiltInFunc contained fileage fileclose filedate +syn keyword btmBuiltInFunc contained filename fileopen fileread +syn keyword btmBuiltInFunc contained files fileseek fileseekl +syn keyword btmBuiltInFunc contained filesize filetime filewrite +syn keyword btmBuiltInFunc contained filewriteb findclose +syn keyword btmBuiltInFunc contained findfirst findnext format +syn keyword btmBuiltInFunc contained full if inc index insert +syn keyword btmBuiltInFunc contained instr int label left len +syn keyword btmBuiltInFunc contained lfn line lines lower lpt +syn keyword btmBuiltInFunc contained makeage makedate maketime +syn keyword btmBuiltInFunc contained master month name numeric +syn keyword btmBuiltInFunc contained path random readscr ready +syn keyword btmBuiltInFunc contained remote removable repeat +syn keyword btmBuiltInFunc contained replace right search +syn keyword btmBuiltInFunc contained select sfn strip substr +syn keyword btmBuiltInFunc contained time timer trim truename +syn keyword btmBuiltInFunc contained unique upper wild word +syn keyword btmBuiltInFunc contained words xms year + +syn cluster btmSpecialVars contains=btmBuiltInVar,btmSpecialVar + +" //Show specialized variables specially +" syn match btmSpecialVar contained "+" +syn match btmSpecialVar contained "=" +syn match btmSpecialVar contained "#" +syn match btmSpecialVar contained "??\=" +syn keyword btmSpecialVar contained cmdline colordir comspec +syn keyword btmSpecialVar contained copycmd dircmd temp temp4dos +syn keyword btmSpecialVar contained filecompletion path prompt + +" //Show 4DOS built-in variables specially specially +syn keyword btmBuiltInVar contained _4ver _alias _ansi +syn keyword btmBuiltInVar contained _apbatt _aplife _apmac _batch +syn keyword btmBuiltInVar contained _batchline _batchname _bg +syn keyword btmBuiltInVar contained _boot _ci _cmdproc _co +syn keyword btmBuiltInVar contained _codepage _column _columns +syn keyword btmBuiltInVar contained _country _cpu _cwd _cwds _cwp +syn keyword btmBuiltInVar contained _cwps _date _day _disk _dname +syn keyword btmBuiltInVar contained _dos _dosver _dow _dowi _doy +syn keyword btmBuiltInVar contained _dpmi _dv _env _fg _hlogfile +syn keyword btmBuiltInVar contained _hour _kbhit _kstack _lastdisk +syn keyword btmBuiltInVar contained _logfile _minute _monitor +syn keyword btmBuiltInVar contained _month _mouse _ndp _row _rows +syn keyword btmBuiltInVar contained _second _shell _swapping +syn keyword btmBuiltInVar contained _syserr _time _transient +syn keyword btmBuiltInVar contained _video _win _wintitle _year + +" //Commands in 4DOS and/or DOS +syn match btmCommand "\s?" +syn match btmCommand "^?" +syn keyword btmCommand alias append assign attrib +syn keyword btmCommand backup beep break cancel case +syn keyword btmCommand cd cdd cdpath chcp chdir +syn keyword btmCommand chkdsk cls color comp copy +syn keyword btmCommand ctty date debug default defrag +syn keyword btmCommand del delay describe dir +syn keyword btmCommand dirhistory dirs diskcomp +syn keyword btmCommand diskcopy doskey dosshell +syn keyword btmCommand drawbox drawhline drawvline +"syn keyword btmCommand echo echoerr echos echoserr +syn keyword btmCommand edit edlin emm386 endlocal +syn keyword btmCommand endswitch erase eset except +syn keyword btmCommand exe2bin exit expand fastopen +syn keyword btmCommand fc fdisk ffind find format +syn keyword btmCommand free global gosub goto +syn keyword btmCommand graftabl graphics help history +syn keyword btmCommand inkey input join keyb keybd +syn keyword btmCommand keystack label lh list loadbtm +syn keyword btmCommand loadhigh lock log md mem +syn keyword btmCommand memory mirror mkdir mode more +syn keyword btmCommand move nlsfunc on option path +syn keyword btmCommand pause popd print prompt pushd +syn keyword btmCommand quit rd reboot recover ren +syn keyword btmCommand rename replace restore return +syn keyword btmCommand rmdir scandisk screen scrput +syn keyword btmCommand select set setdos setlocal +syn keyword btmCommand setver share shift sort subst +syn keyword btmCommand swapping switch sys tee text +syn keyword btmCommand time timer touch tree truename +syn keyword btmCommand type unalias undelete unformat +syn keyword btmCommand unlock unset ver verify vol +syn keyword btmCommand vscrput y + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_btm_syntax_inits") + if version < 508 + let did_btm_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink btmLabel Special + HiLink btmLabelMark Special + HiLink btmCmdDivider Special + HiLink btmConditional btmStatement + HiLink btmDotBoolOp btmStatement + HiLink btmRepeat btmStatement + HiLink btmEchoCommand btmStatement + HiLink btmEchoParam btmStatement + HiLink btmStatement Statement + HiLink btmTodo Todo + HiLink btmString String + HiLink btmNumber Number + HiLink btmComment Comment + HiLink btmArgument Identifier + HiLink btmVariable Identifier + HiLink btmEcho String + HiLink btmBIFMatch btmStatement + HiLink btmBuiltInFunc btmStatement + HiLink btmBuiltInVar btmStatement + HiLink btmSpecialVar btmStatement + HiLink btmCommand btmStatement + + "optional highlighting + "HiLink btmShowTab Error + "HiLink btmShowTabc Error + "hiLink btmIdentifier Identifier + + delcommand HiLink +endif + +let b:current_syntax = "btm" + +" vim: ts=8 diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim new file mode 100644 index 000000000..759bebb68 --- /dev/null +++ b/runtime/syntax/c.vim @@ -0,0 +1,345 @@ +" Vim syntax file +" Language: C +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last Change: 2004 Feb 04 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" A bunch of useful C keywords +syn keyword cStatement goto break return continue asm +syn keyword cLabel case default +syn keyword cConditional if else switch +syn keyword cRepeat while for do + +syn keyword cTodo contained TODO FIXME XXX + +" cCommentGroup allows adding matches for special things in comments +syn cluster cCommentGroup contains=cTodo + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match cSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" +if !exists("c_no_utf") + syn match cSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)" +endif +if exists("c_no_cformat") + syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell + " cCppString: same as cString, but ends at end of line + syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,@Spell +else + syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained + syn match cFormat display "%%" contained + syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell + " cCppString: same as cString, but ends at end of line + syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell +endif + +syn match cCharacter "L\='[^\\]'" +syn match cCharacter "L'[^']*'" contains=cSpecial +if exists("c_gnu") + syn match cSpecialError "L\='\\[^'\"?\\abefnrtv]'" + syn match cSpecialCharacter "L\='\\['\"?\\abefnrtv]'" +else + syn match cSpecialError "L\='\\[^'\"?\\abfnrtv]'" + syn match cSpecialCharacter "L\='\\['\"?\\abfnrtv]'" +endif +syn match cSpecialCharacter display "L\='\\\o\{1,3}'" +syn match cSpecialCharacter display "'\\x\x\{1,2}'" +syn match cSpecialCharacter display "L'\\x\x\+'" + +"when wanted, highlight trailing white space +if exists("c_space_errors") + if !exists("c_no_trail_space_error") + syn match cSpaceError display excludenl "\s\+$" + endif + if !exists("c_no_tab_space_error") + syn match cSpaceError display " \+\t"me=e-1 + endif +endif + +"catch errors caused by wrong parenthesis and brackets +" also accept <% for {, %> for }, <: for [ and :> for ] (C99) +" But avoid matching <::. +syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cCommentSkip,cOctalZero,cCppOut,cCppOut2,cCppSkip,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom +if exists("c_no_bracket_error") + syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cCppString,@Spell + " cCppParen: same as cParen but ends at end-of-line; used in cDefine + syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell + syn match cParenError display ")" + syn match cErrInParen display contained "[{}]\|<%\|%>" +else + syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,cCppString,@Spell + " cCppParen: same as cParen but ends at end-of-line; used in cDefine + syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell + syn match cParenError display "[\])]" + syn match cErrInParen display contained "[\]{}]\|<%\|%>" + syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' contains=ALLBUT,@cParenGroup,cErrInParen,cCppParen,cCppBracket,cCppString,@Spell + " cCppBracket: same as cParen but ends at end-of-line; used in cDefine + syn region cCppBracket transparent start='\[\|<::\@!' skip='\\$' excludenl end=']\|:>' end='$' contained contains=ALLBUT,@cParenGroup,cErrInParen,cParen,cBracket,cString,@Spell + syn match cErrInBracket display contained "[);{}]\|<%\|%>" +endif + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match cNumbers display transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctalError,cOctal +" Same, but without octal error (for comments) +syn match cNumbersCom display contained transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctal +syn match cNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" +"hex number +syn match cNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" +" Flag the first zero of an octal number as something special +syn match cOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero +syn match cOctalZero display contained "\<0" +syn match cFloat display contained "\d\+f" +"floating point number, with dot, optional exponent +syn match cFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" +"floating point number, starting with a dot, optional exponent +syn match cFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match cFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" +if !exists("c_no_c99") + "hexadecimal floating point number, optional leading digits, with dot, with exponent + syn match cFloat display contained "0x\x*\.\x\+p[-+]\=\d\+[fl]\=\>" + "hexadecimal floating point number, with leading digits, optional dot, with exponent + syn match cFloat display contained "0x\x\+\.\=p[-+]\=\d\+[fl]\=\>" +endif + +" flag an octal number with wrong digits +syn match cOctalError display contained "0\o*[89]\d*" +syn case match + +if exists("c_comment_strings") + " A comment can contain cString, cCharacter and cNumber. + " But a "*/" inside a cString in a cComment DOES end the comment! So we + " need to use a special type of cString: cCommentString, which also ends on + " "*/", and sees a "*" at the start of the line as comment again. + " Unfortunately this doesn't very well work for // type of comments :-( + syntax match cCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region cCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=cSpecial,cCommentSkip + syntax region cComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=cSpecial + syntax region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError,@Spell + syntax region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cCommentString,cCharacter,cNumbersCom,cSpaceError,@Spell +else + syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cSpaceError,@Spell + syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cSpaceError,@Spell +endif +" keep a // comment separately, it terminates a preproc. conditional +syntax match cCommentError display "\*/" +syntax match cCommentStartError display "/\*"me=e-1 contained + +syn keyword cOperator sizeof +if exists("c_gnu") + syn keyword cStatement __asm__ + syn keyword cOperator typeof __real__ __imag__ +endif +syn keyword cType int long short char void +syn keyword cType signed unsigned float double +if !exists("c_no_ansi") || exists("c_ansi_typedefs") + syn keyword cType size_t ssize_t wchar_t ptrdiff_t sig_atomic_t fpos_t + syn keyword cType clock_t time_t va_list jmp_buf FILE DIR div_t ldiv_t + syn keyword cType mbstate_t wctrans_t wint_t wctype_t +endif +if !exists("c_no_c99") " ISO C99 + syn keyword cType bool complex + syn keyword cType int8_t int16_t int32_t int64_t + syn keyword cType uint8_t uint16_t uint32_t uint64_t + syn keyword cType int_least8_t int_least16_t int_least32_t int_least64_t + syn keyword cType uint_least8_t uint_least16_t uint_least32_t uint_least64_t + syn keyword cType int_fast8_t int_fast16_t int_fast32_t int_fast64_t + syn keyword cType uint_fast8_t uint_fast16_t uint_fast32_t uint_fast64_t + syn keyword cType intptr_t uintptr_t + syn keyword cType intmax_t uintmax_t +endif +if exists("c_gnu") + syn keyword cType __label__ __complex__ __volatile__ +endif + +syn keyword cStructure struct union enum typedef +syn keyword cStorageClass static register auto volatile extern const +if exists("c_gnu") + syn keyword cStorageClass inline __attribute__ +endif +if !exists("c_no_c99") + syn keyword cStorageClass inline restrict +endif + +if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu") + if exists("c_gnu") + syn keyword cConstant __GNUC__ __FUNCTION__ __PRETTY_FUNCTION__ + endif + syn keyword cConstant __LINE__ __FILE__ __DATE__ __TIME__ __STDC__ + syn keyword cConstant __STDC_VERSION__ + syn keyword cConstant CHAR_BIT MB_LEN_MAX MB_CUR_MAX + syn keyword cConstant UCHAR_MAX UINT_MAX ULONG_MAX USHRT_MAX + syn keyword cConstant CHAR_MIN INT_MIN LONG_MIN SHRT_MIN + syn keyword cConstant CHAR_MAX INT_MAX LONG_MAX SHRT_MAX + syn keyword cConstant SCHAR_MIN SINT_MIN SLONG_MIN SSHRT_MIN + syn keyword cConstant SCHAR_MAX SINT_MAX SLONG_MAX SSHRT_MAX + if !exists("c_no_c99") + syn keyword cConstant LLONG_MAX ULLONG_MAX + syn keyword cConstant INT8_MIN INT16_MIN INT32_MIN INT64_MIN + syn keyword cConstant INT8_MAX INT16_MAX INT32_MAX INT64_MAX + syn keyword cConstant UINT8_MAX UINT16_MAX UINT32_MAX UINT64_MAX + syn keyword cConstant INT_LEAST8_MIN INT_LEAST16_MIN INT_LEAST32_MIN INT_LEAST64_MIN + syn keyword cConstant INT_LEAST8_MAX INT_LEAST16_MAX INT_LEAST32_MAX INT_LEAST64_MAX + syn keyword cConstant UINT_LEAST8_MAX UINT_LEAST16_MAX UINT_LEAST32_MAX UINT_LEAST64_MAX + syn keyword cConstant INT_FAST8_MIN INT_FAST16_MIN INT_FAST32_MIN INT_FAST64_MIN + syn keyword cConstant INT_FAST8_MAX INT_FAST16_MAX INT_FAST32_MAX INT_FAST64_MAX + syn keyword cConstant UINT_FAST8_MAX UINT_FAST16_MAX UINT_FAST32_MAX UINT_FAST64_MAX + syn keyword cConstant INTPTR_MIN INTPTR_MAX UINTPTR_MAX + syn keyword cConstant INTMAX_MIN INTMAX_MAX UINTMAX_MAX + syn keyword cConstant PTRDIFF_MIN PTRDIFF_MAX SIG_ATOMIC_MIN SIG_ATOMIC_MAX + syn keyword cConstant SIZE_MAX WCHAR_MIN WCHAR_MAX WINT_MIN WINT_MAX + endif + syn keyword cConstant FLT_RADIX FLT_ROUNDS + syn keyword cConstant FLT_DIG FLT_MANT_DIG FLT_EPSILON + syn keyword cConstant DBL_DIG DBL_MANT_DIG DBL_EPSILON + syn keyword cConstant LDBL_DIG LDBL_MANT_DIG LDBL_EPSILON + syn keyword cConstant FLT_MIN FLT_MAX FLT_MIN_EXP FLT_MAX_EXP + syn keyword cConstant FLT_MIN_10_EXP FLT_MAX_10_EXP + syn keyword cConstant DBL_MIN DBL_MAX DBL_MIN_EXP DBL_MAX_EXP + syn keyword cConstant DBL_MIN_10_EXP DBL_MAX_10_EXP + syn keyword cConstant LDBL_MIN LDBL_MAX LDBL_MIN_EXP LDBL_MAX_EXP + syn keyword cConstant LDBL_MIN_10_EXP LDBL_MAX_10_EXP + syn keyword cConstant HUGE_VAL CLOCKS_PER_SEC NULL + syn keyword cConstant LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY + syn keyword cConstant LC_NUMERIC LC_TIME + syn keyword cConstant SIG_DFL SIG_ERR SIG_IGN + syn keyword cConstant SIGABRT SIGFPE SIGILL SIGHUP SIGINT SIGSEGV SIGTERM + " Add POSIX signals as well... + syn keyword cConstant SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP + syn keyword cConstant SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT SIGSEGV + syn keyword cConstant SIGSTOP SIGTERM SIGTRAP SIGTSTP SIGTTIN SIGTTOU + syn keyword cConstant SIGUSR1 SIGUSR2 + syn keyword cConstant _IOFBF _IOLBF _IONBF BUFSIZ EOF WEOF + syn keyword cConstant FOPEN_MAX FILENAME_MAX L_tmpnam + syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET + syn keyword cConstant TMP_MAX stderr stdin stdout + syn keyword cConstant EXIT_FAILURE EXIT_SUCCESS RAND_MAX + " Add POSIX errors as well + syn keyword cConstant E2BIG EACCES EAGAIN EBADF EBADMSG EBUSY + syn keyword cConstant ECANCELED ECHILD EDEADLK EDOM EEXIST EFAULT + syn keyword cConstant EFBIG EILSEQ EINPROGRESS EINTR EINVAL EIO EISDIR + syn keyword cConstant EMFILE EMLINK EMSGSIZE ENAMETOOLONG ENFILE ENODEV + syn keyword cConstant ENOENT ENOEXEC ENOLCK ENOMEM ENOSPC ENOSYS + syn keyword cConstant ENOTDIR ENOTEMPTY ENOTSUP ENOTTY ENXIO EPERM + syn keyword cConstant EPIPE ERANGE EROFS ESPIPE ESRCH ETIMEDOUT EXDEV + " math.h + syn keyword cConstant M_E M_LOG2E M_LOG10E M_LN2 M_LN10 M_PI M_PI_2 M_PI_4 + syn keyword cConstant M_1_PI M_2_PI M_2_SQRTPI M_SQRT2 M_SQRT1_2 +endif +if !exists("c_no_c99") " ISO C99 + syn keyword cConstant true false +endif + +" Accept %: for # (C99) +syn region cPreCondit start="^\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=cComment,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError +syn match cPreCondit display "^\s*\(%:\|#\)\s*\(else\|endif\)\>" +if !exists("c_no_if0") + syn region cCppOut start="^\s*\(%:\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=cCppOut2 + syn region cCppOut2 contained start="0" end="^\s*\(%:\|#\)\s*\(endif\>\|else\>\|elif\>\)" contains=cSpaceError,cCppSkip + syn region cCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppSkip +endif +syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match cIncluded display contained "<[^>]*>" +syn match cInclude display "^\s*\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded +"syn match cLineSkip "\\$" +syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOut,cCppOut2,cCppSkip,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti +syn region cDefine start="^\s*\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 contains=ALLBUT,@cPreProcGroup,@Spell +syn region cPreProc start="^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell + +" Highlight User Labels +syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOut,cCppOut2,cCppSkip,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString +syn region cMulti transparent start='?' skip='::' end=':' contains=ALLBUT,@cMultiGroup,@Spell +" Avoid matching foo::bar() in C++ by requiring that the next char is not ':' +syn cluster cLabelGroup contains=cUserLabel +syn match cUserCont display "^\s*\I\i*\s*:$" contains=@cLabelGroup +syn match cUserCont display ";\s*\I\i*\s*:$" contains=@cLabelGroup +syn match cUserCont display "^\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup +syn match cUserCont display ";\s*\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup + +syn match cUserLabel display "\I\i*" contained + +" Avoid recognizing most bitfields as labels +syn match cBitField display "^\s*\I\i*\s*:\s*[1-9]"me=e-1 +syn match cBitField display ";\s*\I\i*\s*:\s*[1-9]"me=e-1 + +if exists("c_minlines") + let b:c_minlines = c_minlines +else + if !exists("c_no_if0") + let b:c_minlines = 50 " #if 0 constructs can be long + else + let b:c_minlines = 15 " mostly for () constructs + endif +endif +exec "syn sync ccomment cComment minlines=" . b:c_minlines + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_c_syn_inits") + if version < 508 + let did_c_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink cFormat cSpecial + HiLink cCppString cString + HiLink cCommentL cComment + HiLink cCommentStart cComment + HiLink cLabel Label + HiLink cUserLabel Label + HiLink cConditional Conditional + HiLink cRepeat Repeat + HiLink cCharacter Character + HiLink cSpecialCharacter cSpecial + HiLink cNumber Number + HiLink cOctal Number + HiLink cOctalZero PreProc " link this to Error if you want + HiLink cFloat Float + HiLink cOctalError cError + HiLink cParenError cError + HiLink cErrInParen cError + HiLink cErrInBracket cError + HiLink cCommentError cError + HiLink cCommentStartError cError + HiLink cSpaceError cError + HiLink cSpecialError cError + HiLink cOperator Operator + HiLink cStructure Structure + HiLink cStorageClass StorageClass + HiLink cInclude Include + HiLink cPreProc PreProc + HiLink cDefine Macro + HiLink cIncluded cString + HiLink cError Error + HiLink cStatement Statement + HiLink cPreCondit PreCondit + HiLink cType Type + HiLink cConstant Constant + HiLink cCommentString cString + HiLink cComment2String cString + HiLink cCommentSkip cComment + HiLink cString String + HiLink cComment Comment + HiLink cSpecial SpecialChar + HiLink cTodo Todo + HiLink cCppSkip cCppOut + HiLink cCppOut2 cCppOut + HiLink cCppOut Comment + + delcommand HiLink +endif + +let b:current_syntax = "c" + +" vim: ts=8 diff --git a/runtime/syntax/calendar.vim b/runtime/syntax/calendar.vim new file mode 100644 index 000000000..9834267ae --- /dev/null +++ b/runtime/syntax/calendar.vim @@ -0,0 +1,104 @@ +" Vim syntax file +" Language: calendar(1) file. +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/calendar/ +" Latest Revision: 2004-05-06 +" arch-tag: d714127d-469d-43bd-9c79-c2a46ec54535 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Todo +syn keyword calendarTodo contained TODO FIXME XXX NOTE + +" Comments +syn region calendarComment matchgroup=calendarComment start='/\*' end='\*/' contains=calendarTodo + +" Strings +syn region calendarCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=calendarSpecial +syn match calendarSpecial display contained '\\\%(x\x\+\|\o\{1,3}\|.\|$\)' +syn match calendarSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)" + +" cpp(1) Preprocessor directives (adapted from syntax/c.vim) + +syn region calendarPreCondit start='^\s*#\s*\%(if\|ifdef\|ifndef\|elif\)\>' skip='\\$' end='$' contains=calendarComment,calendarCppString +syn match calendarPreCondit display '^\s*#\s*\%(else\|endif\)\>' +syn region calendarCppOut start='^\s*#\s*if\s\+0\+' end='.\@=\|$' contains=calendarCppOut2 +syn region calendarCppOut2 contained start='0' end='^\s*#\s*\%(endif\|else\|elif\)\>' contains=calendarSpaceError,calendarCppSkip +syn region calendarCppSkip contained start='^\s*#\s*\%(if\|ifdef\|ifndef\)\>' skip='\\$' end='^\s*#\s*endif\>' contains=calendarSpaceError,calendarCppSkip +syn region calendarIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match calendarIncluded display contained '<[^>]*>' +syn match calendarInclude display '^\s*#\s*include\>\s*["<]' contains=calendarIncluded +syn cluster calendarPreProcGroup contains=calendarPreCondit,calendarIncluded,calendarInclude,calendarDefine,calendarCppOut,calendarCppOut2,calendarCppSkip,calendarString,calendarSpecial,calendarTodo +syn region calendarDefine start='^\s*#\s*\%(define\|undef\)\>' skip='\\$' end='$' contains=ALLBUT,@calendarPreProcGroup +syn region calendarPreProc start='^\s*#\s*\%(pragma\|line\|warning\|warn\|error\)\>' skip='\\$' end='$' keepend contains=ALLBUT,@calendarPreProcGroup + +" Keywords +syn keyword calendarKeyword CHARSET BODUN LANG +syn case ignore +syn keyword calendarKeyword Easter Pashka +syn case match + +" Dates +syn case ignore +syn match calendarNumber '\<\d\+\>' +syn keyword calendarMonth Jan[uary] Feb[ruary] Mar[ch] Apr[il] May Jun[e] +syn keyword calendarMonth Jul[y] Aug[ust] Sep[tember] Oct[ober] +syn keyword calendarMonth Nov[ember] Dec[ember] +syn match calendarMonth '\<\%(Jan\|Feb\|Mar\|Apr\|May\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec\)\.' +syn keyword calendarWeekday Mon[day] Tue[sday] Wed[nesday] Thu[rsday] +syn keyword calendarWeekday Fri[day] Sat[urday] Sun[day] +syn match calendarWeekday '\<\%(Mon\|Tue\|Wed\|Thu\|Fri\|Sat\|Sun\)\.' nextgroup=calendarWeekdayMod +syn match calendarWeekdayMod '[+-]\d\+\>' +syn case match + +" Times +syn match calendarTime '\<\%([01]\=\d\|2[0-3]\):[0-5]\d\%(:[0-5]\d\)\=' +syn match calendarTime '\<\%(0\=[1-9]\|1[0-2]\):[0-5]\d\%(:[0-5]\d\)\=\s*[AaPp][Mm]' + +" Variables +syn match calendarVariable '\*' + +let b:c_minlines = 50 " #if 0 constructs can be long +exec "syn sync ccomment calendarComment minlines=" . b:c_minlines + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_calendar_syn_inits") + if version < 508 + let did_calendar_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink calendarTodo Todo + HiLink calendarComment Comment + HiLink calendarCppString String + HiLink calendarSpecial SpecialChar + HiLink calendarPreCondit PreCondit + HiLink calendarCppOut Comment + HiLink calendarCppOut2 calendarCppOut + HiLink calendarCppSkip calendarCppOut + HiLink calendarIncluded String + HiLink calendarInclude Include + HiLink calendarDefine Macro + HiLink calendarPreProc PreProc + HiLink calendarKeyword Keyword + HiLink calendarNumber Number + HiLink calendarMonth String + HiLink calendarWeekday String + HiLink calendarWeekdayMod Special + HiLink calendarTime Number + HiLink calendarVariable Identifier + + delcommand HiLink +endif + +let b:current_syntax = "calendar" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/catalog.vim b/runtime/syntax/catalog.vim new file mode 100644 index 000000000..2f8e388eb --- /dev/null +++ b/runtime/syntax/catalog.vim @@ -0,0 +1,30 @@ +" Vim syntax file +" Language: sgml catalog file +" Maintainer: Johannes Zellner <johannes@zellner.org> +" Last Change: Tue, 27 Apr 2004 14:54:59 CEST +" Filenames: /etc/sgml.catalog +" $Id$ + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case ignore + +" strings +syn region catalogString start=+"+ skip=+\\\\\|\\"+ end=+"+ keepend +syn region catalogString start=+'+ skip=+\\\\\|\\'+ end=+'+ keepend + +syn region catalogComment start=+--+ end=+--+ contains=catalogTodo +syn keyword catalogTodo TODO FIXME XXX contained display +syn keyword catalogKeyword DOCTYPE OVERRIDE PUBLIC DTDDECL ENTITY display + + +" The default highlighting. +hi def link catalogString String +hi def link catalogComment Comment +hi def link catalogTodo Todo +hi def link catalogKeyword Statement + +let b:current_syntax = "catalog" diff --git a/runtime/syntax/cdl.vim b/runtime/syntax/cdl.vim Binary files differnew file mode 100644 index 000000000..69f124bdd --- /dev/null +++ b/runtime/syntax/cdl.vim diff --git a/runtime/syntax/cf.vim b/runtime/syntax/cf.vim new file mode 100644 index 000000000..6cf111d99 --- /dev/null +++ b/runtime/syntax/cf.vim @@ -0,0 +1,151 @@ +" Vim syntax file +" Language: Cold Fusion +" Maintainer: Jeff Lanzarotta (jefflanzarotta@yahoo.com) +" URL: http://lanzarotta.tripod.com/vim/syntax/cf.vim.zip +" Last Change: October 15, 2001 +" Usage: Since Cold Fusion has its own version of html comments, +" make sure that you put +" 'let html_wrong_comments=1' in your _vimrc file. + +" For version 5.x, clear all syntax items. +" For version 6.x, quit when a syntax file was already loaded. +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Use all the stuff from the original html syntax file. +if version < 600 + source <sfile>:p:h/html.vim +else + runtime! syntax/html.vim +endif + +" Tag names. +syn keyword cfTagName contained cfabort cfapplet cfapplication cfassociate +syn keyword cfTagName contained cfauthenticate cfbreak cfcache cfcol +syn keyword cfTagName contained cfcollection cfcontent cfcookie cfdirectory +syn keyword cfTagName contained cferror cfexit cffile cfform cfftp cfgrid +syn keyword cfTagName contained cfgridcolumn cfgridrow cfgridupdate cfheader +syn keyword cfTagName contained cfhtmlhead cfhttp cfhttpparam +syn keyword cfTagName contained cfif cfelseif cfelse +syn keyword cfTagName contained cfinclude cfindex cfinput cfinsert +syn keyword cfTagName contained cfldap cflocation cflock cfloop cfmail +syn keyword cfTagName contained cfmodule cfobject cfoutput cfparam cfpop +syn keyword cfTagName contained cfprocparam cfprocresult cfquery cfregistry +syn keyword cfTagName contained cfreport cfschedule cfscript cfsearch cfselect +syn keyword cfTagName contained cfset cfsetting cfslider cfstoredproc +syn keyword cfTagName contained cfswitch cfcase cfdefaultcase +syn keyword cfTagName contained cftable cftextinput cfthrow cftransaction +syn keyword cfTagName contained cftree cftreeitem +syn keyword cfTagName contained cftry cfcatch +syn keyword cfTagName contained cfupdate cfwddx + +" Legal arguments. +syn keyword cfArg contained accept action addnewline addtoken agentname align +syn keyword cfArg contained appendkey applicationtimeout attachmentpath +syn keyword cfArg contained attributecollection attributes basetag bgcolor +syn keyword cfArg contained blockfactor body bold border branch cachedafter +syn keyword cfArg contained cachedwithin cc cfsqltype checked class clientmanagement +syn keyword cfArg contained clientstorage colheaderalign colheaderbold colheaderfont +syn keyword cfArg contained colheaderfontsize colheaderitalic colheaders collection +syn keyword cfArg contained colspacing columns completepath connection context +syn keyword cfArg contained criteria custom1 custom2 data dataalign datacollection +syn keyword cfArg contained datasource dbname dbserver dbtype dbvarname debug default +syn keyword cfArg contained delete deletebutton deletefile delimiter destination detail +syn keyword cfArg contained directory display dn domain enablecab enablecfoutputonly +syn keyword cfArg contained enctype enddate endtime entry errorcode expand expires +syn keyword cfArg contained expireurl expression extendedinfo extensions external +syn keyword cfArg contained file filefield filter font fontsize formfields formula +syn keyword cfArg contained from grid griddataalign gridlines groovecolor group header +syn keyword cfArg contained headeralign headerbold headerfont headerfontsize headeritalic +syn keyword cfArg contained headerlines height highlighthref href hrefkey hscroll hspace +syn keyword cfArg contained htmltable img imgopen imgstyle index input insert insertbutton +syn keyword cfArg contained interval isolation italic key keyonly label language mailerid +syn keyword cfArg contained mailto maxlength maxrows message messagenumber method +syn keyword cfArg contained mimeattach mode multiple name namecomplict newdirectory +syn keyword cfArg contained notsupported null numberformat onerror onsubmit onvalidate +syn keyword cfArg contained operation orderby output parrent passthrough password path +syn keyword cfArg contained picturebar port procedure protocol provider providerdsn +syn keyword cfArg contained proxybypass proxyserver publish query queryasroot range +syn keyword cfArg contained recurse refreshlabel report requesttimeout required reset +syn keyword cfArg contained resoleurl resultset retrycount returncode rowheaderalign +syn keyword cfArg contained rowheaderbold rowheaderfont rowheaderfontsize rowheaderitalic +syn keyword cfArg contained rowheaders rowheaderwidth rowheight scale scope secure +syn keyword cfArg contained securitycontext select selectcolor selected selectmode server +syn keyword cfArg contained sessionmanagement sessiontimeout setclientcookies setcookie +syn keyword cfArg contained showdebugoutput showerror size sort sortascendingbutton +syn keyword cfArg contained sortdescendingbutton source sql start startdate startrow starttime +syn keyword cfArg contained step stoponerror subject tablename tableowner tablequalifier +syn keyword cfArg contained target task template text textcolor textqualifier +syn keyword cfArg contained throwonfailure throwontimeout timeout title to toplevelvariable +syn keyword cfArg contained type url urlpath username usetimezoneinfo validate value +syn keyword cfArg contained variable vscroll vspace width + +" Cold Fusion Functions. +syn keyword cfFunctionName contained Abs ArrayAppend ArrayAvg ArrayClear ArrayDeleteAt +syn keyword cfFunctionName contained ArrayInsertAt ArrayIsEmpty ArrayLen ArrayMax +syn keyword cfFunctionName contained ArrayMin ArrayNew ArrayPrepend ArrayResize ArraySet +syn keyword cfFunctionName contained ArraySort ArraySum ArraySwap ArrayToList Asc Atn +syn keyword cfFunctionName contained BitAnd BitMaskClear BitMaskRead BitMaskSet BitNot +syn keyword cfFunctionName contained BitOr BitSHLN BitSHRN BitXor CJustify Ceiling Chr +syn keyword cfFunctionName contained Compare CompareNoCase Cos CreateDate CreateDateTime +syn keyword cfFunctionName contained CreateODBCDate CreateODBCDateTime CreateODBCTime +syn keyword cfFunctionName contained CreateTime CreateTimeSpan DE DateAdd DateCompare DateDiff +syn keyword cfFunctionName contained DateFormat DatePart Day DayOfWeek DayOfWeekAsString +syn keyword cfFunctionName contained DayOfYear DaysInMonth DaysInYear DecimalFormat DecrementValue +syn keyword cfFunctionName contained Decrypt DeleteClientVariable DirectoryExists DollarFormat +syn keyword cfFunctionName contained Encrypt Evaluate Exp ExpandPath FileExists Find FindNoCase +syn keyword cfFunctionName contained FindOneOf FirstDayOfMonth Fix FormatBaseN GetBaseTagData +syn keyword cfFunctionName contained GetBaseTagList GetClientVariablesList GetDirectoryFromPath +syn keyword cfFunctionName contained GetFileFromPath GetLocale GetTempDirectory GetTempFile +syn keyword cfFunctionName contained GetTemplatePath GetTickCount GetToken HTMLCodeFormat +syn keyword cfFunctionName contained HTMLEditFormat Hour IIf IncrementValue InputBaseN Insert +syn keyword cfFunctionName contained Int IsArray IsAuthenticated IsAuthorized IsBoolean IsDate +syn keyword cfFunctionName contained IsDebugMode IsDefined IsLeapYear IsNumeric IsNumericDate +syn keyword cfFunctionName contained IsQuery IsSimpleValue IsStruct LCase LJustify LSCurrencyFormat +syn keyword cfFunctionName contained LSDateFormat LSIsCurrency LSIsDate LSIsNumeric LSNumberFormat +syn keyword cfFunctionName contained LSParseCurrency LSParseDateTime LSParseNumber LSTimeFormat +syn keyword cfFunctionName contained LTrim Left Len ListAppend ListChangeDelims ListContains +syn keyword cfFunctionName contained ListContainsNoCase ListDeleteAt ListFind ListFindNoCase ListFirst +syn keyword cfFunctionName contained ListGetAt ListInsertAt ListLast ListLen ListPrepend ListRest +syn keyword cfFunctionName contained ListSetAt ListToArray Log Log10 Max Mid Min Minute Month +syn keyword cfFunctionName contained MonthAsString Now NumberFormat ParagraphFormat ParameterExists +syn keyword cfFunctionName contained ParseDateTime Pi PreserveSingleQuotes Quarter QueryAddRow +syn keyword cfFunctionName contained QueryNew QuerySetCell QuotedValueList REFind REFindNoCase +syn keyword cfFunctionName contained REReplace REReplaceNoCase RJustify RTrim Rand RandRange +syn keyword cfFunctionName contained Randomize RemoveChars RepeatString Replace ReplaceList +syn keyword cfFunctionName contained ReplaceNoCase Reverse Right Round Second SetLocale SetVariable +syn keyword cfFunctionName contained Sgn Sin SpanExcluding SpanIncluding Sqr StripCR StructClear +syn keyword cfFunctionName contained StructCopy StructCount StructDelete StructFind StructInsert +syn keyword cfFunctionName contained StructIsEmpty StructKeyExists StructNew StructUpdate Tan +syn keyword cfFunctionName contained TimeFormat Trim UCase URLEncodedFormat Val ValueList Week +syn keyword cfFunctionName contained WriteOutput Year YesNoFormat + +syn cluster htmlTagNameCluster add=cfTagName +syn cluster htmlArgCluster add=cfArg,cfFunctionName + +syn region cfFunctionRegion start='#' end='#' contains=cfFunctionName + +" Define the default highlighting. +" For version 5.x and earlier, only when not done already. +" For version 5.8 and later, only when and item doesn't have highlighting yet. +if version >= 508 || !exists("did_cf_syn_inits") + if version < 508 + let did_cf_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink cfTagName Statement + HiLink cfArg Type + HiLink cfFunctionName Function + + delcommand HiLink +endif + +let b:current_syntax = "cf" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/cfg.vim b/runtime/syntax/cfg.vim new file mode 100644 index 000000000..c6e8b2953 --- /dev/null +++ b/runtime/syntax/cfg.vim @@ -0,0 +1,60 @@ +" Vim syntax file +" Language: Good old CFG files +" Maintainer: Igor N. Prischepoff (igor@tyumbit.ru, pri_igor@mail.ru) +" Last change: 2001 Sep 02 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists ("b:current_syntax") + finish +endif + +" case off +syn case ignore +syn keyword CfgOnOff ON OFF YES NO TRUE FALSE contained +syn match UncPath "\\\\\p*" contained +"Dos Drive:\Path +syn match CfgDirectory "[a-zA-Z]:\\\p*" contained +"Parameters +syn match CfgParams ".*="me=e-1 contains=CfgComment +"... and their values (don't want to highlight '=' sign) +syn match CfgValues "=.*"hs=s+1 contains=CfgDirectory,UncPath,CfgComment,CfgString,CfgOnOff + +" Sections +syn match CfgSection "\[.*\]" +syn match CfgSection "{.*}" + +" String +syn match CfgString "\".*\"" contained +syn match CfgString "'.*'" contained + +" Comments (Everything before '#' or '//' or ';') +syn match CfgComment "#.*" +syn match CfgComment ";.*" +syn match CfgComment "\/\/.*" + +" Define the default hightlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_cfg_syn_inits") + if version < 508 + let did_cfg_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + HiLink CfgOnOff Label + HiLink CfgComment Comment + HiLink CfgSection Type + HiLink CfgString String + HiLink CfgParams Keyword + HiLink CfgValues Constant + HiLink CfgDirectory Directory + HiLink UncPath Directory + + delcommand HiLink +endif +let b:current_syntax = "cfg" +" vim:ts=8 diff --git a/runtime/syntax/ch.vim b/runtime/syntax/ch.vim new file mode 100644 index 000000000..2e787c8cc --- /dev/null +++ b/runtime/syntax/ch.vim @@ -0,0 +1,53 @@ +" Vim syntax file +" Language: Ch +" Maintainer: SoftIntegration, Inc. <info@softintegration.com> +" URL: http://www.softintegration.com/download/vim/syntax/ch.vim +" Last change: 2004 May 16 +" Created based on cpp.vim +" +" Ch is a C/C++ interpreter with many high level extensions +" + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the C syntax to start with +if version < 600 + so <sfile>:p:h/c.vim +else + runtime! syntax/c.vim + unlet b:current_syntax +endif + +" Ch extentions + +syn keyword chStatement new delete this +syn keyword chAccess public private +syn keyword chStorageClass __declspec(global) __declspec(local) +syn keyword chStructure class +syn keyword chType string_t array + +" Default highlighting +if version >= 508 || !exists("did_ch_syntax_inits") + if version < 508 + let did_ch_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + HiLink chAccess chStatement + HiLink chExceptions Exception + HiLink chStatement Statement + HiLink chType Type + HiLink chStructure Structure + delcommand HiLink +endif + +let b:current_syntax = "ch" + +" vim: ts=8 diff --git a/runtime/syntax/change.vim b/runtime/syntax/change.vim new file mode 100644 index 000000000..e9bf88b9d --- /dev/null +++ b/runtime/syntax/change.vim @@ -0,0 +1,42 @@ +" Vim syntax file +" Language: WEB Changes +" Maintainer: Andreas Scherer <andreas.scherer@pobox.com> +" Last Change: April 25, 2001 + +" Details of the change mechanism of the WEB and CWEB languages can be found +" in the articles by Donald E. Knuth and Silvio Levy cited in "web.vim" and +" "cweb.vim" respectively. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +" We distinguish two groups of material, (a) stuff between @x..@y, and +" (b) stuff between @y..@z. WEB/CWEB ignore everything else in a change file. +syn region changeFromMaterial start="^@x.*$"ms=e+1 end="^@y.*$"me=s-1 +syn region changeToMaterial start="^@y.*$"ms=e+1 end="^@z.*$"me=s-1 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_change_syntax_inits") + if version < 508 + let did_change_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink changeFromMaterial String + HiLink changeToMaterial Statement + + delcommand HiLink +endif + +let b:current_syntax = "change" + +" vim: ts=8 diff --git a/runtime/syntax/changelog.vim b/runtime/syntax/changelog.vim new file mode 100644 index 000000000..a3eddda5f --- /dev/null +++ b/runtime/syntax/changelog.vim @@ -0,0 +1,78 @@ +" Vim syntax file +" Language: generic ChangeLog file +" Written By: Gediminas Paulauskas <menesis@delfi.lt> +" Maintainer: Corinna Vinschen <vinschen@redhat.com> +" Last Change: June 1, 2003 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +if exists('b:changelog_spacing_errors') + let s:spacing_errors = b:changelog_spacing_errors +elseif exists('g:changelog_spacing_errors') + let s:spacing_errors = g:changelog_spacing_errors +else + let s:spacing_errors = 1 +endif + +if s:spacing_errors + syn match changelogError "^ \+" +endif + +syn match changelogText "^\s.*$" contains=changelogMail,changelogNumber,changelogMonth,changelogDay,changelogError +syn match changelogHeader "^\S.*$" contains=changelogNumber,changelogMonth,changelogDay,changelogMail +if version < 600 + syn region changelogFiles start="^\s\+[+*]\s" end=":\s" end="^$" contains=changelogBullet,changelogColon,changelogError keepend + syn region changelogFiles start="^\s\+[([]" end=":\s" end="^$" contains=changelogBullet,changelogColon,changelogError keepend + syn match changelogColon contained ":\s" +else + syn region changelogFiles start="^\s\+[+*]\s" end=":" end="^$" contains=changelogBullet,changelogColon,changeLogFuncs,changelogError keepend + syn region changelogFiles start="^\s\+[([]" end=":" end="^$" contains=changelogBullet,changelogColon,changeLogFuncs,changelogError keepend + syn match changeLogFuncs contained "(.\{-})" extend + syn match changeLogFuncs contained "\[.\{-}]" extend + syn match changelogColon contained ":" +endif +syn match changelogBullet contained "^\s\+[+*]\s" contains=changelogError +syn match changelogMail contained "<[A-Za-z0-9\._:+-]\+@[A-Za-z0-9\._-]\+>" +syn keyword changelogMonth contained jan feb mar apr may jun jul aug sep oct nov dec +syn keyword changelogDay contained mon tue wed thu fri sat sun +syn match changelogNumber contained "[.-]*[0-9]\+" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_changelog_syntax_inits") + if version < 508 + let did_changelog_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink changelogText Normal + HiLink changelogBullet Type + HiLink changelogColon Type + HiLink changelogFiles Comment + if version >= 600 + HiLink changelogFuncs Comment + endif + HiLink changelogHeader Statement + HiLink changelogMail Special + HiLink changelogNumber Number + HiLink changelogMonth Number + HiLink changelogDay Number + HiLink changelogError Folded + + delcommand HiLink +endif + +let b:current_syntax = "changelog" + +" vim: ts=8 diff --git a/runtime/syntax/chaskell.vim b/runtime/syntax/chaskell.vim new file mode 100644 index 000000000..3f764d0e8 --- /dev/null +++ b/runtime/syntax/chaskell.vim @@ -0,0 +1,18 @@ +" Vim syntax file +" Language: Haskell supporting c2hs binding hooks +" Maintainer: Armin Sander <armin@mindwalker.org> +" Last Change: 2001 November 1 +" +" 2001 November 1: Changed commands for sourcing haskell.vim + +" Enable binding hooks +let b:hs_chs=1 + +" Include standard Haskell highlighting +if version < 600 + source <sfile>:p:h/haskell.vim +else + runtime! syntax/haskell.vim +endif + +" vim: ts=8 diff --git a/runtime/syntax/cheetah.vim b/runtime/syntax/cheetah.vim new file mode 100644 index 000000000..7eb17567c --- /dev/null +++ b/runtime/syntax/cheetah.vim @@ -0,0 +1,60 @@ +" Vim syntax file +" Language: Cheetah template engine +" Maintainer: Max Ischenko <mfi@ukr.net> +" Last Change: 2003-05-11 +" +" Missing features: +" match invalid syntax, like bad variable ref. or unmatched closing tag +" PSP-style tags: <% .. %> (obsoleted feature) +" doc-strings and header comments (rarely used feature) + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syntax case match + +syn keyword cheetahKeyword contained if else unless elif for in not +syn keyword cheetahKeyword contained while repeat break continue pass end +syn keyword cheetahKeyword contained set del attr def global include raw echo +syn keyword cheetahKeyword contained import from extends implements +syn keyword cheetahKeyword contained assert raise try catch finally +syn keyword cheetahKeyword contained errorCatcher breakpoint silent cache filter +syn match cheetahKeyword contained "\<compiler-settings\>" + +" Matches cached placeholders +syn match cheetahPlaceHolder "$\(\*[0-9.]\+[wdhms]\?\*\|\*\)\?\h\w*\(\.\h\w*\)*" display +syn match cheetahPlaceHolder "$\(\*[0-9.]\+[wdhms]\?\*\|\*\)\?{\h\w*\(\.\h\w*\)*}" display +syn match cheetahDirective "^\s*#[^#].*$" contains=cheetahPlaceHolder,cheetahKeyword,cheetahComment display + +syn match cheetahContinuation "\\$" +syn match cheetahComment "##.*$" display +syn region cheetahMultiLineComment start="#\*" end="\*#" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_cheetah_syn_inits") + if version < 508 + let did_cheetah_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink cheetahPlaceHolder Identifier + HiLink cheetahDirective PreCondit + HiLink cheetahKeyword Define + HiLink cheetahContinuation Special + HiLink cheetahComment Comment + HiLink cheetahMultiLineComment Comment + + delcommand HiLink +endif + +let b:current_syntax = "cheetah" + diff --git a/runtime/syntax/chill.vim b/runtime/syntax/chill.vim new file mode 100644 index 000000000..ca00cd95e --- /dev/null +++ b/runtime/syntax/chill.vim @@ -0,0 +1,191 @@ +" Vim syntax file +" Language: CHILL +" Maintainer: YoungSang Yoon <image@lgic.co.kr> +" Last change: 2004 Jan 21 +" + +" first created by image@lgic.co.kr & modified by paris@lgic.co.kr + +" CHILL (CCITT High Level Programming Language) is used for +" developing software of ATM switch at LGIC (LG Information +" & Communications LTd.) + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" A bunch of useful CHILL keywords +syn keyword chillStatement goto GOTO return RETURN returns RETURNS +syn keyword chillLabel CASE case ESAC esac +syn keyword chillConditional if IF else ELSE elsif ELSIF switch SWITCH THEN then FI fi +syn keyword chillLogical NOT not +syn keyword chillRepeat while WHILE for FOR do DO od OD TO to +syn keyword chillProcess START start STACKSIZE stacksize PRIORITY priority THIS this STOP stop +syn keyword chillBlock PROC proc PROCESS process +syn keyword chillSignal RECEIVE receive SEND send NONPERSISTENT nonpersistent PERSISTENT peristent SET set EVER ever + +syn keyword chillTodo contained TODO FIXME XXX + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match chillSpecial contained "\\x\x\+\|\\\o\{1,3\}\|\\.\|\\$" +syn region chillString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=chillSpecial +syn match chillCharacter "'[^\\]'" +syn match chillSpecialCharacter "'\\.'" +syn match chillSpecialCharacter "'\\\o\{1,3\}'" + +"when wanted, highlight trailing white space +if exists("chill_space_errors") + syn match chillSpaceError "\s*$" + syn match chillSpaceError " \+\t"me=e-1 +endif + +"catch errors caused by wrong parenthesis +syn cluster chillParenGroup contains=chillParenError,chillIncluded,chillSpecial,chillTodo,chillUserCont,chillUserLabel,chillBitField +syn region chillParen transparent start='(' end=')' contains=ALLBUT,@chillParenGroup +syn match chillParenError ")" +syn match chillInParen contained "[{}]" + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match chillNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" +"floating point number, with dot, optional exponent +syn match chillFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, starting with a dot, optional exponent +syn match chillFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match chillFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" +"hex number +syn match chillNumber "\<0x\x\+\(u\=l\=\|lu\)\>" +"syn match chillIdentifier "\<[a-z_][a-z0-9_]*\>" +syn case match +" flag an octal number with wrong digits +syn match chillOctalError "\<0\o*[89]" + +if exists("chill_comment_strings") + " A comment can contain chillString, chillCharacter and chillNumber. + " But a "*/" inside a chillString in a chillComment DOES end the comment! So we + " need to use a special type of chillString: chillCommentString, which also ends on + " "*/", and sees a "*" at the start of the line as comment again. + " Unfortunately this doesn't very well work for // type of comments :-( + syntax match chillCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region chillCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=chillSpecial,chillCommentSkip + syntax region chillComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=chillSpecial + syntax region chillComment start="/\*" end="\*/" contains=chillTodo,chillCommentString,chillCharacter,chillNumber,chillFloat,chillSpaceError + syntax match chillComment "//.*" contains=chillTodo,chillComment2String,chillCharacter,chillNumber,chillSpaceError +else + syn region chillComment start="/\*" end="\*/" contains=chillTodo,chillSpaceError + syn match chillComment "//.*" contains=chillTodo,chillSpaceError +endif +syntax match chillCommentError "\*/" + +syn keyword chillOperator SIZE size +syn keyword chillType dcl DCL int INT char CHAR bool BOOL REF ref LOC loc INSTANCE instance +syn keyword chillStructure struct STRUCT enum ENUM newmode NEWMODE synmode SYNMODE +"syn keyword chillStorageClass +syn keyword chillBlock PROC proc END end +syn keyword chillScope GRANT grant SEIZE seize +syn keyword chillEDML select SELECT delete DELETE update UPDATE in IN seq SEQ WHERE where INSERT insert include INCLUDE exclude EXCLUDE +syn keyword chillBoolConst true TRUE false FALSE + +syn region chillPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=chillComment,chillString,chillCharacter,chillNumber,chillCommentError,chillSpaceError +syn region chillIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match chillIncluded contained "<[^>]*>" +syn match chillInclude "^\s*#\s*include\>\s*["<]" contains=chillIncluded +"syn match chillLineSkip "\\$" +syn cluster chillPreProcGroup contains=chillPreCondit,chillIncluded,chillInclude,chillDefine,chillInParen,chillUserLabel +syn region chillDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,@chillPreProcGroup +syn region chillPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,@chillPreProcGroup + +" Highlight User Labels +syn cluster chillMultiGroup contains=chillIncluded,chillSpecial,chillTodo,chillUserCont,chillUserLabel,chillBitField +syn region chillMulti transparent start='?' end=':' contains=ALLBUT,@chillMultiGroup +" Avoid matching foo::bar() in C++ by requiring that the next char is not ':' +syn match chillUserCont "^\s*\I\i*\s*:$" contains=chillUserLabel +syn match chillUserCont ";\s*\I\i*\s*:$" contains=chillUserLabel +syn match chillUserCont "^\s*\I\i*\s*:[^:]"me=e-1 contains=chillUserLabel +syn match chillUserCont ";\s*\I\i*\s*:[^:]"me=e-1 contains=chillUserLabel + +syn match chillUserLabel "\I\i*" contained + +" Avoid recognizing most bitfields as labels +syn match chillBitField "^\s*\I\i*\s*:\s*[1-9]"me=e-1 +syn match chillBitField ";\s*\I\i*\s*:\s*[1-9]"me=e-1 + +syn match chillBracket contained "[<>]" +if !exists("chill_minlines") + let chill_minlines = 15 +endif +exec "syn sync ccomment chillComment minlines=" . chill_minlines + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_ch_syntax_inits") + if version < 508 + let did_ch_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink chillLabel Label + HiLink chillUserLabel Label + HiLink chillConditional Conditional + " hi chillConditional term=bold ctermfg=red guifg=red gui=bold + + HiLink chillRepeat Repeat + HiLink chillProcess Repeat + HiLink chillSignal Repeat + HiLink chillCharacter Character + HiLink chillSpecialCharacter chillSpecial + HiLink chillNumber Number + HiLink chillFloat Float + HiLink chillOctalError chillError + HiLink chillParenError chillError + HiLink chillInParen chillError + HiLink chillCommentError chillError + HiLink chillSpaceError chillError + HiLink chillOperator Operator + HiLink chillStructure Structure + HiLink chillBlock Operator + HiLink chillScope Operator + "hi chillEDML term=underline ctermfg=DarkRed guifg=Red + HiLink chillEDML PreProc + "hi chillBoolConst term=bold ctermfg=brown guifg=brown + HiLink chillBoolConst Constant + "hi chillLogical term=bold ctermfg=brown guifg=brown + HiLink chillLogical Constant + HiLink chillStorageClass StorageClass + HiLink chillInclude Include + HiLink chillPreProc PreProc + HiLink chillDefine Macro + HiLink chillIncluded chillString + HiLink chillError Error + HiLink chillStatement Statement + HiLink chillPreCondit PreCondit + HiLink chillType Type + HiLink chillCommentError chillError + HiLink chillCommentString chillString + HiLink chillComment2String chillString + HiLink chillCommentSkip chillComment + HiLink chillString String + HiLink chillComment Comment + " hi chillComment term=None ctermfg=lightblue guifg=lightblue + HiLink chillSpecial SpecialChar + HiLink chillTodo Todo + HiLink chillBlock Statement + "HiLink chillIdentifier Identifier + HiLink chillBracket Delimiter + + delcommand HiLink +endif + +let b:current_syntax = "chill" + +" vim: ts=8 diff --git a/runtime/syntax/cl.vim b/runtime/syntax/cl.vim new file mode 100644 index 000000000..3c6f41ba8 --- /dev/null +++ b/runtime/syntax/cl.vim @@ -0,0 +1,105 @@ +" Vim syntax file +" Language: cl ("Clever Language" by Multibase, http://www.mbase.com.au) +" Filename extensions: *.ent, *.eni +" Maintainer: Philip Uren <philu@system77.com> +" Last update: Wed May 2 10:30:30 EST 2001 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if version >= 600 + setlocal iskeyword=@,48-57,_,-, +else + set iskeyword=@,48-57,_,-, +endif + +syn case ignore + +syn sync lines=300 + +"If/else/elsif/endif and while/wend mismatch errors +syn match clifError "\<wend\>" +syn match clifError "\<elsif\>" +syn match clifError "\<else\>" +syn match clifError "\<endif\>" + +" If and while regions +syn region clLoop transparent matchgroup=clWhile start="\<while\>" matchgroup=clWhile end="\<wend\>" contains=ALLBUT,clBreak,clProcedure +syn region clIf transparent matchgroup=clConditional start="\<if\>" matchgroup=clConditional end="\<endif\>" contains=ALLBUT,clBreak,clProcedure + +" Make those TODO notes and debugging stand out! +syn keyword clTodo contained TODO BUG DEBUG FIX +syn keyword clDebug contained debug + +syn match clComment "#.*$" contains=clTodo,clNeedsWork +syn region clProcedure oneline start="^\s*[{}]" end="$" +syn match clInclude "^\s*include\s.*" + +" We don't put "debug" in the clSetOptions; +" we contain it in clSet so we can make it stand out. +syn keyword clSetOptions transparent aauto abort align convert E fill fnum goback hangup justify null_exit output rauto rawprint rawdisplay repeat skip tab trim +syn match clSet "^\s*set\s.*" contains=clSetOptions,clDebug + +syn match clPreProc "^\s*#P.*" + +syn keyword clConditional else elsif +syn keyword clWhile continue endloop +" 'break' needs to be a region so we can sync on it above. +syn region clBreak oneline start="^\s*break" end="$" + +syn match clOperator "[!;|)(:.><+*=-]" + +syn match clNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" + +syn region clString matchgroup=clQuote start=+"+ end=+"+ skip=+\\"+ +syn region clString matchgroup=clQuote start=+'+ end=+'+ skip=+\\'+ + +syn keyword clReserved ERROR EXIT INTERRUPT LOCKED LREPLY MODE MCOL MLINE MREPLY NULL REPLY V1 V2 V3 V4 V5 V6 V7 V8 V9 ZERO BYPASS GOING_BACK AAUTO ABORT ABORT ALIGN BIGE CONVERT FNUM GOBACK HANGUP JUSTIFY NEXIT OUTPUT RAUTO RAWDISPLAY RAWPRINT REPEAT SKIP TAB TRIM LCOUNT PCOUNT PLINES SLINES SCOLS MATCH LMATCH + +syn keyword clFunction asc asize chr name random slen srandom day getarg getcgi getenv lcase scat sconv sdel skey smult srep substr sword trim ucase match + +syn keyword clStatement clear clear_eol clear_eos close copy create unique with where empty define define ldefine delay_form delete escape exit_block exit_do exit_process field fork format get getfile getnext getprev goto head join maintain message no_join on_eop on_key on_exit on_delete openin openout openapp pause popenin popenout popenio print put range read redisplay refresh restart_block screen select sleep text unlock write and not or do + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_cl_syntax_inits") + if version < 508 + let did_cl_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink clifError Error + HiLink clWhile Repeat + HiLink clConditional Conditional + HiLink clDebug Debug + HiLink clNeedsWork Todo + HiLink clTodo Todo + HiLink clComment Comment + HiLink clProcedure Procedure + HiLink clBreak Procedure + HiLink clInclude Include + HiLink clSetOption Statement + HiLink clSet Identifier + HiLink clPreProc PreProc + HiLink clOperator Operator + HiLink clNumber Number + HiLink clString String + HiLink clQuote Delimiter + HiLink clReserved Identifier + HiLink clFunction Function + HiLink clStatement Statement + + delcommand HiLink +endif + +let b:current_syntax = "cl" + +" vim: ts=4 sw=4 diff --git a/runtime/syntax/clean.vim b/runtime/syntax/clean.vim new file mode 100644 index 000000000..233ecbda1 --- /dev/null +++ b/runtime/syntax/clean.vim @@ -0,0 +1,94 @@ +" Vim syntax file +" Language: Clean +" Author: Pieter van Engelen <pietere@sci.kun.nl> +" Co-Author: Arthur van Leeuwen <arthurvl@sci.kun.nl> +" Last Change: Fri Sep 29 11:35:34 CEST 2000 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Some Clean-keywords +syn keyword cleanConditional if case +syn keyword cleanLabel let! with where in of +syn keyword cleanInclude from import +syn keyword cleanSpecial Start +syn keyword cleanKeyword infixl infixr infix +syn keyword cleanBasicType Int Real Char Bool String +syn keyword cleanSpecialType World ProcId Void Files File +syn keyword cleanModuleSystem module implementation definition system +syn keyword cleanTypeClass class instance export + +" To do some Denotation Highlighting +syn keyword cleanBoolDenot True False +syn region cleanStringDenot start=+"+ end=+"+ +syn match cleanCharDenot "'.'" +syn match cleanCharsDenot "'[^'\\]*\(\\.[^'\\]\)*'" contained +syn match cleanIntegerDenot "[+-~]\=\<\(\d\+\|0[0-7]\+\|0x[0-9A-Fa-f]\+\)\>" +syn match cleanRealDenot "[+-~]\=\<\d\+\.\d+\(E[+-~]\=\d+\)\=" + +" To highlight the use of lists, tuples and arrays +syn region cleanList start="\[" end="\]" contains=ALL +syn region cleanRecord start="{" end="}" contains=ALL +syn region cleanArray start="{:" end=":}" contains=ALL +syn match cleanTuple "([^=]*,[^=]*)" contains=ALL + +" To do some Comment Highlighting +syn region cleanComment start="/\*" end="\*/" contains=cleanComment +syn match cleanComment "//.*" + +" Now for some useful typedefinitionrecognition +syn match cleanFuncTypeDef "\([a-zA-Z].*\|(\=[-~@#$%^?!+*<>\/|&=:]\+)\=\)[ \t]*\(infix[lr]\=\)\=[ \t]*\d\=[ \t]*::.*->.*" contains=cleanSpecial + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_clean_syntax_init") + if version < 508 + let did_clean_syntax_init = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " Comments + HiLink cleanComment Comment + " Constants and denotations + HiLink cleanCharsDenot String + HiLink cleanStringDenot String + HiLink cleanCharDenot Character + HiLink cleanIntegerDenot Number + HiLink cleanBoolDenot Boolean + HiLink cleanRealDenot Float + " Identifiers + " Statements + HiLink cleanTypeClass Keyword + HiLink cleanConditional Conditional + HiLink cleanLabel Label + HiLink cleanKeyword Keyword + " Generic Preprocessing + HiLink cleanInclude Include + HiLink cleanModuleSystem PreProc + " Type + HiLink cleanBasicType Type + HiLink cleanSpecialType Type + HiLink cleanFuncTypeDef Typedef + " Special + HiLink cleanSpecial Special + HiLink cleanList Special + HiLink cleanArray Special + HiLink cleanRecord Special + HiLink cleanTuple Special + " Error + " Todo + + delcommand HiLink +endif + +let b:current_syntax = "clean" + +" vim: ts=4 diff --git a/runtime/syntax/clipper.vim b/runtime/syntax/clipper.vim new file mode 100644 index 000000000..989b257f7 --- /dev/null +++ b/runtime/syntax/clipper.vim @@ -0,0 +1,143 @@ +" Vim syntax file: +" Language: Clipper 5.2 & FlagShip +" Maintainer: C R Zamana <zamana@zip.net> +" Some things based on c.vim by Bram Moolenaar and pascal.vim by Mario Eusebio +" Last Change: Sat Sep 09 2000 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Exceptions for my "Very Own" (TM) user variables naming style. +" If you don't like this, comment it +syn match clipperUserVariable "\<[a,b,c,d,l,n,o,u,x][A-Z][A-Za-z0-9_]*\>" +syn match clipperUserVariable "\<[a-z]\>" + +" Clipper is case insensitive ( see "exception" above ) +syn case ignore + +" Clipper keywords ( in no particular order ) +syn keyword clipperStatement ACCEPT APPEND BLANK FROM AVERAGE CALL CANCEL +syn keyword clipperStatement CLEAR ALL GETS MEMORY TYPEAHEAD CLOSE +syn keyword clipperStatement COMMIT CONTINUE SHARED NEW PICT +syn keyword clipperStatement COPY FILE STRUCTURE STRU EXTE TO COUNT +syn keyword clipperStatement CREATE FROM NIL +syn keyword clipperStatement DELETE FILE DIR DISPLAY EJECT ERASE FIND GO +syn keyword clipperStatement INDEX INPUT VALID WHEN +syn keyword clipperStatement JOIN KEYBOARD LABEL FORM LIST LOCATE MENU TO +syn keyword clipperStatement NOTE PACK QUIT READ +syn keyword clipperStatement RECALL REINDEX RELEASE RENAME REPLACE REPORT +syn keyword clipperStatement RETURN FORM RESTORE +syn keyword clipperStatement RUN SAVE SEEK SELECT +syn keyword clipperStatement SKIP SORT STORE SUM TEXT TOTAL TYPE UNLOCK +syn keyword clipperStatement UPDATE USE WAIT ZAP +syn keyword clipperStatement BEGIN SEQUENCE +syn keyword clipperStatement SET ALTERNATE BELL CENTURY COLOR CONFIRM CONSOLE +syn keyword clipperStatement CURSOR DATE DECIMALS DEFAULT DELETED DELIMITERS +syn keyword clipperStatement DEVICE EPOCH ESCAPE EXACT EXCLUSIVE FILTER FIXED +syn keyword clipperStatement FORMAT FUNCTION INTENSITY KEY MARGIN MESSAGE +syn keyword clipperStatement ORDER PATH PRINTER PROCEDURE RELATION SCOREBOARD +syn keyword clipperStatement SOFTSEEK TYPEAHEAD UNIQUE WRAP +syn keyword clipperStatement BOX CLEAR GET PROMPT SAY ? ?? +syn keyword clipperStatement DELETE TAG GO RTLINKCMD TMP DBLOCKINFO +syn keyword clipperStatement DBEVALINFO DBFIELDINFO DBFILTERINFO DBFUNCTABLE +syn keyword clipperStatement DBOPENINFO DBORDERCONDINFO DBORDERCREATEINF +syn keyword clipperStatement DBORDERINFO DBRELINFO DBSCOPEINFO DBSORTINFO +syn keyword clipperStatement DBSORTITEM DBTRANSINFO DBTRANSITEM WORKAREA + +" Conditionals +syn keyword clipperConditional CASE OTHERWISE ENDCASE +syn keyword clipperConditional IF ELSE ENDIF IIF IFDEF IFNDEF + +" Loops +syn keyword clipperRepeat DO WHILE ENDDO +syn keyword clipperRepeat FOR TO NEXT STEP + +" Visibility +syn keyword clipperStorageClass ANNOUNCE STATIC +syn keyword clipperStorageClass DECLARE EXTERNAL LOCAL MEMVAR PARAMETERS +syn keyword clipperStorageClass PRIVATE PROCEDURE PUBLIC REQUEST STATIC +syn keyword clipperStorageClass FIELD FUNCTION +syn keyword clipperStorageClass EXIT PROCEDURE INIT PROCEDURE + +" Operators +syn match clipperOperator "$\|%\|&\|+\|-\|->\|!" +syn match clipperOperator "\.AND\.\|\.NOT\.\|\.OR\." +syn match clipperOperator ":=\|<\|<=\|<>\|!=\|#\|=\|==\|>\|>=\|@" +syn match clipperOperator "*" + +" Numbers +syn match clipperNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" + +" Includes +syn region clipperIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match clipperIncluded contained "<[^>]*>" +syn match clipperInclude "^\s*#\s*include\>\s*["<]" contains=clipperIncluded + +" String and Character constants +syn region clipperString start=+"+ end=+"+ +syn region clipperString start=+'+ end=+'+ + +" Delimiters +syn match ClipperDelimiters "[()]\|[\[\]]\|[{}]\|[||]" + +" Special +syn match clipperLineContinuation ";" + +" This is from Bram Moolenaar: +if exists("c_comment_strings") + " A comment can contain cString, cCharacter and cNumber. + " But a "*/" inside a cString in a clipperComment DOES end the comment! + " So we need to use a special type of cString: clipperCommentString, which + " also ends on "*/", and sees a "*" at the start of the line as comment + " again. Unfortunately this doesn't very well work for // type of comments :-( + syntax match clipperCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region clipperCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=clipperCommentSkip + syntax region clipperComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" + syntax region clipperComment start="/\*" end="\*/" contains=clipperCommentString,clipperCharacter,clipperNumber,clipperString + syntax match clipperComment "//.*" contains=clipperComment2String,clipperCharacter,clipperNumber +else + syn region clipperComment start="/\*" end="\*/" + syn match clipperComment "//.*" +endif +syntax match clipperCommentError "\*/" + +" Lines beggining with an "*" are comments too +syntax match clipperComment "^\*.*" + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_clipper_syntax_inits") + if version < 508 + let did_clipper_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink clipperConditional Conditional + HiLink clipperRepeat Repeat + HiLink clipperNumber Number + HiLink clipperInclude Include + HiLink clipperComment Comment + HiLink clipperOperator Operator + HiLink clipperStorageClass StorageClass + HiLink clipperStatement Statement + HiLink clipperString String + HiLink clipperFunction Function + HiLink clipperLineContinuation Special + HiLink clipperDelimiters Delimiter + HiLink clipperUserVariable Identifier + + delcommand HiLink +endif + +let b:current_syntax = "clipper" + +" vim: ts=4 diff --git a/runtime/syntax/cobol.vim b/runtime/syntax/cobol.vim new file mode 100644 index 000000000..0b59f720b --- /dev/null +++ b/runtime/syntax/cobol.vim @@ -0,0 +1,177 @@ +" Vim syntax file +" Language: COBOL +" Maintainers: Davyd Ondrejko <vondraco@columbus.rr.com> +" (formerly Sitaram Chamarty <sitaram@diac.com> and +" James Mitchell <james_mitchell@acm.org>) +" Last change: 2001 Sep 02 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" MOST important - else most of the keywords wont work! +if version < 600 + set isk=@,48-57,- +else + setlocal isk=@,48-57,- +endif + +syn case ignore + +syn match cobolKeys "^\a\{1,6\}" contains=cobolReserved +syn keyword cobolReserved contained ACCEPT ACCESS ADD ADDRESS ADVANCING AFTER ALPHABET ALPHABETIC +syn keyword cobolReserved contained ALPHABETIC-LOWER ALPHABETIC-UPPER ALPHANUMERIC ALPHANUMERIC-EDITED ALS +syn keyword cobolReserved contained ALTERNATE AND ANY ARE AREA AREAS ASCENDING ASSIGN AT AUTHOR BEFORE BINARY +syn keyword cobolReserved contained BLANK BLOCK BOTTOM BY CANCEL CBLL CD CF CH CHARACTER CHARACTERS CLASS +syn keyword cobolReserved contained CLOCK-UNITS CLOSE COBOL CODE CODE-SET COLLATING COLUMN COMMA COMMON +syn keyword cobolReserved contained COMMUNICATIONS COMPUTATIONAL COMPUTE CONFIGURATION CONTENT CONTINUE +syn keyword cobolReserved contained CONTROL CONVERTING CORR CORRESPONDING COUNT CURRENCY DATA DATE DATE-COMPILED +syn keyword cobolReserved contained DATE-WRITTEN DAY DAY-OF-WEEK DE DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE +syn keyword cobolReserved contained DEBUG-NAME DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 DEBUGGING DECIMAL-POINT +syn keyword cobolReserved contained DELARATIVES DELETE DELIMITED DELIMITER DEPENDING DESCENDING DESTINATION +syn keyword cobolReserved contained DETAIL DISABLE DISPLAY DIVIDE DIVISION DOWN DUPLICATES DYNAMIC EGI ELSE EMI +syn keyword cobolReserved contained ENABLE END-ADD END-COMPUTE END-DELETE END-DIVIDE END-EVALUATE END-IF +syn keyword cobolReserved contained END-MULTIPLY END-OF-PAGE END-PERFORM END-READ END-RECEIVE END-RETURN +syn keyword cobolReserved contained END-REWRITE END-SEARCH END-START END-STRING END-SUBTRACT END-UNSTRING +syn keyword cobolReserved contained END-WRITE ENVIRONMENT EQUAL ERROR ESI EVALUATE EVERY EXCEPTION EXIT +syn keyword cobolReserved contained EXTEND EXTERNAL FALSE FD FILE FILE-CONTROL FILLER FINAL FIRST FOOTING FOR FROM +syn keyword cobolReserved contained GENERATE GIVING GLOBAL GREATER GROUP HEADING HIGH-VALUE HIGH-VALUES I-O +syn keyword cobolReserved contained I-O-CONTROL IDENTIFICATION IN INDEX INDEXED INDICATE INITIAL INITIALIZE +syn keyword cobolReserved contained INITIATE INPUT INPUT-OUTPUT INSPECT INSTALLATION INTO IS JUST +syn keyword cobolReserved contained JUSTIFIED KEY LABEL LAST LEADING LEFT LENGTH LOCK MEMORY +syn keyword cobolReserved contained MERGE MESSAGE MODE MODULES MOVE MULTIPLE MULTIPLY NATIVE NEGATIVE NEXT NO NOT +syn keyword cobolReserved contained NUMBER NUMERIC NUMERIC-EDITED OBJECT-COMPUTER OCCURS OF OFF OMITTED ON OPEN +syn keyword cobolReserved contained OPTIONAL OR ORDER ORGANIZATION OTHER OUTPUT OVERFLOW PACKED-DECIMAL PADDING +syn keyword cobolReserved contained PAGE PAGE-COUNTER PERFORM PF PH PIC PICTURE PLUS POINTER POSITION POSITIVE +syn keyword cobolReserved contained PRINTING PROCEDURE PROCEDURES PROCEDD PROGRAM PROGRAM-ID PURGE QUEUE QUOTES +syn keyword cobolReserved contained RANDOM RD READ RECEIVE RECORD RECORDS REDEFINES REEL REFERENCE REFERENCES +syn keyword cobolReserved contained RELATIVE RELEASE REMAINDER REMOVAL REPLACE REPLACING REPORT REPORTING +syn keyword cobolReserved contained REPORTS RERUN RESERVE RESET RETURN RETURNING REVERSED REWIND REWRITE RF RH +syn keyword cobolReserved contained RIGHT ROUNDED RUN SAME SD SEARCH SECTION SECURITY SEGMENT SEGMENT-LIMITED +syn keyword cobolReserved contained SELECT SEND SENTENCE SEPARATE SEQUENCE SEQUENTIAL SET SIGN SIZE SORT +syn keyword cobolReserved contained SORT-MERGE SOURCE SOURCE-COMPUTER SPECIAL-NAMES STANDARD +syn keyword cobolReserved contained STANDARD-1 STANDARD-2 START STATUS STOP STRING SUB-QUEUE-1 SUB-QUEUE-2 +syn keyword cobolReserved contained SUB-QUEUE-3 SUBTRACT SUM SUPPRESS SYMBOLIC SYNC SYNCHRONIZED TABLE TALLYING +syn keyword cobolReserved contained TAPE TERMINAL TERMINATE TEST TEXT THAN THEN THROUGH THRU TIME TIMES TO TOP +syn keyword cobolReserved contained TRAILING TRUE TYPE UNIT UNSTRING UNTIL UP UPON USAGE USE USING VALUE VALUES +syn keyword cobolReserved contained VARYING WHEN WITH WORDS WORKING-STORAGE WRITE +syn match cobolReserved contained "\<CONTAINS\>" +syn match cobolReserved contained "\<\(IF\|INVALID\|END\|EOP\)\>" +syn match cobolReserved contained "\<ALL\>" + +syn keyword cobolConstant SPACE SPACES NULL ZERO ZEROES ZEROS LOW-VALUE LOW-VALUES + +syn match cobolMarker "^.\{6\}" +syn match cobolBadLine "^.\{6\}[^ D\-*$/].*"hs=s+6 + +" If comment mark somehow gets into column past Column 7. +syn match cobolBadLine "^.\{6\}\s\+\*.*" + +syn match cobolNumber "\<-\=\d*\.\=\d\+\>" contains=cobolMarker,cobolComment +syn match cobolPic "\<S*9\+\>" contains=cobolMarker,cobolComment +syn match cobolPic "\<$*\.\=9\+\>" contains=cobolMarker,cobolComment +syn match cobolPic "\<Z*\.\=9\+\>" contains=cobolMarker,cobolComment +syn match cobolPic "\<V9\+\>" contains=cobolMarker,cobolComment +syn match cobolPic "\<9\+V\>" contains=cobolMarker,cobolComment +syn match cobolPic "\<-\+[Z9]\+\>" contains=cobolMarker,cobolComment +syn match cobolTodo "todo" contained +syn match cobolComment "^.\{6\}\*.*"hs=s+6 contains=cobolTodo,cobolMarker +syn match cobolComment "^.\{6\}/.*"hs=s+6 contains=cobolTodo,cobolMarker +syn match cobolComment "^.\{6\}C.*"hs=s+6 contains=cobolTodo,cobolMarker +syn match cobolCompiler "^.\{6\}$.*"hs=s+6 + +" For MicroFocus or other inline comments, include this line. +" syn region cobolComment start="*>" end="$" contains=cobolTodo,cobolMarker + +syn keyword cobolGoTo GO GOTO +syn keyword cobolCopy COPY + +" cobolBAD: things that are BAD NEWS! +syn keyword cobolBAD ALTER ENTER RENAMES + +" cobolWatch: things that are important when trying to understand a program +syn keyword cobolWatch OCCURS DEPENDING VARYING BINARY COMP REDEFINES +syn keyword cobolWatch REPLACING RUN +syn match cobolWatch "COMP-[123456XN]" + +syn keyword cobolEXECs EXEC END-EXEC + + +syn match cobolDecl "^.\{6} \{1,4}\(0\=1\|77\|78\) "hs=s+7,he=e-1 contains=cobolMarker +syn match cobolDecl "^.\{6} \+[1-4]\d "hs=s+7,he=e-1 contains=cobolMarker +syn match cobolDecl "^.\{6} \+0\=[2-9] "hs=s+7,he=e-1 contains=cobolMarker +syn match cobolDecl "^.\{6} \+66 "hs=s+7,he=e-1 contains=cobolMarker + +syn match cobolWatch "^.\{6} \+88 "hs=s+7,he=e-1 contains=cobolMarker + +syn match cobolBadID "\k\+-\($\|[^-A-Z0-9]\)" + +syn keyword cobolCALLs CALL CANCEL GOBACK PERFORM INVOKE +syn match cobolCALLs "EXIT \+PROGRAM" +syn match cobolExtras /\<VALUE \+\d\+\./hs=s+6,he=e-1 + +syn match cobolString /"[^"]*\("\|$\)/ +syn match cobolString /'[^']*\('\|$\)/ + +syn region cobolLine start="^.\{6} " end="$" contains=ALL + +if exists("cobol_legacy_code") +syn region cobolCondFlow contains=ALLBUT,cobolLine start="\<\(IF\|INVALID\|END\|EOP\)\>" skip=/\('\|"\)[^"]\{-}\("\|'\|$\)/ end="\." keepend +endif + +if ! exists("cobol_legacy_code") + " catch junk in columns 1-6 for modern code + syn match cobolBAD "^ \{0,5\}[^ ].*" +endif + +" many legacy sources have junk in columns 1-6: must be before others +" Stuff after column 72 is in error - must be after all other "match" entries +if exists("cobol_legacy_code") + syn match cobolBadLine "^.\{6}[^*/].\{66,\}" +else + syn match cobolBadLine "^.\{6}.\{67,\}" +endif + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_cobol_syntax_inits") + if version < 508 + let did_cobol_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink cobolBAD Error + HiLink cobolBadID Error + HiLink cobolBadLine Error + HiLink cobolMarker Comment + HiLink cobolCALLs Function + HiLink cobolComment Comment + HiLink cobolKeys Comment + HiLink cobolAreaB Special + HiLink cobolCompiler PreProc + HiLink cobolCondFlow Special + HiLink cobolCopy PreProc + HiLink cobolDecl Type + HiLink cobolExtras Special + HiLink cobolGoTo Special + HiLink cobolConstant Constant + HiLink cobolNumber Constant + HiLink cobolPic Constant + HiLink cobolReserved Statement + HiLink cobolString Constant + HiLink cobolTodo Todo + HiLink cobolWatch Special + + delcommand HiLink +endif + +let b:current_syntax = "cobol" + +" vim: ts=6 nowrap diff --git a/runtime/syntax/colortest.vim b/runtime/syntax/colortest.vim new file mode 100644 index 000000000..b08b21f95 --- /dev/null +++ b/runtime/syntax/colortest.vim @@ -0,0 +1,65 @@ +" Vim script for testing colors +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Contributors: Rafael Garcia-Suarez, Charles Campbell +" Last Change: 2001 Jul 28 + +" edit this file, then do ":source %", and check if the colors match + +" black black_on_white white_on_black +" black_on_black black_on_black +" darkred darkred_on_white white_on_darkred +" darkred_on_black black_on_darkred +" darkgreen darkgreen_on_white white_on_darkgreen +" darkgreen_on_black black_on_darkgreen +" brown brown_on_white white_on_brown +" brown_on_black black_on_brown +" darkblue darkblue_on_white white_on_darkblue +" darkblue_on_black black_on_darkblue +" darkmagenta darkmagenta_on_white white_on_darkmagenta +" darkmagenta_on_black black_on_darkmagenta +" darkcyan darkcyan_on_white white_on_darkcyan +" darkcyan_on_black black_on_darkcyan +" lightgray lightgray_on_white white_on_lightgray +" lightgray_on_black black_on_lightgray +" darkgray darkgray_on_white white_on_darkgray +" darkgray_on_black black_on_darkgray +" red red_on_white white_on_red +" red_on_black black_on_red +" green green_on_white white_on_green +" green_on_black black_on_green +" yellow yellow_on_white white_on_yellow +" yellow_on_black black_on_yellow +" blue blue_on_white white_on_blue +" blue_on_black black_on_blue +" magenta magenta_on_white white_on_magenta +" magenta_on_black black_on_magenta +" cyan cyan_on_white white_on_cyan +" cyan_on_black black_on_cyan +" white white_on_white white_on_white +" white_on_black black_on_white +" grey grey_on_white white_on_grey +" grey_on_black black_on_grey +" lightred lightred_on_white white_on_lightred +" lightred_on_black black_on_lightred +" lightgreen lightgreen_on_white white_on_lightgreen +" lightgreen_on_black black_on_lightgreen +" lightyellow lightyellow_on_white white_on_lightyellow +" lightyellow_on_black black_on_lightyellow +" lightblue lightblue_on_white white_on_lightblue +" lightblue_on_black black_on_lightblue +" lightmagenta lightmagenta_on_white white_on_lightmagenta +" lightmagenta_on_black black_on_lightmagenta +" lightcyan lightcyan_on_white white_on_lightcyan +" lightcyan_on_black black_on_lightcyan + +syn clear +8 +while search("_on_", "W") < 55 + let col1 = substitute(expand("<cword>"), '\(\a\+\)_on_\a\+', '\1', "") + let col2 = substitute(expand("<cword>"), '\a\+_on_\(\a\+\)', '\1', "") + exec 'hi col_'.col1.'_'.col2.' ctermfg='.col1.' guifg='.col1.' ctermbg='.col2.' guibg='.col2 + exec 'syn keyword col_'.col1.'_'.col2.' '.col1.'_on_'.col2 +endwhile +8,55g/^" \a/exec 'hi col_'.expand("<cword>").' ctermfg='.expand("<cword>").' guifg='.expand("<cword>")| + \ exec 'syn keyword col_'.expand("<cword>")." ".expand("<cword>") +nohlsearch diff --git a/runtime/syntax/conf.vim b/runtime/syntax/conf.vim new file mode 100644 index 000000000..d08de4f76 --- /dev/null +++ b/runtime/syntax/conf.vim @@ -0,0 +1,41 @@ +" Vim syntax file +" Language: generic configure file +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last Change: 2001 Apr 25 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn keyword confTodo contained TODO FIXME XXX +" Avoid matching "text#text", used in /etc/disktab and /etc/gettytab +syn match confComment "^#.*" contains=confTodo +syn match confComment "\s#.*"ms=s+1 contains=confTodo +syn region confString start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline +syn region confString start=+'+ skip=+\\\\\|\\'+ end=+'+ oneline + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_conf_syntax_inits") + if version < 508 + let did_conf_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink confComment Comment + HiLink confTodo Todo + HiLink confString String + + delcommand HiLink +endif + +let b:current_syntax = "conf" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/config.vim b/runtime/syntax/config.vim new file mode 100644 index 000000000..c02799d32 --- /dev/null +++ b/runtime/syntax/config.vim @@ -0,0 +1,57 @@ +" Vim syntax file +" Language: configure.in script: M4 with sh +" Maintainer: Christian Hammesr <ch@lathspell.westend.com> +" Last Change: 2001 May 09 + +" Well, I actually even do not know much about m4. This explains why there +" is probably very much missing here, yet ! +" But I missed a good hilighting when editing my GNU autoconf/automake +" script, so I wrote this quick and dirty patch. + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" define the config syntax +syn match configdelimiter "[()\[\];,]" +syn match configoperator "[=|&\*\+\<\>]" +syn match configcomment "\(dnl.*\)\|\(#.*\)" +syn match configfunction "\<[A-Z_][A-Z0-9_]*\>" +syn match confignumber "[-+]\=\<\d\+\(\.\d*\)\=\>" +syn keyword configkeyword if then else fi test for in do done +syn keyword configspecial cat rm eval +syn region configstring start=+"+ skip=+\\"+ end=+"+ +syn region configstring start=+`+ skip=+\\'+ end=+'+ +syn region configstring start=+`+ skip=+\\'+ end=+`+ + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_config_syntax_inits") + if version < 508 + let did_config_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink configdelimiter Delimiter + HiLink configoperator Operator + HiLink configcomment Comment + HiLink configfunction Function + HiLink confignumber Number + HiLink configkeyword Keyword + HiLink configspecial Special + HiLink configstring String + + delcommand HiLink +endif + +let b:current_syntax = "config" + +" vim: ts=4 diff --git a/runtime/syntax/cpp.vim b/runtime/syntax/cpp.vim new file mode 100644 index 000000000..feb89ee61 --- /dev/null +++ b/runtime/syntax/cpp.vim @@ -0,0 +1,62 @@ +" Vim syntax file +" Language: C++ +" Maintainer: Ken Shan <ccshan@post.harvard.edu> +" Last Change: 2002 Jul 15 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the C syntax to start with +if version < 600 + so <sfile>:p:h/c.vim +else + runtime! syntax/c.vim + unlet b:current_syntax +endif + +" C++ extentions +syn keyword cppStatement new delete this friend using +syn keyword cppAccess public protected private +syn keyword cppType inline virtual explicit export bool wchar_t +syn keyword cppExceptions throw try catch +syn keyword cppOperator operator typeid +syn keyword cppOperator and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq +syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1 +syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$" +syn keyword cppStorageClass mutable +syn keyword cppStructure class typename template namespace +syn keyword cppNumber NPOS +syn keyword cppBoolean true false + +" The minimum and maximum operators in GNU C++ +syn match cppMinMax "[<>]?" + +" Default highlighting +if version >= 508 || !exists("did_cpp_syntax_inits") + if version < 508 + let did_cpp_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + HiLink cppAccess cppStatement + HiLink cppCast cppStatement + HiLink cppExceptions Exception + HiLink cppOperator Operator + HiLink cppStatement Statement + HiLink cppType Type + HiLink cppStorageClass StorageClass + HiLink cppStructure Structure + HiLink cppNumber Number + HiLink cppBoolean Boolean + delcommand HiLink +endif + +let b:current_syntax = "cpp" + +" vim: ts=8 diff --git a/runtime/syntax/crm.vim b/runtime/syntax/crm.vim new file mode 100644 index 000000000..4a1e3bc41 --- /dev/null +++ b/runtime/syntax/crm.vim @@ -0,0 +1,61 @@ +" Vim syntax file +" Language: CRM114 +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/crm/ +" Latest Revision: 2004-05-22 +" arch-tag: a3d3eaaf-4700-44ff-b332-f6c42c036883 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Todo +syn keyword crmTodo contained TODO FIXME XXX NOTE + +" Comments +syn region crmComment matchgroup=crmComment start='#' end='$' end='\\#' contains=crmTodo + +" Variables +syn match crmVariable ':[*#@]:[^:]\{-1,}:' + +" Special Characters +syn match crmSpecial '\\\%(x\x\x\|o\o\o\o\|[]nrtabvf0>)};/\\]\)' + +" Statements +syn keyword crmStatement insert noop accept alius alter classify eval exit +syn keyword crmStatement fail fault goto hash intersect isolate input learn +syn keyword crmStatement liaf match output syscall trap union window + +" Regexes +syn region crmRegex matchgroup=crmRegex start='/' skip='\\/' end='/' contains=crmVariable + +" Labels +syn match crmLabel '^\s*:[[:graph:]]\+:' + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_crm_syn_inits") + if version < 508 + let did_crm_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink crmTodo Todo + HiLink crmComment Comment + HiLink crmVariable Identifier + HiLink crmSpecial SpecialChar + HiLink crmStatement Statement + HiLink crmRegex String + HiLink crmLabel Label + + delcommand HiLink +endif + +let b:current_syntax = "crm" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/crontab.vim b/runtime/syntax/crontab.vim new file mode 100644 index 000000000..b7b8ef6f1 --- /dev/null +++ b/runtime/syntax/crontab.vim @@ -0,0 +1,69 @@ +" Vim syntax file +" Language: crontab 2.3.3 +" Maintainer: John Hoelzel johnh51@users.sourceforge.net +" Last change: Mon Jun 9 2003 +" Filenames: /tmp/crontab.* used by "crontab -e" +" URL: http://johnh51.get.to/vim/syntax/crontab.vim +" +" crontab line format: +" Minutes Hours Days Months Days_of_Week Commands # comments + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syntax match crontabMin "\_^[0-9\-\/\,\.]\{}\>\|\*" nextgroup=crontabHr skipwhite +syntax match crontabHr "\<[0-9\-\/\,\.]\{}\>\|\*" nextgroup=crontabDay skipwhite contained +syntax match crontabDay "\<[0-9\-\/\,\.]\{}\>\|\*" nextgroup=crontabMnth skipwhite contained + +syntax match crontabMnth "\<[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 "\<[a-z0-9\-\/\,\.]\{}\>\|\*" nextgroup=crontabCmd skipwhite contained +syntax keyword crontabDow7 contained sun mon tue wed thu fri sat + +" syntax region crontabCmd start="\<[a-z0-9\/\(]" end="$" nextgroup=crontabCmnt skipwhite contained contains=crontabCmnt keepend + +syntax region crontabCmd start="\S" end="$" nextgroup=crontabCmnt skipwhite contained contains=crontabCmnt keepend +syntax match crontabCmnt /#.*/ + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_crontab_syn_inits") + if version < 508 + let did_crontab_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink crontabMin Number + HiLink crontabHr PreProc + HiLink crontabDay Type + + HiLink crontabMnth Number + HiLink crontabMnth12 Number + HiLink crontabMnthS Number + HiLink crontabMnthN Number + + HiLink crontabDow PreProc + HiLink crontabDow7 PreProc + HiLink crontabDowS PreProc + HiLink crontabDowN PreProc + +" comment out next line for to suppress unix commands coloring. + HiLink crontabCmd Type + + HiLink crontabCmnt Comment + + delcommand HiLink +endif + +let b:current_syntax = "crontab" + +" vim: ts=8 diff --git a/runtime/syntax/cs.vim b/runtime/syntax/cs.vim new file mode 100644 index 000000000..99844b965 --- /dev/null +++ b/runtime/syntax/cs.vim @@ -0,0 +1,145 @@ +" Vim syntax file +" Language: C# +" Maintainer: Johannes Zellner <johannes@zellner.org> +" Last Change: Tue, 09 Mar 2004 14:32:13 CET +" Filenames: *.cs +" $Id$ +" +" REFERENCES: +" [1] ECMA TC39: C# Language Specification (WD13Oct01.doc) + +if exists("b:current_syntax") + finish +endif + +let s:cs_cpo_save = &cpo +set cpo&vim + + +" type +syn keyword csType bool byte char decimal double float int long object sbyte short string uint ulong ushort void +" storage +syn keyword csStorage class delegate enum interface namespace struct +" repeate / condition / label +syn keyword csRepeat break continue do for foreach goto return while +syn keyword csConditional else if switch +syn keyword csLabel case default +" there's no :: operator in C# +syn match csOperatorError display +::+ +" user labels (see [1] 8.6 Statements) +syn match csLabel display +^\s*\I\i*\s*:\([^:]\)\@=+ +" modifier +syn keyword csModifier abstract const extern internal override private protected public readonly sealed static virtual volatile +" constant +syn keyword csConstant false null true +" exception +syn keyword csException try catch finally throw + +" TODO: +syn keyword csUnspecifiedStatement as base checked event fixed in is lock new operator out params ref sizeof stackalloc this typeof unchecked unsafe using +" TODO: +syn keyword csUnsupportedStatement get set add remove value +" TODO: +syn keyword csUnspecifiedKeyword explicit implicit + + + +" Comments +" +" PROVIDES: @csCommentHook +" +" TODO: include strings ? +" +syn keyword csTodo contained TODO FIXME XXX NOTE +syn region csComment start="/\*" end="\*/" contains=@csCommentHook,csTodo +syn match csComment "//.*$" contains=@csCommentHook,csTodo + +" xml markup inside '///' comments +syn cluster xmlRegionHook add=csXmlCommentLeader +syn cluster xmlCdataHook add=csXmlCommentLeader +syn cluster xmlStartTagHook add=csXmlCommentLeader +syn keyword csXmlTag contained Libraries Packages Types Excluded ExcludedTypeName ExcludedLibraryName +syn keyword csXmlTag contained ExcludedBucketName TypeExcluded Type TypeKind TypeSignature AssemblyInfo +syn keyword csXmlTag contained AssemblyName AssemblyPublicKey AssemblyVersion AssemblyCulture Base +syn keyword csXmlTag contained BaseTypeName Interfaces Interface InterfaceName Attributes Attribute +syn keyword csXmlTag contained AttributeName Members Member MemberSignature MemberType MemberValue +syn keyword csXmlTag contained ReturnValue ReturnType Parameters Parameter MemberOfPackage +syn keyword csXmlTag contained ThreadingSafetyStatement Docs devdoc example overload remarks returns summary +syn keyword csXmlTag contained threadsafe value internalonly nodoc exception param permission platnote +syn keyword csXmlTag contained seealso b c i pre sub sup block code note paramref see subscript superscript +syn keyword csXmlTag contained list listheader item term description altcompliant altmember + +syn cluster xmlTagHook add=csXmlTag + +syn match csXmlCommentLeader +\/\/\/+ contained +syn match csXmlComment +\/\/\/.*$+ contains=csXmlCommentLeader,@csXml +syntax include @csXml <sfile>:p:h/xml.vim +hi def link xmlRegion Comment + + +" [1] 9.5 Pre-processing directives +syn region csPreCondit + \ start="^\s*#\s*\(define\|undef\|if\|elif\|else\|endif\|line\|error\|warning\|region\|endregion\)" + \ skip="\\$" end="$" contains=csComment keepend + + + +" Strings and constants +syn match csSpecialError contained "\\." +syn match csSpecialCharError contained "[^']" +" [1] 9.4.4.4 Character literals +syn match csSpecialChar contained +\\["\\'0abfnrtvx]+ +" unicode characters +syn match csUnicodeNumber +\\\(u\x\{4}\|U\x\{8}\)+ contained contains=csUnicodeSpecifier +syn match csUnicodeSpecifier +\\[uU]+ contained +syn region csVerbatimString start=+@"+ end=+"+ end=+$+ contains=csVerbatimSpec +syn match csVerbatimSpec +@"+he=s+1 contained +syn region csString start=+"+ end=+"+ end=+$+ contains=csSpecialChar,csSpecialError,csUnicodeNumber +syn match csCharacter "'[^']*'" contains=csSpecialChar,csSpecialCharError +syn match csCharacter "'\\''" contains=csSpecialChar +syn match csCharacter "'[^\\]'" +syn match csNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" +syn match csNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" +syn match csNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" +syn match csNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" + +" The default highlighting. +hi def link csType Type +hi def link csStorage StorageClass +hi def link csRepeat Repeat +hi def link csConditional Conditional +hi def link csLabel Label +hi def link csModifier StorageClass +hi def link csConstant Constant +hi def link csException Exception +hi def link csUnspecifiedStatement Statement +hi def link csUnsupportedStatement Statement +hi def link csUnspecifiedKeyword Keyword +hi def link csOperatorError Error + +hi def link csTodo Todo +hi def link csComment Comment + +hi def link csSpecialError Error +hi def link csSpecialCharError Error +hi def link csString String +hi def link csVerbatimString String +hi def link csVerbatimSpec SpecialChar +hi def link csPreCondit PreCondit +hi def link csCharacter Character +hi def link csSpecialChar SpecialChar +hi def link csNumber Number +hi def link csUnicodeNumber SpecialChar +hi def link csUnicodeSpecifier SpecialChar + +" xml markup +hi def link csXmlCommentLeader Comment +hi def link csXmlComment Comment +hi def link csXmlTag Statement + +let b:current_syntax = "cs" + +let &cpo = s:cs_cpo_save +unlet s:cs_cpo_save + +" vim: ts=8 diff --git a/runtime/syntax/csc.vim b/runtime/syntax/csc.vim new file mode 100644 index 000000000..8d67334aa --- /dev/null +++ b/runtime/syntax/csc.vim @@ -0,0 +1,199 @@ +" Vim syntax file +" Language: Essbase script +" Maintainer: Raul Segura Acevedo <raulseguraaceved@netscape.net> +" Last change: 2001 Sep 25 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" folds: fix/endfix and comments +sy region EssFold start="\<Fix" end="EndFix" transparent fold + +sy keyword cscTodo contained TODO FIXME XXX + +" cscCommentGroup allows adding matches for special things in comments +sy cluster cscCommentGroup contains=cscTodo + +" Strings in quotes +sy match cscError '"' +sy match cscString '"[^"]*"' + +"when wanted, highlight trailing white space +if exists("csc_space_errors") + if !exists("csc_no_trail_space_error") + sy match cscSpaceE "\s\+$" + endif + if !exists("csc_no_tab_space_error") + sy match cscSpaceE " \+\t"me=e-1 + endif +endif + +"catch errors caused by wrong parenthesis and brackets +sy cluster cscParenGroup contains=cscParenE,@cscCommentGroup,cscUserCont,cscBitField,cscFormat,cscNumber,cscFloat,cscOctal,cscNumbers,cscIfError,cscComW,cscCom,cscFormula,cscBPMacro +sy region cscParen transparent start='(' end=')' contains=ALLBUT,@cscParenGroup +sy match cscParenE ")" + +"integer number, or floating point number without a dot and with "f". +sy case ignore +sy match cscNumbers transparent "\<\d\|\.\d" contains=cscNumber,cscFloat,cscOctal +sy match cscNumber contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" +"hex number +sy match cscNumber contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" +" Flag the first zero of an octal number as something special +sy match cscOctal contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" +sy match cscFloat contained "\d\+f" +"floating point number, with dot, optional exponent +sy match cscFloat contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" +"floating point number, starting with a dot, optional exponent +sy match cscFloat contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +sy match cscFloat contained "\d\+e[-+]\=\d\+[fl]\=\>" + +sy region cscComment start="/\*" end="\*/" contains=@cscCommentGroup,cscSpaceE fold +sy match cscCommentE "\*/" + +sy keyword cscIfError IF ELSE ENDIF ELSEIF +sy keyword cscCondition contained IF ELSE ENDIF ELSEIF +sy keyword cscFunction contained VARPER VAR UDA TRUNCATE SYD SUMRANGE SUM +sy keyword cscFunction contained STDDEVRANGE STDDEV SPARENTVAL SLN SIBLINGS SHIFT +sy keyword cscFunction contained SANCESTVAL RSIBLINGS ROUND REMAINDER RELATIVE PTD +sy keyword cscFunction contained PRIOR POWER PARENTVAL NPV NEXT MOD MINRANGE MIN +sy keyword cscFunction contained MDSHIFT MDPARENTVAL MDANCESTVAL MAXRANGE MAX MATCH +sy keyword cscFunction contained LSIBLINGS LEVMBRS LEV +sy keyword cscFunction contained ISUDA ISSIBLING ISSAMELEV ISSAMEGEN ISPARENT ISMBR +sy keyword cscFunction contained ISLEV ISISIBLING ISIPARENT ISIDESC ISICHILD ISIBLINGS +sy keyword cscFunction contained ISIANCEST ISGEN ISDESC ISCHILD ISANCEST ISACCTYPE +sy keyword cscFunction contained IRSIBLINGS IRR INTEREST INT ILSIBLINGS IDESCENDANTS +sy keyword cscFunction contained ICHILDREN IANCESTORS IALLANCESTORS +sy keyword cscFunction contained GROWTH GENMBRS GEN FACTORIAL DISCOUNT DESCENDANTS +sy keyword cscFunction contained DECLINE CHILDREN CURRMBRRANGE CURLEV CURGEN +sy keyword cscFunction contained COMPOUNDGROWTH COMPOUND AVGRANGE AVG ANCESTVAL +sy keyword cscFunction contained ANCESTORS ALLANCESTORS ACCUM ABS +sy keyword cscFunction contained @VARPER @VAR @UDA @TRUNCATE @SYD @SUMRANGE @SUM +sy keyword cscFunction contained @STDDEVRANGE @STDDEV @SPARENTVAL @SLN @SIBLINGS @SHIFT +sy keyword cscFunction contained @SANCESTVAL @RSIBLINGS @ROUND @REMAINDER @RELATIVE @PTD +sy keyword cscFunction contained @PRIOR @POWER @PARENTVAL @NPV @NEXT @MOD @MINRANGE @MIN +sy keyword cscFunction contained @MDSHIFT @MDPARENTVAL @MDANCESTVAL @MAXRANGE @MAX @MATCH +sy keyword cscFunction contained @LSIBLINGS @LEVMBRS @LEV +sy keyword cscFunction contained @ISUDA @ISSIBLING @ISSAMELEV @ISSAMEGEN @ISPARENT @ISMBR +sy keyword cscFunction contained @ISLEV @ISISIBLING @ISIPARENT @ISIDESC @ISICHILD @ISIBLINGS +sy keyword cscFunction contained @ISIANCEST @ISGEN @ISDESC @ISCHILD @ISANCEST @ISACCTYPE +sy keyword cscFunction contained @IRSIBLINGS @IRR @INTEREST @INT @ILSIBLINGS @IDESCENDANTS +sy keyword cscFunction contained @ICHILDREN @IANCESTORS @IALLANCESTORS +sy keyword cscFunction contained @GROWTH @GENMBRS @GEN @FACTORIAL @DISCOUNT @DESCENDANTS +sy keyword cscFunction contained @DECLINE @CHILDREN @CURRMBRRANGE @CURLEV @CURGEN +sy keyword cscFunction contained @COMPOUNDGROWTH @COMPOUND @AVGRANGE @AVG @ANCESTVAL +sy keyword cscFunction contained @ANCESTORS @ALLANCESTORS @ACCUM @ABS +sy match cscFunction contained "@" +sy match cscError "@\s*\a*" contains=cscFunction + +sy match cscStatement "&" +sy keyword cscStatement AGG ARRAY VAR CCONV CLEARDATA DATACOPY + +sy match cscComE contained "^\s*CALC.*" +sy match cscComE contained "^\s*CLEARBLOCK.*" +sy match cscComE contained "^\s*SET.*" +sy match cscComE contained "^\s*FIX" +sy match cscComE contained "^\s*ENDFIX" +sy match cscComE contained "^\s*ENDLOOP" +sy match cscComE contained "^\s*LOOP" +" sy keyword cscCom FIX ENDFIX LOOP ENDLOOP + +sy match cscComW "^\s*CALC.*" +sy match cscCom "^\s*CALC\s*ALL" +sy match cscCom "^\s*CALC\s*AVERAGE" +sy match cscCom "^\s*CALC\s*DIM" +sy match cscCom "^\s*CALC\s*FIRST" +sy match cscCom "^\s*CALC\s*LAST" +sy match cscCom "^\s*CALC\s*TWOPASS" + +sy match cscComW "^\s*CLEARBLOCK.*" +sy match cscCom "^\s*CLEARBLOCK\s\+ALL" +sy match cscCom "^\s*CLEARBLOCK\s\+UPPER" +sy match cscCom "^\s*CLEARBLOCK\s\+NONINPUT" + +sy match cscComW "^\s*\<SET.*" +sy match cscCom "^\s*\<SET\s\+Commands" +sy match cscCom "^\s*\<SET\s\+AGGMISSG" +sy match cscCom "^\s*\<SET\s\+CACHE" +sy match cscCom "^\s*\<SET\s\+CALCHASHTBL" +sy match cscCom "^\s*\<SET\s\+CLEARUPDATESTATUS" +sy match cscCom "^\s*\<SET\s\+FRMLBOTTOMUP" +sy match cscCom "^\s*\<SET\s\+LOCKBLOCK" +sy match cscCom "^\s*\<SET\s\+MSG" +sy match cscCom "^\s*\<SET\s\+NOTICE" +sy match cscCom "^\s*\<SET\s\+UPDATECALC" +sy match cscCom "^\s*\<SET\s\+UPTOLOCAL" + +sy keyword cscBPMacro contained !LoopOnAll !LoopOnLevel !LoopOnSelected +sy keyword cscBPMacro contained !CurrentMember !LoopOnDimensions !CurrentDimension +sy keyword cscBPMacro contained !CurrentOtherLoopDimension !LoopOnOtherLoopDimensions +sy keyword cscBPMacro contained !EndLoop !AllMembers !SelectedMembers !If !Else !EndIf +sy keyword cscBPMacro contained LoopOnAll LoopOnLevel LoopOnSelected +sy keyword cscBPMacro contained CurrentMember LoopOnDimensions CurrentDimension +sy keyword cscBPMacro contained CurrentOtherLoopDimension LoopOnOtherLoopDimensions +sy keyword cscBPMacro contained EndLoop AllMembers SelectedMembers If Else EndIf +sy match cscBPMacro contained "!" +sy match cscBPW "!\s*\a*" contains=cscBPmacro + +" when wanted, highlighting lhs members or erros in asignments (may lag the editing) +if version >= 600 && exists("csc_asignment") + sy match cscEqError '\("[^"]*"\s*\|[^][\t !%()*+,--/:;<=>{}~]\+\s*\|->\s*\)*=\([^=]\@=\|$\)' + sy region cscFormula transparent matchgroup=cscVarName start='\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\s*=\([^=]\@=\|\n\)' skip='"[^"]*"' end=';' contains=ALLBUT,cscFormula,cscFormulaIn,cscBPMacro,cscCondition + sy region cscFormulaIn matchgroup=cscVarName transparent start='\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\(->\("[^"]*"\|[^][\t !%()*+,--/:;<=>{}~]\+\)\)*\s*=\([^=]\@=\|$\)' skip='"[^"]*"' end=';' contains=ALLBUT,cscFormula,cscFormulaIn,cscBPMacro,cscCondition contained + sy match cscEq "==" +endif + +if !exists("csc_minlines") + let csc_minlines = 50 " mostly for () constructs +endif +exec "sy sync ccomment cscComment minlines=" . csc_minlines + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_csc_syntax_inits") + if version < 508 + let did_csc_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + hi cscVarName term=bold ctermfg=9 gui=bold guifg=blue + + HiLink cscNumber Number + HiLink cscOctal Number + HiLink cscFloat Float + HiLink cscParenE Error + HiLink cscCommentE Error + HiLink cscSpaceE Error + HiLink cscError Error + HiLink cscString String + HiLink cscComment Comment + HiLink cscTodo Todo + HiLink cscStatement Statement + HiLink cscIfError Error + HiLink cscEqError Error + HiLink cscFunction Statement + HiLink cscCondition Statement + HiLink cscWarn WarningMsg + + HiLink cscComE Error + HiLink cscCom Statement + HiLink cscComW WarningMsg + + HiLink cscBPMacro Identifier + HiLink cscBPW WarningMsg + + delcommand HiLink +endif + +let b:current_syntax = "csc" + +" vim: ts=8 diff --git a/runtime/syntax/csh.vim b/runtime/syntax/csh.vim new file mode 100644 index 000000000..de3d3e2c9 --- /dev/null +++ b/runtime/syntax/csh.vim @@ -0,0 +1,160 @@ +" Vim syntax file +" Language: C-shell (csh) +" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> +" Version: 8 +" Last Change: Sep 02, 2003 +" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" clusters: +syn cluster cshQuoteList contains=cshDblQuote,cshSnglQuote,cshBckQuote +syn cluster cshVarList contains=cshExtVar,cshSelector,cshQtyWord,cshArgv,cshSubst + +" Variables which affect the csh itself +syn match cshSetVariables contained "argv\|histchars\|ignoreeof\|noglob\|prompt\|status" +syn match cshSetVariables contained "cdpath\|history\|mail\|nonomatch\|savehist\|time" +syn match cshSetVariables contained "cwd\|home\|noclobber\|path\|shell\|verbose" +syn match cshSetVariables contained "echo" + +syn case ignore +syn keyword cshTodo contained todo +syn case match + +" Variable Name Expansion Modifiers +syn match cshModifier contained ":\(h\|t\|r\|q\|x\|gh\|gt\|gr\)" + +" Strings and Comments +syn match cshNoEndlineDQ contained "[^\"]\(\\\\\)*$" +syn match cshNoEndlineSQ contained "[^\']\(\\\\\)*$" +syn match cshNoEndlineBQ contained "[^\`]\(\\\\\)*$" + +syn region cshDblQuote start=+[^\\]"+lc=1 skip=+\\\\\|\\"+ end=+"+ contains=cshSpecial,cshShellVariables,cshExtVar,cshSelector,cshQtyWord,cshArgv,cshSubst,cshNoEndlineDQ,cshBckQuote +syn region cshSnglQuote start=+[^\\]'+lc=1 skip=+\\\\\|\\'+ end=+'+ contains=cshNoEndlineSQ +syn region cshBckQuote start=+[^\\]`+lc=1 skip=+\\\\\|\\`+ end=+`+ contains=cshNoEndlineBQ +syn region cshDblQuote start=+^"+ skip=+\\\\\|\\"+ end=+"+ contains=cshSpecial,cshExtVar,cshSelector,cshQtyWord,cshArgv,cshSubst,cshNoEndlineDQ +syn region cshSnglQuote start=+^'+ skip=+\\\\\|\\'+ end=+'+ contains=cshNoEndlineSQ +syn region cshBckQuote start=+^`+ skip=+\\\\\|\\`+ end=+`+ contains=cshNoEndlineBQ +syn cluster cshCommentGroup contains=cshTodo,@Spell +syn match cshComment "#.*$" contains=@cshCommentGroup + +" A bunch of useful csh keywords +syn keyword cshStatement alias end history onintr setenv unalias +syn keyword cshStatement cd eval kill popd shift unhash +syn keyword cshStatement chdir exec login pushd source +syn keyword cshStatement continue exit logout rehash time unsetenv +syn keyword cshStatement dirs glob nice repeat umask wait +syn keyword cshStatement echo goto nohup + +syn keyword cshConditional break case else endsw switch +syn keyword cshConditional breaksw default endif +syn keyword cshRepeat foreach + +" Special environment variables +syn keyword cshShellVariables HOME LOGNAME PATH TERM USER + +" Modifiable Variables without {} +syn match cshExtVar "\$[a-zA-Z_][a-zA-Z0-9_]*\(:h\|:t\|:r\|:q\|:x\|:gh\|:gt\|:gr\)\=" contains=cshModifier +syn match cshSelector "\$[a-zA-Z_][a-zA-Z0-9_]*\[[a-zA-Z_]\+\]\(:h\|:t\|:r\|:q\|:x\|:gh\|:gt\|:gr\)\=" contains=cshModifier +syn match cshQtyWord "\$#[a-zA-Z_][a-zA-Z0-9_]*\(:h\|:t\|:r\|:q\|:x\|:gh\|:gt\|:gr\)\=" contains=cshModifier +syn match cshArgv "\$\d\+\(:h\|:t\|:r\|:q\|:x\|:gh\|:gt\|:gr\)\=" contains=cshModifier +syn match cshArgv "\$\*\(:h\|:t\|:r\|:q\|:x\|:gh\|:gt\|:gr\)\=" contains=cshModifier + +" Modifiable Variables with {} +syn match cshExtVar "\${[a-zA-Z_][a-zA-Z0-9_]*\(:h\|:t\|:r\|:q\|:x\|:gh\|:gt\|:gr\)\=}" contains=cshModifier +syn match cshSelector "\${[a-zA-Z_][a-zA-Z0-9_]*\[[a-zA-Z_]\+\]\(:h\|:t\|:r\|:q\|:x\|:gh\|:gt\|:gr\)\=}" contains=cshModifier +syn match cshQtyWord "\${#[a-zA-Z_][a-zA-Z0-9_]*\(:h\|:t\|:r\|:q\|:x\|:gh\|:gt\|:gr\)\=}" contains=cshModifier +syn match cshArgv "\${\d\+\(:h\|:t\|:r\|:q\|:x\|:gh\|:gt\|:gr\)\=}" contains=cshModifier + +" UnModifiable Substitutions +syn match cshSubstError "\$?[a-zA-Z_][a-zA-Z0-9_]*:\(h\|t\|r\|q\|x\|gh\|gt\|gr\)" +syn match cshSubstError "\${?[a-zA-Z_][a-zA-Z0-9_]*:\(h\|t\|r\|q\|x\|gh\|gt\|gr\)}" +syn match cshSubstError "\$?[0$<]:\(h\|t\|r\|q\|x\|gh\|gt\|gr\)" +syn match cshSubst "\$?[a-zA-Z_][a-zA-Z0-9_]*" +syn match cshSubst "\${?[a-zA-Z_][a-zA-Z0-9_]*}" +syn match cshSubst "\$?[0$<]" + +" I/O redirection +syn match cshRedir ">>&!\|>&!\|>>&\|>>!\|>&\|>!\|>>\|<<\|>\|<" + +" Handle set expressions +syn region cshSetExpr matchgroup=cshSetStmt start="\<set\>\|\<unset\>" end="$\|;" contains=cshComment,cshSetStmt,cshSetVariables,@cshQuoteList + +" Operators and Expression-Using constructs +"syn match cshOperator contained "&&\|!\~\|!=\|<<\|<=\|==\|=\~\|>=\|>>\|\*\|\^\|\~\|||\|!\|\|%\|&\|+\|-\|/\|<\|>\||" +syn match cshOperator contained "&&\|!\~\|!=\|<<\|<=\|==\|=\~\|>=\|>>\|\*\|\^\|\~\|||\|!\|%\|&\|+\|-\|/\|<\|>\||" +syn match cshOperator contained "[(){}]" +syn region cshTest matchgroup=cshStatement start="\<if\>\|\<while\>" skip="\\$" matchgroup=cshStatement end="\<then\>\|$" contains=cshComment,cshOperator,@cshQuoteList,@cshVarLIst + +" Highlight special characters (those which have a backslash) differently +syn match cshSpecial contained "\\\d\d\d\|\\[abcfnrtv\\]" +syn match cshNumber "-\=\<\d\+\>" + +" All other identifiers +"syn match cshIdentifier "\<[a-zA-Z._][a-zA-Z0-9._]*\>" + +" Shell Input Redirection (Here Documents) +if version < 600 + syn region cshHereDoc matchgroup=cshRedir start="<<-\=\s*\**END[a-zA-Z_0-9]*\**" matchgroup=cshRedir end="^END[a-zA-Z_0-9]*$" + syn region cshHereDoc matchgroup=cshRedir start="<<-\=\s*\**EOF\**" matchgroup=cshRedir end="^EOF$" +else + syn region cshHereDoc matchgroup=cshRedir start="<<-\=\s*\**\z(\h\w*\)\**" matchgroup=cshRedir end="^\z1$" +endif + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_csh_syntax_inits") + if version < 508 + let did_csh_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink cshArgv cshVariables + HiLink cshBckQuote cshCommand + HiLink cshDblQuote cshString + HiLink cshExtVar cshVariables + HiLink cshHereDoc cshString + HiLink cshNoEndlineBQ cshNoEndline + HiLink cshNoEndlineDQ cshNoEndline + HiLink cshNoEndlineSQ cshNoEndline + HiLink cshQtyWord cshVariables + HiLink cshRedir cshOperator + HiLink cshSelector cshVariables + HiLink cshSetStmt cshStatement + HiLink cshSetVariables cshVariables + HiLink cshSnglQuote cshString + HiLink cshSubst cshVariables + + HiLink cshCommand Statement + HiLink cshComment Comment + HiLink cshConditional Conditional + HiLink cshIdentifier Error + HiLink cshModifier Special + HiLink cshNoEndline Error + HiLink cshNumber Number + HiLink cshOperator Operator + HiLink cshRedir Statement + HiLink cshRepeat Repeat + HiLink cshShellVariables Special + HiLink cshSpecial Special + HiLink cshStatement Statement + HiLink cshString String + HiLink cshSubstError Error + HiLink cshTodo Todo + HiLink cshVariables Type + + delcommand HiLink +endif + +let b:current_syntax = "csh" + +" vim: ts=18 diff --git a/runtime/syntax/csp.vim b/runtime/syntax/csp.vim new file mode 100644 index 000000000..bd6213efd --- /dev/null +++ b/runtime/syntax/csp.vim @@ -0,0 +1,195 @@ +" Vim syntax file +" Language: CSP (Communication Sequential Processes, using FDR input syntax) +" Maintainer: Jan Bredereke <brederek@tzi.de> +" Version: 0.6.0 +" Last change: Mon Mar 25, 2002 +" URL: http://www.tzi.de/~brederek/vim/ +" Copying: You may distribute and use this file freely, in the same +" way as the vim editor itself. +" +" To Do: - Probably I missed some keywords or operators, please +" fix them and notify me, the maintainer. +" - Currently, we do lexical highlighting only. It would be +" nice to have more actual syntax checks, including +" highlighting of wrong syntax. +" - The additional syntax for the RT-Tester (pseudo-comments) +" should be optional. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" case is significant to FDR: +syn case match + +" Block comments in CSP are between {- and -} +syn region cspComment start="{-" end="-}" contains=cspTodo +" Single-line comments start with -- +syn region cspComment start="--" end="$" contains=cspTodo,cspOldRttComment,cspSdlRttComment keepend + +" Numbers: +syn match cspNumber "\<\d\+\>" + +" Conditionals: +syn keyword cspConditional if then else + +" Operators on processes: +" -> ? : ! ' ; /\ \ [] |~| [> & [[..<-..]] ||| [|..|] || [..<->..] ; : @ ||| +syn match cspOperator "->" +syn match cspOperator "/\\" +syn match cspOperator "[^/]\\"lc=1 +syn match cspOperator "\[\]" +syn match cspOperator "|\~|" +syn match cspOperator "\[>" +syn match cspOperator "\[\[" +syn match cspOperator "\]\]" +syn match cspOperator "<-" +syn match cspOperator "|||" +syn match cspOperator "[^|]||[^|]"lc=1,me=e-1 +syn match cspOperator "[^|{\~]|[^|}\~]"lc=1,me=e-1 +syn match cspOperator "\[|" +syn match cspOperator "|\]" +syn match cspOperator "\[[^>]"me=e-1 +syn match cspOperator "\]" +syn match cspOperator "<->" +syn match cspOperator "[?:!';@]" +syn match cspOperator "&" +syn match cspOperator "\." + +" (not on processes:) +" syn match cspDelimiter "{|" +" syn match cspDelimiter "|}" +" syn match cspDelimiter "{[^-|]"me=e-1 +" syn match cspDelimiter "[^-|]}"lc=1 + +" Keywords: +syn keyword cspKeyword length null head tail concat elem +syn keyword cspKeyword union inter diff Union Inter member card +syn keyword cspKeyword empty set Set Seq +syn keyword cspKeyword true false and or not within let +syn keyword cspKeyword nametype datatype diamond normal +syn keyword cspKeyword sbisim tau_loop_factor model_compress +syn keyword cspKeyword explicate +syn match cspKeyword "transparent" +syn keyword cspKeyword external chase prioritize +syn keyword cspKeyword channel Events +syn keyword cspKeyword extensions productions +syn keyword cspKeyword Bool Int + +" Reserved keywords: +syn keyword cspReserved attribute embed module subtype + +" Include: +syn region cspInclude matchgroup=cspIncludeKeyword start="^include" end="$" keepend contains=cspIncludeArg +syn region cspIncludeArg start='\s\+\"' end= '\"\s*' contained + +" Assertions: +syn keyword cspAssert assert deterministic divergence free deadlock +syn keyword cspAssert livelock +syn match cspAssert "\[T=" +syn match cspAssert "\[F=" +syn match cspAssert "\[FD=" +syn match cspAssert "\[FD\]" +syn match cspAssert "\[F\]" + +" Types and Sets +" (first char a capital, later at least one lower case, no trailing underscore): +syn match cspType "\<_*[A-Z][A-Z_0-9]*[a-z]\(\|[A-Za-z_0-9]*[A-Za-z0-9]\)\>" + +" Processes (all upper case, no trailing underscore): +" (For identifiers that could be types or sets, too, this second rule set +" wins.) +syn match cspProcess "\<[A-Z_][A-Z_0-9]*[A-Z0-9]\>" +syn match cspProcess "\<[A-Z_]\>" + +" reserved identifiers for tool output (ending in underscore): +syn match cspReservedIdentifier "\<[A-Za-z_][A-Za-z_0-9]*_\>" + +" ToDo markers: +syn match cspTodo "FIXME" contained +syn match cspTodo "TODO" contained +syn match cspTodo "!!!" contained + +" RT-Tester pseudo comments: +" (The now obsolete syntax:) +syn match cspOldRttComment "^--\$\$AM_UNDEF"lc=2 contained +syn match cspOldRttComment "^--\$\$AM_ERROR"lc=2 contained +syn match cspOldRttComment "^--\$\$AM_WARNING"lc=2 contained +syn match cspOldRttComment "^--\$\$AM_SET_TIMER"lc=2 contained +syn match cspOldRttComment "^--\$\$AM_RESET_TIMER"lc=2 contained +syn match cspOldRttComment "^--\$\$AM_ELAPSED_TIMER"lc=2 contained +syn match cspOldRttComment "^--\$\$AM_OUTPUT"lc=2 contained +syn match cspOldRttComment "^--\$\$AM_INPUT"lc=2 contained +" (The current syntax:) +syn region cspRttPragma matchgroup=cspRttPragmaKeyword start="^pragma\s\+" end="\s*$" oneline keepend contains=cspRttPragmaArg,cspRttPragmaSdl +syn keyword cspRttPragmaArg AM_ERROR AM_WARNING AM_SET_TIMER contained +syn keyword cspRttPragmaArg AM_RESET_TIMER AM_ELAPSED_TIMER contained +syn keyword cspRttPragmaArg AM_OUTPUT AM_INPUT AM_INTERNAL contained +" the "SDL_MATCH" extension: +syn region cspRttPragmaSdl matchgroup=cspRttPragmaKeyword start="SDL_MATCH\s\+" end="\s*$" contains=cspRttPragmaSdlArg contained +syn keyword cspRttPragmaSdlArg TRANSLATE nextgroup=cspRttPragmaSdlTransName contained +syn keyword cspRttPragmaSdlArg PARAM SKIP OPTIONAL CHOICE ARRAY nextgroup=cspRttPragmaSdlName contained +syn match cspRttPragmaSdlName "\s*\S\+\s*" nextgroup=cspRttPragmaSdlTail contained +syn region cspRttPragmaSdlTail start="" end="\s*$" contains=cspRttPragmaSdlTailArg contained +syn keyword cspRttPragmaSdlTailArg SUBSET_USED DEFAULT_VALUE Present contained +syn match cspRttPragmaSdlTransName "\s*\w\+\s*" nextgroup=cspRttPragmaSdlTransTail contained +syn region cspRttPragmaSdlTransTail start="" end="\s*$" contains=cspRttPragmaSdlTransTailArg contained +syn keyword cspRttPragmaSdlTransTailArg sizeof contained +syn match cspRttPragmaSdlTransTailArg "\*" contained +syn match cspRttPragmaSdlTransTailArg "(" contained +syn match cspRttPragmaSdlTransTailArg ")" contained + +" temporary syntax extension for commented-out "pragma SDL_MATCH": +syn match cspSdlRttComment "pragma\s\+SDL_MATCH\s\+" nextgroup=cspRttPragmaSdlArg contained + +syn sync lines=250 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_csp_syn_inits") + if version < 508 + let did_csp_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + " (For vim version <=5.7, the command groups are defined in + " $VIMRUNTIME/syntax/synload.vim ) + HiLink cspComment Comment + HiLink cspNumber Number + HiLink cspConditional Conditional + HiLink cspOperator Delimiter + HiLink cspKeyword Keyword + HiLink cspReserved SpecialChar + HiLink cspInclude Error + HiLink cspIncludeKeyword Include + HiLink cspIncludeArg Include + HiLink cspAssert PreCondit + HiLink cspType Type + HiLink cspProcess Function + HiLink cspTodo Todo + HiLink cspOldRttComment Define + HiLink cspRttPragmaKeyword Define + HiLink cspSdlRttComment Define + HiLink cspRttPragmaArg Define + HiLink cspRttPragmaSdlArg Define + HiLink cspRttPragmaSdlName Default + HiLink cspRttPragmaSdlTailArg Define + HiLink cspRttPragmaSdlTransName Default + HiLink cspRttPragmaSdlTransTailArg Define + HiLink cspReservedIdentifier Error + " (Currently unused vim method: Debug) + + delcommand HiLink +endif + +let b:current_syntax = "csp" + +" vim: ts=8 diff --git a/runtime/syntax/css.vim b/runtime/syntax/css.vim new file mode 100644 index 000000000..953f224f3 --- /dev/null +++ b/runtime/syntax/css.vim @@ -0,0 +1,274 @@ +" Vim syntax file +" Language: Cascading Style Sheets +" Maintainer: Claudio Fleiner <claudio@fleiner.com> +" URL: http://www.fleiner.com/vim/syntax/css.vim +" Last Change: 2002 Oct 19 +" CSS2 by Nikolai Weibull +" Full CSS2, HTML4 support by Yeti + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if !exists("main_syntax") + if version < 600 + syntax clear + elseif exists("b:current_syntax") + finish +endif + let main_syntax = 'css' +endif + +syn case ignore + +syn keyword cssTagName abbr acronym address applet area a b base +syn keyword cssTagName basefont bdo big blockquote body br button +syn keyword cssTagName caption center cite code col colgroup dd del +syn keyword cssTagName dfn dir div dl dt em fieldset font form frame +syn keyword cssTagName frameset h1 h2 h3 h4 h5 h6 head hr html img i +syn keyword cssTagName iframe img input ins isindex kbd label legend li +syn keyword cssTagName link map menu meta noframes noscript ol optgroup +syn keyword cssTagName option p param pre q s samp script select small +syn keyword cssTagName span strike strong style sub sup tbody td +syn keyword cssTagName textarea tfoot th thead title tr tt ul u var +syn match cssTagName "\<table\>" +syn match cssTagName "\*" + +syn match cssTagName "@page\>" nextgroup=cssDefinition + +syn match cssSelectorOp "[+>.]" +syn match cssSelectorOp2 "[~|]\?=" contained +syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" transparent contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ + +syn match cssIdentifier "#\i\+" + +syn match cssMedia "@media\>" nextgroup=cssMediaType skipwhite skipnl +syn keyword cssMediaType contained screen print aural braile embosed handheld projection ty tv all nextgroup=cssMediaComma,cssMediaBlock skipwhite skipnl +syn match cssMediaComma "," nextgroup=cssMediaType skipwhite skipnl +syn region cssMediaBlock transparent matchgroup=cssBraces start='{' end='}' contains=cssTagName,cssError,cssComment,cssDefinition,cssURL,cssUnicodeEscape,cssIdentifier + +syn match cssValueInteger contained "[-+]\=\d\+" +syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\=" +syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\)" +syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)" +syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)" +syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)" + +syn match cssFontDescriptor "@font-face\>" nextgroup=cssFontDescriptorBlock skipwhite skipnl +syn region cssFontDescriptorBlock contained transparent matchgroup=cssBraces start="{" end="}" contains=cssComment,cssError,cssUnicodeEscape,cssFontProp,cssFontAttr,cssCommonAttr,cssStringQ,cssStringQQ,cssFontDescriptorProp,cssValue.*,cssFontDescriptorFunction,cssUnicodeRange,cssFontDescriptorAttr +syn match cssFontDescriptorProp contained "\<\(unicode-range\|unit-per-em\|panose-1\|cap-height\|x-height\|definition-src\)\>" +syn keyword cssFontDescriptorProp contained src stemv stemh slope ascent descent widths bbox baseline centerline mathline topline +syn keyword cssFontDescriptorAttr contained all +syn region cssFontDescriptorFunction contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline keepend +syn match cssUnicodeRange contained "U+[0-9A-Fa-f?]\+" +syn match cssUnicodeRange contained "U+\x\+-\x\+" + +syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon navy olive purple red silver teal yellow +" FIXME: These are actually case-insentivie too, but (a) specs recommend using +" mixed-case (b) it's hard to highlight the word `Background' correctly in +" all situations +syn case match +syn keyword cssColor contained ActiveBorder ActiveCaption AppWorkspace ButtonFace ButtonHighlight ButtonShadow ButtonText CaptionText GrayText Highlight HighlightText InactiveBorder InactiveCaption InactiveCaptionText InfoBackground InfoText Menu MenuText Scrollbar ThreeDDarkShadow ThreeDFace ThreeDHighlight ThreeDLightShadow ThreeDShadow Window WindowFrame WindowText Background +syn case ignore +syn match cssColor contained "\<transparent\>" +syn match cssColor contained "\<white\>" +syn match cssColor contained "#[0-9A-Fa-f]\{3\}\>" +syn match cssColor contained "#[0-9A-Fa-f]\{6\}\>" +"syn match cssColor contained "\<rgb\s*(\s*\d\+\(\.\d*\)\=%\=\s*,\s*\d\+\(\.\d*\)\=%\=\s*,\s*\d\+\(\.\d*\)\=%\=\s*)" +syn region cssURL contained matchgroup=cssFunctionName start="\<url\s*(" end=")" oneline keepend +syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\)\s*(" end=")" oneline keepend + +syn match cssImportant contained "!\s*important\>" + +syn keyword cssCommonAttr contained auto none inherit +syn keyword cssCommonAttr contained top bottom +syn keyword cssCommonAttr contained medium normal + +syn match cssFontProp contained "\<font\>\(-\(family\|style\|variant\|weight\|size\(-adjust\)\=\|stretch\)\>\)\=" +syn match cssFontAttr contained "\<\(sans-\)\=\<serif\>" +syn match cssFontAttr contained "\<small\>\(-\(caps\|caption\)\>\)\=" +syn match cssFontAttr contained "\<x\{1,2\}-\(large\|small\)\>" +syn match cssFontAttr contained "\<message-box\>" +syn match cssFontAttr contained "\<status-bar\>" +syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\|status-bar\)-\)\=\(condensed\|expanded\)\>" +syn keyword cssFontAttr contained cursive fantasy monospace italic oblique +syn keyword cssFontAttr contained bold bolder lighter larger smaller +syn keyword cssFontAttr contained icon menu +syn match cssFontAttr contained "\<caption\>" +syn keyword cssFontAttr contained large smaller larger +syn keyword cssFontAttr contained narrower wider + +syn keyword cssColorProp contained color +syn match cssColorProp contained "\<background\(-\(color\|image\|attachment\|position\)\)\=" +syn keyword cssColorAttr contained center scroll fixed +syn match cssColorAttr contained "\<repeat\(-[xy]\)\=\>" +syn match cssColorAttr contained "\<no-repeat\>" + +syn match cssTextProp "\<\(\(word\|letter\)-spacing\|text\(-\(decoration\|transform\|align\|index\|shadow\)\)\=\|vertical-align\|unicode-bidi\|line-height\)\>" +syn match cssTextAttr contained "\<line-through\>" +syn match cssTextAttr contained "\<text-indent\>" +syn match cssTextAttr contained "\<\(text-\)\=\(top\|bottom\)\>" +syn keyword cssTextAttr contained underline overline blink sub super middle +syn keyword cssTextAttr contained capitalize uppercase lowercase center justify baseline sub super + +syn match cssBoxProp contained "\<\(margin\|padding\|border\)\(-\(top\|right\|bottom\|left\)\)\=\>" +syn match cssBoxProp contained "\<border-\(\(\(top\|right\|bottom\|left\)-\)\=\(width\|color\|style\)\)\=\>" +syn match cssBoxProp contained "\<\(width\|z-index\)\>" +syn match cssBoxProp contained "\<\(min\|max\)-\(width\|height\)\>" +syn keyword cssBoxProp contained width height float clear overflow clip visibility +syn keyword cssBoxAttr contained thin thick both +syn keyword cssBoxAttr contained dotted dashed solid double groove ridge inset outset +syn keyword cssBoxAttr contained hidden visible scroll collapse + +syn keyword cssGeneratedContentProp contained content quotes +syn match cssGeneratedContentProp contained "\<counter-\(reset\|increment\)\>" +syn match cssGeneratedContentProp contained "\<list-style\(-\(type\|position\|image\)\)\=\>" +syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>" +syn match cssAuralAttr contained "\<lower\>" +syn match cssGeneratedContentAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>" +syn match cssGeneratedContentAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>" +syn match cssGeneratedContentAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>" +syn keyword cssGeneratedContentAttr contained disc circle square hebrew armenian georgian +syn keyword cssGeneratedContentAttr contained inside outside + +syn match cssPagingProp contained "\<page\(-break-\(before\|after\|inside\)\)\=\>" +syn keyword cssPagingProp contained size marks inside orphans widows +syn keyword cssPagingAttr contained landscape portrait crop cross always avoid + +syn keyword cssUIProp contained cursor +syn match cssUIProp contained "\<outline\(-\(width\|style\|color\)\)\=\>" +syn match cssUIAttr contained "\<[ns]\=[ew]\=-resize\>" +syn keyword cssUIAttr contained default crosshair pointer move wait help +syn keyword cssUIAttr contained thin thick +syn keyword cssUIAttr contained dotted dashed solid double groove ridge inset outset +syn keyword cssUIAttr contained invert + +syn match cssRenderAttr contained "\<marker\>" +syn match cssRenderProp contained "\<\(display\|marker-offset\|unicode-bidi\|white-space\|list-item\|run-in\|inline-table\)\>" +syn keyword cssRenderProp contained position top bottom direction +syn match cssRenderProp contained "\<\(left\|right\)\>" +syn keyword cssRenderAttr contained block inline compact +syn match cssRenderAttr contained "\<table\(-\(row-gorup\|\(header\|footer\)-group\|row\|column\(-group\)\=\|cell\|caption\)\)\=\>" +syn keyword cssRenderAttr contained static relative absolute fixed +syn keyword cssRenderAttr contained ltr rtl embed bidi-override pre nowrap +syn match cssRenderAttr contained "\<bidi-override\>" + + +syn match cssAuralProp contained "\<\(pause\|cue\)\(-\(before\|after\)\)\=\>" +syn match cssAuralProp contained "\<\(play-during\|speech-rate\|voice-family\|pitch\(-range\)\=\|speak\(-\(punctuation\|numerals\)\)\=\)\>" +syn keyword cssAuralProp contained volume during azimuth elevation stress richness +syn match cssAuralAttr contained "\<\(x-\)\=\(soft\|loud\)\>" +syn keyword cssAuralAttr contained silent +syn match cssAuralAttr contained "\<spell-out\>" +syn keyword cssAuralAttr contained non mix +syn match cssAuralAttr contained "\<\(left\|right\)-side\>" +syn match cssAuralAttr contained "\<\(far\|center\)-\(left\|center\|right\)\>" +syn keyword cssAuralAttr contained leftwards rightwards behind +syn keyword cssAuralAttr contained below level above higher +syn match cssAuralAttr contained "\<\(x-\)\=\(slow\|fast\)\>" +syn keyword cssAuralAttr contained faster slower +syn keyword cssAuralAttr contained male female child code digits continuous + +syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\|speak-header\)\>" +syn keyword cssTableAttr contained fixed collapse separate show hide once always + +" FIXME: This allows cssMediaBlock before the semicolon, which is wrong. +syn region cssInclude start="@import" end=";" contains=cssComment,cssURL,cssUnicodeEscape,cssMediaType +syn match cssBraces contained "[{}]" +syn match cssError contained "{@<>" +syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape +syn match cssBraceError "}" + +syn match cssPseudoClass ":\S*" contains=cssPseudoClassId,cssUnicodeEscape +syn keyword cssPseudoClassId contained link visited active hover focus before after left right +syn match cssPseudoClassId contained "\<first\(-\(line\|letter\|child\)\)\=\>" +syn region cssPseudoClassLang matchgroup=cssPseudoClassId start=":lang(" end=")" oneline + +syn region cssComment start="/\*" end="\*/" + +syn match cssUnicodeEscape "\\\x\{1,6}\s\?" +syn match cssSpecialCharQQ +\\"+ contained +syn match cssSpecialCharQ +\\'+ contained +syn region cssStringQQ start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cssUnicodeEscape,cssSpecialCharQQ +syn region cssStringQ start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=cssUnicodeEscape,cssSpecialCharQ + +if main_syntax == "css" + syn sync minlines=10 +endif + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_css_syn_inits") + if version < 508 + let did_css_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink cssComment Comment + HiLink cssTagName Statement + HiLink cssSelectorOp Special + HiLink cssSelectorOp2 Special + HiLink cssFontProp StorageClass + HiLink cssColorProp StorageClass + HiLink cssTextProp StorageClass + HiLink cssBoxProp StorageClass + HiLink cssRenderProp StorageClass + HiLink cssAuralProp StorageClass + HiLink cssRenderProp StorageClass + HiLink cssGeneratedContentProp StorageClass + HiLink cssPagingProp StorageClass + HiLink cssTableProp StorageClass + HiLink cssUIProp StorageClass + HiLink cssFontAttr Type + HiLink cssColorAttr Type + HiLink cssTextAttr Type + HiLink cssBoxAttr Type + HiLink cssRenderAttr Type + HiLink cssAuralAttr Type + HiLink cssGeneratedContentAttr Type + HiLink cssPagingAttr Type + HiLink cssTableAttr Type + HiLink cssUIAttr Type + HiLink cssCommonAttr Type + HiLink cssPseudoClassId PreProc + HiLink cssPseudoClassLang Constant + HiLink cssValueLength Number + HiLink cssValueInteger Number + HiLink cssValueNumber Number + HiLink cssValueAngle Number + HiLink cssValueTime Number + HiLink cssValueFrequency Number + HiLink cssFunction Constant + HiLink cssURL String + HiLink cssFunctionName Function + HiLink cssColor Constant + HiLink cssIdentifier Function + HiLink cssInclude Include + HiLink cssImportant Special + HiLink cssBraces Function + HiLink cssBraceError Error + HiLink cssError Error + HiLink cssInclude Include + HiLink cssUnicodeEscape Special + HiLink cssStringQQ String + HiLink cssStringQ String + HiLink cssMedia Special + HiLink cssMediaType Special + HiLink cssMediaComma Normal + HiLink cssFontDescriptor Special + HiLink cssFontDescriptorFunction Constant + HiLink cssFontDescriptorProp StorageClass + HiLink cssFontDescriptorAttr Type + HiLink cssUnicodeRange Constant + delcommand HiLink +endif + +let b:current_syntax = "css" + +if main_syntax == 'css' + unlet main_syntax +endif + +" vim: ts=8 + diff --git a/runtime/syntax/cterm.vim b/runtime/syntax/cterm.vim new file mode 100644 index 000000000..139a0d5e1 --- /dev/null +++ b/runtime/syntax/cterm.vim @@ -0,0 +1,190 @@ +" Vim syntax file +" Language: Century Term Command Script +" Maintainer: Sean M. McKee <mckee@misslink.net> +" Last Change: 2002 Apr 13 +" Version Info: @(#)cterm.vim 1.7 97/12/15 09:23:14 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +"FUNCTIONS +syn keyword ctermFunction abort addcr addlf answer at attr batch baud +syn keyword ctermFunction break call capture cd cdelay charset cls color +syn keyword ctermFunction combase config commect copy cread +syn keyword ctermFunction creadint devprefix dialer dialog dimint +syn keyword ctermFunction dimlog dimstr display dtimeout dwait edit +syn keyword ctermFunction editor emulate erase escloop fcreate +syn keyword ctermFunction fflush fillchar flags flush fopen fread +syn keyword ctermFunction freadln fseek fwrite fwriteln get hangup +syn keyword ctermFunction help hiwait htime ignore init itime +syn keyword ctermFunction keyboard lchar ldelay learn lockfile +syn keyword ctermFunction locktime log login logout lowait +syn keyword ctermFunction lsend ltime memlist menu mkdir mode +syn keyword ctermFunction modem netdialog netport noerror pages parity +syn keyword ctermFunction pause portlist printer protocol quit rcv +syn keyword ctermFunction read readint readn redial release +syn keyword ctermFunction remote rename restart retries return +syn keyword ctermFunction rmdir rtime run runx scrollback send +syn keyword ctermFunction session set setcap setcolor setkey +syn keyword ctermFunction setsym setvar startserver status +syn keyword ctermFunction stime stopbits stopserver tdelay +syn keyword ctermFunction terminal time trans type usend version +syn keyword ctermFunction vi vidblink vidcard vidout vidunder wait +syn keyword ctermFunction wildsize wclose wopen wordlen wru wruchar +syn keyword ctermFunction xfer xmit xprot +syn match ctermFunction "?" +"syn keyword ctermFunction comment remark + +"END FUNCTIONS +"INTEGER FUNCTIONS +syn keyword ctermIntFunction asc atod eval filedate filemode filesize ftell +syn keyword ctermIntFunction len termbits opsys pos sum time val mdmstat +"END INTEGER FUNCTIONS + +"STRING FUNCTIONS +syn keyword ctermStrFunction cdate ctime chr chrdy chrin comin getenv +syn keyword ctermStrFunction gethomedir left midstr right str tolower +syn keyword ctermStrFunction toupper uniq comst exists feof hascolor + +"END STRING FUNCTIONS + +"PREDEFINED TERM VARIABLES R/W +syn keyword ctermPreVarRW f _escloop _filename _kermiteol _obufsiz +syn keyword ctermPreVarRW _port _rcvsync _cbaud _reval _turnchar +syn keyword ctermPreVarRW _txblksiz _txwindow _vmin _vtime _cparity +syn keyword ctermPreVarRW _cnumber false t true _cwordlen _cstopbits +syn keyword ctermPreVarRW _cmode _cemulate _cxprot _clogin _clogout +syn keyword ctermPreVarRW _cstartsrv _cstopsrv _ccmdfile _cwru +syn keyword ctermPreVarRW _cprotocol _captfile _cremark _combufsiz +syn keyword ctermPreVarRW logfile +"END PREDEFINED TERM VARIABLES R/W + +"PREDEFINED TERM VARIABLES R/O +syn keyword ctermPreVarRO _1 _2 _3 _4 _5 _6 _7 _8 _9 _cursess +syn keyword ctermPreVarRO _lockfile _baud _errno _retval _sernum +syn keyword ctermPreVarRO _timeout _row _col _version +"END PREDEFINED TERM VARIABLES R/O + +syn keyword ctermOperator not mod eq ne gt le lt ge xor and or shr not shl + +"SYMBOLS +syn match CtermSymbols "|" +"syn keyword ctermOperators + - * / % = != > < >= <= & | ^ ! << >> +"END SYMBOLS + +"STATEMENT +syn keyword ctermStatement off +syn keyword ctermStatement disk overwrite append spool none +syn keyword ctermStatement echo view wrap +"END STATEMENT + +"TYPE +"syn keyword ctermType +"END TYPE + +"USERLIB FUNCTIONS +"syn keyword ctermLibFunc +"END USERLIB FUNCTIONS + +"LABEL +syn keyword ctermLabel case default +"END LABEL + +"CONDITIONAL +syn keyword ctermConditional on endon +syn keyword ctermConditional proc endproc +syn keyword ctermConditional for in do endfor +syn keyword ctermConditional if else elseif endif iferror +syn keyword ctermConditional switch endswitch +syn keyword ctermConditional repeat until +"END CONDITIONAL + +"REPEAT +syn keyword ctermRepeat while +"END REPEAT + +" Function arguments (eg $1 $2 $3) +syn match ctermFuncArg "\$[1-9]" + +syn keyword ctermTodo contained TODO + +syn match ctermNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" +"floating point number, with dot, optional exponent +syn match ctermNumber "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, starting with a dot, optional exponent +syn match ctermNumber "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match ctermNumber "\<\d\+e[-+]\=\d\+[fl]\=\>" +"hex number +syn match ctermNumber "0x[0-9a-f]\+\(u\=l\=\|lu\)\>" + +syn match ctermComment "![^=].*$" contains=ctermTodo +syn match ctermComment "!$" +syn match ctermComment "\*.*$" contains=ctermTodo +syn region ctermComment start="comment" end="$" contains=ctermTodo +syn region ctermComment start="remark" end="$" contains=ctermTodo + +syn region ctermVar start="\$(" end=")" + +" String and Character contstants +" Highlight special characters (those which have a backslash) differently +syn match ctermSpecial contained "\\\d\d\d\|\\." +syn match ctermSpecial contained "\^." +syn region ctermString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=ctermSpecial,ctermVar,ctermSymbols +syn match ctermCharacter "'[^\\]'" +syn match ctermSpecialCharacter "'\\.'" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_cterm_syntax_inits") + if version < 508 + let did_cterm_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink ctermStatement Statement + HiLink ctermFunction Statement + HiLink ctermStrFunction Statement + HiLink ctermIntFunction Statement + HiLink ctermLabel Statement + HiLink ctermConditional Statement + HiLink ctermRepeat Statement + HiLink ctermLibFunc UserDefFunc + HiLink ctermType Type + HiLink ctermFuncArg PreCondit + + HiLink ctermPreVarRO PreCondit + HiLink ctermPreVarRW PreConditBold + HiLink ctermVar Type + + HiLink ctermComment Comment + + HiLink ctermCharacter SpecialChar + HiLink ctermSpecial Special + HiLink ctermSpecialCharacter SpecialChar + HiLink ctermSymbols Special + HiLink ctermString String + HiLink ctermTodo Todo + HiLink ctermOperator Statement + HiLink ctermNumber Number + + " redefine the colors + "hi PreConditBold term=bold ctermfg=1 cterm=bold guifg=Purple gui=bold + "hi Special term=bold ctermfg=6 guifg=SlateBlue gui=underline + + delcommand HiLink +endif + +let b:current_syntax = "cterm" + +" vim: ts=8 diff --git a/runtime/syntax/ctrlh.vim b/runtime/syntax/ctrlh.vim new file mode 100644 index 000000000..715c2c00e --- /dev/null +++ b/runtime/syntax/ctrlh.vim @@ -0,0 +1,33 @@ +" Vim syntax file +" Language: CTRL-H (e.g., ASCII manpages) +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last Change: 2001 Apr 25 + +" Existing syntax is kept, this file can be used as an addition + +" Recognize underlined text: _^Hx +syntax match CtrlHUnderline /_\b./ contains=CtrlHHide + +" Recognize bold text: x^Hx +syntax match CtrlHBold /\(.\)\b\1/ contains=CtrlHHide + +" Hide the CTRL-H (backspace) +syntax match CtrlHHide /.\b/ contained + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_ctrlh_syntax_inits") + if version < 508 + let did_ctrlh_syntax_inits = 1 + hi link CtrlHHide Ignore + hi CtrlHUnderline term=underline cterm=underline gui=underline + hi CtrlHBold term=bold cterm=bold gui=bold + else + hi def link CtrlHHide Ignore + hi def CtrlHUnderline term=underline cterm=underline gui=underline + hi def CtrlHBold term=bold cterm=bold gui=bold + endif +endif + +" vim: ts=8 diff --git a/runtime/syntax/cupl.vim b/runtime/syntax/cupl.vim new file mode 100644 index 000000000..9f804c76c --- /dev/null +++ b/runtime/syntax/cupl.vim @@ -0,0 +1,130 @@ +" Vim syntax file +" Language: CUPL +" Maintainer: John Cook <john.cook@kla-tencor.com> +" Last Change: 2001 Apr 25 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" this language is oblivious to case. +syn case ignore + +" A bunch of keywords +syn keyword cuplHeader name partno date revision rev designer company nextgroup=cuplHeaderContents +syn keyword cuplHeader assembly assy location device nextgroup=cuplHeaderContents + +syn keyword cuplTodo contained TODO XXX FIXME + +" cuplHeaderContents uses default highlighting except for numbers +syn match cuplHeaderContents ".\+;"me=e-1 contains=cuplNumber contained + +" String contstants +syn region cuplString start=+'+ end=+'+ +syn region cuplString start=+"+ end=+"+ + +syn keyword cuplStatement append condition +syn keyword cuplStatement default else +syn keyword cuplStatement field fld format function fuse +syn keyword cuplStatement group if jump loc +syn keyword cuplStatement macro min node out +syn keyword cuplStatement pin pinnode present table +syn keyword cuplStatement sequence sequenced sequencejk sequencers sequencet + +syn keyword cuplFunction log2 log8 log16 log + +" Valid integer number formats (decimal, binary, octal, hex) +syn match cuplNumber "\<[-+]\=[0-9]\+\>" +syn match cuplNumber "'d'[0-9]\+\>" +syn match cuplNumber "'b'[01x]\+\>" +syn match cuplNumber "'o'[0-7x]\+\>" +syn match cuplNumber "'h'[0-9a-fx]\+\>" + +" operators +syn match cuplLogicalOperator "[!#&$]" +syn match cuplArithmeticOperator "[-+*/%]" +syn match cuplArithmeticOperator "\*\*" +syn match cuplAssignmentOperator ":\==" +syn match cuplEqualityOperator ":" +syn match cuplTruthTableOperator "=>" + +" Signal extensions +syn match cuplExtension "\.[as][pr]\>" +syn match cuplExtension "\.oe\>" +syn match cuplExtension "\.oemux\>" +syn match cuplExtension "\.[dlsrjk]\>" +syn match cuplExtension "\.ck\>" +syn match cuplExtension "\.dq\>" +syn match cuplExtension "\.ckmux\>" +syn match cuplExtension "\.tec\>" +syn match cuplExtension "\.cnt\>" + +syn match cuplRangeOperator "\.\." contained + +" match ranges like memadr:[0000..1FFF] +" and highlight both the numbers and the .. operator +syn match cuplNumberRange "\<\x\+\.\.\x\+\>" contains=cuplRangeOperator + +" match vectors of type [name3..0] (decimal numbers only) +" but assign them no special highlighting except for the .. operator +syn match cuplBitVector "\<\a\+\d\+\.\.\d\+\>" contains=cuplRangeOperator + +" other special characters +syn match cuplSpecialChar "[\[\](){},;]" + +" directives +" (define these after cuplOperator so $xxx overrides $) +syn match cuplDirective "\$msg" +syn match cuplDirective "\$macro" +syn match cuplDirective "\$mend" +syn match cuplDirective "\$repeat" +syn match cuplDirective "\$repend" +syn match cuplDirective "\$define" +syn match cuplDirective "\$include" + +" multi-line comments +syn region cuplComment start=+/\*+ end=+\*/+ contains=cuplNumber,cuplTodo + +syn sync minlines=1 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_cupl_syn_inits") + if version < 508 + let did_cupl_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default highlighting. + HiLink cuplHeader cuplStatement + HiLink cuplLogicalOperator cuplOperator + HiLink cuplRangeOperator cuplOperator + HiLink cuplArithmeticOperator cuplOperator + HiLink cuplAssignmentOperator cuplOperator + HiLink cuplEqualityOperator cuplOperator + HiLink cuplTruthTableOperator cuplOperator + HiLink cuplOperator cuplStatement + HiLink cuplFunction cuplStatement + HiLink cuplStatement Statement + HiLink cuplNumberRange cuplNumber + HiLink cuplNumber cuplString + HiLink cuplString String + HiLink cuplComment Comment + HiLink cuplExtension cuplSpecial + HiLink cuplSpecialChar cuplSpecial + HiLink cuplSpecial Special + HiLink cuplDirective PreProc + HiLink cuplTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "cupl" +" vim:ts=8 diff --git a/runtime/syntax/cuplsim.vim b/runtime/syntax/cuplsim.vim new file mode 100644 index 000000000..18a30ce25 --- /dev/null +++ b/runtime/syntax/cuplsim.vim @@ -0,0 +1,80 @@ +" Vim syntax file +" Language: CUPL simulation +" Maintainer: John Cook <john.cook@kla-tencor.com> +" Last Change: 2001 Apr 25 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the CUPL syntax to start with +if version < 600 + source <sfile>:p:h/cupl.vim +else + runtime! syntax/cupl.vim + unlet b:current_syntax +endif + +" omit definition-specific stuff +syn clear cuplStatement +syn clear cuplFunction +syn clear cuplLogicalOperator +syn clear cuplArithmeticOperator +syn clear cuplAssignmentOperator +syn clear cuplEqualityOperator +syn clear cuplTruthTableOperator +syn clear cuplExtension + +" simulation order statement +syn match cuplsimOrder "order:" nextgroup=cuplsimOrderSpec skipempty +syn region cuplsimOrderSpec start="." end=";"me=e-1 contains=cuplComment,cuplsimOrderFormat,cuplBitVector,cuplSpecialChar,cuplLogicalOperator,cuplCommaOperator contained + +" simulation base statement +syn match cuplsimBase "base:" nextgroup=cuplsimBaseSpec skipempty +syn region cuplsimBaseSpec start="." end=";"me=e-1 contains=cuplComment,cuplsimBaseType contained +syn keyword cuplsimBaseType octal decimal hex contained + +" simulation vectors statement +syn match cuplsimVectors "vectors:" + +" simulator format control +syn match cuplsimOrderFormat "%\d\+\>" contained + +" simulator control +syn match cuplsimStimulus "[10ckpx]\+" +syn match cuplsimStimulus +'\(\x\|x\)\+'+ +syn match cuplsimOutput "[lhznx*]\+" +syn match cuplsimOutput +"\x\+"+ + +syn sync minlines=1 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_cuplsim_syn_inits") + if version < 508 + let did_cuplsim_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " append to the highlighting links in cupl.vim + " The default highlighting. + HiLink cuplsimOrder cuplStatement + HiLink cuplsimBase cuplStatement + HiLink cuplsimBaseType cuplStatement + HiLink cuplsimVectors cuplStatement + HiLink cuplsimStimulus cuplNumber + HiLink cuplsimOutput cuplNumber + HiLink cuplsimOrderFormat cuplNumber + + delcommand HiLink +endif + +let b:current_syntax = "cuplsim" +" vim:ts=8 diff --git a/runtime/syntax/cvs.vim b/runtime/syntax/cvs.vim new file mode 100644 index 000000000..94b2a809e --- /dev/null +++ b/runtime/syntax/cvs.vim @@ -0,0 +1,43 @@ +" Vim syntax file +" Language: CVS commit file +" Maintainer: Matt Dunford (zoot@zotikos.com) +" URL: http://www.zotikos.com/downloads/cvs.vim +" Last Change: Sat Nov 24 23:25:11 CET 2001 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn region cvsLine start="^CVS: " end="$" contains=cvsFile,cvsCom,cvsFiles,cvsTag +syn match cvsFile contained " \t\(\(\S\+\) \)\+" +syn match cvsTag contained " Tag:" +syn match cvsFiles contained "\(Added\|Modified\|Removed\) Files:" +syn region cvsCom start="Committing in" end="$" contains=cvsDir contained extend keepend +syn match cvsDir contained "\S\+$" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_cvs_syn_inits") + if version < 508 + let did_cvs_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink cvsLine Comment + HiLink cvsDir cvsFile + HiLink cvsFile Constant + HiLink cvsFiles cvsCom + HiLink cvsTag cvsCom + HiLink cvsCom Statement + + delcommand HiLink +endif + +let b:current_syntax = "cvs" diff --git a/runtime/syntax/cvsrc.vim b/runtime/syntax/cvsrc.vim new file mode 100644 index 000000000..d55197950 --- /dev/null +++ b/runtime/syntax/cvsrc.vim @@ -0,0 +1,49 @@ +" Vim syntax file +" Language: CVS RC File +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/syntax/pcp/cvsrc/ +" Latest Revision: 2004-05-06 +" arch-tag: 1910f2a8-66f4-4dde-9d1a-297566934535 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" strings +syn region cvsrcString start=+"+ skip=+\\\\\|\\\\"+ end=+"\|$+ +syn region cvsrcString start=+'+ skip=+\\\\\|\\\\'+ end=+'\|$+ + +" numbers +syn match cvsrcNumber "\<\d\+\>" + +" commands +syn match cvsrcBegin "^" nextgroup=cvsrcCommand skipwhite + +syn region cvsrcCommand contained transparent matchgroup=cvsrcCommand start="add\|admin\|checkout\|commit\|cvs\|diff\|export\|history\|import\|init\|log\|rdiff\|release\|remove\|rtag\|status\|tag\|update" end="$" contains=cvsrcOption,cvsrcString,cvsrcNumber keepend + +" options +syn match cvsrcOption "-\a\+" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_cvsrc_syn_inits") + if version < 508 + let did_cvsrc_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink cvsrcString String + HiLink cvsrcNumber Number + HiLink cvsrcCommand Keyword + HiLink cvsrcOption Identifier + delcommand HiLink +endif + +let b:current_syntax = "cvsrc" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/cweb.vim b/runtime/syntax/cweb.vim new file mode 100644 index 000000000..4062b0a4e --- /dev/null +++ b/runtime/syntax/cweb.vim @@ -0,0 +1,80 @@ +" Vim syntax file +" Language: CWEB +" Maintainer: Andreas Scherer <andreas.scherer@pobox.com> +" Last Change: April 30, 2001 + +" Details of the CWEB language can be found in the article by Donald E. Knuth +" and Silvio Levy, "The CWEB System of Structured Documentation", included as +" file "cwebman.tex" in the standard CWEB distribution, available for +" anonymous ftp at ftp://labrea.stanford.edu/pub/cweb/. + +" TODO: Section names and C/C++ comments should be treated as TeX material. +" TODO: The current version switches syntax highlighting off for section +" TODO: names, and leaves C/C++ comments as such. (On the other hand, +" TODO: switching to TeX mode in C/C++ comments might be colour overkill.) + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" For starters, read the TeX syntax; TeX syntax items are allowed at the top +" level in the CWEB syntax, e.g., in the preamble. In general, a CWEB source +" code can be seen as a normal TeX document with some C/C++ material +" interspersed in certain defined regions. +if version < 600 + source <sfile>:p:h/tex.vim +else + runtime! syntax/tex.vim + unlet b:current_syntax +endif + +" Read the C/C++ syntax too; C/C++ syntax items are treated as such in the +" C/C++ section of a CWEB chunk or in inner C/C++ context in "|...|" groups. +syntax include @webIncludedC <sfile>:p:h/cpp.vim + +" Inner C/C++ context (ICC) should be quite simple as it's comprised of +" material in "|...|"; however the naive definition for this region would +" hickup at the innocious "\|" TeX macro. Note: For the time being we expect +" that an ICC begins either at the start of a line or after some white space. +syntax region webInnerCcontext start="\(^\|[ \t\~`(]\)|" end="|" contains=@webIncludedC,webSectionName,webRestrictedTeX,webIgnoredStuff + +" Genuine C/C++ material. This syntactic region covers both the definition +" part and the C/C++ part of a CWEB section; it is ended by the TeX part of +" the next section. +syntax region webCpart start="@[dfscp<(]" end="@[ \*]" contains=@webIncludedC,webSectionName,webRestrictedTeX,webIgnoredStuff + +" Section names contain C/C++ material only in inner context. +syntax region webSectionName start="@[<(]" end="@>" contains=webInnerCcontext contained + +" The contents of "control texts" is not treated as TeX material, because in +" non-trivial cases this completely clobbers the syntax recognition. Instead, +" we highlight these elements as "strings". +syntax region webRestrictedTeX start="@[\^\.:t=q]" end="@>" oneline + +" Double-@ means single-@, anywhere in the CWEB source. (This allows e-mail +" address <someone@@fsf.org> without going into C/C++ mode.) +syntax match webIgnoredStuff "@@" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_cweb_syntax_inits") + if version < 508 + let did_cweb_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink webRestrictedTeX String + + delcommand HiLink +endif + +let b:current_syntax = "cweb" + +" vim: ts=8 diff --git a/runtime/syntax/cynlib.vim b/runtime/syntax/cynlib.vim new file mode 100644 index 000000000..a9985074d --- /dev/null +++ b/runtime/syntax/cynlib.vim @@ -0,0 +1,91 @@ +" Vim syntax file +" Language: Cynlib(C++) +" Maintainer: Phil Derrick <phild@forteds.com> +" Last change: 2001 Sep 02 +" URL http://www.derrickp.freeserve.co.uk/vim/syntax/cynlib.vim +" +" Language Information +" +" Cynlib is a library of C++ classes to allow hardware +" modelling in C++. Combined with a simulation kernel, +" the compiled and linked executable forms a hardware +" simulation of the described design. +" +" Further information can be found from www.forteds.com + + +" Remove any old syntax stuff hanging around +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + + +" Read the C++ syntax to start with - this includes the C syntax +if version < 600 + source <sfile>:p:h/cpp.vim +else + runtime! syntax/cpp.vim +endif +unlet b:current_syntax + +" Cynlib extensions + +syn keyword cynlibMacro Default CYNSCON +syn keyword cynlibMacro Case CaseX EndCaseX +syn keyword cynlibType CynData CynSignedData CynTime +syn keyword cynlibType In Out InST OutST +syn keyword cynlibType Struct +syn keyword cynlibType Int Uint Const +syn keyword cynlibType Long Ulong +syn keyword cynlibType OneHot +syn keyword cynlibType CynClock Cynclock0 +syn keyword cynlibFunction time configure my_name +syn keyword cynlibFunction CynModule epilog execute_on +syn keyword cynlibFunction my_name +syn keyword cynlibFunction CynBind bind +syn keyword cynlibFunction CynWait CynEvent +syn keyword cynlibFunction CynSetName +syn keyword cynlibFunction CynTick CynRun +syn keyword cynlibFunction CynFinish +syn keyword cynlibFunction Cynprintf CynSimTime +syn keyword cynlibFunction CynVcdFile +syn keyword cynlibFunction CynVcdAdd CynVcdRemove +syn keyword cynlibFunction CynVcdOn CynVcdOff +syn keyword cynlibFunction CynVcdScale +syn keyword cynlibFunction CynBgnName CynEndName +syn keyword cynlibFunction CynClock configure time +syn keyword cynlibFunction CynRedAnd CynRedNand +syn keyword cynlibFunction CynRedOr CynRedNor +syn keyword cynlibFunction CynRedXor CynRedXnor +syn keyword cynlibFunction CynVerify + + +syn match cynlibOperator "<<=" +syn keyword cynlibType In Out InST OutST Int Uint Const Cynclock + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_cynlib_syntax_inits") + if version < 508 + let did_cynlib_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink cynlibOperator Operator + HiLink cynlibMacro Statement + HiLink cynlibFunction Statement + HiLink cynlibppMacro Statement + HiLink cynlibType Type + + delcommand HiLink +endif + +let b:current_syntax = "cynlib" diff --git a/runtime/syntax/cynpp.vim b/runtime/syntax/cynpp.vim new file mode 100644 index 000000000..b984bace3 --- /dev/null +++ b/runtime/syntax/cynpp.vim @@ -0,0 +1,68 @@ +" Vim syntax file +" Language: Cyn++ +" Maintainer: Phil Derrick <phild@forteds.com> +" Last change: 2001 Sep 02 +" +" Language Information +" +" Cynpp (Cyn++) is a macro language to ease coding in Cynlib. +" Cynlib is a library of C++ classes to allow hardware +" modelling in C++. Combined with a simulation kernel, +" the compiled and linked executable forms a hardware +" simulation of the described design. +" +" Cyn++ is designed to be HDL-like. +" +" Further information can be found from www.forteds.com + + + + + +" Remove any old syntax stuff hanging around +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the Cynlib syntax to start with - this includes the C++ syntax +if version < 600 + source <sfile>:p:h/cynlib.vim +else + runtime! syntax/cynlib.vim +endif +unlet b:current_syntax + + + +" Cyn++ extensions + +syn keyword cynppMacro Always EndAlways +syn keyword cynppMacro Module EndModule +syn keyword cynppMacro Initial EndInitial +syn keyword cynppMacro Posedge Negedge Changed +syn keyword cynppMacro At +syn keyword cynppMacro Thread EndThread +syn keyword cynppMacro Instantiate + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_cynpp_syntax_inits") + if version < 508 + let did_cynpp_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink cLabel Label + HiLink cynppMacro Statement + + delcommand HiLink +endif + +let b:current_syntax = "cynpp" diff --git a/runtime/syntax/d.vim b/runtime/syntax/d.vim new file mode 100644 index 000000000..51ecc43ae --- /dev/null +++ b/runtime/syntax/d.vim @@ -0,0 +1,219 @@ +" Vim syntax file for the D programming language (version 0.90). +" +" Language: D +" Maintainer: Jason Mills<jmills@cs.mun.ca> +" URL: +" Last Change: 2004 May 21 +" Version: 0.8 +" +" Options: +" d_comment_strings - set to highlight strings and numbers in comments +" +" d_hl_operator_overload - set to highlight D's specially named functions +" that when overloaded implement unary and binary operators (e.g. cmp). +" +" Todo: +" - Allow user to set sync minlines +" +" - Several keywords (namely, in and out) are both storage class and +" statements, depending on their context. Must use some matching to figure +" out which and highlight appropriately. For now I have made such keywords +" statements. +" +" - Mark contents of the asm statement body as special +" + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" Keyword definitions +" +syn keyword dExternal import module extern +syn keyword dConditional if else switch +syn keyword dBranch goto break continue +syn keyword dRepeat while for do foreach +syn keyword dBoolean true false +syn keyword dConstant null +syn keyword dTypedef alias typedef +syn keyword dStructure template interface class enum struct union +syn keyword dOperator new delete typeof cast align is +syn keyword dOperator this super +if exists("d_hl_operator_overload") + syn keyword dOpOverload opNeg opCom opPostInc opPostDec opAdd opSub opSub_r + syn keyword dOpOverload opMul opDiv opDiv_r opMod opMod_r opAnd opOr opXor + syn keyword dOpOverload opShl opShl_r opShr opShr_r opUShr opUShr_r opCat + syn keyword dOpOverload opCat_r opEquals opEquals opCmp opCmp opCmp opCmp + syn keyword dOpOverload opAddAssign opSubAssign opMulAssign opDivAssign + syn keyword dOpOverload opModAssign opAndAssign opOrAssign opXorAssign + syn keyword dOpOverload opShlAssign opShrAssign opUShrAssign opCatAssign + syn keyword dOpOverload opIndex opCall opSlice +endif +syn keyword dType ushort int uint long ulong float +syn keyword dType void byte ubyte double bit char wchar ucent cent +syn keyword dType short bool dchar +syn keyword dType real ireal ifloat idouble creal cfloat cdouble +syn keyword dDebug deprecated unittest +syn keyword dExceptions throw try catch finally +syn keyword dScopeDecl public protected private export +syn keyword dStatement version debug return with invariant body +syn keyword dStatement in out inout asm mixin +syn keyword dStatement function delegate +syn keyword dStorageClass auto static override final const abstract volatile +syn keyword dStorageClass synchronized +syn keyword dPragma pragma + + +" Assert is a statement and a module name. +syn match dAssert "^assert\>" +syn match dAssert "[^.]\s*\<assert\>"ms=s+1 + +" Marks contents of the asm statment body as special +" +" TODO +"syn match dAsmStatement "\<asm\>" +"syn region dAsmBody start="asm[\n]*\s*{"hs=e+1 end="}"he=e-1 contains=dAsmStatement +" +"hi def link dAsmBody dUnicode +"hi def link dAsmStatement dStatement + +" Labels +" +" We contain dScopeDecl so public: private: etc. are not highlighted like labels +syn match dUserLabel "^\s*[_$a-zA-Z][_$a-zA-Z0-9_]*\s*:"he=e-1 contains=dLabel,dScopeDecl +syn keyword dLabel case default + +" Comments +" +syn keyword dTodo contained TODO FIXME TEMP XXX +syn match dCommentStar contained "^\s*\*[^/]"me=e-1 +syn match dCommentStar contained "^\s*\*$" +syn match dCommentPlus contained "^\s*+[^/]"me=e-1 +syn match dCommentPlus contained "^\s*+$" +if exists("d_comment_strings") + syn region dBlockCommentString contained start=+"+ end=+"+ end=+\*/+me=s-1,he=s-1 contains=dCommentStar,dUnicode,dEscSequence,@Spell + syn region dNestedCommentString contained start=+"+ end=+"+ end="+"me=s-1,he=s-1 contains=dCommentPlus,dUnicode,dEscSequence,@Spell + syn region dLineCommentString contained start=+"+ end=+$\|"+ contains=dUnicode,dEscSequence,@Spell + syn region dBlockComment start="/\*" end="\*/" contains=dBlockCommentString,dTodo,@Spell + syn region dNestedComment start="/+" end="+/" contains=dNestedComment,dNestedCommentString,dTodo,@Spell + syn match dLineComment "//.*" contains=dLineCommentString,dTodo,@Spell +else + syn region dBlockComment start="/\*" end="\*/" contains=dBlockCommentString,dTodo,@Spell + syn region dNestedComment start="/+" end="+/" contains=dNestedComment,dNestedCommentString,dTodo,@Spell + syn match dLineComment "//.*" contains=dLineCommentString,dTodo,@Spell +endif + +hi link dLineCommentString dBlockCommentString +hi link dBlockCommentString dString +hi link dNestedCommentString dString +hi link dCommentStar dBlockComment +hi link dCommentPlus dNestedComment + +syn sync minlines=25 + +" Characters +" +syn match dSpecialCharError contained "[^']" + +" Escape sequences (oct,specal char,hex,wchar). These are not contained +" because they are considered string litterals +syn match dEscSequence "\\\(\o\{1,3}\|[\"\\'\\?ntbrfva]\|u\x\{4}\|U\x\{8}\|x\x\x\)" +syn match dCharacter "'[^']*'" contains=dEscSequence,dSpecialCharError +syn match dCharacter "'\\''" contains=dEscSequence +syn match dCharacter "'[^\\]'" + +" Unicode characters +" +syn match dUnicode "\\u\d\{4\}" + +" String. +" +syn region dString start=+"+ end=+"+ contains=dEscSequence,@Spell +syn region dRawString start=+`+ skip=+\\`+ end=+`+ contains=@Spell +syn region dRawString start=+r"+ skip=+\\"+ end=+"+ contains=@Spell +syn region dHexString start=+x"+ skip=+\\"+ end=+"+ + +" Numbers +" +syn case ignore +syn match dInt display "\<\d[0-9_]*\(u\=l\=\|l\=u\=\)\>" +" Hex number +syn match dHex display "\<0x[0-9a-f_]\+\(u\=l\=\|l\=u\=\)\>" +syn match dHex display "\<\x[0-9a-f_]*h\(u\=l\=\|l\=u\=\)\>" +" Flag the first zero of an octal number as something special +syn match dOctal display "\<0[0-7_]\+\(u\=l\=\|l\=u\=\)\>" contains=cOctalZero +syn match dOctalZero display contained "\<0" + +"floating point without the dot +syn match dFloat display "\<\d[0-9_]*\(fi\=\|l\=i\)\>" +"floating point number, with dot, optional exponent +syn match dFloat display "\<\d[0-9_]*\.[0-9_]*\(e[-+]\=[0-9_]\+\)\=[fl]\=i\=" +"floating point number, starting with a dot, optional exponent +syn match dFloat display "\(\.[0-9_]\+\)\(e[-+]\=[0-9_]\+\)\=[fl]\=i\=\>" +"floating point number, without dot, with exponent +"syn match dFloat display "\<\d\+e[-+]\=\d\+[fl]\=\>" +syn match dFloat display "\<\d[0-9_]*e[-+]\=[0-9_]\+[fl]\=\>" + +"floating point without the dot +syn match dHexFloat display "\<0x\x\+\(fi\=\|l\=i\)\>" +"floating point number, with dot, optional exponent +syn match dHexFloat display "\<0x\x\+\.\x*\(p[-+]\=\x\+\)\=[fl]\=i\=" +"floating point number, without dot, with exponent +syn match dHexFloat display "\<0x\x\+p[-+]\=\x\+[fl]\=\>" + +" binary numbers +syn match dBinary display "\<0b[01_]\+\>" +" flag an octal number with wrong digits +syn match dOctalError display "0\o*[89]\d*" +syn case match + +" Pragma (preprocessor) support +" TODO: Highlight following Integer and optional Filespec. +syn region dPragma start="#\s*\(line\>\)" skip="\\$" end="$" + + +" The default highlighting. +" +hi def link dBinary Number +hi def link dInt Number +hi def link dHex Number +hi def link dOctal Number +hi def link dFloat Float +hi def link dHexFloat Float +hi def link dDebug Debug +hi def link dBranch Conditional +hi def link dConditional Conditional +hi def link dLabel Label +hi def link dUserLabel Label +hi def link dRepeat Repeat +hi def link dExceptions Exception +hi def link dAssert Statement +hi def link dStatement Statement +hi def link dScopeDecl dStorageClass +hi def link dStorageClass StorageClass +hi def link dBoolean Boolean +hi def link dUnicode Special +hi def link dRawString String +hi def link dString String +hi def link dHexString String +hi def link dCharacter Character +hi def link dEscSequence SpecialChar +hi def link dSpecialCharError Error +hi def link dOctalError Error +hi def link dOperator Operator +hi def link dOpOverload Operator +hi def link dConstant Constant +hi def link dTypedef Typedef +hi def link dStructure Structure +hi def link dTodo Todo +hi def link dType Type +hi def link dLineComment Comment +hi def link dBlockComment Comment +hi def link dNestedComment Comment +hi def link dExternal Include +hi def link dPragma PreProc + +let b:current_syntax = "d" + +" vim: ts=8 diff --git a/runtime/syntax/dcd.vim b/runtime/syntax/dcd.vim new file mode 100644 index 000000000..a566745fb --- /dev/null +++ b/runtime/syntax/dcd.vim @@ -0,0 +1,64 @@ +" Vim syntax file +" Language: WildPackets EtherPeek Decoder (.dcd) file +" Maintainer: Christopher Shinn <christopher@lucent.com> +" Last Change: 2003 Apr 25 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Keywords +syn keyword dcdFunction DCod TRTS TNXT CRLF +syn match dcdFunction display "\(STR\)\#" +syn keyword dcdLabel LABL +syn region dcdLabel start="[A-Z]" end=";" +syn keyword dcdConditional CEQU CNEQ CGTE CLTE CBIT CLSE +syn keyword dcdConditional LSTS LSTE LSTZ +syn keyword dcdConditional TYPE TTST TEQU TNEQ TGTE TLTE TBIT TLSE TSUB SKIP +syn keyword dcdConditional MARK WHOA +syn keyword dcdConditional SEQU SNEQ SGTE SLTE SBIT +syn match dcdConditional display "\(CST\)\#" "\(TST\)\#" +syn keyword dcdDisplay HBIT DBIT BBIT +syn keyword dcdDisplay HBYT DBYT BBYT +syn keyword dcdDisplay HWRD DWRD BWRD +syn keyword dcdDisplay HLNG DLNG BLNG +syn keyword dcdDisplay D64B +syn match dcdDisplay display "\(HEX\)\#" "\(CHR\)\#" "\(EBC\)\#" +syn keyword dcdDisplay HGLB DGLB BGLB +syn keyword dcdDisplay DUMP +syn keyword dcdStatement IPLG IPV6 ATLG AT03 AT01 ETHR TRNG PRTO PORT +syn keyword dcdStatement TIME OSTP PSTR CSTR NBNM DMPE FTPL CKSM FCSC +syn keyword dcdStatement GBIT GBYT GWRD GLNG +syn keyword dcdStatement MOVE ANDG ORRG NOTG ADDG SUBG MULG DIVG MODG INCR DECR +syn keyword dcdSpecial PRV1 PRV2 PRV3 PRV4 PRV5 PRV6 PRV7 PRV8 + +" Comment +syn region dcdComment start="\*" end="\;" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_dcd_syntax_inits") + if version < 508 + let did_dcd_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink dcdFunction Identifier + HiLink dcdLabel Constant + HiLink dcdConditional Conditional + HiLink dcdDisplay Type + HiLink dcdStatement Statement + HiLink dcdSpecial Special + HiLink dcdComment Comment + + delcommand HiLink +endif + +let b:current_syntax = "dcd" diff --git a/runtime/syntax/dcl.vim b/runtime/syntax/dcl.vim new file mode 100644 index 000000000..0d67a712c --- /dev/null +++ b/runtime/syntax/dcl.vim @@ -0,0 +1,164 @@ +" Vim syntax file +" Language: DCL (Digital Command Language - vms) +" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> +" Last Change: Sep 02, 2003 +" Version: 3 +" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if version < 600 + set iskeyword=$,@,48-57,_ +else + setlocal iskeyword=$,@,48-57,_ +endif + +syn case ignore +syn keyword dclInstr accounting del[ete] gen[cat] mou[nt] run +syn keyword dclInstr all[ocate] dep[osit] gen[eral] ncp run[off] +syn keyword dclInstr ana[lyze] dia[gnose] gos[ub] ncs sca +syn keyword dclInstr app[end] dif[ferences] got[o] on sea[rch] +syn keyword dclInstr ass[ign] dir[ectory] hel[p] ope[n] set +syn keyword dclInstr att[ach] dis[able] ico[nv] pas[cal] sho[w] +syn keyword dclInstr aut[horize] dis[connect] if pas[sword] sor[t] +syn keyword dclInstr aut[ogen] dis[mount] ini[tialize] pat[ch] spa[wn] +syn keyword dclInstr bac[kup] dpm[l] inq[uire] pca sta[rt] +syn keyword dclInstr cal[l] dqs ins[tall] pho[ne] sto[p] +syn keyword dclInstr can[cel] dsr job pri[nt] sub[mit] +syn keyword dclInstr cc dst[graph] lat[cp] pro[duct] sub[routine] +syn keyword dclInstr clo[se] dtm lib[rary] psw[rap] swx[cr] +syn keyword dclInstr cms dum[p] lic[ense] pur[ge] syn[chronize] +syn keyword dclInstr con[nect] edi[t] lin[k] qde[lete] sys[gen] +syn keyword dclInstr con[tinue] ena[ble] lmc[p] qse[t] sys[man] +syn keyword dclInstr con[vert] end[subroutine] loc[ale] qsh[ow] tff +syn keyword dclInstr cop[y] eod log[in] rea[d] then +syn keyword dclInstr cre[ate] eoj log[out] rec[all] typ[e] +syn keyword dclInstr cxx exa[mine] lse[dit] rec[over] uil +syn keyword dclInstr cxx[l_help] exc[hange] mac[ro] ren[ame] unl[ock] +syn keyword dclInstr dea[llocate] exi[t] mai[l] rep[ly] ves[t] +syn keyword dclInstr dea[ssign] fdl mer[ge] req[uest] vie[w] +syn keyword dclInstr deb[ug] flo[wgraph] mes[sage] ret[urn] wai[t] +syn keyword dclInstr dec[k] fon[t] mms rms wri[te] +syn keyword dclInstr def[ine] for[tran] + +syn keyword dclLexical f$context f$edit f$getjpi f$message f$setprv +syn keyword dclLexical f$csid f$element f$getqui f$mode f$string +syn keyword dclLexical f$cvsi f$environment f$getsyi f$parse f$time +syn keyword dclLexical f$cvtime f$extract f$identifier f$pid f$trnlnm +syn keyword dclLexical f$cvui f$fao f$integer f$privilege f$type +syn keyword dclLexical f$device f$file_attributes f$length f$process f$user +syn keyword dclLexical f$directory f$getdvi f$locate f$search f$verify + +syn match dclMdfy "/\I\i*" nextgroup=dclMdfySet,dclMdfySetString +syn match dclMdfySet "=[^ \t"]*" contained +syn region dclMdfySet matchgroup=dclMdfyBrkt start="=\[" matchgroup=dclMdfyBrkt end="]" contains=dclMdfySep +syn region dclMdfySetString start='="' skip='""' end='"' contained +syn match dclMdfySep "[:,]" contained + +" Numbers +syn match dclNumber "\d\+" + +" Varname (mainly to prevent dclNumbers from being recognized when part of a dclVarname) +syn match dclVarname "\I\i*" + +" Filenames (devices, paths) +syn match dclDevice "\I\i*\(\$\I\i*\)\=:[^=]"me=e-1 nextgroup=dclDirPath,dclFilename +syn match dclDirPath "\[\(\I\i*\.\)*\I\i*\]" contains=dclDirSep nextgroup=dclFilename +syn match dclFilename "\I\i*\$\(\I\i*\)\=\.\(\I\i*\)*\(;\d\+\)\=" contains=dclDirSep +syn match dclFilename "\I\i*\.\(\I\i*\)\=\(;\d\+\)\=" contains=dclDirSep contained +syn match dclDirSep "[[\].;]" + +" Strings +syn region dclString start='"' skip='""' end='"' + +" $ stuff and comments +syn cluster dclCommentGroup contains=dclStart,dclTodo,@Spell +syn match dclStart "^\$" skipwhite nextgroup=dclExe +syn match dclContinue "-$" +syn match dclComment "^\$!.*$" contains=@dclCommentGroup +syn match dclExe "\I\i*" contained +syn match dclTodo "DEBUG\|TODO" contained + +" Assignments and Operators +syn match dclAssign ":==\=" +syn match dclAssign "=" +syn match dclOper "--\|+\|\*\|/" +syn match dclLogOper "\.[a-zA-Z][a-zA-Z][a-zA-Z]\=\." contains=dclLogical,dclLogSep +syn keyword dclLogical contained and ge gts lt nes +syn keyword dclLogical contained eq ges le lts not +syn keyword dclLogical contained eqs gt les ne or +syn match dclLogSep "\." contained + +" @command procedures +syn match dclCmdProcStart "@" nextgroup=dclCmdProc +syn match dclCmdProc "\I\i*\(\.\I\i*\)\=" contained +syn match dclCmdProc "\I\i*:" contained nextgroup=dclCmdDirPath,dclCmdProc +syn match dclCmdDirPath "\[\(\I\i*\.\)*\I\i*\]" contained nextgroup=delCmdProc + +" labels +syn match dclGotoLabel "^\$\s*\I\i*:\s*$" contains=dclStart + +" parameters +syn match dclParam "'\I[a-zA-Z0-9_$]*'\=" + +" () matching (the clusters are commented out until a vim/vms comes out for v5.2+) +"syn cluster dclNextGroups contains=dclCmdDirPath,dclCmdProc,dclCmdProc,dclDirPath,dclFilename,dclFilename,dclMdfySet,dclMdfySetString,delCmdProc,dclExe,dclTodo +"syn region dclFuncList matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALLBUT,@dclNextGroups +syn region dclFuncList matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALLBUT,dclCmdDirPath,dclCmdProc,dclCmdProc,dclDirPath,dclFilename,dclFilename,dclMdfySet,dclMdfySetString,delCmdProc,dclExe,dclTodo +syn match dclError ")" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_dcl_syntax_inits") + if version < 508 + let did_dcl_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink dclLogOper dclError + HiLink dclLogical dclOper + HiLink dclLogSep dclSep + + HiLink dclAssign Operator + HiLink dclCmdProc Special + HiLink dclCmdProcStart Operator + HiLink dclComment Comment + HiLink dclContinue Statement + HiLink dclDevice Identifier + HiLink dclDirPath Identifier + HiLink dclDirPath Identifier + HiLink dclDirSep Delimiter + HiLink dclError Error + HiLink dclExe Statement + HiLink dclFilename NONE + HiLink dclGotoLabel Label + HiLink dclInstr Statement + HiLink dclLexical Function + HiLink dclMdfy Type + HiLink dclMdfyBrkt Delimiter + HiLink dclMdfySep Delimiter + HiLink dclMdfySet Type + HiLink dclMdfySetString String + HiLink dclNumber Number + HiLink dclOper Operator + HiLink dclParam Special + HiLink dclSep Delimiter + HiLink dclStart Delimiter + HiLink dclString String + HiLink dclTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "dcl" + +" vim: ts=16 diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim new file mode 100644 index 000000000..577b48d3e --- /dev/null +++ b/runtime/syntax/debchangelog.vim @@ -0,0 +1,54 @@ +" Vim syntax file +" Language: Debian changelog files +" Maintainer: Wichert Akkerman <wakkerma@debian.org> +" Last Change: 30 April 2001 + +" Standard syntax initialization +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Case doesn't matter for us +syn case ignore + +" Define some common expressions we can use later on +syn match debchangelogName contained "^[[:alpha:]][[:alnum:].+-]\+ " +syn match debchangelogUrgency contained "; urgency=\(low\|medium\|high\|critical\)" +syn match debchangelogTarget contained "\( stable\| frozen\| unstable\| experimental\)\+" +syn match debchangelogVersion contained "(.\{-})" +syn match debchangelogCloses contained "closes:\s*\(bug\)\=#\s\=\d\+\(,\s*\(bug\)\=#\s\=\d\+\)*" +syn match debchangelogEmail contained "[_=[:alnum:].+-]\+@[[:alnum:]./\-]\+" +syn match debchangelogEmail contained "<.\{-}>" + +" Define the entries that make up the changelog +syn region debchangelogHeader start="^[^ ]" end="$" contains=debchangelogName,debchangelogUrgency,debchangelogTarget,debchangelogVersion oneline +syn region debchangelogFooter start="^ [^ ]" end="$" contains=debchangelogEmail oneline +syn region debchangelogEntry start="^ " end="$" contains=debchangelogCloses oneline + +" Associate our matches and regions with pretty colours +if version >= 508 || !exists("did_debchangelog_syn_inits") + if version < 508 + let did_debchangelog_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink debchangelogHeader Error + HiLink debchangelogFooter Identifier + HiLink debchangelogEntry Normal + HiLink debchangelogCloses Statement + HiLink debchangelogUrgency Identifier + HiLink debchangelogName Comment + HiLink debchangelogVersion Identifier + HiLink debchangelogTarget Identifier + HiLink debchangelogEmail Special + + delcommand HiLink +endif + +let b:current_syntax = "debchangelog" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim new file mode 100644 index 000000000..d580fdb93 --- /dev/null +++ b/runtime/syntax/debcontrol.vim @@ -0,0 +1,70 @@ +" Vim syntax file +" Language: Debian control files +" Maintainer: Wichert Akkerman <wakkerma@debian.org> +" Last Change: October 28, 2001 + +" Standard syntax initialization +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Everything that is not explicitly matched by the rules below +syn match debcontrolElse "^.*$" + +" Common seperators +syn match debControlComma ", *" +syn match debControlSpace " " + +" Define some common expressions we can use later on +syn match debcontrolArchitecture contained "\(all\|any\|alpha\|arm\|hppa\|ia64\|i386\|m68k\|mipsel\|mips\|powerpc\|sh\|sheb\|sparc\|hurd-i386\)" +syn match debcontrolName contained "[a-z][a-z0-9+-]*" +syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)" +syn match debcontrolSection contained "\(\(contrib\|non-free\|non-US/main\|non-US/contrib\|non-US/non-free\)/\)\=\(admin\|base\|comm\|devel\|doc\|editors\|electronics\|games\|graphics\|hamradio\|interpreters\|libs\|mail\|math\|misc\|net\|news\|oldlibs\|otherosfs\|science\|shells\|sound\|text\|tex\|utils\|web\|x11\|debian-installer\)" +syn match debcontrolVariable contained "\${.\{-}}" + +" An email address +syn match debcontrolEmail "[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+" +syn match debcontrolEmail "<.\{-}>" + +" List of all legal keys +syn match debcontrolKey contained "^\(Source\|Package\|Section\|Priority\|Maintainer\|Uploaders\|Build-Depends\|Build-Conflicts\|Build-Depends-Indep\|Build-Conflicts-Indep\|Standards-Version\|Pre-Depends\|Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Essential\|Architecture\|Description\|Bugs\|Origin\): *" + +" Fields for which we do strict syntax checking +syn region debcontrolStrictField start="^Architecture" end="$" contains=debcontrolKey,debcontrolArchitecture,debcontrolSpace oneline +syn region debcontrolStrictField start="^\(Package\|Source\)" end="$" contains=debcontrolKey,debcontrolName oneline +syn region debcontrolStrictField start="^Priority" end="$" contains=debcontrolKey,debcontrolPriority oneline +syn region debcontrolStrictField start="^Section" end="$" contains=debcontrolKey,debcontrolSection oneline + +" Catch-all for the other legal fields +syn region debcontrolField start="^\(Maintainer\|Build-Depends\|Build-Conflicts\|Build-Depends-Indep\|Build-Conflicts-Indep\|Standards-Version\|Pre-Depends\|Depends\|Recommends\|Suggests\|Provides\|Replaces\|Conflicts\|Essential\|Bugs\|Origin\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline +syn region debcontrolMultiField start="^\(Uploaders\|Description\):" skip="^ " end="^$"me=s-1 end="^[^ ]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable + +" Associate our matches and regions with pretty colours +if version >= 508 || !exists("did_debcontrol_syn_inits") + if version < 508 + let did_debcontrol_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink debcontrolKey Keyword + HiLink debcontrolField Normal + HiLink debcontrolStrictField Error + HiLink debcontrolMultiField Normal + HiLink debcontrolArchitecture Normal + HiLink debcontrolName Normal + HiLink debcontrolPriority Normal + HiLink debcontrolSection Normal + HiLink debcontrolVariable Identifier + HiLink debcontrolEmail Identifier + HiLink debcontrolElse Special + + delcommand HiLink +endif + +let b:current_syntax = "debcontrol" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/def.vim b/runtime/syntax/def.vim new file mode 100644 index 000000000..a360022b2 --- /dev/null +++ b/runtime/syntax/def.vim @@ -0,0 +1,57 @@ +" Vim syntax file +" Language: Microsoft Module-Definition (.def) File +" Maintainer: Rob Brady <robb@datatone.com> +" Last Change: $Date$ +" URL: http://www.datatone.com/~robb/vim/syntax/def.vim +" $Revision$ + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +syn match defComment ";.*" + +syn keyword defKeyword LIBRARY STUB EXETYPE DESCRIPTION CODE WINDOWS DOS +syn keyword defKeyword RESIDENTNAME PRIVATE EXPORTS IMPORTS SEGMENTS +syn keyword defKeyword HEAPSIZE DATA +syn keyword defStorage LOADONCALL MOVEABLE DISCARDABLE SINGLE +syn keyword defStorage FIXED PRELOAD + +syn match defOrdinal "@\d\+" + +syn region defString start=+'+ end=+'+ + +syn match defNumber "\d+" +syn match defNumber "0x\x\+" + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_def_syntax_inits") + if version < 508 + let did_def_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink defComment Comment + HiLink defKeyword Keyword + HiLink defStorage StorageClass + HiLink defString String + HiLink defNumber Number + HiLink defOrdinal Operator + + delcommand HiLink +endif + +let b:current_syntax = "def" + +" vim: ts=8 diff --git a/runtime/syntax/desc.vim b/runtime/syntax/desc.vim new file mode 100644 index 000000000..0d0dbbda4 --- /dev/null +++ b/runtime/syntax/desc.vim @@ -0,0 +1,100 @@ +" Vim syntax file +" Language: ROCKLinux .desc +" Maintainer: Piotr Esden-Tempski <esden@rocklinux.org> +" Last Change: 2002 Apr 23 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" syntax definitions + +setl iskeyword+=- +syn keyword descFlag DIETLIBC contained +syn keyword descLicense Unknown GPL LGPL FDL MIT BSD OpenSource Free-to-use Commercial contained + +" tags +syn match descTag /^\[\(I\|TITLE\)\]/ +syn match descTag /^\[\(T\|TEXT\)\]/ contained +syn match descTag /^\[\(U\|URL\)\]/ +syn match descTag /^\[\(A\|AUTHOR\)\]/ +syn match descTag /^\[\(M\|MAINTAINER\)\]/ +syn match descTag /^\[\(C\|CATEGORY\)\]/ contained +syn match descTag /^\[\(F\|FLAG\)\]/ contained +syn match descTag /^\[\(E\|DEP\|DEPENDENCY\)\]/ +syn match descTag /^\[\(R\|ARCH\|ARCHITECTURE\)\]/ +syn match descTag /^\[\(L\|LICENSE\)\]/ contained +syn match descTag /^\[\(S\|STATUS\)\]/ +syn match descTag /^\[\(V\|VER\|VERSION\)\]/ +syn match descTag /^\[\(P\|PRI\|PRIORITY\)\]/ nextgroup=descInstall skipwhite +syn match descTag /^\[\(D\|DOWN\|DOWNLOAD\)\]/ nextgroup=descSum skipwhite + +" misc +syn match descUrl /\w\+:\/\/\S\+/ +syn match descCategory /\w\+\/\w\+/ contained +syn match descEmail /<\w\+@[\.A-Za-z0-9]\+>/ + +" priority tag +syn match descInstallX /X/ contained +syn match descInstallO /O/ contained +syn match descInstall /[OX]/ contained contains=descInstallX,descInstallO nextgroup=descStage skipwhite +syn match descDash /-/ contained +syn match descDigit /\d/ contained +syn match descStage /[\-0][\-1][\-2][\-3][\-4][\-5][\-6][\-7][\-8][\-9]/ contained contains=descDash,descDigit nextgroup=descCompilePriority skipwhite +syn match descCompilePriority /\d\{3}\.\d\{3}/ contained + +" download tag +syn match descSum /\d\+/ contained nextgroup=descTarball skipwhite +syn match descTarball /\S\+/ contained nextgroup=descUrl skipwhite + + +" tag regions +syn region descText start=/^\[\(T\|TEXT\)\]/ end=/$/ contains=descTag,descUrl,descEmail + +syn region descTagRegion start=/^\[\(C\|CATEGORY\)\]/ end=/$/ contains=descTag,descCategory + +syn region descTagRegion start=/^\[\(F\|FLAG\)\]/ end=/$/ contains=descTag,descFlag + +syn region descTagRegion start=/^\[\(L\|LICENSE\)\]/ end=/$/ contains=descTag,descLicense + +" For version 5.7 and earlier: only when not done already +" Define the default highlighting. +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_desc_syntax_inits") + if version < 508 + let did_desc_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink descFlag Identifier + HiLink descLicense Identifier + HiLink descCategory Identifier + + HiLink descTag Type + HiLink descUrl Underlined + HiLink descEmail Underlined + + " priority tag colors + HiLink descInstallX Boolean + HiLink descInstallO Type + HiLink descDash Operator + HiLink descDigit Number + HiLink descCompilePriority Number + + " download tag colors + HiLink descSum Number + HiLink descTarball Underlined + + " tag region colors + HiLink descText Comment + + delcommand HiLink +endif + +let b:current_syntax = "desc" diff --git a/runtime/syntax/desktop.vim b/runtime/syntax/desktop.vim new file mode 100644 index 000000000..5b71e5119 --- /dev/null +++ b/runtime/syntax/desktop.vim @@ -0,0 +1,119 @@ +" Vim syntax file +" Language: .desktop, .directory files +" according to freedesktop.org specification 0.9.4 +" http://pdx.freedesktop.org/Standards/desktop-entry-spec/desktop-entry-spec-0.9.4.html +" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) +" Last Change: 2004 May 16 +" Version Info: desktop.vim 0.9.4-1.2 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" This syntax file can be used to all *nix configuration files similar to dos +" ini format (eg. .xawtv, .radio, kde rc files) - this is default mode. But +" you can also enforce strict following of freedesktop.org standard for +" .desktop and .directory files . Set (eg. in vimrc) +" let enforce_freedesktop_standard = 1 +" and nonstandard extensions not following X- notation will not be highlighted. +if exists("enforce_freedesktop_standard") + let b:enforce_freedesktop_standard = 1 +else + let b:enforce_freedesktop_standard = 0 +endif + +" case on +syn case match + +" General +if b:enforce_freedesktop_standard == 0 + syn match dtNotStLabel "^.\{-}=\@=" nextgroup=dtDelim +endif + +syn match dtGroup /^\s*\[.*\]/ +syn match dtComment /^\s*#.*$/ +syn match dtDelim /=/ contained + +" Locale +syn match dtLocale /^\s*\<\(Name\|GenericName\|Comment\|SwallowTitle\|Icon\|UnmountIcon\)\>.*/ contains=dtLocaleKey,dtLocaleName,dtDelim transparent +syn keyword dtLocaleKey Name GenericName Comment SwallowTitle Icon UnmountIcon nextgroup=dtLocaleName containedin=dtLocale +syn match dtLocaleName /\(\[.\{-}\]\s*=\@=\|\)/ nextgroup=dtDelim containedin=dtLocale contained + +" Numeric +syn match dtNumeric /^\s*\<Version\>/ contains=dtNumericKey,dtDelim +syn keyword dtNumericKey Version nextgroup=dtDelim containedin=dtNumeric contained + +" Boolean +syn match dtBoolean /^\s*\<\(StartupNotify\|ReadOnly\|Terminal\|Hidden\|NoDisplay\)\>.*/ contains=dtBooleanKey,dtDelim,dtBooleanValue transparent +syn keyword dtBooleanKey StartupNotify ReadOnly Terminal Hidden NoDisplay nextgroup=dtDelim containedin=dtBoolean contained +syn keyword dtBooleanValue true false containedin=dtBoolean contained + +" String +syn match dtString /^\s*\<\(Encoding\|Icon\|Path\|Actions\|FSType\|MountPoint\|UnmountIcon\|URL\|Categories\|OnlyShowIn\|NotShowIn\|StartupWMClass\|FilePattern\|MimeType\)\>.*/ contains=dtStringKey,dtDelim transparent +syn keyword dtStringKey Type Encoding TryExec Exec Path Actions FSType MountPoint URL Categories OnlyShowIn NotShowIn StartupWMClass FilePattern MimeType nextgroup=dtDelim containedin=dtString contained + +" Exec +syn match dtExec /^\s*\<\(Exec\|TryExec\|SwallowExec\)\>.*/ contains=dtExecKey,dtDelim,dtExecParam transparent +syn keyword dtExecKey Exec TryExec SwallowExec nextgroup=dtDelim containedin=dtExec contained +syn match dtExecParam /%[fFuUnNdDickv]/ containedin=dtExec contained + +" Type +syn match dtType /^\s*\<Type\>.*/ contains=dtTypeKey,dtDelim,dtTypeValue transparent +syn keyword dtTypeKey Type nextgroup=dtDelim containedin=dtType contained +syn keyword dtTypeValue Application Link FSDevice Directory containedin=dtType contained + +" X-Addition +syn match dtXAdd /^\s*X-.*/ contains=dtXAddKey,dtDelim transparent +syn match dtXAddKey /^\s*X-.\{-}\s*=\@=/ nextgroup=dtDelim containedin=dtXAdd contains=dtXLocale contained + +" Locale for X-Addition +syn match dtXLocale /\[.\{-}\]\s*=\@=/ containedin=dtXAddKey contained + +" Locale for all +syn match dtALocale /\[.\{-}\]\s*=\@=/ containedin=ALL + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_desktop_syntax_inits") + if version < 508 + let did_dosini_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink dtGroup Special + HiLink dtComment Comment + HiLink dtDelim String + + HiLink dtLocaleKey Type + HiLink dtLocaleName Identifier + HiLink dtXLocale Identifier + HiLink dtALocale Identifier + + HiLink dtNumericKey Type + + HiLink dtBooleanKey Type + HiLink dtBooleanValue Constant + + HiLink dtStringKey Type + + HiLink dtExecKey Type + HiLink dtExecParam Special + HiLink dtTypeKey Type + HiLink dtTypeValue Constant + HiLink dtNotStLabel Type + HiLink dtXAddKey Type + + delcommand HiLink +endif + +let b:current_syntax = "desktop" + +" vim:ts=8 diff --git a/runtime/syntax/diff.vim b/runtime/syntax/diff.vim new file mode 100644 index 000000000..2461abebb --- /dev/null +++ b/runtime/syntax/diff.vim @@ -0,0 +1,78 @@ +" Vim syntax file +" Language: Diff (context or unified) +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last Change: 2003 Apr 02 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match diffOnly "^Only in .*" +syn match diffIdentical "^Files .* and .* are identical$" +syn match diffDiffer "^Files .* and .* differ$" +syn match diffBDiffer "^Binary files .* and .* differ$" +syn match diffIsA "^File .* is a .* while file .* is a .*" +syn match diffNoEOL "^No newline at end of file .*" +syn match diffCommon "^Common subdirectories: .*" + +syn match diffRemoved "^-.*" +syn match diffRemoved "^<.*" +syn match diffAdded "^+.*" +syn match diffAdded "^>.*" +syn match diffChanged "^! .*" + +syn match diffSubname " @@..*"ms=s+3 contained +syn match diffLine "^@.*" contains=diffSubname +syn match diffLine "^\<\d\+\>.*" +syn match diffLine "^\*\*\*\*.*" + +"Some versions of diff have lines like "#c#" and "#d#" (where # is a number) +syn match diffLine "^\d\+\(,\d\+\)\=[cda]\d\+\>.*" + +syn match diffFile "^diff.*" +syn match diffFile "^+++ .*" +syn match diffFile "^Index: .*$" +syn match diffFile "^==== .*$" +syn match diffOldFile "^\*\*\* .*" +syn match diffNewFile "^--- .*" + +syn match diffComment "^#.*" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_diff_syntax_inits") + if version < 508 + let did_diff_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink diffOldFile diffFile + HiLink diffNewFile diffFile + HiLink diffFile Type + HiLink diffOnly Constant + HiLink diffIdentical Constant + HiLink diffDiffer Constant + HiLink diffBDiffer Constant + HiLink diffIsA Constant + HiLink diffNoEOL Constant + HiLink diffCommon Constant + HiLink diffRemoved Special + HiLink diffChanged PreProc + HiLink diffAdded Identifier + HiLink diffLine Statement + HiLink diffSubname PreProc + HiLink diffComment Comment + + delcommand HiLink +endif + +let b:current_syntax = "diff" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/dircolors.vim b/runtime/syntax/dircolors.vim new file mode 100644 index 000000000..ade52fc6f --- /dev/null +++ b/runtime/syntax/dircolors.vim @@ -0,0 +1,106 @@ +" Vim syntax file +" Language: dircolors(1) input file +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/dircolors/ +" Latest Revision: 2004-05-22 +" arch-tag: 995e2983-2a7a-4f1e-b00d-3fdf8e076b40 +" Color definition coloring implemented my Mikolaj Machowski <mikmach@wp.pl> + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" todo +syn keyword dircolorsTodo contained FIXME TODO XXX NOTE + +" comments +syn region dircolorsComment start="#" end="$" contains=dircolorsTodo + +" numbers +syn match dircolorsNumber "\<\d\+\>" + +" keywords +syn keyword dircolorsKeyword TERM NORMAL NORM FILE DIR LNK LINK SYMLINK +syn keyword dircolorsKeyword ORPHAN MISSING FIFO PIPE SOCK BLK BLOCK CHR +syn keyword dircolorsKeyword CHAR DOOR EXEC LEFT LEFTCODE RIGHT RIGHTCODE +syn keyword dircolorsKeyword END ENDCODE +if exists("dircolors_is_slackware") + syn keyword dircolorsKeyword COLOR OPTIONS EIGHTBIT +endif + +" extensions +syn match dircolorsExtension "^\s*\zs[.*]\S\+" + +" colors +syn match dircolors01 "\<01\>" +syn match dircolors04 "\<04\>" +syn match dircolors05 "\<05\>" +syn match dircolors07 "\<07\>" +syn match dircolors08 "\<08\>" +syn match dircolors30 "\<30\>" +syn match dircolors31 "\<31\>" +syn match dircolors32 "\<32\>" +syn match dircolors33 "\<33\>" +syn match dircolors34 "\<34\>" +syn match dircolors35 "\<35\>" +syn match dircolors36 "\<36\>" +syn match dircolors37 "\<37\>" +syn match dircolors40 "\<40\>" +syn match dircolors41 "\<41\>" +syn match dircolors42 "\<42\>" +syn match dircolors43 "\<43\>" +syn match dircolors44 "\<44\>" +syn match dircolors45 "\<45\>" +syn match dircolors46 "\<46\>" +syn match dircolors47 "\<47\>" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_dircolors_syn_inits") + if version < 508 + let did_dircolors_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + command -nargs=+ HiDef hi <args> + else + command -nargs=+ HiLink hi def link <args> + command -nargs=+ HiDef hi def <args> + endif + + HiLink dircolorsTodo Todo + HiLink dircolorsComment Comment + HiLink dircolorsNumber Number + HiLink dircolorsKeyword Keyword + HiLink dircolorsExtension Keyword + + HiDef dircolors01 term=bold cterm=bold gui=bold + HiDef dircolors04 term=underline cterm=underline gui=underline + " HiDef dircolors05 + HiDef dircolors07 term=reverse cterm=reverse gui=reverse + HiLink dircolors08 Ignore + HiDef dircolors30 ctermfg=Black guifg=Black + HiDef dircolors31 ctermfg=Red guifg=Red + HiDef dircolors32 ctermfg=Green guifg=Green + HiDef dircolors33 ctermfg=Yellow guifg=Yellow + HiDef dircolors34 ctermfg=Blue guifg=Blue + HiDef dircolors35 ctermfg=Magenta guifg=Magenta + HiDef dircolors36 ctermfg=Cyan guifg=Cyan + HiDef dircolors37 ctermfg=White guifg=White + HiDef dircolors40 ctermbg=Black ctermfg=White guibg=Black guifg=White + HiDef dircolors41 ctermbg=DarkRed guibg=DarkRed + HiDef dircolors42 ctermbg=DarkGreen guibg=DarkGreen + HiDef dircolors43 ctermbg=DarkYellow guibg=DarkYellow + HiDef dircolors44 ctermbg=DarkBlue guibg=DarkBlue + HiDef dircolors45 ctermbg=DarkMagenta guibg=DarkMagenta + HiDef dircolors46 ctermbg=DarkCyan guibg=DarkCyan + HiDef dircolors47 ctermbg=White ctermfg=Black guibg=White guifg=Black + + delcommand HiLink + delcommand HiDef +endif + +let b:current_syntax = "dircolors" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/diva.vim b/runtime/syntax/diva.vim new file mode 100644 index 000000000..78668fd85 --- /dev/null +++ b/runtime/syntax/diva.vim @@ -0,0 +1,110 @@ +" Vim syntax file +" Language: SKILL for Diva +" Maintainer: Toby Schaffer <jtschaff@eos.ncsu.edu> +" Last Change: 2001 May 09 +" Comments: SKILL is a Lisp-like programming language for use in EDA +" tools from Cadence Design Systems. It allows you to have +" a programming environment within the Cadence environment +" that gives you access to the complete tool set and design +" database. These items are for Diva verification rules decks. + +" Don't remove any old syntax stuff hanging around! We need stuff +" from skill.vim. +if !exists("did_skill_syntax_inits") + if version < 600 + so <sfile>:p:h/skill.vim + else + runtime! syntax/skill.vim + endif +endif + +syn keyword divaDRCKeywords area enc notch ovlp sep width +syn keyword divaDRCKeywords app diffNet length lengtha lengthb +syn keyword divaDRCKeywords notParallel only_perp opposite parallel +syn keyword divaDRCKeywords sameNet shielded with_perp +syn keyword divaDRCKeywords edge edgea edgeb fig figa figb +syn keyword divaDRCKeywords normalGrow squareGrow message raw +syn keyword divaMeasKeywords perimeter length bends_all bends_full +syn keyword divaMeasKeywords bends_part corners_all corners_full +syn keyword divaMeasKeywords corners_part angles_all angles_full +syn keyword divaMeasKeywords angles_part fig_count butting coincident +syn keyword divaMeasKeywords over not_over outside inside enclosing +syn keyword divaMeasKeywords figure one_net two_net three_net grounded +syn keyword divaMeasKeywords polarized limit keep ignore +syn match divaCtrlFunctions "(ivIf\>"hs=s+1 +syn match divaCtrlFunctions "\<ivIf("he=e-1 +syn match divaCtrlFunctions "(switch\>"hs=s+1 +syn match divaCtrlFunctions "\<switch("he=e-1 +syn match divaCtrlFunctions "(and\>"hs=s+1 +syn match divaCtrlFunctions "\<and("he=e-1 +syn match divaCtrlFunctions "(or\>"hs=s+1 +syn match divaCtrlFunctions "\<or("he=e-1 +syn match divaCtrlFunctions "(null\>"hs=s+1 +syn match divaCtrlFunctions "\<null("he=e-1 +syn match divaExtFunctions "(save\(Interconnect\|Property\|Parameter\|Recognition\)\>"hs=s+1 +syn match divaExtFunctions "\<save\(Interconnect\|Property\|Parameter\|Recognition\)("he=e-1 +syn match divaExtFunctions "(\(save\|measure\|attach\|multiLevel\|calculate\)Parasitic\>"hs=s+1 +syn match divaExtFunctions "\<\(save\|measure\|attach\|multiLevel\|calculate\)Parasitic("he=e-1 +syn match divaExtFunctions "(\(calculate\|measure\)Parameter\>"hs=s+1 +syn match divaExtFunctions "\<\(calculate\|measure\)Parameter("he=e-1 +syn match divaExtFunctions "(measure\(Resistance\|Fringe\)\>"hs=s+1 +syn match divaExtFunctions "\<measure\(Resistance\|Fringe\)("he=e-1 +syn match divaExtFunctions "(extract\(Device\|MOS\)\>"hs=s+1 +syn match divaExtFunctions "\<extract\(Device\|MOS\)("he=e-1 +syn match divaDRCFunctions "(checkAllLayers\>"hs=s+1 +syn match divaDRCFunctions "\<checkAllLayers("he=e-1 +syn match divaDRCFunctions "(checkLayer\>"hs=s+1 +syn match divaDRCFunctions "\<checkLayer("he=e-1 +syn match divaDRCFunctions "(drc\>"hs=s+1 +syn match divaDRCFunctions "\<drc("he=e-1 +syn match divaDRCFunctions "(drcAntenna\>"hs=s+1 +syn match divaDRCFunctions "\<drcAntenna("he=e-1 +syn match divaFunctions "(\(drcExtract\|lvs\)Rules\>"hs=s+1 +syn match divaFunctions "\<\(drcExtract\|lvs\)Rules("he=e-1 +syn match divaLayerFunctions "(saveDerived\>"hs=s+1 +syn match divaLayerFunctions "\<saveDerived("he=e-1 +syn match divaLayerFunctions "(copyGraphics\>"hs=s+1 +syn match divaLayerFunctions "\<copyGraphics("he=e-1 +syn match divaChkFunctions "(dubiousData\>"hs=s+1 +syn match divaChkFunctions "\<dubiousData("he=e-1 +syn match divaChkFunctions "(offGrid\>"hs=s+1 +syn match divaChkFunctions "\<offGrid("he=e-1 +syn match divaLVSFunctions "(compareDeviceProperty\>"hs=s+1 +syn match divaLVSFunctions "\<compareDeviceProperty("he=e-1 +syn match divaLVSFunctions "(ignoreTerminal\>"hs=s+1 +syn match divaLVSFunctions "\<ignoreTerminal("he=e-1 +syn match divaLVSFunctions "(parameterMatchType\>"hs=s+1 +syn match divaLVSFunctions "\<parameterMatchType("he=e-1 +syn match divaLVSFunctions "(\(permute\|prune\|remove\)Device\>"hs=s+1 +syn match divaLVSFunctions "\<\(permute\|prune\|remove\)Device("he=e-1 +syn match divaGeomFunctions "(geom\u\a\+\(45\|90\)\=\>"hs=s+1 +syn match divaGeomFunctions "\<geom\u\a\+\(45\|90\)\=("he=e-1 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_diva_syntax_inits") + if version < 508 + let did_diva_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink divaDRCKeywords Statement + HiLink divaMeasKeywords Statement + HiLink divaCtrlFunctions Conditional + HiLink divaExtFunctions Function + HiLink divaDRCFunctions Function + HiLink divaFunctions Function + HiLink divaLayerFunctions Function + HiLink divaChkFunctions Function + HiLink divaLVSFunctions Function + HiLink divaGeomFunctions Function + + delcommand HiLink +endif + +let b:current_syntax = "diva" + +" vim:ts=4 diff --git a/runtime/syntax/dns.vim b/runtime/syntax/dns.vim new file mode 100644 index 000000000..844b96f4c --- /dev/null +++ b/runtime/syntax/dns.vim @@ -0,0 +1,47 @@ +" Vim syntax file +" Language: DNS/BIND Zone File +" Maintainer: jehsom@jehsom.com +" URL: http://scripts.jehsom.com +" Last Change: 2001 Sep 02 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Last match is taken! +syn match dnsKeyword "\<\(IN\|A\|SOA\|NS\|CNAME\|MX\|PTR\|SOA\|MB\|MG\|MR\|NULL\|WKS\|HINFO\|TXT\|CS\|CH\|CPU\|OS\)\>" +syn match dnsRecordName "^[^ ]*" +syn match dnsPreProc "^\$[^ ]*" +syn match dnsComment ";.*$" +syn match dnsDataFQDN "\<[^ ]*\.[ ]*$" +syn match dnsConstant "\<\([0-9][0-9.]*\|[0-9.]*[0-9]\)\>" +syn match dnsIPaddr "\<\(\([0-2]\)\{0,1}\([0-9]\)\{1,2}\.\)\{3}\([0-2]\)\{0,1}\([0-9]\)\{1,2}\>[ ]*$" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet. +if version >= 508 || !exists("did_dns_syntax_inits") + if version < 508 + let did_dns_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink dnsComment Comment + HiLink dnsDataFQDN Identifier + HiLink dnsPreProc PreProc + HiLink dnsKeyword Keyword + HiLink dnsRecordName Type + HiLink dnsIPaddr Type + HiLink dnsIPerr Error + HiLink dnsConstant Constant + + delcommand HiLink +endif + +let b:current_syntax = "dns" diff --git a/runtime/syntax/docbk.vim b/runtime/syntax/docbk.vim new file mode 100644 index 000000000..9391ec1a8 --- /dev/null +++ b/runtime/syntax/docbk.vim @@ -0,0 +1,150 @@ +" Vim syntax file +" Language: DocBook +" Maintainer: Devin Weaver <vim@tritarget.com> +" URL: http://tritarget.com/pub/vim/syntax/docbk.vim +" Last Change: 2002 Sep 04 +" Version: $Revision$ +" Thanks to Johannes Zellner <johannes@zellner.org> for the default to XML +" suggestion. + +" REFERENCES: +" http://docbook.org/ +" http://www.open-oasis.org/docbook/ +" + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Auto detect added by Bram Moolenaar +if !exists('b:docbk_type') + if expand('%:e') == "sgml" + let b:docbk_type = 'sgml' + else + let b:docbk_type = 'xml' + endif +endif +if 'xml' == b:docbk_type + doau FileType xml + syn cluster xmlTagHook add=docbkKeyword + syn cluster xmlRegionHook add=docbkRegion,docbkTitle,docbkRemark,docbkCite + syn case match +elseif 'sgml' == b:docbk_type + doau FileType sgml + syn cluster sgmlTagHook add=docbkKeyword + syn cluster sgmlRegionHook add=docbkRegion,docbkTitle,docbkRemark,docbkCite + syn case ignore +endif + +" <comment> has been removed and replace with <remark> in DocBook 4.0 +" <comment> kept for backwards compatability. +syn keyword docbkKeyword abbrev abstract accel ackno acronym action contained +syn keyword docbkKeyword address affiliation alt anchor answer appendix contained +syn keyword docbkKeyword application area areaset areaspec arg artheader contained +syn keyword docbkKeyword article articleinfo artpagenums attribution audiodata contained +syn keyword docbkKeyword audioobject author authorblurb authorgroup contained +syn keyword docbkKeyword authorinitials beginpage bibliodiv biblioentry contained +syn keyword docbkKeyword bibliography bibliomisc bibliomixed bibliomset contained +syn keyword docbkKeyword biblioset blockquote book bookbiblio bookinfo contained +syn keyword docbkKeyword bridgehead callout calloutlist caption caution contained +syn keyword docbkKeyword chapter citation citerefentry citetitle city contained +syn keyword docbkKeyword classname cmdsynopsis co collab collabname contained +syn keyword docbkKeyword colophon colspec command comment computeroutput contained +syn keyword docbkKeyword confdates confgroup confnum confsponsor conftitle contained +syn keyword docbkKeyword constant contractnum contractsponsor contrib contained +syn keyword docbkKeyword copyright corpauthor corpname country database contained +syn keyword docbkKeyword date dedication docinfo edition editor email contained +syn keyword docbkKeyword emphasis entry entrytbl envar epigraph equation contained +syn keyword docbkKeyword errorcode errorname errortype example fax figure contained +syn keyword docbkKeyword filename firstname firstterm footnote footnoteref contained +syn keyword docbkKeyword foreignphrase formalpara funcdef funcparams contained +syn keyword docbkKeyword funcprototype funcsynopsis funcsynopsisinfo contained +syn keyword docbkKeyword function glossary glossdef glossdiv glossentry contained +syn keyword docbkKeyword glosslist glosssee glossseealso glossterm graphic contained +syn keyword docbkKeyword graphicco group guibutton guiicon guilabel contained +syn keyword docbkKeyword guimenu guimenuitem guisubmenu hardware contained +syn keyword docbkKeyword highlights holder honorific imagedata imageobject contained +syn keyword docbkKeyword imageobjectco important index indexdiv indexentry contained +syn keyword docbkKeyword indexterm informalequation informalexample contained +syn keyword docbkKeyword informalfigure informaltable inlineequation contained +syn keyword docbkKeyword inlinegraphic inlinemediaobject interface contained +syn keyword docbkKeyword interfacedefinition invpartnumber isbn issn contained +syn keyword docbkKeyword issuenum itemizedlist itermset jobtitle keycap contained +syn keyword docbkKeyword keycode keycombo keysym keyword keywordset label contained +syn keyword docbkKeyword legalnotice lineage lineannotation link listitem contained +syn keyword docbkKeyword literal literallayout lot lotentry manvolnum contained +syn keyword docbkKeyword markup medialabel mediaobject mediaobjectco contained +syn keyword docbkKeyword member menuchoice modespec mousebutton msg msgaud contained +syn keyword docbkKeyword msgentry msgexplan msginfo msglevel msgmain contained +syn keyword docbkKeyword msgorig msgrel msgset msgsub msgtext note contained +syn keyword docbkKeyword objectinfo olink option optional orderedlist contained +syn keyword docbkKeyword orgdiv orgname otheraddr othercredit othername contained +syn keyword docbkKeyword pagenums para paramdef parameter part partintro contained +syn keyword docbkKeyword phone phrase pob postcode preface primary contained +syn keyword docbkKeyword primaryie printhistory procedure productname contained +syn keyword docbkKeyword productnumber programlisting programlistingco contained +syn keyword docbkKeyword prompt property pubdate publisher publishername contained +syn keyword docbkKeyword pubsnumber qandadiv qandaentry qandaset question contained +syn keyword docbkKeyword quote refclass refdescriptor refentry contained +syn keyword docbkKeyword refentrytitle reference refmeta refmiscinfo contained +syn keyword docbkKeyword refname refnamediv refpurpose refsect1 contained +syn keyword docbkKeyword refsect1info refsect2 refsect2info refsect3 contained +syn keyword docbkKeyword refsect3info refsynopsisdiv refsynopsisdivinfo contained +syn keyword docbkKeyword releaseinfo remark replaceable returnvalue revhistory contained +syn keyword docbkKeyword revision revnumber revremark row sbr screen contained +syn keyword docbkKeyword screenco screeninfo screenshot secondary contained +syn keyword docbkKeyword secondaryie sect1 sect1info sect2 sect2info sect3 contained +syn keyword docbkKeyword sect3info sect4 sect4info sect5 sect5info section contained +syn keyword docbkKeyword sectioninfo see seealso seealsoie seeie seg contained +syn keyword docbkKeyword seglistitem segmentedlist segtitle seriesinfo contained +syn keyword docbkKeyword seriesvolnums set setindex setinfo sgmltag contained +syn keyword docbkKeyword shortaffil shortcut sidebar simpara simplelist contained +syn keyword docbkKeyword simplesect spanspec state step street structfield contained +syn keyword docbkKeyword structname subject subjectset subjectterm contained +syn keyword docbkKeyword subscript substeps subtitle superscript surname contained +syn keyword docbkKeyword symbol synopfragment synopfragmentref synopsis contained +syn keyword docbkKeyword systemitem table tbody term tertiary tertiaryie contained +syn keyword docbkKeyword textobject tfoot tgroup thead tip title contained +syn keyword docbkKeyword titleabbrev toc tocback tocchap tocentry tocfront contained +syn keyword docbkKeyword toclevel1 toclevel2 toclevel3 toclevel4 toclevel5 contained +syn keyword docbkKeyword tocpart token trademark type ulink userinput contained +syn keyword docbkKeyword varargs variablelist varlistentry varname contained +syn keyword docbkKeyword videodata videoobject void volumenum warning contained +syn keyword docbkKeyword wordasword xref year contained + +" Add special emphasis on some regions. Thanks to Rory Hunter <roryh@dcs.ed.ac.uk> for these ideas. +syn region docbkRegion start="<emphasis>"lc=10 end="</emphasis>"me=e-11 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend +syn region docbkTitle start="<title>"lc=7 end="</title>"me=e-8 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend +syn region docbkRemark start="<remark>"lc=8 end="</remark>"me=e-9 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend +syn region docbkRemark start="<comment>"lc=9 end="</comment>"me=e-10 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend +syn region docbkCite start="<citation>"lc=10 end="</citation>"me=e-11 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_docbk_syn_inits") + if version < 508 + let did_docbk_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + hi DocbkBold term=bold cterm=bold gui=bold + else + command -nargs=+ HiLink hi def link <args> + hi def DocbkBold term=bold cterm=bold gui=bold + endif + + HiLink docbkKeyword Statement + HiLink docbkRegion DocbkBold + HiLink docbkTitle Title + HiLink docbkRemark Comment + HiLink docbkCite Constant + + delcommand HiLink +endif + +let b:current_syntax = "docbk" + +" vim: ts=8 diff --git a/runtime/syntax/docbksgml.vim b/runtime/syntax/docbksgml.vim new file mode 100644 index 000000000..544f3d290 --- /dev/null +++ b/runtime/syntax/docbksgml.vim @@ -0,0 +1,7 @@ +" Vim syntax file +" Language: DocBook SGML +" Maintainer: Johannes Zellner <johannes@zellner.org> +" Last Change: Sam, 07 Sep 2002 17:20:46 CEST + +let b:docbk_type="sgml" +runtime syntax/docbk.vim diff --git a/runtime/syntax/docbkxml.vim b/runtime/syntax/docbkxml.vim new file mode 100644 index 000000000..181af2cc8 --- /dev/null +++ b/runtime/syntax/docbkxml.vim @@ -0,0 +1,7 @@ +" Vim syntax file +" Language: DocBook XML +" Maintainer: Johannes Zellner <johannes@zellner.org> +" Last Change: Sam, 07 Sep 2002 17:20:12 CEST + +let b:docbk_type="xml" +runtime syntax/docbk.vim diff --git a/runtime/syntax/dosbatch.vim b/runtime/syntax/dosbatch.vim new file mode 100644 index 000000000..e27310cc9 --- /dev/null +++ b/runtime/syntax/dosbatch.vim @@ -0,0 +1,158 @@ +" Vim syntax file +" Language: MSDOS batch file (with NT command extensions) +" Maintainer: Mike Williams <mrw@eandem.co.uk> +" Filenames: *.bat +" Last Change: 16th March 2004 +" Web Page: http://www.eandem.co.uk/mrw/vim +" +" Options Flags: +" dosbatch_cmdextversion - 1 = Windows NT, 2 = Windows 2000 [default] +" + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Set default highlighting to Win2k +if !exists("dosbatch_cmdextversion") + let dosbatch_cmdextversion = 2 +endif + +" DOS bat files are case insensitive but case preserving! +syn case ignore + +syn keyword dosbatchTodo contained TODO + +" Dosbat keywords +syn keyword dosbatchStatement goto call exit +syn keyword dosbatchConditional if else +syn keyword dosbatchRepeat for + +" Some operators - first lot are case sensitive! +syn case match +syn keyword dosbatchOperator EQU NEQ LSS LEQ GTR GEQ +syn case ignore +syn match dosbatchOperator "\s[-+\*/%]\s" +syn match dosbatchOperator "=" +syn match dosbatchOperator "[-+\*/%]=" +syn match dosbatchOperator "\s\(&\||\|^\|<<\|>>\)=\=\s" +syn match dosbatchIfOperator "if\s\+\(\(not\)\=\s\+\)\=\(exist\|defined\|errorlevel\|cmdextversion\)\="lc=2 + +" String - using "'s is a convenience rather than a requirement outside of FOR +syn match dosbatchString "\"[^"]*\"" contains=dosbatchVariable,dosBatchArgument,@dosbatchNumber +syn match dosbatchString "\<echo[^)>|]*"lc=4 contains=dosbatchVariable,dosbatchArgument,@dosbatchNumber +syn match dosbatchEchoOperator "\<echo\s\+\(on\|off\)\s*$"lc=4 + +" For embedded commands +syn match dosbatchCmd "(\s*'[^']*'"lc=1 contains=dosbatchString,dosbatchVariable,dosBatchArgument,@dosbatchNumber,dosbatchImplicit,dosbatchStatement,dosbatchConditional,dosbatchRepeat,dosbatchOperator + +" Numbers - surround with ws to not include in dir and filenames +syn match dosbatchInteger "[[:space:]=(/:]\d\+"lc=1 +syn match dosbatchHex "[[:space:]=(/:]0x\x\+"lc=1 +syn match dosbatchBinary "[[:space:]=(/:]0b[01]\+"lc=1 +syn match dosbatchOctal "[[:space:]=(/:]0\o\+"lc=1 +syn cluster dosbatchNumber contains=dosbatchInteger,dosbatchHex,dosbatchBinary,dosbatchOctal + +" Command line switches +syn match dosbatchSwitch "/\(\a\+\|?\)" + +" Various special escaped char formats +syn match dosbatchSpecialChar "\^[&|()<>^]" +syn match dosbatchSpecialChar "\$[a-hl-npqstv_$+]" +syn match dosbatchSpecialChar "%%" + +" Environment variables +syn match dosbatchIdentifier contained "\s\h\w*\>" +syn match dosbatchVariable "%\h\w*%" +syn match dosbatchVariable "%\h\w*:\*\=[^=]*=[^%]*%" +syn match dosbatchVariable "%\h\w*:\~\d\+,\d\+%" contains=dosbatchInteger +syn match dosbatchVariable "!\h\w*!" +syn match dosbatchVariable "!\h\w*:\*\=[^=]*=[^%]*!" +syn match dosbatchVariable "!\h\w*:\~\d\+,\d\+!" contains=dosbatchInteger +syn match dosbatchSet "\s\h\w*[+-]\==\{-1}" contains=dosbatchIdentifier,dosbatchOperator + +" Args to bat files and for loops, etc +syn match dosbatchArgument "%\(\d\|\*\)" +syn match dosbatchArgument "%%[a-z]\>" +if dosbatch_cmdextversion == 1 + syn match dosbatchArgument "%\~[fdpnxs]\+\(\($PATH:\)\=[a-z]\|\d\)\>" +else + syn match dosbatchArgument "%\~[fdpnxsatz]\+\(\($PATH:\)\=[a-z]\|\d\)\>" +endif + +" Line labels +syn match dosbatchLabel "^\s*:\s*\h\w*\>" +syn match dosbatchLabel "\<\(goto\|call\)\s\+:\h\w*\>"lc=4 +syn match dosbatchLabel "\<goto\s\+\h\w*\>"lc=4 +syn match dosbatchLabel ":\h\w*\>" + +" Comments - usual rem but also two colons as first non-space is an idiom +syn match dosbatchComment "^rem\($\|\s.*$\)"lc=3 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument +syn match dosbatchComment "\srem\($\|\s.*$\)"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument +syn match dosbatchComment "\s*:\s*:.*$" contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument + +" Comments in ()'s - still to handle spaces before rem +syn match dosbatchComment "(rem[^)]*"lc=4 contains=dosbatchTodo,@dosbatchNumber,dosbatchVariable,dosbatchArgument + +syn keyword dosbatchImplicit append assoc at attrib break cacls cd chcp chdir +syn keyword dosbatchImplicit chkdsk chkntfs cls cmd color comp compact convert copy +syn keyword dosbatchImplicit date del dir diskcomp diskcopy doskey echo endlocal +syn keyword dosbatchImplicit erase fc find findstr format ftype +syn keyword dosbatchImplicit graftabl help keyb label md mkdir mode more move +syn keyword dosbatchImplicit path pause popd print prompt pushd rd recover rem +syn keyword dosbatchImplicit ren rename replace restore rmdir set setlocal shift +syn keyword dosbatchImplicit sort start subst time title tree type ver verify +syn keyword dosbatchImplicit vol xcopy + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_dosbatch_syntax_inits") + if version < 508 + let did_dosbatch_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink dosbatchTodo Todo + + HiLink dosbatchStatement Statement + HiLink dosbatchCommands dosbatchStatement + HiLink dosbatchLabel Label + HiLink dosbatchConditional Conditional + HiLink dosbatchRepeat Repeat + + HiLink dosbatchOperator Operator + HiLink dosbatchEchoOperator dosbatchOperator + HiLink dosbatchIfOperator dosbatchOperator + + HiLink dosbatchArgument Identifier + HiLink dosbatchIdentifier Identifier + HiLink dosbatchVariable dosbatchIdentifier + + HiLink dosbatchSpecialChar SpecialChar + HiLink dosbatchString String + HiLink dosbatchNumber Number + HiLink dosbatchInteger dosbatchNumber + HiLink dosbatchHex dosbatchNumber + HiLink dosbatchBinary dosbatchNumber + HiLink dosbatchOctal dosbatchNumber + + HiLink dosbatchComment Comment + HiLink dosbatchImplicit Function + + HiLink dosbatchSwitch Special + + HiLink dosbatchCmd PreProc + + delcommand HiLink +endif + +let b:current_syntax = "dosbatch" + +" vim: ts=8 diff --git a/runtime/syntax/dosini.vim b/runtime/syntax/dosini.vim new file mode 100644 index 000000000..73744183a --- /dev/null +++ b/runtime/syntax/dosini.vim @@ -0,0 +1,42 @@ +" Vim syntax file +" Language: Configuration File (ini file) for MSDOS/MS Windows +" Maintainer: Sean M. McKee <mckee@misslink.net> +" Last Change: 2001 May 09 +" Version Info: @(#)dosini.vim 1.6 97/12/15 08:54:12 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" shut case off +syn case ignore + +syn match dosiniLabel "^.\{-}=" +syn region dosiniHeader start="\[" end="\]" +syn match dosiniComment "^;.*$" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_dosini_syntax_inits") + if version < 508 + let did_dosini_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink dosiniHeader Special + HiLink dosiniComment Comment + HiLink dosiniLabel Type + + delcommand HiLink +endif + +let b:current_syntax = "dosini" + +" vim:ts=8 diff --git a/runtime/syntax/dot.vim b/runtime/syntax/dot.vim new file mode 100644 index 000000000..a2947aad9 --- /dev/null +++ b/runtime/syntax/dot.vim @@ -0,0 +1,110 @@ +" Vim syntax file +" Language: Dot +" Filenames: *.dot +" Maintainer: Markus Mottl <markus@oefai.at> +" URL: http://www.ai.univie.ac.at/~markus/vim/syntax/dot.vim +" Last Change: 2003 May 11 +" 2001 May 04 - initial version + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Errors +syn match dotParErr ")" +syn match dotBrackErr "]" +syn match dotBraceErr "}" + +" Enclosing delimiters +syn region dotEncl transparent matchgroup=dotParEncl start="(" matchgroup=dotParEncl end=")" contains=ALLBUT,dotParErr +syn region dotEncl transparent matchgroup=dotBrackEncl start="\[" matchgroup=dotBrackEncl end="\]" contains=ALLBUT,dotBrackErr +syn region dotEncl transparent matchgroup=dotBraceEncl start="{" matchgroup=dotBraceEncl end="}" contains=ALLBUT,dotBraceErr + +" Comments +syn region dotComment start="//" end="$" contains=dotComment,dotTodo +syn region dotComment start="/\*" end="\*/" contains=dotComment,dotTodo +syn keyword dotTodo contained TODO FIXME XXX + +" Strings +syn region dotString start=+"+ skip=+\\\\\|\\"+ end=+"+ + +" General keywords +syn keyword dotKeyword digraph node edge subgraph + +" Graph attributes +syn keyword dotType center layers margin mclimit name nodesep nslimit +syn keyword dotType ordering page pagedir rank rankdir ranksep ratio +syn keyword dotType rotate size + +" Node attributes +syn keyword dotType distortion fillcolor fontcolor fontname fontsize +syn keyword dotType height layer orientation peripheries regular +syn keyword dotType shape shapefile sides skew width + +" Edge attributes +syn keyword dotType arrowhead arrowsize arrowtail constraint decorateP +syn keyword dotType dir headclip headlabel labelangle labeldistance +syn keyword dotType labelfontcolor labelfontname labelfontsize +syn keyword dotType minlen port_label_distance samehead sametail +syn keyword dotType tailclip taillabel weight + +" Shared attributes (graphs, nodes, edges) +syn keyword dotType color + +" Shared attributes (graphs and edges) +syn keyword dotType bgcolor label URL + +" Shared attributes (nodes and edges) +syn keyword dotType fontcolor fontname fontsize layer style + +" Special chars +syn match dotKeyChar "=" +syn match dotKeyChar ";" +syn match dotKeyChar "->" + +" Identifier +syn match dotIdentifier /\<\w\+\>/ + +" Synchronization +syn sync minlines=50 +syn sync maxlines=500 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_dot_syntax_inits") + if version < 508 + let did_dot_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink dotParErr Error + HiLink dotBraceErr Error + HiLink dotBrackErr Error + + HiLink dotComment Comment + HiLink dotTodo Todo + + HiLink dotParEncl Keyword + HiLink dotBrackEncl Keyword + HiLink dotBraceEncl Keyword + + HiLink dotKeyword Keyword + HiLink dotType Type + HiLink dotKeyChar Keyword + + HiLink dotString String + HiLink dotIdentifier Identifier + + delcommand HiLink +endif + +let b:current_syntax = "dot" + +" vim: ts=8 diff --git a/runtime/syntax/dracula.vim b/runtime/syntax/dracula.vim new file mode 100644 index 000000000..6a3806028 --- /dev/null +++ b/runtime/syntax/dracula.vim @@ -0,0 +1,85 @@ +" Vim syntax file +" Language: Dracula +" Maintainer: Scott Bordelon <slb@artisan.com> +" Last change: Wed Apr 25 18:50:01 PDT 2001 +" Extensions: drac.*,*.drac,*.drc,*.lvs,*.lpe +" Comment: Dracula is an industry-standard language created by CADENCE (a +" company specializing in Electronics Design Automation), for +" the purposes of Design Rule Checking, Layout vs. Schematic +" verification, and Layout Parameter Extraction. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Ignore case +syn case ignore + +" A bunch of useful Dracula keywords + +"syn match draculaIdentifier + +syn keyword draculaStatement indisk primary outdisk printfile system +syn keyword draculaStatement mode scale resolution listerror keepdata +syn keyword draculaStatement datatype by lt gt output label range touch +syn keyword draculaStatement inside outside within overlap outlib +syn keyword draculaStatement schematic model unit parset +syn match draculaStatement "flag-\(non45\|acuteangle\|offgrid\)" +syn match draculaStatement "text-pri-only" +syn match draculaStatement "[=&]" +syn match draculaStatement "\[[^,]*\]" +syn match draculastatement "^ *\(sel\|width\|ext\|enc\|area\|shrink\|grow\|length\)" +syn match draculastatement "^ *\(or\|not\|and\|select\|size\|connect\|sconnect\|int\)" +syn match draculastatement "^ *\(softchk\|stamp\|element\|parasitic cap\|attribute cap\)" +syn match draculastatement "^ *\(flagnon45\|lextract\|equation\|lpeselect\|lpechk\|attach\)" +syn match draculaStatement "\(temporary\|connect\)-layer" +syn match draculaStatement "program-dir" +syn match draculaStatement "status-command" +syn match draculaStatement "batch-queue" +syn match draculaStatement "cnames-csen" +syn match draculaStatement "filter-lay-opt" +syn match draculaStatement "filter-sch-opt" +syn match draculaStatement "power-node" +syn match draculaStatement "ground-node" +syn match draculaStatement "subckt-name" + +syn match draculaType "\*description" +syn match draculaType "\*input-layer" +syn match draculaType "\*operation" +syn match draculaType "\*end" + +syn match draculaComment ";.*" + +syn match draculaPreProc "^#.*" + +"Modify the following as needed. The trade-off is performance versus +"functionality. +syn sync lines=50 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_dracula_syn_inits") + if version < 508 + let did_dracula_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink draculaIdentifier Identifier + HiLink draculaStatement Statement + HiLink draculaType Type + HiLink draculaComment Comment + HiLink draculaPreProc PreProc + + delcommand HiLink +endif + +let b:current_syntax = "dracula" + +" vim: ts=8 diff --git a/runtime/syntax/dsl.vim b/runtime/syntax/dsl.vim new file mode 100644 index 000000000..9b3cb56f5 --- /dev/null +++ b/runtime/syntax/dsl.vim @@ -0,0 +1,38 @@ +" Vim syntax file +" Language: DSSSL +" Maintainer: Johannes Zellner <johannes@zellner.org> +" Last Change: Tue, 27 Apr 2004 14:54:59 CEST +" Filenames: *.dsl +" $Id$ + +if exists("b:current_syntax") | finish | endif + +runtime syntax/xml.vim +syn cluster xmlRegionHook add=dslRegion,dslComment +syn cluster xmlCommentHook add=dslCond + +" EXAMPLE: +" <![ %output.html; [ +" <!-- some comment --> +" (define html-manifest #f) +" ]]> +" +" NOTE: 'contains' the same as xmlRegion, except xmlTag / xmlEndTag +syn region dslCond matchgroup=dslCondDelim start="\[\_[^[]\+\[" end="]]" contains=xmlCdata,@xmlRegionCluster,xmlComment,xmlEntity,xmlProcessing,@xmlRegionHook + +" NOTE, that dslRegion and dslComment do both NOT have a 'contained' +" argument, so this will also work in plain dsssl documents. + +syn region dslRegion matchgroup=Delimiter start=+(+ end=+)+ contains=dslRegion,dslString,dslComment +syn match dslString +"\_[^"]*"+ contained +syn match dslComment +;.*$+ contains=dslTodo +syn keyword dslTodo contained TODO FIXME XXX display + +" The default highlighting. +hi def link dslTodo Todo +hi def link dslString String +hi def link dslComment Comment +" compare the following with xmlCdataStart / xmlCdataEnd +hi def link dslCondDelim Type + +let b:current_syntax = "dsl" diff --git a/runtime/syntax/dtd.vim b/runtime/syntax/dtd.vim new file mode 100644 index 000000000..0f80e199c --- /dev/null +++ b/runtime/syntax/dtd.vim @@ -0,0 +1,181 @@ +" Vim syntax file +" Language: DTD (Document Type Definition for XML) +" Maintainer: Johannes Zellner <johannes@zellner.org> +" Author and previous maintainer: +" Daniel Amyot <damyot@site.uottawa.ca> +" Last Change: Tue, 27 Apr 2004 14:54:59 CEST +" Filenames: *.dtd +" +" REFERENCES: +" http://www.w3.org/TR/html40/ +" http://www.w3.org/TR/NOTE-html-970421 +" +" TODO: +" - improve synchronizing. + +if version < 600 + syntax clear + let __dtd_cpo_save__ = &cpo + set cpo& +else + if exists("b:current_syntax") + finish + endif + let s:dtd_cpo_save = &cpo + set cpo&vim +endif + +if !exists("dtd_ignore_case") + " I prefer having the case takes into consideration. + syn case match +else + syn case ignore +endif + + +" the following line makes the opening <! and +" closing > highlighted using 'dtdFunction'. +" +" PROVIDES: @dtdTagHook +" +syn region dtdTag matchgroup=dtdFunction + \ start=+<!+ end=+>+ matchgroup=NONE + \ contains=dtdTag,dtdTagName,dtdError,dtdComment,dtdString,dtdAttrType,dtdAttrDef,dtdEnum,dtdParamEntityInst,dtdParamEntityDecl,dtdCard,@dtdTagHook + +if !exists("dtd_no_tag_errors") + " mark everything as an error which starts with a <! + " and is not overridden later. If this is annoying, + " it can be switched off by setting the variable + " dtd_no_tag_errors. + syn region dtdError contained start=+<!+lc=2 end=+>+ +endif + +" if this is a html like comment hightlight also +" the opening <! and the closing > as Comment. +syn region dtdComment start=+<![ \t]*--+ end=+-->+ contains=dtdTodo + + +" proper DTD comment +syn region dtdComment contained start=+--+ end=+--+ contains=dtdTodo + + +" Start tags (keywords). This is contained in dtdFunction. +" Note that everything not contained here will be marked +" as error. +syn match dtdTagName contained +<!\(ATTLIST\|DOCTYPE\|ELEMENT\|ENTITY\|NOTATION\|SHORTREF\|USEMAP\|\[\)+lc=2,hs=s+2 + + +" wildcards and operators +syn match dtdCard contained "|" +syn match dtdCard contained "," +" evenutally overridden by dtdEntity +syn match dtdCard contained "&" +syn match dtdCard contained "?" +syn match dtdCard contained "\*" +syn match dtdCard contained "+" + +" ...and finally, special cases. +syn match dtdCard "ANY" +syn match dtdCard "EMPTY" + +if !exists("dtd_no_param_entities") + + " highlight parameter entity declarations + " and instances. Note that the closing `;' + " is optional. + + " instances + syn region dtdParamEntityInst oneline matchgroup=dtdParamEntityPunct + \ start="%[-_a-zA-Z0-9.]\+"he=s+1,rs=s+1 + \ skip=+[-_a-zA-Z0-9.]+ + \ end=";\|\>" + \ matchgroup=NONE contains=dtdParamEntityPunct + syn match dtdParamEntityPunct contained "\." + + " declarations + " syn region dtdParamEntityDecl oneline matchgroup=dtdParamEntityDPunct start=+<!ENTITY % +lc=8 skip=+[-_a-zA-Z0-9.]+ matchgroup=NONE end="\>" contains=dtdParamEntityDPunct + syn match dtdParamEntityDecl +<!ENTITY % [-_a-zA-Z0-9.]*+lc=8 contains=dtdParamEntityDPunct + syn match dtdParamEntityDPunct contained "%\|\." + +endif + +" &entities; compare with xml +syn match dtdEntity "&[^; \t]*;" contains=dtdEntityPunct +syn match dtdEntityPunct contained "[&.;]" + +" Strings are between quotes +syn region dtdString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=dtdAttrDef,dtdAttrType,dtdEnum,dtdParamEntityInst,dtdEntity,dtdCard +syn region dtdString start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=dtdAttrDef,dtdAttrType,dtdEnum,dtdParamEntityInst,dtdEntity,dtdCard + +" Enumeration of elements or data between parenthesis +" +" PROVIDES: @dtdEnumHook +" +syn region dtdEnum matchgroup=dtdType start="(" end=")" matchgroup=NONE contains=dtdEnum,dtdParamEntityInst,dtdCard,@dtdEnumHook + +"Attribute types +syn keyword dtdAttrType NMTOKEN ENTITIES NMTOKENS ID CDATA +syn keyword dtdAttrType IDREF IDREFS +" ENTITY has to treated special for not overriding <!ENTITY +syn match dtdAttrType +[^!]\<ENTITY+ + +"Attribute Definitions +syn match dtdAttrDef "#REQUIRED" +syn match dtdAttrDef "#IMPLIED" +syn match dtdAttrDef "#FIXED" + +syn case match +" define some common keywords to mark TODO +" and important sections inside comments. +syn keyword dtdTodo contained TODO FIXME XXX + +syn sync lines=250 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_dtd_syn_inits") + if version < 508 + let did_dtd_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default highlighting. + HiLink dtdFunction Function + HiLink dtdTag Normal + HiLink dtdType Type + HiLink dtdAttrType dtdType + HiLink dtdAttrDef dtdType + HiLink dtdConstant Constant + HiLink dtdString dtdConstant + HiLink dtdEnum dtdConstant + HiLink dtdCard dtdFunction + + HiLink dtdEntity Statement + HiLink dtdEntityPunct dtdType + HiLink dtdParamEntityInst dtdConstant + HiLink dtdParamEntityPunct dtdType + HiLink dtdParamEntityDecl dtdType + HiLink dtdParamEntityDPunct dtdComment + + HiLink dtdComment Comment + HiLink dtdTagName Statement + HiLink dtdError Error + HiLink dtdTodo Todo + + delcommand HiLink +endif + +if version < 600 + let &cpo = __dtd_cpo_save__ + unlet __dtd_cpo_save__ +else + let &cpo = s:dtd_cpo_save + unlet s:dtd_cpo_save +endif + +let b:current_syntax = "dtd" + +" vim: ts=8 diff --git a/runtime/syntax/dtml.vim b/runtime/syntax/dtml.vim new file mode 100644 index 000000000..7de722aab --- /dev/null +++ b/runtime/syntax/dtml.vim @@ -0,0 +1,225 @@ +" DTML syntax file +" Language: Zope's Dynamic Template Markup Language +" Maintainer: Jean Jordaan <jean@upfrontsystems.co.za> (njj) +" Last change: 2001 Sep 02 + +" These are used with Claudio Fleiner's html.vim in the standard distribution. +" +" Still very hackish. The 'dtml attributes' and 'dtml methods' have been +" hacked out of the Zope Quick Reference in case someone finds something +" sensible to do with them. I certainly haven't. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" First load the HTML syntax +if version < 600 + source <sfile>:p:h/html.vim +else + runtime! syntax/html.vim +endif + +syn case match + +" This doesn't have any effect. Does it need to be moved to above/ +" if !exists("main_syntax") +" let main_syntax = 'dtml' +" endif + +" dtml attributes +syn keyword dtmlAttribute ac_inherited_permissions access_debug_info contained +syn keyword dtmlAttribute acquiredRolesAreUsedBy all_meta_types assume_children AUTH_TYPE contained +syn keyword dtmlAttribute AUTHENTICATED_USER AUTHENTICATION_PATH BASE0 batch-end-index batch-size contained +syn keyword dtmlAttribute batch-start-index bobobase_modification_time boundary branches contained +syn keyword dtmlAttribute branches_expr capitalize cb_dataItems cb_dataValid cb_isCopyable contained +syn keyword dtmlAttribute cb_isMoveable changeClassId classDefinedAndInheritedPermissions contained +syn keyword dtmlAttribute classDefinedPermissions classInheritedPermissions collapse-all column contained +syn keyword dtmlAttribute connected connectionIsValid CONTENT_LENGTH CONTENT_TYPE cook cookies contained +syn keyword dtmlAttribute COPY count- createInObjectManager da_has_single_argument dav__allprop contained +syn keyword dtmlAttribute dav__init dav__propnames dav__propstat dav__validate default contained +syn keyword dtmlAttribute delClassAttr DELETE Destination DestinationURL digits discard contained +syn keyword dtmlAttribute disposition document_src e encode enter etc expand-all expr File contained +syn keyword dtmlAttribute filtered_manage_options filtered_meta_types first- fmt footer form contained +syn keyword dtmlAttribute GATEWAY_INTERFACE get_local_roles get_local_roles_for_userid contained +syn keyword dtmlAttribute get_request_var_or_attr get_size get_size get_valid_userids getAttribute contained +syn keyword dtmlAttribute getAttributeNode getAttributes getChildNodes getClassAttr getContentType contained +syn keyword dtmlAttribute getData getDocType getDocumentElement getElementsByTagName getFirstChild contained +syn keyword dtmlAttribute getImplementation getLastChild getLength getName getNextSibling contained +syn keyword dtmlAttribute getNodeName getNodeType getNodeValue getOwnerDocument getParentNode contained +syn keyword dtmlAttribute getPreviousSibling getProperty getPropertyType getSize getSize getSize contained +syn keyword dtmlAttribute get_size getTagName getUser getUserName getUserNames getUsers contained +syn keyword dtmlAttribute has_local_roles hasChildNodes hasProperty HEAD header hexdigits HTML contained +syn keyword dtmlAttribute html_quote HTMLFile id index_html index_objects indexes contained +syn keyword dtmlAttribute inheritedAttribute items last- leave leave_another leaves letters LOCK contained +syn keyword dtmlAttribute locked_in_version lower lowercase mailfrom mailhost mailhost_list mailto contained +syn keyword dtmlAttribute manage manage_ methods manage_access manage_acquiredPermissions contained +syn keyword dtmlAttribute manage_addConferaTopic manage_addDocument manage_addDTMLDocument contained +syn keyword dtmlAttribute manage_addDTMLMethod manage_addFile manage_addFolder manage_addImage contained +syn keyword dtmlAttribute manage_addLocalRoles manage_addMailHost manage_addPermission contained +syn keyword dtmlAttribute manage_addPrincipiaFactory manage_addProduct manage_addProperty contained +syn keyword dtmlAttribute manage_addUserFolder manage_addZClass manage_addZGadflyConnection contained +syn keyword dtmlAttribute manage_addZGadflyConnectionForm manage_advanced manage_afterAdd contained +syn keyword dtmlAttribute manage_afterClone manage_beforeDelete manage_changePermissions contained +syn keyword dtmlAttribute manage_changeProperties manage_clone manage_CopyContainerFirstItem contained +syn keyword dtmlAttribute manage_copyObjects manage_cutObjects manage_defined_roles contained +syn keyword dtmlAttribute manage_delLocalRoles manage_delObjects manage_delProperties contained +syn keyword dtmlAttribute manage_distribute manage_edit manage_editedDialog manage_editProperties contained +syn keyword dtmlAttribute manage_editRoles manage_exportObject manage_FTPget manage_FTPlist contained +syn keyword dtmlAttribute manage_FTPstat manage_get_product_readme__ manage_getPermissionMapping contained +syn keyword dtmlAttribute manage_haveProxy manage_help manage_importObject manage_listLocalRoles contained +syn keyword dtmlAttribute manage_options manage_pasteObjects manage_permission contained +syn keyword dtmlAttribute manage_propertiesForm manage_proxy manage_renameObject manage_role contained +syn keyword dtmlAttribute manage_setLocalRoles manage_setPermissionMapping contained +syn keyword dtmlAttribute manage_subclassableClassNames manage_test manage_testForm contained +syn keyword dtmlAttribute manage_undo_transactions manage_upload manage_users manage_workspace contained +syn keyword dtmlAttribute management_interface mapping math max- mean- median- meta_type min- contained +syn keyword dtmlAttribute MKCOL modified_in_version MOVE multiple name navigate_filter new_version contained +syn keyword dtmlAttribute newline_to_br next next-batches next-sequence next-sequence-end-index contained +syn keyword dtmlAttribute next-sequence-size next-sequence-start-index no manage_access None contained +syn keyword dtmlAttribute nonempty normalize nowrap null Object Manager objectIds objectItems contained +syn keyword dtmlAttribute objectMap objectValues octdigits only optional OPTIONS orphan overlap contained +syn keyword dtmlAttribute PARENTS PATH_INFO PATH_TRANSLATED permission_settings contained +syn keyword dtmlAttribute permissionMappingPossibleValues permissionsOfRole pi port contained +syn keyword dtmlAttribute possible_permissions previous previous-batches previous-sequence contained +syn keyword dtmlAttribute previous-sequence-end-index previous-sequence-size contained +syn keyword dtmlAttribute previous-sequence-start-index PrincipiaFind PrincipiaSearchSource contained +syn keyword dtmlAttribute propdict propertyIds propertyItems propertyLabel propertyMap propertyMap contained +syn keyword dtmlAttribute propertyValues PROPFIND PROPPATCH PUT query_day query_month QUERY_STRING contained +syn keyword dtmlAttribute query_year quoted_input quoted_report raise_standardErrorMessage random contained +syn keyword dtmlAttribute read read_raw REMOTE_ADDR REMOTE_HOST REMOTE_IDENT REMOTE_USER REQUEST contained +syn keyword dtmlAttribute REQUESTED_METHOD required RESPONSE reverse rolesOfPermission save schema contained +syn keyword dtmlAttribute SCRIPT_NAME sequence-end sequence-even sequence-index contained +syn keyword dtmlAttribute sequence-index-var- sequence-item sequence-key sequence-Letter contained +syn keyword dtmlAttribute sequence-letter sequence-number sequence-odd sequence-query contained +syn keyword dtmlAttribute sequence-roman sequence-Roman sequence-start sequence-step-end-index contained +syn keyword dtmlAttribute sequence-step-size sequence-step-start-index sequence-var- SERVER_NAME contained +syn keyword dtmlAttribute SERVER_PORT SERVER_PROTOCOL SERVER_SOFTWARE setClassAttr setName single contained +syn keyword dtmlAttribute size skip_unauthorized smtphost sort spacify sql_quote SQLConnectionIDs contained +syn keyword dtmlAttribute standard-deviation- standard-deviation-n- standard_html_footer contained +syn keyword dtmlAttribute standard_html_header start String string subject SubTemplate superValues contained +syn keyword dtmlAttribute tabs_path_info tag test_url_ text_content this thousands_commas title contained +syn keyword dtmlAttribute title_and_id title_or_id total- tpURL tpValues TRACE translate tree-c contained +syn keyword dtmlAttribute tree-colspan tree-e tree-item-expanded tree-item-url tree-level contained +syn keyword dtmlAttribute tree-root-url tree-s tree-state type undoable_transactions UNLOCK contained +syn keyword dtmlAttribute update_data upper uppercase url url_quote URLn user_names contained +syn keyword dtmlAttribute userdefined_roles valid_property_id valid_roles validate_roles contained +syn keyword dtmlAttribute validClipData validRoles values variance- variance-n- view_image_or_file contained +syn keyword dtmlAttribute where whitespace whrandom xml_namespace zclass_candidate_view_actions contained +syn keyword dtmlAttribute ZClassBaseClassNames ziconImage ZopeFind ZQueryIds contained + +syn keyword dtmlMethod abs absolute_url ac_inherited_permissions aCommon contained +syn keyword dtmlMethod aCommonZ acos acquiredRolesAreUsedBy aDay addPropertySheet aMonth AMPM contained +syn keyword dtmlMethod ampm AMPMMinutes appendChild appendData appendHeader asin atan atan2 contained +syn keyword dtmlMethod atof atoi betavariate capatilize capwords catalog_object ceil center contained +syn keyword dtmlMethod choice chr cloneNode COPY cos cosh count createInObjectManager contained +syn keyword dtmlMethod createSQLInput cunifvariate Date DateTime Day day dayOfYear dd default contained +syn keyword dtmlMethod DELETE deleteData delPropertySheet divmod document_id document_title dow contained +syn keyword dtmlMethod earliestTime enter equalTo exp expireCookie expovariate fabs fCommon contained +syn keyword dtmlMethod fCommonZ filtered_manage_options filtered_meta_types find float floor contained +syn keyword dtmlMethod fmod frexp gamma gauss get get_local_roles_for_userid get_size getattr contained +syn keyword dtmlMethod getAttribute getAttributeNode getClassAttr getDomains contained +syn keyword dtmlMethod getElementsByTagName getHeader getitem getNamedItem getobject contained +syn keyword dtmlMethod getObjectsInfo getpath getProperty getRoles getStatus getUser contained +syn keyword dtmlMethod getUserName greaterThan greaterThanEqualTo h_12 h_24 has_key contained +syn keyword dtmlMethod has_permission has_role hasattr hasFeature hash hasProperty HEAD hex contained +syn keyword dtmlMethod hour hypot index index_html inheritedAttribute insertBefore insertData contained +syn keyword dtmlMethod int isCurrentDay isCurrentHour isCurrentMinute isCurrentMonth contained +syn keyword dtmlMethod isCurrentYear isFuture isLeadYear isPast item join latestTime ldexp contained +syn keyword dtmlMethod leave leave_another len lessThan lessThanEqualTo ljust log log10 contained +syn keyword dtmlMethod lognormvariate lower lstrip maketrans manage manage_access contained +syn keyword dtmlMethod manage_acquiredPermissions manage_addColumn manage_addDocument contained +syn keyword dtmlMethod manage_addDTMLDocument manage_addDTMLMethod manage_addFile contained +syn keyword dtmlMethod manage_addFolder manage_addImage manage_addIndex manage_addLocalRoles contained +syn keyword dtmlMethod manage_addMailHost manage_addPermission manage_addPrincipiaFactory contained +syn keyword dtmlMethod manage_addProduct manage_addProperty manage_addPropertySheet contained +syn keyword dtmlMethod manage_addUserFolder manage_addZCatalog manage_addZClass contained +syn keyword dtmlMethod manage_addZGadflyConnection manage_addZGadflyConnectionForm contained +syn keyword dtmlMethod manage_advanced manage_catalogClear manage_catalogFoundItems contained +syn keyword dtmlMethod manage_catalogObject manage_catalogReindex manage_changePermissions contained +syn keyword dtmlMethod manage_changeProperties manage_clone manage_CopyContainerFirstItem contained +syn keyword dtmlMethod manage_copyObjects manage_createEditor manage_createView contained +syn keyword dtmlMethod manage_cutObjects manage_defined_roles manage_delColumns contained +syn keyword dtmlMethod manage_delIndexes manage_delLocalRoles manage_delObjects contained +syn keyword dtmlMethod manage_delProperties manage_Discard__draft__ manage_distribute contained +syn keyword dtmlMethod manage_edit manage_edit manage_editedDialog manage_editProperties contained +syn keyword dtmlMethod manage_editRoles manage_exportObject manage_importObject contained +syn keyword dtmlMethod manage_makeChanges manage_pasteObjects manage_permission contained +syn keyword dtmlMethod manage_propertiesForm manage_proxy manage_renameObject manage_role contained +syn keyword dtmlMethod manage_Save__draft__ manage_setLocalRoles manage_setPermissionMapping contained +syn keyword dtmlMethod manage_test manage_testForm manage_uncatalogObject contained +syn keyword dtmlMethod manage_undo_transactions manage_upload manage_users manage_workspace contained +syn keyword dtmlMethod mange_createWizard max min minute MKCOL mm modf month Month MOVE contained +syn keyword dtmlMethod namespace new_version nextObject normalvariate notEqualTo objectIds contained +syn keyword dtmlMethod objectItems objectValues oct OPTIONS ord paretovariate parts pCommon contained +syn keyword dtmlMethod pCommonZ pDay permissionsOfRole pMonth pow PreciseAMPM PreciseTime contained +syn keyword dtmlMethod previousObject propertyInfo propertyLabel PROPFIND PROPPATCH PUT quit contained +syn keyword dtmlMethod raise_standardErrorMessage randint random read read_raw redirect contained +syn keyword dtmlMethod removeAttribute removeAttributeNode removeChild replace replaceChild contained +syn keyword dtmlMethod replaceData rfc822 rfind rindex rjust rolesOfPermission round rstrip contained +syn keyword dtmlMethod save searchResults second seed set setAttribute setAttributeNode setBase contained +syn keyword dtmlMethod setCookie setHeader setStatus sin sinh split splitText sqrt str strip contained +syn keyword dtmlMethod substringData superValues swapcase tabs_path_info tan tanh Time contained +syn keyword dtmlMethod TimeMinutes timeTime timezone title title_and_id title_or_id toXML contained +syn keyword dtmlMethod toZone uncatalog_object undoable_transactions uniform uniqueValuesFor contained +syn keyword dtmlMethod update_data upper valid_property_id validate_roles vonmisesvariate contained +syn keyword dtmlMethod weibullvariate year yy zfill ZopeFind contained + +" DTML tags +syn keyword dtmlTagName var if elif else unless in with let call raise try except tag comment tree sqlvar sqltest sqlgroup sendmail mime transparent contained + +syn keyword dtmlEndTagName if unless in with let raise try tree sendmail transparent contained + +" Own additions +syn keyword dtmlTODO TODO FIXME contained + +syn region dtmlComment start=+<dtml-comment>+ end=+</dtml-comment>+ contains=dtmlTODO + +" All dtmlTagNames are contained by dtmlIsTag. +syn match dtmlIsTag "dtml-[A-Za-z]\+" contains=dtmlTagName + +" 'var' tag entity syntax: &dtml-variableName; +" - with attributes: &dtml.attribute1[.attribute2]...-variableName; +syn match dtmlSpecialChar "&dtml[.0-9A-Za-z_]\{-}-[0-9A-Za-z_.]\+;" + +" Redefine to allow inclusion of DTML within HTML strings. +syn cluster htmlTop contains=@Spell,htmlTag,htmlEndTag,dtmlSpecialChar,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,javaScript,@htmlPreproc +syn region htmlLink start="<a\>[^>]*href\>" end="</a>"me=e-4 contains=@Spell,htmlTag,htmlEndTag,dtmlSpecialChar,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc +syn region htmlHead start="<head\>" end="</head>"me=e-7 end="<body\>"me=e-5 end="<h[1-6]\>"me=e-3 contains=htmlTag,htmlEndTag,dtmlSpecialChar,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,htmlTitle,javaScript,cssStyle,@htmlPreproc +syn region htmlTitle start="<title\>" end="</title>"me=e-8 contains=htmlTag,htmlEndTag,dtmlSpecialChar,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc +syn region htmlString contained start=+"+ end=+"+ contains=dtmlSpecialChar,htmlSpecialChar,javaScriptExpression,dtmlIsTag,dtmlAttribute,dtmlMethod,@htmlPreproc +syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,dtmlIsTag,dtmlAttribute,dtmlMethod,@htmlTagNameCluster +syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,dtmlIsTag,dtmlAttribute,dtmlMethod,@htmlTagNameCluster + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_dtml_syntax_inits") + if version < 508 + let did_dtml_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink dtmlIsTag PreProc + HiLink dtmlAttribute Identifier + HiLink dtmlMethod Function + HiLink dtmlComment Comment + HiLink dtmlTODO Todo + HiLink dtmlSpecialChar Special + + delcommand HiLink +endif + +let b:current_syntax = "dtml" + +" if main_syntax == 'dtml' +" unlet main_syntax +" endif + +" vim: ts=4 diff --git a/runtime/syntax/dylan.vim b/runtime/syntax/dylan.vim new file mode 100644 index 000000000..14262d53d --- /dev/null +++ b/runtime/syntax/dylan.vim @@ -0,0 +1,109 @@ +" Vim syntax file +" Language: Dylan +" Authors: Justus Pendleton <justus@acm.org> +" Brent A. Fulgham <bfulgham@debian.org> +" Last Change: Fri Sep 29 13:45:55 PDT 2000 +" +" This syntax file is based on the Haskell, Perl, Scheme, and C +" syntax files. + +" Part 1: Syntax definition +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +if version < 600 + set lisp +else + setlocal lisp +endif + +" Highlight special characters (those that have backslashes) differently +syn match dylanSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" + +" Keywords +syn keyword dylanBlock afterwards begin block cleanup end +syn keyword dylanClassMods abstract concrete primary inherited virtual +syn keyword dylanException exception handler signal +syn keyword dylanParamDefs method class function library macro interface +syn keyword dylanSimpleDefs constant variable generic primary +syn keyword dylanOther above below from by in instance local slot subclass then to +syn keyword dylanConditional if when select case else elseif unless finally otherwise then +syn keyword dylanRepeat begin for until while from to +syn keyword dylanStatement define let +syn keyword dylanImport use import export exclude rename create +syn keyword dylanMiscMods open sealed domain singleton sideways inline functional + +" Matching rules for special forms +syn match dylanOperator "\s[-!%&\*\+/=\?@\\^|~:]\+[-#!>%&:\*\+/=\?@\\^|~]*" +syn match dylanOperator "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=:[-!#$%&\*\+./=\?@\\^|~:]*" +" Numbers +syn match dylanNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>" +syn match dylanNumber "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>" +" Booleans +syn match dylanBoolean "#t\|#f" +" Comments +syn match dylanComment "//.*" +syn region dylanComment start="/\*" end="\*/" +" Strings +syn region dylanString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=dySpecial +syn match dylanCharacter "'[^\\]'" +" Constants, classes, and variables +syn match dylanConstant "$\<[a-zA-Z0-9\-]\+\>" +syn match dylanClass "<\<[a-zA-Z0-9\-]\+\>>" +syn match dylanVariable "\*\<[a-zA-Z0-9\-]\+\>\*" +" Preconditions +syn region dylanPrecondit start="^\s*#\s*\(if\>\|else\>\|endif\>\)" skip="\\$" end="$" + +" These appear at the top of files (usually). I like to highlight the whole line +" so that the definition stands out. They should probably really be keywords, but they +" don't generally appear in the middle of a line of code. +syn region dylanHeader start="^[Mm]odule:" end="^$" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_dylan_syntax_inits") + if version < 508 + let did_dylan_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink dylanBlock PreProc + HiLink dylanBoolean Boolean + HiLink dylanCharacter Character + HiLink dylanClass Structure + HiLink dylanClassMods StorageClass + HiLink dylanComment Comment + HiLink dylanConditional Conditional + HiLink dylanConstant Constant + HiLink dylanException Exception + HiLink dylanHeader Macro + HiLink dylanImport Include + HiLink dylanLabel Label + HiLink dylanMiscMods StorageClass + HiLink dylanNumber Number + HiLink dylanOther Keyword + HiLink dylanOperator Operator + HiLink dylanParamDefs Keyword + HiLink dylanPrecondit PreCondit + HiLink dylanRepeat Repeat + HiLink dylanSimpleDefs Keyword + HiLink dylanStatement Macro + HiLink dylanString String + HiLink dylanVariable Identifier + + delcommand HiLink +endif + +let b:current_syntax = "dylan" + +" vim:ts=8 diff --git a/runtime/syntax/dylanintr.vim b/runtime/syntax/dylanintr.vim new file mode 100644 index 000000000..11ef81668 --- /dev/null +++ b/runtime/syntax/dylanintr.vim @@ -0,0 +1,52 @@ +" Vim syntax file +" Language: Dylan +" Authors: Justus Pendleton <justus@acm.org> +" Last Change: Fri Sep 29 13:53:27 PDT 2000 +" + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +syn region dylanintrInfo matchgroup=Statement start="^" end=":" oneline +syn match dylanintrInterface "define interface" +syn match dylanintrClass "<.*>" +syn region dylanintrType start=+"+ skip=+\\\\\|\\"+ end=+"+ + +syn region dylanintrIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match dylanintrIncluded contained "<[^>]*>" +syn match dylanintrInclude "^\s*#\s*include\>\s*["<]" contains=intrIncluded + +"syn keyword intrMods pointer struct + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_dylan_intr_syntax_inits") + if version < 508 + let did_dylan_intr_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink dylanintrInfo Special + HiLink dylanintrInterface Operator + HiLink dylanintrMods Type + HiLink dylanintrClass StorageClass + HiLink dylanintrType Type + HiLink dylanintrIncluded String + HiLink dylanintrInclude Include + + delcommand HiLink +endif + +let b:current_syntax = "dylanintr" + +" vim:ts=8 diff --git a/runtime/syntax/dylanlid.vim b/runtime/syntax/dylanlid.vim new file mode 100644 index 000000000..ec7b40114 --- /dev/null +++ b/runtime/syntax/dylanlid.vim @@ -0,0 +1,42 @@ +" Vim syntax file +" Language: Dylan Library Interface Files +" Authors: Justus Pendleton <justus@acm.org> +" Brent Fulgham <bfulgham@debian.org> +" Last Change: Fri Sep 29 13:50:20 PDT 2000 +" + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +syn region dylanlidInfo matchgroup=Statement start="^" end=":" oneline +syn region dylanlidEntry matchgroup=Statement start=":%" end="$" oneline + +syn sync lines=50 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_dylan_lid_syntax_inits") + if version < 508 + let did_dylan_lid_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink dylanlidInfo Type + HiLink dylanlidEntry String + + delcommand HiLink +endif + +let b:current_syntax = "dylanlid" + +" vim:ts=8 diff --git a/runtime/syntax/ecd.vim b/runtime/syntax/ecd.vim new file mode 100644 index 000000000..fff7a4b88 --- /dev/null +++ b/runtime/syntax/ecd.vim @@ -0,0 +1,56 @@ +" Vim syntax file +" Language: ecd (Embedix Component Description) files +" Maintainer: John Beppu <beppu@opensource.lineo.com> +" URL: http://opensource.lineo.com/~beppu/prose/ecd_vim.html +" Last Change: 2001 Sep 27 + +" An ECD file contains meta-data for packages in the Embedix Linux distro. +" This syntax file was derived from apachestyle.vim +" by Christian Hammers <ch@westend.com> + +" Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" specials +syn match ecdComment "^\s*#.*" + +" options and values +syn match ecdAttr "^\s*[a-zA-Z]\S*\s*[=].*$" contains=ecdAttrN,ecdAttrV +syn match ecdAttrN contained "^.*="me=e-1 +syn match ecdAttrV contained "=.*$"ms=s+1 + +" tags +syn region ecdTag start=+<+ end=+>+ contains=ecdTagN,ecdTagError +syn match ecdTagN contained +<[/\s]*[-a-zA-Z0-9_]\++ms=s+1 +syn match ecdTagError contained "[^>]<"ms=s+1 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_ecd_syn_inits") + if version < 508 + let did_ecd_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink ecdComment Comment + HiLink ecdAttr Type + HiLink ecdAttrN Statement + HiLink ecdAttrV Value + HiLink ecdTag Function + HiLink ecdTagN Statement + HiLink ecdTagError Error + + delcommand HiLink +endif + +let b:current_syntax = "ecd" +" vim: ts=8 diff --git a/runtime/syntax/edif.vim b/runtime/syntax/edif.vim new file mode 100644 index 000000000..0c1783494 --- /dev/null +++ b/runtime/syntax/edif.vim @@ -0,0 +1,64 @@ +" Vim syntax file +" Language: EDIF (Electronic Design Interchange Format) +" Maintainer: Artem Zankovich <z_artem@hotbox.ru> +" Last Change: Oct 14, 2002 +" +" Supported standarts are: +" ANSI/EIA Standard 548-1988 (EDIF Version 2 0 0) +" IEC 61690-1 (EDIF Version 3 0 0) +" IEC 61690-2 (EDIF Version 4 0 0) + +" Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if version >= 600 + setlocal iskeyword=48-57,-,+,A-Z,a-z,_,& +else + set iskeyword=A-Z,a-z,_,& +endif + +syn region edifList matchgroup=Delimiter start="(" end=")" contains=edifList,edifKeyword,edifString,edifNumber + +" Strings +syn match edifInStringError /%/ contained +syn match edifInString /%\s*\d\+\s*%/ contained +syn region edifString start=/"/ end=/"/ contains=edifInString,edifInStringError contained + +" Numbers +syn match edifNumber "\<[-+]\=[0-9]\+\>" + +" Keywords +syn match edifKeyword "(\@<=\s*[a-zA-Z&][a-zA-Z_0-9]*\>" contained + +syn match edifError ")" + +" synchronization +if version < 600 + syntax sync maxlines=250 +else + syntax sync fromstart +endif + +" Define the default highlighting. +if version >= 508 || !exists("did_edif_syntax_inits") + if version < 508 + let did_edif_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink edifInString SpecialChar + HiLink edifKeyword Keyword + HiLink edifNumber Number + HiLink edifInStringError edifError + HiLink edifError Error + HiLink edifString String + delcommand HiLink +endif + +let b:current_syntax = "edif" diff --git a/runtime/syntax/eiffel.vim b/runtime/syntax/eiffel.vim new file mode 100644 index 000000000..af6eee98a --- /dev/null +++ b/runtime/syntax/eiffel.vim @@ -0,0 +1,196 @@ +" Eiffel syntax file +" Language: Eiffel +" Maintainer: Reimer Behrends <behrends@cse.msu.edu> +" With much input from Jocelyn Fiat <fiat@eiffel.com> +" See http://www.cse.msu.edu/~behrends/vim/ for the most current version. +" Last Change: 2001 May 09 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Option handling + +if exists("eiffel_ignore_case") + syn case ignore +else + syn case match + if exists("eiffel_pedantic") || exists("eiffel_strict") + syn keyword eiffelError current void result precursor none + syn keyword eiffelError CURRENT VOID RESULT PRECURSOR None + syn keyword eiffelError TRUE FALSE + endif + if exists("eiffel_pedantic") + syn keyword eiffelError true false + syn match eiffelError "\<[a-z_]\+[A-Z][a-zA_Z_]*\>" + syn match eiffelError "\<[A-Z][a-z_]*[A-Z][a-zA-Z_]*\>" + endif + if exists("eiffel_lower_case_predef") + syn keyword eiffelPredefined current void result precursor + endif +endif + +if exists("eiffel_hex_constants") + syn match eiffelNumber "\d[0-9a-fA-F]*[xX]" +endif + +" Keyword definitions + +syn keyword eiffelTopStruct indexing feature creation inherit +syn match eiffelTopStruct "\<class\>" +syn match eiffelKeyword "\<end\>" +syn match eiffelTopStruct "^end\>\(\s*--\s\+class\s\+\<[A-Z][A-Z0-9_]*\>\)\=" contains=eiffelClassName +syn match eiffelBrackets "[[\]]" +syn match eiffelBracketError "\]" +syn region eiffelGeneric transparent matchgroup=eiffelBrackets start="\[" end="\]" contains=ALLBUT,eiffelBracketError,eiffelGenericDecl,eiffelStringError,eiffelStringEscape,eiffelGenericCreate,eiffelTopStruct +if exists("eiffel_ise") + syn match eiffelCreate "\<create\>" + syn match eiffelTopStruct contained "\<create\>" + syn match eiffelGenericCreate contained "\<create\>" + syn match eiffelTopStruct "^create\>" + syn region eiffelGenericDecl transparent matchgroup=eiffelBrackets contained start="\[" end="\]" contains=ALLBUT,eiffelCreate,eiffelTopStruct,eiffelGeneric,eiffelBracketError,eiffelStringEscape,eiffelStringError,eiffelBrackets + syn region eiffelClassHeader start="^class\>" end="$" contains=ALLBUT,eiffelCreate,eiffelGenericCreate,eiffelGeneric,eiffelStringEscape,eiffelStringError,eiffelBrackets +endif +syn keyword eiffelDeclaration is do once deferred unique local +syn keyword eiffelDeclaration Unique +syn keyword eiffelProperty expanded obsolete separate frozen +syn keyword eiffelProperty prefix infix +syn keyword eiffelInheritClause rename redefine undefine select export as +syn keyword eiffelAll all +syn keyword eiffelKeyword external alias +syn keyword eiffelStatement if else elseif inspect +syn keyword eiffelStatement when then +syn match eiffelAssertion "\<require\(\s\+else\)\=\>" +syn match eiffelAssertion "\<ensure\(\s\+then\)\=\>" +syn keyword eiffelAssertion check +syn keyword eiffelDebug debug +syn keyword eiffelStatement from until loop +syn keyword eiffelAssertion variant +syn match eiffelAssertion "\<invariant\>" +syn match eiffelTopStruct "^invariant\>" +syn keyword eiffelException rescue retry + +syn keyword eiffelPredefined Current Void Result Precursor + +" Operators +syn match eiffelOperator "\<and\(\s\+then\)\=\>" +syn match eiffelOperator "\<or\(\s\+else\)\=\>" +syn keyword eiffelOperator xor implies not +syn keyword eiffelOperator strip old +syn keyword eiffelOperator Strip +syn match eiffelOperator "\$" +syn match eiffelCreation "!" +syn match eiffelExport "[{}]" +syn match eiffelArray "<<" +syn match eiffelArray ">>" +syn match eiffelConstraint "->" +syn match eiffelOperator "[@#|&][^ \e\t\b%]*" + +" Special classes +syn keyword eiffelAnchored like +syn keyword eiffelBitType BIT + +" Constants +if !exists("eiffel_pedantic") + syn keyword eiffelBool true false +endif +syn keyword eiffelBool True False +syn region eiffelString start=+"+ skip=+%"+ end=+"+ contains=eiffelStringEscape,eiffelStringError +syn match eiffelStringEscape contained "%[^/]" +syn match eiffelStringEscape contained "%/\d\+/" +syn match eiffelStringEscape contained "^[ \t]*%" +syn match eiffelStringEscape contained "%[ \t]*$" +syn match eiffelStringError contained "%/[^0-9]" +syn match eiffelStringError contained "%/\d\+[^0-9/]" +syn match eiffelBadConstant "'\(%[^/]\|%/\d\+/\|[^'%]\)\+'" +syn match eiffelBadConstant "''" +syn match eiffelCharacter "'\(%[^/]\|%/\d\+/\|[^'%]\)'" contains=eiffelStringEscape +syn match eiffelNumber "-\=\<\d\+\(_\d\+\)*\>" +syn match eiffelNumber "\<[01]\+[bB]\>" +syn match eiffelNumber "-\=\<\d\+\(_\d\+\)*\.\(\d\+\(_\d\+\)*\)\=\([eE][-+]\=\d\+\(_\d\+\)*\)\=" +syn match eiffelNumber "-\=\.\d\+\(_\d\+\)*\([eE][-+]\=\d\+\(_\d\+\)*\)\=" +syn match eiffelComment "--.*" contains=eiffelTodo + +syn case match + +" Case sensitive stuff + +syn keyword eiffelTodo contained TODO XXX FIXME +syn match eiffelClassName "\<[A-Z][A-Z0-9_]*\>" + +" Catch mismatched parentheses +syn match eiffelParenError ")" +syn region eiffelParen transparent start="(" end=")" contains=ALLBUT,eiffelParenError,eiffelStringError,eiffelStringEscape + +" Should suffice for even very long strings and expressions +syn sync lines=40 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_eiffel_syntax_inits") + if version < 508 + let did_eiffel_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink eiffelKeyword Statement + HiLink eiffelProperty Statement + HiLink eiffelInheritClause Statement + HiLink eiffelStatement Statement + HiLink eiffelDeclaration Statement + HiLink eiffelAssertion Statement + HiLink eiffelDebug Statement + HiLink eiffelException Statement + HiLink eiffelGenericCreate Statement + + + HiLink eiffelTopStruct PreProc + + HiLink eiffelAll Special + HiLink eiffelAnchored Special + HiLink eiffelBitType Special + + + HiLink eiffelBool Boolean + HiLink eiffelString String + HiLink eiffelCharacter Character + HiLink eiffelClassName Type + HiLink eiffelNumber Number + + HiLink eiffelStringEscape Special + + HiLink eiffelOperator Special + HiLink eiffelArray Special + HiLink eiffelExport Special + HiLink eiffelCreation Special + HiLink eiffelBrackets Special + HiLink eiffelGeneric Special + HiLink eiffelGenericDecl Special + HiLink eiffelConstraint Special + HiLink eiffelCreate Special + + HiLink eiffelPredefined Constant + + HiLink eiffelComment Comment + + HiLink eiffelError Error + HiLink eiffelBadConstant Error + HiLink eiffelStringError Error + HiLink eiffelParenError Error + HiLink eiffelBracketError Error + + HiLink eiffelTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "eiffel" + +" vim: ts=8 diff --git a/runtime/syntax/elf.vim b/runtime/syntax/elf.vim new file mode 100644 index 000000000..678048968 --- /dev/null +++ b/runtime/syntax/elf.vim @@ -0,0 +1,95 @@ +" Vim syntax file +" Language: ELF +" Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de> +" Last Change: Son 22 Jun 2003 20:43:14 CEST +" Filenames: *.ab,*.am +" URL: http://www.cvjb.de/comp/vim/elf.vim +" $Id$ +" +" ELF: Extensible Language Facility +" This is the Applix Inc., Macro and Builder programming language. +" It has nothing in common with the binary format called ELF. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Case does not matter +syn case ignore + +" Environments +syn region elfEnvironment transparent matchgroup=Special start="{" matchgroup=Special end="}" contains=ALLBUT,elfBraceError + +" Unmatched braces +syn match elfBraceError "}" + +" All macros must have at least one of these definitions +syn keyword elfSpecial endmacro +syn region elfSpecial transparent matchgroup=Special start="^\(\(macro\)\|\(set\)\) \S\+$" matchgroup=Special end="^\(\(endmacro\)\|\(endset\)\)$" contains=ALLBUT,elfBraceError + +" Preprocessor Commands +syn keyword elfPPCom define include + +" Some keywords +syn keyword elfKeyword false true null +syn keyword elfKeyword var format object function endfunction + +" Conditionals and loops +syn keyword elfConditional if else case of endcase for to next while until return goto + +" All built-in elf macros end with an '@' +syn match elfMacro "[0-9_A-Za-z]\+@" + +" Strings and characters +syn region elfString start=+"+ skip=+\\\\\|\\"+ end=+"+ + +" Numbers +syn match elfNumber "-\=\<[0-9]*\.\=[0-9_]\>" + +" Comments +syn region elfComment start="/\*" end="\*/" +syn match elfComment "\'.*$" + +syn sync ccomment elfComment + +" Parenthesis +syn match elfParens "[\[\]()]" + +" Punctuation +syn match elfPunct "[,;]" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_elf_syn_inits") + if version < 508 + let did_elf_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later. + HiLink elfComment Comment + HiLink elfPPCom Include + HiLink elfKeyword Keyword + HiLink elfSpecial Special + HiLink elfEnvironment Special + HiLink elfBraceError Error + HiLink elfConditional Conditional + HiLink elfMacro Function + HiLink elfNumber Number + HiLink elfString String + HiLink elfParens Delimiter + HiLink elfPunct Delimiter + + delcommand HiLink +endif + +let b:current_syntax = "elf" + +" vim:ts=8:sw=4:nocindent:smartindent: diff --git a/runtime/syntax/elinks.vim b/runtime/syntax/elinks.vim new file mode 100644 index 000000000..0392c0858 --- /dev/null +++ b/runtime/syntax/elinks.vim @@ -0,0 +1,207 @@ +" Vim syntax file +" Language: elinks(1) configuration file +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/ +" Latest Revision: 2004-05-22 +" arch-tag: 74eaff55-cdb5-4d31-805b-9627eb6535f1 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Set iskeyword since we need `-' (and potentially others) in keywords. +" For version 5.x: Set it globally +" For version 6.x: Set it locally +if version >= 600 + command -nargs=1 SetIsk setlocal iskeyword=<args> +else + command -nargs=1 SetIsk set iskeyword=<args> +endif +SetIsk @,48-57,_,- +delcommand SetIsk + +" Todo +syn keyword elinksTodo contained TODO FIXME XXX NOTE + +" Comments +syn region elinksComment matchgroup=elinksComment start='#' end='$' contains=elinksTodo + +" Numbers +syn match elinksNumber '\<\d\+\>' + +" Strings +syn region elinksString matchgroup=elinksString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@elinksColor + +" Keywords +syn keyword elinksKeyword set bind + +" Options +syn keyword elinksPrefix bookmarks +syn keyword elinksOptions file_format + +syn keyword elinksPrefix config +syn keyword elinksOptions comments indentation saving_style i18n +syn keyword elinksOptions saving_style_w show_template + +syn keyword elinksPrefix connection ssl client_cert +syn keyword elinksOptions enable file cert_verify async_dns max_connections +syn keyword elinksOptions max_connections_to_host receive_timeout retries +syn keyword elinksOptions unrestartable_receive_timeout + +syn keyword elinksPrefix cookies +syn keyword elinksOptions accept_policy max_age paranoid_security save resave + +syn keyword elinksPrefix document browse accesskey forms images links +syn keyword elinksPrefix active_link colors search cache codepage colors +syn keyword elinksPrefix format memory download dump history global html +syn keyword elinksPrefix plain +syn keyword elinksOptions auto_follow priority auto_submit confirm_submit +syn keyword elinksOptions input_size show_formhist file_tags +syn keyword elinksOptions image_link_tagging image_link_prefix +syn keyword elinksOptions image_link_suffix show_as_links show_any_as_links +syn keyword elinksOptions background text enable_color bold invert underline +syn keyword elinksOptions color_dirs numbering use_tabindex +syn keyword elinksOptions number_keys_select_link wraparound case regex +syn keyword elinksOptions show_hit_top_bottom wraparound show_not_found +syn keyword elinksOptions margin_width refresh minimum_refresh_time +syn keyword elinksOptions scroll_margin scroll_step table_move_order size +syn keyword elinksOptions size cache_redirects ignore_cache_control assume +syn keyword elinksOptions force_assumed text background link vlink dirs +syn keyword elinksOptions allow_dark_on_black ensure_contrast +syn keyword elinksOptions use_document_colors directory set_original_time +syn keyword elinksOptions overwrite notify_bell codepage width enable +syn keyword elinksOptions max_items display_type write_interval +syn keyword elinksOptions keep_unhistory display_frames display_tables +syn keyword elinksOptions expand_table_columns display_subs display_sups +syn keyword elinksOptions link_display underline_links wrap_nbsp +syn keyword elinksOptions display_links compress_empty_lines + +syn keyword elinksPrefix mime extension handler mailcap mimetypes type +syn keyword elinksOptions ask block program enable path ask description +syn keyword elinksOptions prioritize enable path default_type + +syn keyword elinksPrefix protocol file cgi ftp proxy http bugs proxy +syn keyword elinksPrefix referer https proxy rewrite dumb smart +syn keyword elinksOptions path policy allow_special_files show_hidden_files +syn keyword elinksOptions try_encoding_extensions host anon_passwd use_pasv +syn keyword elinksOptions use_epsv accept_charset allow_blacklist +syn keyword elinksOptions broken_302_redirect post_no_keepalive http10 host +syn keyword elinksOptions user passwd policy fake accept_language +syn keyword elinksOptions accept_ui_language trace user_agent host +syn keyword elinksOptions enable-dumb enable-smart + +syn keyword elinksPrefix terminal +syn keyword elinksOptions type m11_hack utf_8_io restrict_852 block_cursor +syn keyword elinksOptions colors transparency underline charset + +syn keyword elinksPrefix ui colors color mainmenu normal selected hotkey +syn keyword elinksPrefix menu marked hotkey frame dialog generic frame +syn keyword elinksPrefix scrollbar scrollbar-selected title text checkbox +syn keyword elinksPrefix checkbox-label button button-selected field +syn keyword elinksPrefix field-text meter shadow title title-bar title-text +syn keyword elinksPrefix status status-bar status-text tabs unvisited normal +syn keyword elinksPrefix loading separator searched mono +syn keyword elinksOptions text background + +syn keyword elinksPrefix ui dialogs leds sessions tabs timer +syn keyword elinksOptions listbox_min_height shadows underline_hotkeys enable +syn keyword elinksOptions auto_save auto_restore auto_save_foldername +syn keyword elinksOptions homepage show_bar wraparound confirm_close enable +syn keyword elinksOptions duration action language show_status_bar +syn keyword elinksOptions show_title_bar startup_goto_dialog success_msgbox +syn keyword elinksOptions window_title + +syn keyword elinksOptions secure_file_saving + +" Colors +syn cluster elinksColor contains=elinksColorBlack,elinksColorDarkRed,elinksColorDarkGreen,elinksColorDarkYellow,elinksColorDarkBlue,elinksColorDarkMagenta,elinksColorDarkCyan,elinksColorGray,elinksColorDarkGray,elinksColorRed,elinksColorGreen,elinksColorYellow,elinksColorBlue,elinksColorMagenta,elinksColorCyan,elinksColorWhite + +syn keyword elinksColorBlack black contained +syn keyword elinksColorDarkRed darkred sandybrown maroon crimson firebrick contained +syn keyword elinksColorDarkGreen darkgreen darkolivegreen darkseagreen contained +syn keyword elinksColorDarkGreen forestgreen mediumspringgreen seagreen contained +syn keyword elinksColorDarkYellow brown blanchedalmond chocolate darkorange contained +syn keyword elinksColorDarkYellow darkgoldenrod orange rosybrown saddlebrown contained +syn keyword elinksColorDarkYellow peru olive olivedrab sienna contained +syn keyword elinksColorDarkBlue darkblue cadetblue cornflowerblue contained +syn keyword elinksColorDarkBlue darkslateblue deepskyblue midnightblue contained +syn keyword elinksColorDarkBlue royalblue steelblue navy contained +syn keyword elinksColorDarkMagenta darkmagenta mediumorchid mediumpurple contained +syn keyword elinksColorDarkMagenta mediumslateblue slateblue deeppink hotpink contained +syn keyword elinksColorDarkMagenta darkorchid orchid purple indigo contained +syn keyword elinksColorDarkCyan darkcyan mediumaquamarine mediumturquoise contained +syn keyword elinksColorDarkCyan darkturquoise teal contained +syn keyword elinksColorGray silver dimgray lightslategray slategray contained +syn keyword elinksColorGray lightgrey burlywood plum tan thistle contained + +syn keyword elinksColorDarkGray gray darkgray darkslategray darksalmon contained +syn keyword elinksColorRed red indianred orangered tomato lightsalmon contained +syn keyword elinksColorRed salmon coral lightcoral contained +syn keyword elinksColorGreen green greenyellow lawngreen lightgreen contained +syn keyword elinksColorGreen lightseagreen limegreen mediumseagreen contained +syn keyword elinksColorGreen springgreen yellowgreen palegreen lime contained +syn keyword elinksColorGreen chartreuse contained +syn keyword elinksColorYellow yellow beige darkkhaki lightgoldenrodyellow contained +syn keyword elinksColorYellow palegoldenrod gold goldenrod khaki contained +syn keyword elinksColorYellow lightyellow contained +syn keyword elinksColorBlue blue aliceblue aqua aquamarine azure contained +syn keyword elinksColorBlue dodgerblue lightblue lightskyblue contained +syn keyword elinksColorBlue lightsteelblue mediumblue contained +syn keyword elinksColorMagenta magenta darkviolet blueviolet lightpink contained +syn keyword elinksColorMagenta mediumvioletred palevioletred violet pink contained +syn keyword elinksColorMagenta fuchsia contained +syn keyword elinksColorCyan cyan lightcyan powderblue skyblue turquoise contained +syn keyword elinksColorCyan paleturquoise contained +syn keyword elinksColorWhite white antiquewhite floralwhite ghostwhite contained +syn keyword elinksColorWhite navajowhite whitesmoke linen lemonchiffon contained +syn keyword elinksColorWhite cornsilk lavender lavenderblush seashell contained +syn keyword elinksColorWhite mistyrose ivory papayawhip bisque gainsboro contained +syn keyword elinksColorWhite honeydew mintcream moccasin oldlace contained +syn keyword elinksColorWhite peachpuff snow wheat contained + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_elinks_syn_inits") + if version < 508 + let did_elinks_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + command -nargs=+ HiDef hi <args> + else + command -nargs=+ HiLink hi def link <args> + command -nargs=+ HiDef hi def <args> + endif + + HiLink elinksTodo Todo + HiLink elinksComment Comment + HiLink elinksNumber Number + HiLink elinksString String + HiLink elinksKeyword Keyword + HiLink elinksPrefix Identifier + HiLink elinksOptions Identifier + HiDef elinksColorBlack ctermfg=Black guifg=Black + HiDef elinksColorDarkRed ctermfg=DarkRed guifg=DarkRed + HiDef elinksColorDarkGreen ctermfg=DarkGreen guifg=DarkGreen + HiDef elinksColorDarkYellow ctermfg=DarkYellow guifg=DarkYellow + HiDef elinksColorDarkBlue ctermfg=DarkBlue guifg=DarkBlue + HiDef elinksColorDarkMagenta ctermfg=DarkMagenta guifg=DarkMagenta + HiDef elinksColorDarkCyan ctermfg=DarkCyan guifg=DarkCyan + HiDef elinksColorGray ctermfg=Gray guifg=Gray + HiDef elinksColorDarkGray ctermfg=DarkGray guifg=DarkGray + HiDef elinksColorRed ctermfg=Red guifg=Red + HiDef elinksColorGreen ctermfg=Green guifg=Green + HiDef elinksColorYellow ctermfg=Yellow guifg=Yellow + HiDef elinksColorBlue ctermfg=Blue guifg=Blue + HiDef elinksColorMagenta ctermfg=Magenta guifg=Magenta + HiDef elinksColorCyan ctermfg=Cyan guifg=Cyan + HiDef elinksColorWhite ctermfg=White guifg=White + + delcommand HiLink + delcommand HiDef +endif + +let b:current_syntax = "elinks" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/elmfilt.vim b/runtime/syntax/elmfilt.vim new file mode 100644 index 000000000..20f22d39b --- /dev/null +++ b/runtime/syntax/elmfilt.vim @@ -0,0 +1,70 @@ +" Vim syntax file +" Language: Elm Filter rules +" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> +" Last Change: Sep 02, 2003 +" Version: 3 +" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn cluster elmfiltIfGroup contains=elmfiltCond,elmfiltOper,elmfiltOperKey,,elmfiltNumber,elmfiltOperKey + +syn match elmfiltParenError "[()]" +syn match elmfiltMatchError "/" +syn region elmfiltIf start="\<if\>" end="\<then\>" contains=elmfiltParen,elmfiltParenError skipnl skipwhite nextgroup=elmfiltAction +syn region elmfiltParen contained matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=elmfiltParen,@elmfiltIfGroup,elmfiltThenError +syn region elmfiltMatch contained matchgroup=Delimiter start="/" skip="\\/" matchgroup=Delimiter end="/" skipnl skipwhite nextgroup=elmfiltOper,elmfiltOperKey +syn match elmfiltThenError "\<then.*$" +syn match elmfiltComment "^#.*$" contains=@Spell + +syn keyword elmfiltAction contained delete execute executec forward forwardc leave save savecopy skipnl skipwhite nextgroup=elmfiltString +syn match elmfiltArg contained "[^\\]%[&0-9dDhmrsSty&]"lc=1 + +syn match elmfiltOperKey contained "\<contains\>" skipnl skipwhite nextgroup=elmfiltString +syn match elmfiltOperKey contained "\<matches\s" nextgroup=elmfiltMatch,elmfiltSpaceError +syn keyword elmfiltCond contained cc bcc lines always subject sender from to lines received skipnl skipwhite nextgroup=elmfiltString +syn match elmfiltNumber contained "\d\+" +syn keyword elmfiltOperKey contained and not skipnl skipwhite nextgroup=elmfiltOper,elmfiltOperKey,elmfiltString +syn match elmfiltOper contained "\~" skipnl skipwhite nextgroup=elmfiltMatch +syn match elmfiltOper contained "<=\|>=\|!=\|<\|<\|=" skipnl skipwhite nextgroup=elmfiltString,elmfiltCond,elmfiltOperKey +syn region elmfiltString contained start='"' skip='"\(\\\\\)*\\["%]' end='"' contains=elmfiltArg skipnl skipwhite nextgroup=elmfiltOper,elmfiltOperKey +syn region elmfiltString contained start="'" skip="'\(\\\\\)*\\['%]" end="'" contains=elmfiltArg skipnl skipwhite nextgroup=elmfiltOper,elmfiltOperKey +syn match elmfiltSpaceError contained "\s.*$" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_elmfilt_syntax_inits") + if version < 508 + let did_elmfilt_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink elmfiltAction Statement + HiLink elmfiltArg Special + HiLink elmfiltComment Comment + HiLink elmfiltCond Statement + HiLink elmfiltIf Statement + HiLink elmfiltMatch Special + HiLink elmfiltMatchError Error + HiLink elmfiltNumber Number + HiLink elmfiltOper Operator + HiLink elmfiltOperKey Type + HiLink elmfiltParenError Error + HiLink elmfiltSpaceError Error + HiLink elmfiltString String + HiLink elmfiltThenError Error + + delcommand HiLink +endif + +let b:current_syntax = "elmfilt" +" vim: ts=9 diff --git a/runtime/syntax/erlang.vim b/runtime/syntax/erlang.vim new file mode 100644 index 000000000..a8ffb3939 --- /dev/null +++ b/runtime/syntax/erlang.vim @@ -0,0 +1,224 @@ +" Vim syntax file +" Language: erlang (ERicsson LANGuage) +" http://www.erlang.se +" http://www.erlang.org +" Maintainer: Kre¹imir Mar¾iæ (Kresimir Marzic) <kmarzic@fly.srk.fer.hr> +" Last update: Fri, 15-Feb-2002 +" Filenames: .erl +" URL: http://www.srk.fer.hr/~kmarzic/vim/syntax/erlang.vim + + +" There are three sets of highlighting in here: +" One is "erlang_characters", second is "erlang_functions" and third +" is "erlang_keywords". +" If you want to disable keywords highlighting, put in your .vimrc: +" let erlang_keywords=1 +" If you want to disable erlang BIF highlighting, put in your .vimrc +" this: +" let erlang_functions=1 +" If you want to disable special characters highlighting, put in +" your .vimrc: +" let erlang_characters=1 + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists ("b:current_syntax") + finish +endif + + +" Case sensitive +syn case match + + +if ! exists ("erlang_characters") + " Basic elements + syn match erlangComment +%.*$+ + syn match erlangModifier "\~\a\|\\\a" contained + syn match erlangSpecialCharacter ":\|_\|@\|\\\|\"\|\." + syn match erlangSeparator "(\|)\|{\|}\|\[\|]\||\|||\|;\|,\|?\|->\|#" contained + syn region erlangString start=+"+ skip=+\\"+ end=+"+ contains=erlangModifier + syn region erlangAtom start=+'+ skip=+\\'+ end=+'+ + + " Operators + syn match erlangOperator "+\|-\|\*\|\/" + syn keyword erlangOperator div rem or xor bor bxor bsl bsr + syn keyword erlangOperator and band not bnot + syn match erlangOperator "==\|/=\|=:=\|=/=\|<\|=<\|>\|>=" + syn match erlangOperator "++\|--\|=\|!\|<-" + + " Numbers + syn match erlangNumberInteger "[+-]\=\d\+" contains=erlangSeparator + syn match erlangNumberFloat1 "[+-]\=\d\+.\d\+" contains=erlangSeparator + syn match erlangNumberFloat2 "[+-]\=\d\+\(.\d\+\)\=[eE][+-]\=\d\+\(.\d\+\)\=" contains=erlangSeparator + syn match erlangNumberFloat3 "[+-]\=\d\+[#]\x\+" contains=erlangSeparator + syn match erlangNumberFloat4 "[+-]\=[eE][+-]\=\d\+" contains=erlangSeparator + syn match erlangNumberHex "$\x\+" contains=erlangSeparator + + " Ignore '_' and '-' in words + syn match erlangWord "\w\+[_-]\+\w\+" + + " Ignore numbers in words + syn match erlangWord "\w\+\d\+\(\(.\d\+\)\=\(\w\+\)\=\)\=" +endif + +if ! exists ("erlang_functions") + " Functions call + syn match erlangFCall "\w\+\(\s\+\)\=[:@]\(\s\+\)\=\w\+" contains=ALLBUT,erlangFunction,erlangBIF,erlangWord + + " build-in-functions (BIFs) + syn keyword erlangBIF abs alive apply atom_to_list + syn keyword erlangBIF binary_to_list binary_to_term + syn keyword erlangBIF concat_binary + syn keyword erlangBIF date disconnect_node + syn keyword erlangBIF element erase exit + syn keyword erlangBIF float float_to_list + syn keyword erlangBIF get get_keys group_leader + syn keyword erlangBIF halt hd + syn keyword erlangBIF integer_to_list is_alive + syn keyword erlangBIF length link list_to_atom list_to_binary + syn keyword erlangBIF list_to_float list_to_integer list_to_pid + syn keyword erlangBIF list_to_tuple load_module + syn keyword erlangBIF make_ref monitor_node + syn keyword erlangBIF node nodes now + syn keyword erlangBIF open_port + syn keyword erlangBIF pid_to_list process_flag + syn keyword erlangBIF process_info process put + syn keyword erlangBIF register registered round + syn keyword erlangBIF self setelement size spawn + syn keyword erlangBIF spawn_link split_binary statistics + syn keyword erlangBIF term_to_binary throw time tl trunc + syn keyword erlangBIF tuple_to_list + syn keyword erlangBIF unlink unregister + syn keyword erlangBIF whereis + + " Other BIFs + syn keyword erlangBIF atom binary constant function integer + syn keyword erlangBIF list number pid ports port_close port_info + syn keyword erlangBIF reference record + + " erlang:BIFs + syn keyword erlangBIF check_process_code delete_module + syn keyword erlangBIF get_cookie hash math module_loaded + syn keyword erlangBIF preloaded processes purge_module set_cookie + syn keyword erlangBIF set_node + + " functions of math library + syn keyword erlangFunction acos asin atan atan2 cos cosh exp + syn keyword erlangFunction log log10 pi pow power sin sinh sqrt + syn keyword erlangFunction tan tanh + + " Other functions + syn keyword erlangFunction call module_info parse_transform + syn keyword erlangFunction undefined_function + + " Modules + syn keyword erlangModule error_handler +endif + +if ! exists ("erlang_keywords") + " Constants and Directives + syn match erlangDirective "-compile\|-define\|-else\|-endif\|-export\|-file" + syn match erlangDirective "-ifdef\|-ifndef\|-import\|-include\|-include_lib" + syn match erlangDirective "-module\|-record\|-undef" + + syn match erlangConstant "-author\|-copyright\|-doc" + + " Keywords + syn keyword erlangKeyword after begin case catch + syn keyword erlangKeyword cond end fun if + syn keyword erlangKeyword let of query receive + syn keyword erlangKeyword when + + " Processes + syn keyword erlangProcess creation current_function dictionary + syn keyword erlangProcess group_leader heap_size high initial_call + syn keyword erlangProcess linked low memory_in_use message_queue + syn keyword erlangProcess net_kernel node normal priority + syn keyword erlangProcess reductions registered_name runnable + syn keyword erlangProcess running stack_trace status timer + syn keyword erlangProcess trap_exit waiting + + " Ports + syn keyword erlangPort command count_in count_out creation in + syn keyword erlangPort in_format linked node out owner packeting + + " Nodes + syn keyword erlangNode atom_tables communicating creation + syn keyword erlangNode current_gc current_reductions current_runtime + syn keyword erlangNode current_wall_clock distribution_port + syn keyword erlangNode entry_points error_handler friends + syn keyword erlangNode garbage_collection magic_cookie magic_cookies + syn keyword erlangNode module_table monitored_nodes name next_ref + syn keyword erlangNode ports preloaded processes reductions + syn keyword erlangNode ref_state registry runtime wall_clock + + " Reserved + syn keyword erlangReserved apply_lambda module_info module_lambdas + syn keyword erlangReserved record record_index record_info + + " Extras + syn keyword erlangExtra badarg nocookie false fun true + + " Signals + syn keyword erlangSignal badsig kill killed exit normal +endif + + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists ("did_erlang_inits") + if version < 508 + let did_erlang_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " erlang_characters + HiLink erlangComment Comment + HiLink erlangSpecialCharacter Special + HiLink erlangSeparator Normal + HiLink erlangModifier Special + HiLink erlangOperator Operator + HiLink erlangString String + HiLink erlangAtom Type + + HiLink erlangNumberInteger Number + HiLink erlangNumberFloat1 Float + HiLink erlangNumberFloat2 Float + HiLink erlangNumberFloat3 Float + HiLink erlangNumberFloat4 Float + HiLink erlangNumberHex Number + + HiLink erlangWord Normal + + " erlang_functions + HiLink erlangFCall Function + HiLink erlangBIF Function + HiLink erlangFunction Function + HiLink erlangModuleFunction Function + + " erlang_keywords + HiLink erlangDirective Type + HiLink erlangConstant Type + HiLink erlangKeyword Keyword + HiLink erlangProcess Special + HiLink erlangPort Special + HiLink erlangNode Special + HiLink erlangReserved Statement + HiLink erlangExtra Statement + HiLink erlangSignal Statement + + delcommand HiLink +endif + + +let b:current_syntax = "erlang" + +" eof diff --git a/runtime/syntax/esqlc.vim b/runtime/syntax/esqlc.vim new file mode 100644 index 000000000..6ad167a7e --- /dev/null +++ b/runtime/syntax/esqlc.vim @@ -0,0 +1,75 @@ +" Vim syntax file +" Language: ESQL-C +" Maintainer: Jonathan A. George <jageorge@tel.gte.com> +" Last Change: 2001 May 09 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the C++ syntax to start with +if version < 600 + source <sfile>:p:h/cpp.vim +else + runtime! syntax/cpp.vim +endif + +" ESQL-C extentions + +syntax keyword esqlcPreProc EXEC SQL INCLUDE + +syntax case ignore + +syntax keyword esqlcPreProc begin end declare section database open execute +syntax keyword esqlcPreProc prepare fetch goto continue found sqlerror work + +syntax keyword esqlcKeyword access add as asc by check cluster column +syntax keyword esqlcKeyword compress connect current decimal +syntax keyword esqlcKeyword desc exclusive file from group +syntax keyword esqlcKeyword having identified immediate increment index +syntax keyword esqlcKeyword initial into is level maxextents mode modify +syntax keyword esqlcKeyword nocompress nowait of offline on online start +syntax keyword esqlcKeyword successful synonym table then to trigger uid +syntax keyword esqlcKeyword unique user validate values view whenever +syntax keyword esqlcKeyword where with option order pctfree privileges +syntax keyword esqlcKeyword public resource row rowlabel rownum rows +syntax keyword esqlcKeyword session share size smallint + +syntax keyword esqlcOperator not and or +syntax keyword esqlcOperator in any some all between exists +syntax keyword esqlcOperator like escape +syntax keyword esqlcOperator intersect minus +syntax keyword esqlcOperator prior distinct +syntax keyword esqlcOperator sysdate + +syntax keyword esqlcStatement alter analyze audit comment commit create +syntax keyword esqlcStatement delete drop explain grant insert lock noaudit +syntax keyword esqlcStatement rename revoke rollback savepoint select set +syntax keyword esqlcStatement truncate update + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_esqlc_syntax_inits") + if version < 508 + let did_esqlc_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink esqlcOperator Operator + HiLink esqlcStatement Statement + HiLink esqlcKeyword esqlcSpecial + HiLink esqlcSpecial Special + HiLink esqlcPreProc PreProc + + delcommand HiLink +endif + +let b:current_syntax = "esqlc" + diff --git a/runtime/syntax/eterm.vim b/runtime/syntax/eterm.vim new file mode 100644 index 000000000..9cf38fe14 --- /dev/null +++ b/runtime/syntax/eterm.vim @@ -0,0 +1,200 @@ +" Vim syntax file +" Language: Eterm configuration file +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/eterm/ +" Latest Revision: 2004-05-06 +" arch-tag: f4c58caf-2b91-4fc4-96af-e3cad7c70e6b + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" magic number +syn match etermMagic display "^<Eterm-[0-9.]\+>$" + +" comments +syn region etermComment matchgroup=etermComment start="^#" end="$" contains=etermTodo + +" todo +syn keyword etermTodo contained TODO FIXME XXX NOTE + +" numbers +syn match etermNumber contained display "\<\(\d\+\|0x\x\{1,2}\)\>" + +" strings +syn region etermString contained display oneline start=+"+ skip=+\\"+ end=+"+ + +" booleans +syn keyword etermBoolean contained on off true false yes no + +" colors (not pretty, but can't figure out better way...) +syn match etermColor contained display "\s\+#\x\{6}\>" +syn keyword etermColor contained white black + +" preproc +syn match etermPreProc contained "%\(appname\|exec\|get\|put\|random\|version\|include\|preproc\)("he=e-1 + +" functions +syn match etermFunctions contained "\<\(copy\|exit\|kill\|nop\|paste\|save\|scroll\|search\|spawn\)(" + +" and make it easy to refer to the above... +syn cluster etermGeneral contains=etermComment,etermNumber,etermString,etermBoolean,etermColor,etermFunction,etermPreProc + +" key modifiers +syn keyword etermKeyMod contained ctrl shift lock mod1 mod2 mod3 mod4 mod5 alt meta anymod +syn keyword etermKeyMod contained button1 button2 button3 button4 button5 + +" color context +syn region etermColorOptions contained oneline matchgroup=etermOption start="^\s*video\>" matchgroup=etermType end="\<\(normal\|reverse\)\>" +syn region etermColorOptions contained oneline matchgroup=etermOption start="^\s*color\>" matchgroup=etermType end="\<\(bd\|ul\|[0-9]\|1[0-5]\)\>" +syn keyword etermColorOptions contained foreground background cursor cursor_text pointer + +syn region etermColorContext fold transparent matchgroup=etermContext start="^\s*begin\s\+color\s*$" end="^\s*end\>\(\s\+.\{-0,}\)\=$" contains=@etermGeneral,etermColorOptions + +" attributes context +syn region etermAttrOptions contained oneline matchgroup=etermOption start="^\s*geometry\>" matchgroup=etermType end="\<\d\+x\d\++\d\++\d\+\>" +syn region etermAttrOptions contained oneline matchgroup=etermOption start="^\s*scrollbar_type\>" matchgroup=etermType end="\<\(motif\|xterm\|next\)\>" +syn region etermAttrOptions contained oneline matchgroup=etermOption start="^\s*font\>" matchgroup=etermType end="\<\(bold\|default\|proportional\|fx\|[0-5]\)\>" +syn keyword etermAttrOptions contained title name iconname desktop scrollbar_width + +syn region etermAttrContext fold transparent matchgroup=etermContext start="^\s*begin\s\+attributes\s*$" end="^\s*end\>\(\s\+.\{-0,}\)\=$" contains=@etermGeneral,etermAttrOptions + +" image context +" image types +syn keyword etermImageTypes contained background trough anchor up_arrow +syn keyword etermImageTypes contained left_arrow right_arrow menu menuitem +syn keyword etermImageTypes contained submenu button buttonbar down_arrow +syn region etermImageOptions contained transparent oneline matchgroup=etermOption start="^\s*type\>" end="$" contains=etermImageTypes +" image modes +syn keyword etermImageModes contained image trans viewport auto solid +syn keyword etermImageModesAllow contained allow +syn region etermImageOptions contained transparent oneline matchgroup=etermOption start="^\s*mode\>" end="$" contains=etermImageModes,etermImageModesAllow +" image states +syn region etermImageOptions contained transparent oneline matchgroup=etermOption start="^\s*state\>" matchgroup=etermType end="\<\(normal\|selected\|clicked\|disabled\)\>" +" image geometry +syn region etermImageOptions contained transparent oneline matchgroup=etermOption start="^\s*geom\>" matchgroup=etermType end="\s\+\(\d\+x\d\++\d\++\d\+\)\=:\(\(tile\|scale\|hscale\|vscale\|propscale\)d\=\)\=" +" image color modification +syn region etermImageOptions contained transparent oneline matchgroup=etermOption start="^\s*\(cmod\|colormod\)\>" matchgroup=etermType end="\<\(image\|red\|green\|blue\)\>" +" other keywords +syn keyword etermImageOptions contained file padding border bevel color + +syn region etermImageContext contained transparent fold matchgroup=etermContext start="^\s*begin\s\+image\s*$" end="^\s*end\>\(\s\+.\{-0,}\)\=$" contains=@etermGeneral,etermImageOptions + +" imageclasses context +syn keyword etermIClassOptions contained icon cache path anim + +syn region etermIClassContext fold transparent matchgroup=etermContext start="^\s*begin\s\+imageclasses\s*$" end="^\s*end\>\(\s\+.\{-0,}\)\=$" contains=@etermGeneral,etermImageContext,etermIClassOptions + +" menuitem context +syn region etermMenuItemOptions contained transparent oneline matchgroup=etermOption start="^\s*action\>" matchgroup=etermType end="\<string\|echo\|submenu\|script\|separator\>" +syn keyword etermMenuItemOptions contained text rtext + +syn region etermMenuItemContext fold transparent matchgroup=etermContext start="^\s*begin\s\+menuitem\s*$" end="^\s*end\>\(\s\+.\{-0,}\)\=$" contains=@etermGeneral,etermMenuItemOptions + +" menu context (should contain - as well, but no...) +syn keyword etermMenuOptions contained title font_name sep + +syn region etermMenuContext fold transparent matchgroup=etermContext start="^\s*begin\s\+menu\s*$" end="^\s*end\>\(\s\+.\{-0,}\)\=$" contains=@etermGeneral,etermMenuOptions,etermMenuItemContext + +" action context +syn match etermActionDef contained "\<\(to\|string\|echo\|menu\|script\)\>" +syn region etermActionsOptions contained transparent oneline matchgroup=etermOption start="^\s*bind\>" end="$" contains=etermActionDef,etermKeyMod + +syn region etermActionsContext fold transparent matchgroup=etermContext start="^\s*begin\s\+actions\s*$" end="^\s*end\>\(\s\+.\{-0,}\)\=$" contains=@etermGeneral,etermActionsOptions + +" button bar context +syn match etermButtonDef contained "\<\(action\|string\|echo\|menu\|scrupt\)\>" +syn region etermButtonOptions contained transparent oneline matchgroup=etermOption start="^\s*button\>" end="$" contains=etermButtonDef +syn keyword etermButtonOptions contained font visible dock + +syn region etermButtonContext fold transparent matchgroup=etermContext start="^\s*begin\s\+button_bar\s*$" end="^\s*end\>\(\s\+.\{-0,}\)\=$" contains=@etermGeneral,etermButtonOptions + +" multichar context +syn keyword etermMultiOptions contained encoding font + +syn region etermMultiContext fold transparent matchgroup=etermContext start="^\s*begin\s\+multichar\s*$" end="^\s*end\>\(\s\+.\{-0,}\)\=$" contains=@etermGeneral,etermMultiOptions + +" xim context +syn keyword etermXimOptions contained input_method preedit_type + +syn region etermXimContext fold transparent matchgroup=etermContext start="^\s*begin\s\+xim\s*$" end="^\s*end\>\(\s\+.\{-0,}\)\=$" contains=@etermGeneral,etermXimOptions + +" toggles context +syn keyword etermTogOptions contained map_alert visual_bell login_shell scrollbar utmp_logging meta8 iconic no_input +syn keyword etermTogOptions contained home_on_output home_on_input scrollbar_floating scrollbar_right scrollbar_popup +syn keyword etermTogOptions contained borderless double_buffer no_cursor pause xterm_select select_line +syn keyword etermTogOptions contained select_trailing_spaces report_as_keysyms itrans immotile_trans buttonbar +syn keyword etermTogOptions contained resize_gravity + +syn region etermTogContext fold transparent matchgroup=etermContext start="^\s*begin\s\+toggles\s*$" end="^\s*end\>\(\s\+.\{-0,}\)\=$" contains=@etermGeneral,etermTogOptions + +" keyboard context +syn keyword etermKeyboardOptions contained smallfont_key bigfont_key keysym meta_mod alt_mod +syn keyword etermKeyboardOptions contained greek numlock_mod app_keypad app_cursor + +syn region etermKeyboardContext fold transparent matchgroup=etermContext start="^\s*begin\s\+keyboard\s*$" end="^\s*end\>\(\s\+.\{-0,}\)\=$" contains=@etermGeneral,etermKeyboardOptions + +" misc context +syn keyword etermMiscOptions contained print_pipe save_lines cut_chars min_anchor_size +syn keyword etermMiscOptions contained border_width line_space finished_title term_name +syn keyword etermMiscOptions contained finished_text exec + +syn region etermMiscContext fold transparent matchgroup=etermContext start="^\s*begin\s\+misc\s*$" end="^\s*end\>\(\s\+.\{-0,}\)\=$" contains=@etermGeneral,etermMiscOptions + +if exists("eterm_minlines") + let b:eterm_minlines = eterm_minlines +else + let b:eterm_minlines = 30 +endif +exec "syn sync minlines=" . b:eterm_minlines + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_eterm_syn_inits") + if version < 508 + let did_eterm_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink etermMagic Special + HiLink etermComment Comment + HiLink etermTodo Todo + HiLink etermNumber Number + HiLink etermString String + HiLink etermBoolean Boolean + HiLink etermColor Number + HiLink etermPreProc PreProc + HiLink etermFunctions Function + HiLink etermKeyMod Special + HiLink etermContext Keyword + HiLink etermOption Keyword + HiLink etermType Type + HiLink etermColorOptions Keyword + HiLink etermAttrOptions Keyword + HiLink etermIClassOptions Keyword + HiLink etermImageTypes Type + HiLink etermImageModes Type + HiLink etermImageModesAllow Keyword + HiLink etermImageOptions Keyword + HiLink etermMenuOptions Keyword + HiLink etermMenuItemOptions Keyword + HiLink etermActionDef Type + HiLink etermActionsOptions Keyword + HiLink etermButtonDef Type + HiLink etermButtonOptions Keyword + HiLink etermMultiOptions Keyword + HiLink etermXimOptions Keyword + HiLink etermTogOptions Keyword + HiLink etermKeyboardOptions Keyword + HiLink etermMiscOptions Keyword + delcommand HiLink +endif + +let b:current_syntax = "eterm" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/exim.vim b/runtime/syntax/exim.vim new file mode 100644 index 000000000..ff8066f8a --- /dev/null +++ b/runtime/syntax/exim.vim @@ -0,0 +1,117 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: Exim configuration file exim.conf +" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> +" Last Change: 2002-10-15 +" URL: http://trific.ath.cx/Ftp/vim/syntax/exim.vim + +" Setup +if version >= 600 + if exists("b:current_syntax") + finish + endif +else + syntax clear +endif + +syn case match + +" Base constructs +syn match eximComment "^\s*#.*$" contains=eximFixme +syn match eximComment "\s#.*$" contains=eximFixme +syn keyword eximFixme FIXME TODO XXX NOT contained +syn keyword eximConstant true false yes no +syn match eximNumber "\<\d\+[KM]\?\>" +syn match eximNumber "\<0[xX]\x\+\>" +syn match eximNumber "\<\d\+\(\.\d\{,3}\)\?\>" +syn match eximTime "\<\(\d\+[wdhms]\)\+\>" +syn match eximSpecialChar "\\[\\nrt]\|\\\o\{1,3}\|\\x\x\{1,2}" +syn region eximMacroDefinition matchgroup=eximMacroName start="^[A-Z]\i*\s*=" end="$" skip="\\\s*$" transparent + +syn match eximDriverName "\<\(aliasfile\|appendfile\|autoreply\|domainlist\|forwardfile\|ipliteral\|iplookup\|lmtp\|localuser\|lookuphost\|pipe\|queryprogram\|smartuser\|smtp\)\>" +syn match eximTransport "^\s*\i\+:" + +" Options +syn keyword eximEnd end +syn keyword eximKeyword accept_8bitmime accept_timeout admin_groups allow_mx_to_ip always_bcc auth_always_advertise auth_hosts auth_over_tls_hosts auto_thaw bi_command check_log_inodes check_log_space check_spool_inodes check_spool_space collapse_source_routes daemon_smtp_port daemon_smtp_service debug_level delay_warning delay_warning_condition deliver_load_max deliver_queue_load_max delivery_date_remove dns_again_means_nonexist dns_check_names dns_check_names_pattern dns_retrans dns_ipv4_lookup dns_retry envelope_to_remove errmsg_text errmsg_file errors_address errors_copy errors_reply_to exim_group exim_path exim_user extract_addresses_remove_arguments finduser_retries forbid_domain_literals freeze_tell_mailmaster gecos_name gecos_pattern headers_check_syntax headers_checks_fail headers_sender_verify headers_sender_verify_errmsg helo_accept_junk_hosts helo_strict_syntax helo_verify hold_domains host_accept_relay host_auth_accept_relay host_lookup host_reject host_reject_recipients hosts_treat_as_local ignore_errmsg_errors ignore_errmsg_errors_after ignore_fromline_hosts ignore_fromline_local keep_malformed kill_ip_options ldap_default_servers local_domains local_domains_include_host local_domains_include_host_literals local_from_check local_from_prefix local_from_suffix local_interfaces localhost_number locally_caseless log_all_parents log_arguments log_file_path log_incoming_port log_ip_options log_level log_queue_run_level log_received_recipients log_received_sender log_refused_recipients log_rewrites log_sender_on_delivery log_smtp_confirmation log_smtp_connections log_smtp_syntax_errors log_subject lookup_open_max max_username_length message_body_visible message_filter message_filter_directory_transport message_filter_directory2_transport message_filter_file_transport message_filter_group message_filter_pipe_transport message_filter_reply_transport message_filter_user message_id_header_text message_size_limit message_size_limit_count_recipients move_frozen_messages mysql_servers never_users nobody_group nobody_user percent_hack_domains perl_at_start perl_startup pgsql_servers pid_file_path preserve_message_logs primary_hostname print_topbitchars prod_requires_admin prohibition_message qualify_domain qualify_recipient queue_list_requires_admin queue_only queue_only_file queue_only_load queue_remote_domains queue_run_in_order queue_run_max queue_smtp_domains rbl_domains rbl_hosts rbl_log_headers rbl_log_rcpt_count rbl_reject_recipients rbl_warn_header received_header_text received_headers_max receiver_try_verify receiver_unqualified_hosts receiver_verify receiver_verify_addresses receiver_verify_hosts receiver_verify_senders recipients_max recipients_max_reject recipients_reject_except recipients_reject_except_senders refuse_ip_options relay_domains relay_domains_include_local_mx relay_match_host_or_sender remote_max_parallel remote_sort retry_data_expire retry_interval_max return_path_remove return_size_limit rfc1413_hosts rfc1413_query_timeout security sender_address_relay sender_address_relay_hosts sender_reject sender_reject_recipients sender_try_verify sender_unqualified_hosts sender_verify sender_verify_batch sender_verify_callback_domains sender_verify_callback_timeout sender_verify_fixup sender_verify_hosts sender_verify_hosts_callback sender_verify_max_retry_rate sender_verify_reject smtp_accept_keepalive smtp_accept_max smtp_accept_max_per_host smtp_accept_queue smtp_accept_queue_per_connection smtp_accept_reserve smtp_banner smtp_check_spool_space smtp_connect_backlog smtp_etrn_command smtp_etrn_hosts smtp_etrn_serialize smtp_expn_hosts smtp_load_reserve smtp_receive_timeout smtp_reserve_hosts smtp_verify split_spool_directory spool_directory strip_excess_angle_brackets strip_trailing_dot syslog_timestamp timeout_frozen_after timestamps_utc timezone tls_advertise_hosts tls_certificate tls_dhparam tls_host_accept_relay tls_hosts tls_log_cipher tls_log_peerdn tls_privatekey tls_verify_certificates tls_verify_ciphers tls_verify_hosts trusted_groups trusted_users unknown_login unknown_username untrusted_set_sender uucp_from_pattern uucp_from_sender warnmsg_file +syn keyword eximKeyword no_accept_8bitmime no_allow_mx_to_ip no_always_bcc no_auth_always_advertise no_collapse_source_routes no_delivery_date_remove no_dns_check_names no_envelope_to_remove no_extract_addresses_remove_arguments no_forbid_domain_literals no_freeze_tell_mailmaster no_headers_check_syntax no_headers_checks_fail no_headers_sender_verify no_headers_sender_verify_errmsg no_helo_strict_syntax no_ignore_errmsg_errors no_ignore_fromline_local no_kill_ip_options no_local_domains_include_host no_local_domains_include_host_literals no_local_from_check no_locally_caseless no_log_all_parents no_log_arguments no_log_incoming_port no_log_ip_options no_log_received_recipients no_log_received_sender no_log_refused_recipients no_log_rewrites no_log_sender_on_delivery no_log_smtp_confirmation no_log_smtp_connections no_log_smtp_syntax_errors no_log_subject no_message_size_limit_count_recipients no_move_frozen_messages no_preserve_message_logs no_print_topbitchars no_prod_requires_admin no_queue_list_requires_admin no_queue_only no_rbl_log_headers no_rbl_log_rcpt_count no_rbl_reject_recipients no_receiver_try_verify no_receiver_verify no_recipients_max_reject no_refuse_ip_options no_relay_domains_include_local_mx no_relay_match_host_or_sender no_return_path_remove no_sender_try_verify no_sender_verify no_sender_verify_batch no_sender_verify_fixup no_sender_verify_reject no_smtp_accept_keepalive no_smtp_check_spool_space no_smtp_etrn_serialize no_smtp_verify no_split_spool_directory no_strip_excess_angle_brackets no_strip_trailing_dot no_syslog_timestamp no_timestamps_utc no_tls_log_cipher no_tls_log_peerdn no_untrusted_set_sender +syn keyword eximKeyword not_accept_8bitmime not_allow_mx_to_ip not_always_bcc not_auth_always_advertise not_collapse_source_routes not_delivery_date_remove not_dns_check_names not_envelope_to_remove not_extract_addresses_remove_arguments not_forbid_domain_literals not_freeze_tell_mailmaster not_headers_check_syntax not_headers_checks_fail not_headers_sender_verify not_headers_sender_verify_errmsg not_helo_strict_syntax not_ignore_errmsg_errors not_ignore_fromline_local not_kill_ip_options not_local_domains_include_host not_local_domains_include_host_literals not_local_from_check not_locally_caseless not_log_all_parents not_log_arguments not_log_incoming_port not_log_ip_options not_log_received_recipients not_log_received_sender not_log_refused_recipients not_log_rewrites not_log_sender_on_delivery not_log_smtp_confirmation not_log_smtp_connections not_log_smtp_syntax_errors not_log_subject not_message_size_limit_count_recipients not_move_frozen_messages not_preserve_message_logs not_print_topbitchars not_prod_requires_admin not_queue_list_requires_admin not_queue_only not_rbl_log_headers not_rbl_log_rcpt_count not_rbl_reject_recipients not_receiver_try_verify not_receiver_verify not_recipients_max_reject not_refuse_ip_options not_relay_domains_include_local_mx not_relay_match_host_or_sender not_return_path_remove not_sender_try_verify not_sender_verify not_sender_verify_batch not_sender_verify_fixup not_sender_verify_reject not_smtp_accept_keepalive not_smtp_check_spool_space not_smtp_etrn_serialize not_smtp_verify not_split_spool_directory not_strip_excess_angle_brackets not_strip_trailing_dot not_syslog_timestamp not_timestamps_utc not_tls_log_cipher not_tls_log_peerdn not_untrusted_set_sender +syn keyword eximKeyword body_only debug_print delivery_date_add driver envelope_to_add headers_add headers_only headers_remove headers_rewrite message_size_limit return_path return_path_add shadow_condition shadow_transport transport_filter +syn keyword eximKeyword no_body_only no_delivery_date_add no_envelope_to_add no_headers_only no_return_path_add +syn keyword eximKeyword not_body_only not_delivery_date_add not_envelope_to_add not_headers_only not_return_path_add +syn keyword eximKeyword allow_fifo allow_symlink batch batch_max bsmtp bsmtp_helo check_group check_owner check_string create_directory create_file current_directory directory directory_mode escape_string file file_format file_must_exist from_hack group lock_fcntl_timeout lock_interval lock_retries lockfile_mode lockfile_timeout maildir_format maildir_retries maildir_tag mailstore_format mailstore_prefix mailstore_suffix mbx_format mode mode_fail_narrower notify_comsat prefix quota quota_filecount quota_is_inclusive quota_size_regex quota_warn_message quota_warn_threshold require_lockfile retry_use_local_part suffix use_crlf use_fcntl_lock use_lockfile use_mbx_lock user +syn keyword eximKeyword no_allow_fifo no_allow_symlink no_bsmtp_helo no_check_group no_check_owner no_create_directory no_file_must_exist no_from_hack no_maildir_format no_mailstore_format no_mbx_format no_mode_fail_narrower no_notify_comsat no_quota_is_inclusive no_require_lockfile no_retry_use_local_part no_use_crlf no_use_fcntl_lock no_use_lockfile no_use_mbx_lock +syn keyword eximKeyword not_allow_fifo not_allow_symlink not_bsmtp_helo not_check_group not_check_owner not_create_directory not_file_must_exist not_from_hack not_maildir_format not_mailstore_format not_mbx_format not_mode_fail_narrower not_notify_comsat not_quota_is_inclusive not_require_lockfile not_retry_use_local_part not_use_crlf not_use_fcntl_lock not_use_lockfile not_use_mbx_lock +syn keyword eximKeyword bcc cc file file_expand file_optional from group headers initgroups log mode once once_file_size once_repeat reply_to return_message subject text to user +syn keyword eximKeyword no_file_expand no_file_optional no_initgroups no_return_message +syn keyword eximKeyword not_file_expand not_file_optional not_initgroups not_return_message +syn keyword eximKeyword batch batch_max command group initgroups retry_use_local_part timeout user +syn keyword eximKeyword no_initgroups +syn keyword eximKeyword not_initgroups +syn keyword eximKeyword allow_commands batch batch_max bsmtp bsmtp_helo check_string command current_directory environment escape_string freeze_exec_fail from_hack group home_directory ignore_status initgroups log_defer_output log_fail_output log_output max_output path pipe_as_creator prefix restrict_to_path retry_use_local_part return_fail_output return_output suffix temp_errors timeout umask use_crlf use_shell user +syn keyword eximKeyword no_bsmtp_helo no_freeze_exec_fail no_from_hack no_ignore_status no_log_defer_output no_log_fail_output no_log_output no_pipe_as_creator no_restrict_to_path no_return_fail_output no_return_output no_use_crlf no_use_shell +syn keyword eximKeyword not_bsmtp_helo not_freeze_exec_fail not_from_hack not_ignore_status not_log_defer_output not_log_fail_output not_log_output not_pipe_as_creator not_restrict_to_path not_return_fail_output not_return_output not_use_crlf not_use_shell +syn keyword eximKeyword allow_localhost authenticate_hosts batch_max command_timeout connect_timeout data_timeout delay_after_cutoff dns_qualify_single dns_search_parents fallback_hosts final_timeout gethostbyname helo_data hosts hosts_avoid_tls hosts_require_tls hosts_override hosts_max_try hosts_randomize interface keepalive max_rcpt multi_domain mx_domains port protocol retry_include_ip_address serialize_hosts service size_addition tls_certificate tls_privatekey tls_verify_certificates tls_verify_ciphers +syn keyword eximKeyword no_allow_localhost no_delay_after_cutoff no_dns_qualify_single no_dns_search_parents no_gethostbyname no_hosts_override no_hosts_randomize no_keepalive no_multi_domain no_retry_include_ip_address +syn keyword eximKeyword not_allow_localhost not_delay_after_cutoff not_dns_qualify_single not_dns_search_parents not_gethostbyname not_hosts_override not_hosts_randomize not_keepalive not_multi_domain not_retry_include_ip_address +syn keyword eximKeyword condition debug_print domains driver errors_to fail_verify fail_verify_recipient fail_verify_sender fallback_hosts group headers_add headers_remove initgroups local_parts more require_files senders transport unseen user verify verify_only verify_recipient verify_sender +syn keyword eximKeyword no_fail_verify no_fail_verify_recipient no_fail_verify_sender no_initgroups no_more no_unseen no_verify no_verify_only no_verify_recipient no_verify_sender +syn keyword eximKeyword not_fail_verify not_fail_verify_recipient not_fail_verify_sender not_initgroups not_more not_unseen not_verify not_verify_only not_verify_recipient not_verify_sender +syn keyword eximKeyword current_directory expn home_directory new_director prefix prefix_optional suffix suffix_optional +syn keyword eximKeyword no_expn no_prefix_optional no_suffix_optional +syn keyword eximKeyword not_expn not_prefix_optional not_suffix_optional +syn keyword eximKeyword check_ancestor directory_transport directory2_transport file_transport forbid_file forbid_include forbid_pipe freeze_missing_include hide_child_in_errmsg modemask one_time owners owngroups pipe_transport qualify_preserve_domain rewrite skip_syntax_errors syntax_errors_text syntax_errors_to +syn keyword eximKeyword no_check_ancestor no_forbid_file no_forbid_include no_forbid_pipe no_freeze_missing_include no_hide_child_in_errmsg no_one_time no_qualify_preserve_domain no_rewrite no_skip_syntax_errors +syn keyword eximKeyword not_check_ancestor not_forbid_file not_forbid_include not_forbid_pipe not_freeze_missing_include not_hide_child_in_errmsg not_one_time not_qualify_preserve_domain not_rewrite not_skip_syntax_errors +syn keyword eximKeyword expand file forbid_special include_domain optional queries query search_type +syn keyword eximKeyword no_expand no_forbid_special no_include_domain no_optional +syn keyword eximKeyword not_expand not_forbid_special not_include_domain not_optional +syn keyword eximKeyword allow_system_actions check_group check_local_user data file file_directory filter forbid_filter_existstest forbid_filter_logwrite forbid_filter_lookup forbid_filter_perl forbid_filter_reply ignore_eacces ignore_enotdir match_directory reply_transport seteuid +syn keyword eximKeyword no_allow_system_actions no_check_local_user no_forbid_filter_reply no_forbid_filter_existstest no_forbid_filter_logwrite no_forbid_filter_lookup no_forbid_filter_perl no_forbid_filter_reply no_ignore_eacces no_ignore_enotdir no_seteuid +syn keyword eximKeyword not_allow_system_actions not_check_local_user not_forbid_filter_reply not_forbid_filter_existstest not_forbid_filter_logwrite not_forbid_filter_lookup not_forbid_filter_perl not_forbid_filter_reply not_ignore_eacces not_ignore_enotdir not_seteuid +syn keyword eximKeyword match_directory +syn keyword eximKeyword directory_transport directory2_transport file_transport forbid_file forbid_pipe hide_child_in_errmsg new_address panic_expansion_fail pipe_transport qualify_preserve_domain rewrite +syn keyword eximKeyword no_forbid_file no_forbid_pipe no_hide_child_in_errmsg no_panic_expansion_fail no_qualify_preserve_domain no_rewrite +syn keyword eximKeyword not_forbid_file not_forbid_pipe not_hide_child_in_errmsg not_panic_expansion_fail not_qualify_preserve_domain not_rewrite +syn keyword eximKeyword ignore_target_hosts pass_on_timeout self translate_ip_address +syn keyword eximKeyword no_pass_on_timeout +syn keyword eximKeyword not_pass_on_timeout +syn keyword eximKeyword host_find_failed hosts_randomize modemask owners owngroups qualify_single route_file route_list route_queries route_query search_parents search_type +syn keyword eximKeyword no_hosts_randomize no_qualify_single no_search_parents +syn keyword eximKeyword not_hosts_randomize not_qualify_single not_search_parents +syn keyword eximKeyword hosts optional port protocol query reroute response_pattern service timeout +syn keyword eximKeyword no_optional +syn keyword eximKeyword not_optional +syn keyword eximKeyword check_secondary_mx gethostbyname mx_domains qualify_single rewrite_headers search_parents widen_domains +syn keyword eximKeyword no_check_secondary_mx no_gethostbyname no_qualify_single no_search_parents +syn keyword eximKeyword not_check_secondary_mx not_gethostbyname not_qualify_single not_search_parents +syn keyword eximKeyword command command_group command_user current_directory timeout +syn keyword eximKeyword driver public_name server_set_id server_mail_auth_condition +syn keyword eximKeyword server_prompts server_condition client_send +syn keyword eximKeyword server_secret client_name client_secret + +" Define the default highlighting +if version >= 508 || !exists("did_exim_syntax_inits") + if version < 508 + let did_exim_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink eximComment Comment + HiLink eximFixme Todo + HiLink eximEnd Keyword + HiLink eximNumber Number + HiLink eximDriverName Constant + HiLink eximConstant Constant + HiLink eximTime Constant + HiLink eximKeyword Type + HiLink eximSpecialChar Special + HiLink eximMacroName Preproc + HiLink eximTransport Identifier + + delcommand HiLink +endif + +let b:current_syntax = "exim" diff --git a/runtime/syntax/expect.vim b/runtime/syntax/expect.vim new file mode 100644 index 000000000..1886e2b3e --- /dev/null +++ b/runtime/syntax/expect.vim @@ -0,0 +1,113 @@ +" Vim syntax file +" Language: Expect +" Maintainer: Ralph Jennings <knowbudy@oro.net> +" Last Change: 2001 May 09 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Reserved Expect variable prefixes. +syn match expectVariables "\$exp[a-zA-Z0-9_]*\|\$inter[a-zA-Z0-9_]*" +syn match expectVariables "\$spawn[a-zA-Z0-9_]*\|\$timeout[a-zA-Z0-9_]*" + +" Normal Expect variables. +syn match expectVariables "\$env([^)]*)" +syn match expectVariables "\$any_spawn_id\|\$argc\|\$argv\d*" +syn match expectVariables "\$user_spawn_id\|\$spawn_id\|\$timeout" + +" Expect variable arrays. +syn match expectVariables "\$\(expect\|interact\)_out([^)]*)" contains=expectOutVar + +" User defined variables. +syn match expectVariables "\$[a-zA-Z_][a-zA-Z0-9_]*" + +" Reserved Expect command prefixes. +syn match expectCommand "exp_[a-zA-Z0-9_]*" + +" Normal Expect commands. +syn keyword expectStatement close debug disconnect +syn keyword expectStatement exit exp_continue exp_internal exp_open +syn keyword expectStatement exp_pid exp_version +syn keyword expectStatement fork inter_return interpreter +syn keyword expectStatement log_file log_user match_max overlay +syn keyword expectStatement parity remove_nulls return +syn keyword expectStatement send send_error send_log send_user +syn keyword expectStatement sleep spawn strace stty system +syn keyword expectStatement timestamp trace trap wait + +" Tcl commands recognized and used by Expect. +syn keyword expectCommand proc +syn keyword expectConditional if else +syn keyword expectRepeat while for foreach + +" Expect commands with special arguments. +syn keyword expectStatement expect expect_after expect_background nextgroup=expectExpectOpts +syn keyword expectStatement expect_before expect_user interact nextgroup=expectExpectOpts + +syn match expectSpecial contained "\\." + +" Options for "expect", "expect_after", "expect_background", +" "expect_before", "expect_user", and "interact". +syn keyword expectExpectOpts default eof full_buffer null return timeout + +syn keyword expectOutVar contained spawn_id seconds seconds_total +syn keyword expectOutVar contained string start end buffer + +" Numbers (Tcl style). +syn case ignore + syn match expectNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" + "floating point number, with dot, optional exponent + syn match expectNumber "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" + "floating point number, starting with a dot, optional exponent + syn match expectNumber "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" + "floating point number, without dot, with exponent + syn match expectNumber "\<\d\+e[-+]\=\d\+[fl]\=\>" + "hex number + syn match expectNumber "0x[0-9a-f]\+\(u\=l\=\|lu\)\>" + "syn match expectIdentifier "\<[a-z_][a-z0-9_]*\>" +syn case match + +syn region expectString start=+"+ end=+"+ contains=expectVariables,expectSpecial + +" Are these really comments in Expect? (I never use it, so I'm just guessing). +syn keyword expectTodo contained TODO +syn match expectComment "#.*$" contains=expectTodo + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_expect_syntax_inits") + if version < 508 + let did_expect_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink expectVariables Special + HiLink expectCommand Function + HiLink expectStatement Statement + HiLink expectConditional Conditional + HiLink expectRepeat Repeat + HiLink expectExpectOpts Keyword + HiLink expectOutVar Special + HiLink expectSpecial Special + HiLink expectNumber Number + + HiLink expectString String + + HiLink expectComment Comment + HiLink expectTodo Todo + "HiLink expectIdentifier Identifier + + delcommand HiLink +endif + +let b:current_syntax = "expect" + +" vim: ts=8 diff --git a/runtime/syntax/exports.vim b/runtime/syntax/exports.vim new file mode 100644 index 000000000..d44cc9f78 --- /dev/null +++ b/runtime/syntax/exports.vim @@ -0,0 +1,70 @@ +" Vim syntax file +" Language: exports +" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> +" Last Change: Sep 02, 2003 +" Version: 3 +" Notes: This file includes both SysV and BSD 'isms +" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Options: -word +syn keyword exportsKeyOptions contained alldirs nohide ro wsync +syn keyword exportsKeyOptions contained kerb o rw +syn match exportsOptError contained "[a-z]\+" + +" Settings: word= +syn keyword exportsKeySettings contained access anon root rw +syn match exportsSetError contained "[a-z]\+" + +" OptSet: -word= +syn keyword exportsKeyOptSet contained mapall maproot mask network +syn match exportsOptSetError contained "[a-z]\+" + +" options and settings +syn match exportsSettings "[a-z]\+=" contains=exportsKeySettings,exportsSetError +syn match exportsOptions "-[a-z]\+" contains=exportsKeyOptions,exportsOptError +syn match exportsOptSet "-[a-z]\+=" contains=exportsKeyOptSet,exportsOptSetError + +" Separators +syn match exportsSeparator "[,:]" + +" comments +syn match exportsComment "^\s*#.*$" contains=@Spell + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_exports_syntax_inits") + if version < 508 + let did_exports_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink exportsKeyOptSet exportsKeySettings + HiLink exportsOptSet exportsSettings + + HiLink exportsComment Comment + HiLink exportsKeyOptions Type + HiLink exportsKeySettings Keyword + HiLink exportsOptions Constant + HiLink exportsSeparator Constant + HiLink exportsSettings Constant + + HiLink exportsOptError Error + HiLink exportsOptSetError Error + HiLink exportsSetError Error + + delcommand HiLink +endif + +let b:current_syntax = "exports" +" vim: ts=10 diff --git a/runtime/syntax/fasm.vim b/runtime/syntax/fasm.vim new file mode 100644 index 000000000..01bdc8311 --- /dev/null +++ b/runtime/syntax/fasm.vim @@ -0,0 +1,145 @@ +" Vim syntax file +" Language: Flat Assembler (FASM) +" Maintainer: Ron Aaron <ron@ronware.org> +" Last Change: 2004 May 16 +" Vim URL: http://www.vim.org/lang.html +" FASM Home: http://flatassembler.net/ +" FASM Version: 1.52 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +setlocal iskeyword=a-z,A-Z,48-57,.,_ +setlocal isident=a-z,A-Z,48-57,.,_ +syn case ignore + +syn keyword fasmRegister ah al ax bh bl bp bx ch cl cr0 cr1 cr2 cr3 cr4 cr5 cr6 +syn keyword fasmRegister cr7 cs cx dh di dl dr0 dr1 dr2 dr3 dr4 dr5 dr6 dr7 ds dx +syn keyword fasmRegister eax ebp ebx ecx edi edx es esi esp fs gs mm0 mm1 mm2 mm3 +syn keyword fasmRegister mm4 mm5 mm6 mm7 si sp ss st st0 st1 st2 st3 st4 st5 st6 +syn keyword fasmRegister st7 tr0 tr1 tr2 tr3 tr4 tr5 tr6 tr7 xmm0 xmm1 xmm2 xmm3 +syn keyword fasmRegister xmm4 xmm5 xmm6 xmm7 +syn keyword fasmAddressSizes byte dqword dword fword pword qword tword word +syn keyword fasmDataDirectives db dd df dp dq dt du dw file rb rd rf rp rq rt rw +syn keyword fasmInstr aaa aad aam aas adc add addpd addps addsd addss addsubpd +syn keyword fasmInstr addsubps and andnpd andnps andpd andps arpl bound bsf bsr +syn keyword fasmInstr bswap bt btc btr bts call cbw cdq clc cld clflush cli clts +syn keyword fasmInstr cmc cmova cmovae cmovb cmovbe cmovc cmove cmovg cmovge cmovl +syn keyword fasmInstr cmovle cmovna cmovnae cmovnb cmovnbe cmovnc cmovne cmovng +syn keyword fasmInstr cmovnge cmovnl cmovnle cmovno cmovnp cmovns cmovnz cmovo cmovp +syn keyword fasmInstr cmovpe cmovpo cmovs cmovz cmp cmpeqpd cmpeqps cmpeqsd cmpeqss +syn keyword fasmInstr cmplepd cmpleps cmplesd cmpless cmpltpd cmpltps cmpltsd cmpltss +syn keyword fasmInstr cmpneqpd cmpneqps cmpneqsd cmpneqss cmpnlepd cmpnleps cmpnlesd +syn keyword fasmInstr cmpnless cmpnltpd cmpnltps cmpnltsd cmpnltss cmpordpd cmpordps +syn keyword fasmInstr cmpordsd cmpordss cmppd cmpps cmps cmpsb cmpsd cmpss cmpsw +syn keyword fasmInstr cmpunordpd cmpunordps cmpunordsd cmpunordss cmpxchg cmpxchg8b +syn keyword fasmInstr comisd comiss cpuid cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps +syn keyword fasmInstr cvtpi2pd cvtpi2ps cvtps2dq cvtps2pd cvtps2pi cvtsd2si cvtsd2ss +syn keyword fasmInstr cvtsi2sd cvtsi2ss cvtss2sd cvtss2si cvttpd2dq cvttpd2pi cvttps2dq +syn keyword fasmInstr cvttps2pi cvttsd2si cvttss2si cwd cwde daa das data dec div +syn keyword fasmInstr divpd divps divsd divss else emms end enter extrn f2xm1 fabs +syn keyword fasmInstr fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb +syn keyword fasmInstr fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp +syn keyword fasmInstr fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree +syn keyword fasmInstr ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp +syn keyword fasmInstr finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv +syn keyword fasmInstr fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi +syn keyword fasmInstr fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem +syn keyword fasmInstr fprem1 fptan frndint frstor frstpm fsave fscale fsetpm fsin +syn keyword fasmInstr fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr +syn keyword fasmInstr fsubrp ftst fucom fucomi fucomip fucomp fucompp fwait fxam +syn keyword fasmInstr fxch fxrstor fxsave fxtract fyl2x fyl2xp1 haddpd haddps heap +syn keyword fasmInstr hlt hsubpd hsubps idiv if imul in inc ins insb insd insw int +syn keyword fasmInstr int3 into invd invlpg iret iretd iretw ja jae jb jbe jc jcxz +syn keyword fasmInstr je jecxz jg jge jl jle jmp jna jnae jnb jnbe jnc jne jng jnge +syn keyword fasmInstr jnl jnle jno jnp jns jnz jo jp jpe jpo js jz lahf lar lddqu +syn keyword fasmInstr ldmxcsr lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw +syn keyword fasmInstr load loadall286 loadall386 lock lods lodsb lodsd lodsw loop +syn keyword fasmInstr loopd loope looped loopew loopne loopned loopnew loopnz loopnzd +syn keyword fasmInstr loopnzw loopw loopz loopzd loopzw lsl lss ltr maskmovdqu maskmovq +syn keyword fasmInstr maxpd maxps maxsd maxss mfence minpd minps minsd minss monitor +syn keyword fasmInstr mov movapd movaps movd movddup movdq2q movdqa movdqu movhlps +syn keyword fasmInstr movhpd movhps movlhps movlpd movlps movmskpd movmskps movntdq +syn keyword fasmInstr movnti movntpd movntps movntq movq movq2dq movs movsb movsd +syn keyword fasmInstr movshdup movsldup movss movsw movsx movupd movups movzx mul +syn keyword fasmInstr mulpd mulps mulsd mulss mwait neg nop not or org orpd orps +syn keyword fasmInstr out outs outsb outsd outsw packssdw packsswb packuswb paddb +syn keyword fasmInstr paddd paddq paddsb paddsw paddusb paddusw paddw pand pandn +syn keyword fasmInstr pause pavgb pavgusb pavgw pcmpeqb pcmpeqd pcmpeqw pcmpgtb +syn keyword fasmInstr pcmpgtd pcmpgtw pextrw pf2id pf2iw pfacc pfadd pfcmpeq pfcmpge +syn keyword fasmInstr pfcmpgt pfmax pfmin pfmul pfnacc pfpnacc pfrcp pfrcpit1 pfrcpit2 +syn keyword fasmInstr pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pi2fw pinsrw pmaddwd pmaxsw +syn keyword fasmInstr pmaxub pminsw pminub pmovmskb pmulhrw pmulhuw pmulhw pmullw +syn keyword fasmInstr pmuludq pop popa popad popaw popd popf popfd popfw popw por +syn keyword fasmInstr prefetch prefetchnta prefetcht0 prefetcht1 prefetcht2 prefetchw +syn keyword fasmInstr psadbw pshufd pshufhw pshuflw pshufw pslld pslldq psllq psllw +syn keyword fasmInstr psrad psraw psrld psrldq psrlq psrlw psubb psubd psubq psubsb +syn keyword fasmInstr psubsw psubusb psubusw psubw pswapd punpckhbw punpckhdq punpckhqdq +syn keyword fasmInstr punpckhwd punpcklbw punpckldq punpcklqdq punpcklwd push pusha +syn keyword fasmInstr pushad pushaw pushd pushf pushfd pushfw pushw pxor rcl rcpps +syn keyword fasmInstr rcpss rcr rdmsr rdpmc rdtsc rep repe repne repnz repz ret +syn keyword fasmInstr retd retf retfd retfw retn retnd retnw retw rol ror rsm rsqrtps +syn keyword fasmInstr rsqrtss sahf sal salc sar sbb scas scasb scasd scasw seta +syn keyword fasmInstr setae setalc setb setbe setc sete setg setge setl setle setna +syn keyword fasmInstr setnae setnb setnbe setnc setne setng setnge setnl setnle +syn keyword fasmInstr setno setnp setns setnz seto setp setpe setpo sets setz sfence +syn keyword fasmInstr sgdt shl shld shr shrd shufpd shufps sidt sldt smsw sqrtpd +syn keyword fasmInstr sqrtps sqrtsd sqrtss stc std sti stmxcsr store stos stosb +syn keyword fasmInstr stosd stosw str sub subpd subps subsd subss sysenter sysexit +syn keyword fasmInstr test ucomisd ucomiss ud2 unpckhpd unpckhps unpcklpd unpcklps +syn keyword fasmInstr verr verw wait wbinvd wrmsr xadd xchg xlat xlatb xor xorpd +syn keyword fasmPreprocess common equ fix forward include local macro purge restore +syn keyword fasmPreprocess reverse struc +syn keyword fasmDirective align binary code coff console discardable display dll +syn keyword fasmDirective elf entry executable export extern far fixups format gui +syn keyword fasmDirective import label ms mz native near notpageable pe public readable +syn keyword fasmDirective repeat resource section segment shareable stack times +syn keyword fasmDirective use16 use32 virtual wdm writeable +syn keyword fasmOperator as at defined eq eqtype from mod on ptr rva used + +syn match fasmNumericOperator "[+-/*]" +syn match fasmLogicalOperator "[=|&~<>]\|<=\|>=\|<>" +" numbers +syn match fasmBinaryNumber "\<[01]\+b\>" +syn match fasmHexNumber "\<\d\x*h\>" +syn match fasmHexNumber "\<\(0x\|$\)\x*\>" +syn match fasmFPUNumber "\<\d\+\(\.\d*\)\=\(e[-+]\=\d*\)\=\>" +syn match fasmOctalNumber "\<\(0\o\+o\=\|\o\+o\)\>" +syn match fasmDecimalNumber "\<\(0\|[1-9]\d*\)\>" +syn region fasmComment start=";" end="$" +syn region fasmString start="\"" end="\"\|$" +syn region fasmString start="'" end="'\|$" +syn match fasmSymbol "[()|\[\]:]" +syn match fasmSpecial "[#?%$,]" +syn match fasmLabel "^\s*[^; \t]\+:" + +hi def link fasmAddressSizes type +hi def link fasmNumericOperator fasmOperator +hi def link fasmLogicalOperator fasmOperator + +hi def link fasmBinaryNumber fasmNumber +hi def link fasmHexNumber fasmNumber +hi def link fasmFPUNumber fasmNumber +hi def link fasmOctalNumber fasmNumber +hi def link fasmDecimalNumber fasmNumber + +hi def link fasmSymbols fasmRegister +hi def link fasmPreprocess fasmDirective + +" link to standard syn groups so the 'colorschemes' work: +hi def link fasmOperator operator +hi def link fasmComment comment +hi def link fasmDirective preproc +hi def link fasmRegister type +hi def link fasmNumber constant +hi def link fasmSymbol structure +hi def link fasmString String +hi def link fasmSpecial special +hi def link fasmInstr keyword +hi def link fasmLabel label +hi def link fasmPrefix preproc +let b:current_syntax = "fasm" +" vim: ts=8 sw=8 : diff --git a/runtime/syntax/fdcc.vim b/runtime/syntax/fdcc.vim new file mode 100644 index 000000000..38717ebfb --- /dev/null +++ b/runtime/syntax/fdcc.vim @@ -0,0 +1,114 @@ +" Vim syntax file +" Language: fdcc or locale files +" Maintainer: Dwayne Bailey <dwayne@translate.org.za> +" Last Change: 2004 May 16 +" Remarks: FDCC (Formal Definitions of Cultural Conventions) see ISO TR 14652 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn sync minlines=150 +setlocal iskeyword+=- + +" Numbers +syn match fdccNumber /[0-9]*/ contained + +" Unicode codings and strings +syn match fdccUnicodeInValid /<[^<]*>/ contained +syn match fdccUnicodeValid /<U[0-9A-F][0-9A-F][0-9A-F][0-9A-F]>/ contained +syn region fdccString start=/"/ end=/"/ contains=fdccUnicodeInValid,fdccUnicodeValid + +" Valid LC_ Keywords +syn keyword fdccKeyword escape_char comment_char +syn keyword fdccKeywordIdentification title source address contact email tel fax language territory revision date category +syn keyword fdccKeywordCtype copy space translit_start include translit_end outdigit class +syn keyword fdccKeywordCollate copy script order_start order_end collating-symbol reorder-after reorder-end collating-element symbol-equivalence +syn keyword fdccKeywordMonetary copy int_curr_symbol currency_symbol mon_decimal_point mon_thousands_sep mon_grouping positive_sign negative_sign int_frac_digits frac_digits p_cs_precedes p_sep_by_space n_cs_precedes n_sep_by_space p_sign_posn n_sign_posn int_p_cs_precedes int_p_sep_by_space int_n_cs_precedes int_n_sep_by_space int_p_sign_posn int_n_sign_posn +syn keyword fdccKeywordNumeric copy decimal_point thousands_sep grouping +syn keyword fdccKeywordTime copy abday day abmon mon d_t_fmt d_fmt t_fmt am_pm t_fmt_ampm date_fmt era_d_fmt first_weekday first_workday week cal_direction time_zone era alt_digits era_d_t_fmt +syn keyword fdccKeywordMessages copy yesexpr noexpr yesstr nostr +syn keyword fdccKeywordPaper copy height width +syn keyword fdccKeywordTelephone copy tel_int_fmt int_prefix tel_dom_fmt int_select +syn keyword fdccKeywordMeasurement copy measurement +syn keyword fdccKeywordName copy name_fmt name_gen name_mr name_mrs name_miss name_ms +syn keyword fdccKeywordAddress copy postal_fmt country_name country_post country_ab2 country_ab3 country_num country_car country_isbn lang_name lang_ab lang_term lang_lib + +" Comments +syn keyword fdccTodo TODO FIXME contained +syn match fdccVariable /%[a-zA-Z]/ contained +syn match fdccComment /[#%].*/ contains=fdccTodo,fdccVariable + +" LC_ Groups +syn region fdccBlank matchgroup=fdccLCIdentification start=/^LC_IDENTIFICATION$/ end=/^END LC_IDENTIFICATION$/ contains=fdccKeywordIdentification,fdccString,fdccComment +syn region fdccBlank matchgroup=fdccLCCtype start=/^LC_CTYPE$/ end=/^END LC_CTYPE$/ contains=fdccKeywordCtype,fdccString,fdccComment,fdccUnicodeInValid,fdccUnicodeValid +syn region fdccBlank matchgroup=fdccLCCollate start=/^LC_COLLATE$/ end=/^END LC_COLLATE$/ contains=fdccKeywordCollate,fdccString,fdccComment,fdccUnicodeInValid,fdccUnicodeValid +syn region fdccBlank matchgroup=fdccLCMonetary start=/^LC_MONETARY$/ end=/^END LC_MONETARY$/ contains=fdccKeywordMonetary,fdccString,fdccComment,fdccNumber +syn region fdccBlank matchgroup=fdccLCNumeric start=/^LC_NUMERIC$/ end=/^END LC_NUMERIC$/ contains=fdccKeywordNumeric,fdccString,fdccComment,fdccNumber +syn region fdccBlank matchgroup=fdccLCTime start=/^LC_TIME$/ end=/^END LC_TIME$/ contains=fdccKeywordTime,fdccString,fdccComment,fdccNumber +syn region fdccBlank matchgroup=fdccLCMessages start=/^LC_MESSAGES$/ end=/^END LC_MESSAGES$/ contains=fdccKeywordMessages,fdccString,fdccComment +syn region fdccBlank matchgroup=fdccLCPaper start=/^LC_PAPER$/ end=/^END LC_PAPER$/ contains=fdccKeywordPaper,fdccString,fdccComment,fdccNumber +syn region fdccBlank matchgroup=fdccLCTelephone start=/^LC_TELEPHONE$/ end=/^END LC_TELEPHONE$/ contains=fdccKeywordTelephone,fdccString,fdccComment +syn region fdccBlank matchgroup=fdccLCMeasurement start=/^LC_MEASUREMENT$/ end=/^END LC_MEASUREMENT$/ contains=fdccKeywordMeasurement,fdccString,fdccComment,fdccNumber +syn region fdccBlank matchgroup=fdccLCName start=/^LC_NAME$/ end=/^END LC_NAME$/ contains=fdccKeywordName,fdccString,fdccComment +syn region fdccBlank matchgroup=fdccLCAddress start=/^LC_ADDRESS$/ end=/^END LC_ADDRESS$/ contains=fdccKeywordAddress,fdccString,fdccComment,fdccNumber + + +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_fdcc_syn_inits") + if version < 508 + let did_fdcc_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink fdccBlank Blank + + HiLink fdccTodo Todo + HiLink fdccComment Comment + HiLink fdccVariable Type + + HiLink fdccLCIdentification Statement + HiLink fdccLCCtype Statement + HiLink fdccLCCollate Statement + HiLink fdccLCMonetary Statement + HiLink fdccLCNumeric Statement + HiLink fdccLCTime Statement + HiLink fdccLCMessages Statement + HiLink fdccLCPaper Statement + HiLink fdccLCTelephone Statement + HiLink fdccLCMeasurement Statement + HiLink fdccLCName Statement + HiLink fdccLCAddress Statement + + HiLink fdccUnicodeInValid Error + HiLink fdccUnicodeValid String + HiLink fdccString String + HiLink fdccNumber Blank + + HiLink fdccKeywordIdentification fdccKeyword + HiLink fdccKeywordCtype fdccKeyword + HiLink fdccKeywordCollate fdccKeyword + HiLink fdccKeywordMonetary fdccKeyword + HiLink fdccKeywordNumeric fdccKeyword + HiLink fdccKeywordTime fdccKeyword + HiLink fdccKeywordMessages fdccKeyword + HiLink fdccKeywordPaper fdccKeyword + HiLink fdccKeywordTelephone fdccKeyword + HiLink fdccKeywordMeasurement fdccKeyword + HiLink fdccKeywordName fdccKeyword + HiLink fdccKeywordAddress fdccKeyword + HiLink fdccKeyword Identifier + + delcommand HiLink +endif + +let b:current_syntax = "fdcc" + +" vim: ts=8 diff --git a/runtime/syntax/fetchmail.vim b/runtime/syntax/fetchmail.vim new file mode 100644 index 000000000..c586ee7c5 --- /dev/null +++ b/runtime/syntax/fetchmail.vim @@ -0,0 +1,88 @@ +" Vim syntax file +" Language: fetchmail(1) RC File +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/fetchmail/ +" Latest Revision: 2004-05-06 +" arch-tag: 59d8adac-6e59-45f6-88cb-f9ba1e009c1f + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" todo +syn keyword fetchmailTodo contained FIXME TODO XXX NOTE + +" comments +syn region fetchmailComment start="#" end="$" contains=fetchmailTodo + +" numbers +syn match fetchmailNumber "\<\d\+\>" + +" strings +syn region fetchmailString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=fetchmailStringEsc +syn region fetchmailString start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=fetchmailStringEsc + +" escape characters in strings +syn match fetchmailStringEsc "\\\([ntb]\|0\d*\|x\x\+\)" + +" server entries +syn region fetchmailKeyword transparent matchgroup=fetchmailKeyword start="\<poll\|skip\|defaults\>" end="\<poll\|skip\|defaults\>" contains=ALLBUT,fetchmailOptions,fetchmailSet + +" server options +syn keyword fetchmailServerOpts contained via proto[col] local[domains] port auth[enticate] +syn keyword fetchmailServerOpts contained timeout envelope qvirtual aka interface monitor +syn keyword fetchmailServerOpts contained plugin plugout dns checkalias uidl interval netsec +syn keyword fetchmailServerOpts contained principal esmtpname esmtppassword +syn match fetchmailServerOpts contained "\<no\_s\+\(envelope\|dns\|checkalias\|uidl\)" + +" user options +syn keyword fetchmailUserOpts contained user[name] is to pass[word] ssl sslcert sslkey sslproto folder +syn keyword fetchmailUserOpts contained smtphost fetchdomains smtpaddress smtpname antispam mda bsmtp +syn keyword fetchmailUserOpts contained preconnect postconnect keep flush fetchall rewrite stripcr +syn keyword fetchmailUserOpts contained forcecr pass8bits dropstatus dropdelivered mimedecode idle +syn keyword fetchmailUserOpts contained limit warnings batchlimit fetchlimit expunge tracepolls properties +syn match fetchmailUserOpts contained "\<no\_s\+\(keep\|flush\|fetchall\|rewrite\|stripcr\|forcecr\|pass8bits\|dropstatus\|dropdelivered\|mimedecode\|noidle\)" + +syn keyword fetchmailSpecial contained here there + + +" noise keywords +syn keyword fetchmailNoise and with has wants options +syn match fetchmailNoise "[:;,]" + +" options +syn keyword fetchmailSet nextgroup=fetchmailOptions skipwhite skipnl set + +syn keyword fetchmailOptions daemon postmaster bouncemail spambounce logfile idfile syslog nosyslog properties +syn match fetchmailOptions "\<no\_s\+\(bouncemail\|spambounce\)" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_fetchmail_syn_inits") + if version < 508 + let did_fetchmail_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink fetchmailComment Comment + HiLink fetchmailTodo Todo + HiLink fetchmailNumber Number + HiLink fetchmailString String + HiLink fetchmailStringEsc SpecialChar + HiLink fetchmailKeyword Keyword + HiLink fetchmailServerOpts Identifier + HiLink fetchmailUserOpts Identifier + HiLink fetchmailSpecial Special + HiLink fetchmailSet Keyword + HiLink fetchmailOptions Identifier + delcommand HiLink +endif + +let b:current_syntax = "fetchmail" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/fgl.vim b/runtime/syntax/fgl.vim new file mode 100644 index 000000000..1b2fe19a8 --- /dev/null +++ b/runtime/syntax/fgl.vim @@ -0,0 +1,147 @@ +" Vim syntax file +" Language: Informix 4GL +" Maintainer: Rafal M. Sulejman <rms@poczta.onet.pl> +" Update: 26 Sep 2002 +" Changes: +" - Dynamic 4GL/FourJs/4GL 7.30 pseudo comment directives (Julian Bridle) +" - Conditionally allow case insensitive keywords (Julian Bridle) +" + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if exists("fgl_ignore_case") + syntax case ignore +else + syntax case match +endif +syn keyword fglKeyword ABORT ABS ABSOLUTE ACCEPT ACCESS ACOS ADD AFTER ALL +syn keyword fglKeyword ALLOCATE ALTER AND ANSI ANY APPEND ARG_VAL ARRAY ARR_COUNT +syn keyword fglKeyword ARR_CURR AS ASC ASCENDING ASCII ASIN AT ATAN ATAN2 ATTACH +syn keyword fglKeyword ATTRIBUTE ATTRIBUTES AUDIT AUTHORIZATION AUTO AUTONEXT AVERAGE AVG +syn keyword fglKeyword BEFORE BEGIN BETWEEN BLACK BLINK BLUE BOLD BORDER BOTH BOTTOM +syn keyword fglKeyword BREAK BUFFERED BY BYTE +syn keyword fglKeyword CALL CASCADE CASE CHAR CHARACTER CHARACTER_LENGTH CHAR_LENGTH +syn keyword fglKeyword CHECK CLASS_ORIGIN CLEAR CLIPPED CLOSE CLUSTER COLOR +syn keyword fglKeyword COLUMN COLUMNS COMMAND COMMENT COMMENTS COMMIT COMMITTED +syn keyword fglKeyword COMPOSITES COMPRESS CONCURRENT CONNECT CONNECTION +syn keyword fglKeyword CONNECTION_ALIAS CONSTRAINED CONSTRAINT CONSTRAINTS CONSTRUCT +syn keyword fglKeyword CONTINUE CONTROL COS COUNT CREATE CURRENT CURSOR CYAN +syn keyword fglKeyword DATA DATABASE DATASKIP DATE DATETIME DAY DBA DBINFO DBSERVERNAME +syn keyword fglKeyword DEALLOCATE DEBUG DEC DECIMAL DECLARE DEFAULT DEFAULTS DEFER +syn keyword fglKeyword DEFERRED DEFINE DELETE DELIMITER DELIMITERS DESC DESCENDING +syn keyword fglKeyword DESCRIBE DESCRIPTOR DETACH DIAGNOSTICS DIM DIRTY DISABLED +syn keyword fglKeyword DISCONNECT DISPLAY DISTINCT DISTRIBUTIONS DO DORMANT DOUBLE +syn keyword fglKeyword DOWN DOWNSHIFT DROP +syn keyword fglKeyword EACH ELIF ELSE ENABLED END ENTRY ERROR ERRORLOG ERR_GET +syn keyword fglKeyword ERR_PRINT ERR_QUIT ESC ESCAPE EVERY EXCEPTION EXCLUSIVE +syn keyword fglKeyword EXEC EXECUTE EXISTS EXIT EXP EXPLAIN EXPRESSION EXTEND EXTENT +syn keyword fglKeyword EXTERN EXTERNAL +syn keyword fglKeyword F1 F10 F11 F12 F13 F14 F15 F16 F17 F18 F19 F2 F20 F21 F22 F23 +syn keyword fglKeyword F24 F25 F26 F27 F28 F29 F3 F30 F31 F32 F33 F34 F35 F36 F37 F38 +syn keyword fglKeyword F39 F4 F40 F41 F42 F43 F44 F45 F46 F47 F48 F49 F5 F50 F51 F52 +syn keyword fglKeyword F53 F54 F55 F56 F57 F58 F59 F6 F60 F61 F62 F63 F64 F7 F8 F9 +syn keyword fglKeyword FALSE FETCH FGL_GETENV FGL_KEYVAL FGL_LASTKEY FIELD FIELD_TOUCHED +syn keyword fglKeyword FILE FILLFACTOR FILTERING FINISH FIRST FLOAT FLUSH FOR +syn keyword fglKeyword FOREACH FOREIGN FORM FORMAT FORMONLY FORTRAN FOUND FRACTION +syn keyword fglKeyword FRAGMENT FREE FROM FUNCTION GET_FLDBUF GLOBAL GLOBALS GO GOTO +syn keyword fglKeyword GRANT GREEN GROUP HAVING HEADER HELP HEX HIDE HIGH HOLD HOUR +syn keyword fglKeyword IDATA IF ILENGTH IMMEDIATE IN INCLUDE INDEX INDEXES INDICATOR +syn keyword fglKeyword INFIELD INIT INITIALIZE INPUT INSERT INSTRUCTIONS INT INTEGER +syn keyword fglKeyword INTERRUPT INTERVAL INTO INT_FLAG INVISIBLE IS ISAM ISOLATION +syn keyword fglKeyword ITYPE +syn keyword fglKeyword KEY LABEL +syn keyword fglKeyword LANGUAGE LAST LEADING LEFT LENGTH LET LIKE LINE +syn keyword fglKeyword LINENO LINES LOAD LOCATE LOCK LOG LOG10 LOGN LONG LOW +syn keyword fglKeyword MAGENTA MAIN MARGIN MATCHES MAX MDY MEDIUM MEMORY MENU MESSAGE +syn keyword fglKeyword MESSAGE_LENGTH MESSAGE_TEXT MIN MINUTE MOD MODE MODIFY MODULE +syn keyword fglKeyword MONEY MONTH MORE +syn keyword fglKeyword NAME NCHAR NEED NEW NEXT NEXTPAGE NO NOCR NOENTRY NONE NORMAL +syn keyword fglKeyword NOT NOTFOUND NULL NULLABLE NUMBER NUMERIC NUM_ARGS NVARCHAR +syn keyword fglKeyword OCTET_LENGTH OF OFF OLD ON ONLY OPEN OPTIMIZATION OPTION OPTIONS +syn keyword fglKeyword OR ORDER OTHERWISE OUTER OUTPUT +syn keyword fglKeyword PAGE PAGENO PAUSE PDQPRIORITY PERCENT PICTURE PIPE POW PRECISION +syn keyword fglKeyword PREPARE PREVIOUS PREVPAGE PRIMARY PRINT PRINTER PRIOR PRIVATE +syn keyword fglKeyword PRIVILEGES PROCEDURE PROGRAM PROMPT PUBLIC PUT +syn keyword fglKeyword QUIT QUIT_FLAG +syn keyword fglKeyword RAISE RANGE READ READONLY REAL RECORD RECOVER RED REFERENCES +syn keyword fglKeyword REFERENCING REGISTER RELATIVE REMAINDER REMOVE RENAME REOPTIMIZATION +syn keyword fglKeyword REPEATABLE REPORT REQUIRED RESOLUTION RESOURCE RESTRICT +syn keyword fglKeyword RESUME RETURN RETURNED_SQLSTATE RETURNING REVERSE REVOKE RIGHT +syn keyword fglKeyword ROBIN ROLE ROLLBACK ROLLFORWARD ROOT ROUND ROW ROWID ROWIDS +syn keyword fglKeyword ROWS ROW_COUNT RUN +syn keyword fglKeyword SCALE SCHEMA SCREEN SCROLL SCR_LINE SECOND SECTION SELECT +syn keyword fglKeyword SERIAL SERIALIZABLE SERVER_NAME SESSION SET SET_COUNT SHARE +syn keyword fglKeyword SHORT SHOW SITENAME SIZE SIZEOF SKIP SLEEP SMALLFLOAT SMALLINT +syn keyword fglKeyword SOME SPACE SPACES SQL SQLAWARN SQLCA SQLCODE SQLERRD SQLERRM +syn keyword fglKeyword SQLERROR SQLERRP SQLSTATE SQLWARNING SQRT STABILITY START +syn keyword fglKeyword STARTLOG STATIC STATISTICS STATUS STDEV STEP STOP STRING STRUCT +syn keyword fglKeyword SUBCLASS_ORIGIN SUM SWITCH SYNONYM SYSTEM +syn keyword fglKeyword SysBlobs SysChecks SysColAuth SysColDepend SysColumns +syn keyword fglKeyword SysConstraints SysDefaults SysDepend SysDistrib SysFragAuth +syn keyword fglKeyword SysFragments SysIndexes SysObjState SysOpClstr SysProcAuth +syn keyword fglKeyword SysProcBody SysProcPlan SysProcedures SysReferences SysRoleAuth +syn keyword fglKeyword SysSynTable SysSynonyms SysTabAuth SysTables SysTrigBody +syn keyword fglKeyword SysTriggers SysUsers SysViews SysViolations +syn keyword fglKeyword TAB TABLE TABLES TAN TEMP TEXT THEN THROUGH THRU TIME TO +syn keyword fglKeyword TODAY TOP TOTAL TRACE TRAILER TRAILING TRANSACTION TRIGGER +syn keyword fglKeyword TRIGGERS TRIM TRUE TRUNC TYPE TYPEDEF +syn keyword fglKeyword UNCOMMITTED UNCONSTRAINED UNDERLINE UNION UNIQUE UNITS UNLOAD +syn keyword fglKeyword UNLOCK UNSIGNED UP UPDATE UPSHIFT USER USING +syn keyword fglKeyword VALIDATE VALUE VALUES VARCHAR VARIABLES VARIANCE VARYING +syn keyword fglKeyword VERIFY VIEW VIOLATIONS +syn keyword fglKeyword WAIT WAITING WARNING WEEKDAY WHEN WHENEVER WHERE WHILE WHITE +syn keyword fglKeyword WINDOW WITH WITHOUT WORDWRAP WORK WRAP WRITE +syn keyword fglKeyword YEAR YELLOW +syn keyword fglKeyword ZEROFILL + +" Strings and characters: +syn region fglString start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn region fglString start=+'+ skip=+\\\\\|\\"+ end=+'+ + +" Numbers: +syn match fglNumber "-\=\<[0-9]*\.\=[0-9_]\>" + +" Comments: +syn region fglComment start="{" end="}" +syn match fglComment "--.*" +syn match fglComment "#.*" + +" Not a comment even though it looks like one (Dynamic 4GL/FourJs directive) +syn match fglSpecial "--#" +syn match fglSpecial "--@" + +syn sync ccomment fglComment + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_fgl_syntax_inits") + if version < 508 + let did_fgl_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink fglComment Comment + "HiLink fglKeyword fglSpecial + HiLink fglKeyword fglStatement + HiLink fglNumber Number + HiLink fglOperator fglStatement + HiLink fglSpecial Special + HiLink fglStatement Statement + HiLink fglString String + HiLink fglType Type + + delcommand HiLink +endif + +let b:current_syntax = "fgl" + +" vim: ts=8 diff --git a/runtime/syntax/focexec.vim b/runtime/syntax/focexec.vim new file mode 100644 index 000000000..884c37ebf --- /dev/null +++ b/runtime/syntax/focexec.vim @@ -0,0 +1,101 @@ +" Vim syntax file +" Language: Focus Executable +" Maintainer: Rob Brady <robb@datatone.com> +" Last Change: $Date$ +" URL: http://www.datatone.com/~robb/vim/syntax/focexec.vim +" $Revision$ + +" this is a very simple syntax file - I will be improving it +" one thing is how to do computes +" I don't like that &vars and FUSE() functions highlight to the same color +" I think some of these things should get different hilights - +" should MODIFY commands look different than TABLE? + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case match + +" A bunch of useful keywords +syn keyword focexecTable TABLE SUM BY ACROSS END PRINT HOLD LIST NOPRINT +syn keyword focexecTable SUBFOOT SUBHEAD HEADING FOOTING PAGE-BREAK AS +syn keyword focexecTable WHERE AND OR NOSPLIT FORMAT +syn keyword focexecModify MODIFY DATA ON FIXFORM PROMPT MATCH COMPUTE +syn keyword focexecModify GOTO CASE ENDCASE TYPE NOMATCH REJECT INCLUDE +syn keyword focexecModify CONTINUE FROM +syn keyword focexecNormal CHECK FILE CREATE EX SET IF FILEDEF DEFINE +syn keyword focexecNormal REBUILD IF RECORDLIMIT FI EQ JOIN +syn keyword focexecJoin IN TO +syn keyword focexecFileDef DISK +syn keyword focexecSet MSG ALL +syn match focexecDash "-RUN" +syn match focexecDash "-PROMPT" +syn match focexecDash "-WINFORM" + +" String and Character constants +syn region focexecString1 start=+"+ end=+"+ +syn region focexecString2 start=+'+ end=+'+ + +"amper variables +syn match focexecAmperVar "&&\=[A-Z_]\+" + +"fuse functions +syn keyword focexecFuse GETUSER GETUSR WHOAMI FEXERR ASIS GETTOK UPCASE LOCASE +syn keyword focexecFuse SUBSTR TODAY TODAYI POSIT HHMMSS BYTVAL EDAUT1 BITVAL +syn keyword focexecFuse BITSON FGETENV FPUTENV HEXBYT SPAWN YM YMI JULDAT +syn keyword focexecFuse JULDATI DOWK DOWKI DOWKLI CHGDAT CHGDATI FTOA ATODBL +syn keyword focexecFuse SOUNDEX RJUST REVERSE PARAG OVRLAY LJUST CTRFLD CTRAN +syn keyword focexecFuse CHKFMT ARGLEN GREGDT GREGDTI DTYMD DTYMDI DTDMY DTDMYI +syn keyword focexecFuse DTYDM DTYDMI DTMYD DTMYDI DTDYM DTDYMI DAYMD DAYMDI +syn keyword focexecFuse DAMDY DAMDYI DADMY DADMYI AYM AYMI AYMD AYMDI CHKPCK +syn keyword focexecFuse IMOD FMOD DMOD PCKOUT EXP BAR SPELLNM SPELLNUM RTCIVP +syn keyword focexecFuse PRDUNI PRDNOR RDNORM RDUNIF LCWORD ITOZ RLPHLD IBIPRO +syn keyword focexecFuse IBIPRW IBIPRC IBIPRU IBIRCP PTHDAT ITOPACK ITONUM +syn keyword focexecFuse DSMEXEC DSMEVAL DSMERRC MSMEXEC MSMEVAL MSMERRC EXTDXI +syn keyword focexecFuse BAANHASH EDAYSI DTOG GTOD HSETPT HPART HTIME HNAME +syn keyword focexecFuse HADD HDIFF HDATE HGETC HCNVRT HDTTM HMIDNT TEMPPATH +syn keyword focexecFuse DATEADD DATEDIF DATEMOV DATECVT EURHLD EURXCH FINDFOC +syn keyword focexecFuse FERRMES CNCTUSR CURRPATH USERPATH SYSTEM ASKYN +syn keyword focexecFuse FUSEMENU POPEDIT POPFILE + +syn match focexecNumber "\<\d\+\>" +syn match focexecNumber "\<\d\+\.\d*\>" + +syn match focexecComment "-\*.*" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_focexec_syntax_inits") + if version < 508 + let did_focexec_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink focexecString1 String + HiLink focexecString2 String + HiLink focexecNumber Number + HiLink focexecComment Comment + HiLink focexecTable Keyword + HiLink focexecModify Keyword + HiLink focexecNormal Keyword + HiLink focexecSet Keyword + HiLink focexecDash Keyword + HiLink focexecFileDef Keyword + HiLink focexecJoin Keyword + HiLink focexecAmperVar Identifier + HiLink focexecFuse Function + + delcommand HiLink +endif + +let b:current_syntax = "focexec" + +" vim: ts=8 diff --git a/runtime/syntax/form.vim b/runtime/syntax/form.vim new file mode 100644 index 000000000..726bf4756 --- /dev/null +++ b/runtime/syntax/form.vim @@ -0,0 +1,101 @@ +" Vim syntax file +" Language: FORM +" Maintainer: Michael M. Tung <michael.tung@uni-mainz.de> +" Last Change: 2001 May 10 + +" First public release based on 'Symbolic Manipulation with FORM' +" by J.A.M. Vermaseren, CAN, Netherlands, 1991. +" This syntax file is still in development. Please send suggestions +" to the maintainer. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" A bunch of useful FORM keywords +syn keyword formType global local +syn keyword formHeaderStatement symbol symbols cfunction cfunctions +syn keyword formHeaderStatement function functions vector vectors +syn keyword formHeaderStatement set sets index indices +syn keyword formHeaderStatement dimension dimensions unittrace +syn keyword formStatement id identify drop skip +syn keyword formStatement write nwrite +syn keyword formStatement format print nprint load save +syn keyword formStatement bracket brackets +syn keyword formStatement multiply count match only discard +syn keyword formStatement trace4 traceN contract symmetrize antisymmetrize +syn keyword formConditional if else endif while +syn keyword formConditional repeat endrepeat label goto + +" some special functions +syn keyword formStatement g_ gi_ g5_ g6_ g7_ 5_ 6_ 7_ +syn keyword formStatement e_ d_ delta_ theta_ sum_ sump_ + +" pattern matching for keywords +syn match formComment "^\ *\*.*$" +syn match formComment "\;\ *\*.*$" +syn region formString start=+"+ end=+"+ +syn region formString start=+'+ end=+'+ +syn match formPreProc "^\=\#[a-zA-z][a-zA-Z0-9]*\>" +syn match formNumber "\<\d\+\>" +syn match formNumber "\<\d\+\.\d*\>" +syn match formNumber "\.\d\+\>" +syn match formNumber "-\d" contains=Number +syn match formNumber "-\.\d" contains=Number +syn match formNumber "i_\+\>" +syn match formNumber "fac_\+\>" +syn match formDirective "^\=\.[a-zA-z][a-zA-Z0-9]*\>" + +" hi User Labels +syn sync ccomment formComment minlines=10 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_form_syn_inits") + if version < 508 + let did_form_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink formConditional Conditional + HiLink formNumber Number + HiLink formStatement Statement + HiLink formComment Comment + HiLink formPreProc PreProc + HiLink formDirective PreProc + HiLink formType Type + HiLink formString String + + if !exists("form_enhanced_color") + HiLink formHeaderStatement Statement + else + " enhanced color mode + HiLink formHeaderStatement HeaderStatement + " dark and a light background for local types + if &background == "dark" + hi HeaderStatement term=underline ctermfg=LightGreen guifg=LightGreen gui=bold + else + hi HeaderStatement term=underline ctermfg=DarkGreen guifg=SeaGreen gui=bold + endif + " change slightly the default for dark gvim + if has("gui_running") && &background == "dark" + hi Conditional guifg=LightBlue gui=bold + hi Statement guifg=LightYellow + endif + endif + + delcommand HiLink +endif + + let b:current_syntax = "form" + +" vim: ts=8 diff --git a/runtime/syntax/forth.vim b/runtime/syntax/forth.vim new file mode 100644 index 000000000..6e737d319 --- /dev/null +++ b/runtime/syntax/forth.vim @@ -0,0 +1,235 @@ +" Vim syntax file +" Language: FORTH +" Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de> +" Last Change: Son 22 Jun 2003 20:42:55 CEST +" Filenames: *.fs,*.ft +" URL: http://www.cvjb.de/comp/vim/forth.vim + +" $Id$ + +" The list of keywords is incomplete, compared with the offical ANS +" wordlist. If you use this language, please improve it, and send me +" the patches. + +" Many Thanks to... +" +" 2003-05-10: +" Andrew Gaul <andrew at gaul.org> send me a patch for +" forthOperators. +" +" 2003-04-03: +" Ron Aaron <ron at ronware.org> made updates for an +" improved Win32Forth support. +" +" 2002-04-22: +" Charles Shattuck <charley at forth.org> helped me to settle up with the +" binary and hex number highlighting. +" +" 2002-04-20: +" Charles Shattuck <charley at forth.org> send me some code for correctly +" highlighting char and [char] followed by an opening paren. He also added +" some words for operators, conditionals, and definitions; and added the +" highlighting for s" and c". +" +" 2000-03-28: +" John Providenza <john at probo.com> made improvements for the +" highlighting of strings, and added the code for highlighting hex numbers. +" + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Synchronization method +syn sync ccomment maxlines=200 + +" 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-FORHT +if version >= 600 + setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 +else + set iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 +endif + + +" Keywords + +" basic mathematical and logical operators +syn keyword forthOperators + - * / MOD /MOD NEGATE ABS MIN MAX +syn keyword forthOperators AND OR XOR NOT INVERT 2* 2/ 1+ 1- 2+ 2- 8* +syn keyword forthOperators M+ */ */MOD M* UM* M*/ UM/MOD FM/MOD SM/REM +syn keyword forthOperators D+ D- DNEGATE DABS DMIN DMAX +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 +syn keyword forthOperators 0< 0<= 0<> 0= 0> 0>= < <= <> = > >= +syn keyword forthOperators ?NEGATE ?DNEGATE + +" 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 +syn keyword forthStack 3DUP 4DUP +syn keyword forthRStack >R R> R@ RDROP 2>R 2R> 2R@ 2RDROP +syn keyword forthFStack FDROP FNIP FDUP FOVER FTUCK FSWAP FROT + +" stack pointer manipulations +syn keyword forthSP SP@ SP! FP@ FP! RP@ RP! LP@ LP! + +" 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 + +" 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 + +" new words +syn match forthColonDef '\<:m\?\s*[^ \t]\+\>' +syn keyword forthEndOfColonDef ; ;M ;m +syn keyword forthDefine CONSTANT 2CONSTANT FCONSTANT VARIABLE 2VARIABLE CREATE +syn keyword forthDefine USER VALUE TO DEFER IS DOES> IMMEDIATE COMPILE-ONLY +syn keyword forthDefine COMPILE RESTRICT INTERPRET POSTPONE EXECUTE LITERAL +syn keyword forthDefine CREATE-INTERPRET/COMPILE INTERPRETATION> <INTERPRETATION +syn keyword forthDefine COMPILATION> <COMPILATION ] LASTXT COMP' POSTPONE, +syn keyword forthDefine FIND-NAME NAME>INT NAME?INT NAME>COMP NAME>STRING STATE +syn keyword forthDefine C; CVARIABLE +syn match forthDefine "\[COMP']" +syn match forthDefine "'" +syn match forthDefine '\<\[\>' +syn match forthDefine "\[']" +syn match forthDefine '\[COMPILE]' +syn match forthClassDef '\<:class\s*[^ \t]\+\>' +syn match forthObjectDef '\<:object\s*[^ \t]\+\>' +syn keyword forthEndOfClassDef ';class' +syn keyword forthEndOfObjectDef ';object' + +" 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 +" 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 D>S DIGIT +syn keyword forthConversion DPL F>D HLD HOLD NUMBER S>D SIGN >NUMBER + +" interptreter, 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> +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 + +" numbers +syn keyword forthMath DECIMAL HEX BASE +syn match forthInteger '\<-\=[0-9.]*[0-9.]\+\>' +" recognize hex and binary numbers, the '$' and '%' notation is for gforth +syn match forthInteger '\<\$\x*\x\+\>' " *1* --- dont't mess +syn match forthInteger '\<\x*\d\x*\>' " *2* --- this order! +syn match forthInteger '\<%[0-1]*[0-1]\+\>' +syn match forthFloat '\<-\=\d*[.]\=\d\+[Ee]\d\+\>' + +" Strings +syn region forthString start=+\.*\"+ end=+"+ end=+$+ +" XXX +syn region forthString start=+s\"+ end=+"+ end=+$+ +syn region forthString start=+c\"+ end=+"+ end=+$+ + +" Comments +syn match forthComment '\\\s.*$' contains=forthTodo +syn region forthComment start='\\S\s' end='.*' contains=forthTodo +syn match forthComment '\.(\s[^)]*)' contains=forthTodo +syn region forthComment start='(\s' skip='\\)' end=')' contains=forthTodo +syn region forthComment start='/\*' end='\*/' contains=forthTodo +"syn match forthComment '(\s[^\-]*\-\-[^\-]*)' contains=forthTodo + +" Include files +syn match forthInclude '^INCLUDE\s\+\k\+' +syn match forthInclude '^fload\s\+' +syn match forthInclude '^needs\s\+' + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_forth_syn_inits") + if version < 508 + let did_forth_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overriden later. + HiLink forthTodo Todo + HiLink forthOperators Operator + HiLink forthMath Number + HiLink forthInteger Number + HiLink forthFloat Float + HiLink forthStack Special + HiLink forthRstack Special + HiLink forthFStack Special + HiLink forthSP Special + HiLink forthMemory Function + HiLink forthAdrArith Function + HiLink forthMemBlks Function + HiLink forthCond Conditional + HiLink forthLoop Repeat + HiLink forthColonDef Define + HiLink forthEndOfColonDef Define + HiLink forthDefine Define + HiLink forthDebug Debug + HiLink forthAssembler Include + HiLink forthCharOps Character + HiLink forthConversion String + HiLink forthForth Statement + HiLink forthVocs Statement + HiLink forthString String + HiLink forthComment Comment + HiLink forthClassDef Define + HiLink forthEndOfClassDef Define + HiLink forthObjectDef Define + HiLink forthEndOfObjectDef Define + HiLink forthInclude Include + + delcommand HiLink +endif + +let b:current_syntax = "forth" + +" vim:ts=8:sw=4:nocindent:smartindent: diff --git a/runtime/syntax/fortran.vim b/runtime/syntax/fortran.vim new file mode 100644 index 000000000..ae1fa8b19 --- /dev/null +++ b/runtime/syntax/fortran.vim @@ -0,0 +1,526 @@ +" Vim syntax file +" Language: Fortran95 (and Fortran90, Fortran77, F and elf90) +" Version: 0.86 +" URL: http://www.unb.ca/chem/ajit/syntax/fortran.vim +" Last Change: 2003 Mar. 12 +" Maintainer: Ajit J. Thakkar (ajit AT unb.ca); <http://www.unb.ca/chem/ajit/> +" Usage: Do :help fortran-syntax from Vim +" Credits: +" Version 0.1 was based on the fortran 77 syntax file by Mario Eusebio and +" Preben Guldberg. Useful suggestions were made by: Andrej Panjkov, +" Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile, +" Walter Dieudonné, Alexander Wagner, Roman Bertle, Charles Rendleman, +" and Andrew Griffiths. For instructions on use, do :help fortran from vim + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit if a syntax file is already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" let b:fortran_dialect = fortran_dialect if set correctly by user +if exists("fortran_dialect") + if fortran_dialect =~ '\<\(f\(9[05]\|77\)\|elf\|F\)\>' + let b:fortran_dialect = matchstr(fortran_dialect,'\<\(f\(9[05]\|77\)\|elf\|F\)\>') + else + echohl WarningMsg | echo "Unknown value of fortran_dialect" | echohl None + let b:fortran_dialect = "unknown" + endif +else + let b:fortran_dialect = "unknown" +endif + +" fortran_dialect not set or set incorrectly by user, +if b:fortran_dialect == "unknown" + " set b:fortran_dialect from directive in first three lines of file + let b:fortran_retype = getline(1)." ".getline(2)." ".getline(3) + if b:fortran_retype =~ '\<fortran_dialect\s*=\s*F\>' + let b:fortran_dialect = "F" + elseif b:fortran_retype =~ '\<fortran_dialect\s*=\s*elf\>' + let b:fortran_dialect = "elf" + elseif b:fortran_retype =~ '\<fortran_dialect\s*=\s*f90\>' + let b:fortran_dialect = "f90" + elseif b:fortran_retype =~ '\<fortran_dialect\s*=\s*f95\>' + let b:fortran_dialect = "f95" + elseif b:fortran_retype =~ '\<fortran_dialect\s*=\s*f77\>' + let b:fortran_dialect = "f77" + else + " no directive found, so assume f95 + let b:fortran_dialect = "f95" + endif + unlet b:fortran_retype +endif + +" Choose between fixed and free source form if this hasn't been done yet +if !exists("b:fortran_fixed_source") + if b:fortran_dialect == "elf" || b:fortran_dialect == "F" + " elf and F require free source form + let b:fortran_fixed_source = 0 + elseif b:fortran_dialect == "f77" + " f77 requires fixed source form + let b:fortran_fixed_source = 1 + elseif exists("fortran_free_source") + " User guarantees free source form for all f90 and f95 files + let b:fortran_fixed_source = 0 + elseif exists("fortran_fixed_source") + " User guarantees fixed source form for all f90 and f95 files + let b:fortran_fixed_source = 1 + else + " f90 and f95 allow both fixed and free source form. + " Assume fixed source form unless signs of free source form + " are detected in the first five columns of the first b:lmax lines. + " Detection becomes more accurate and time-consuming if more lines + " are checked. Increase the limit below if you keep lots of comments at + " the very top of each file and you have a fast computer. + let b:lmax = 25 + if ( b:lmax > line("$") ) + let b:lmax = line("$") + endif + let b:fortran_fixed_source = 1 + let b:ln=1 + while b:ln <= b:lmax + let b:test = strpart(getline(b:ln),0,5) + if b:test[0] !~ '[Cc*!#]' && b:test !~ '^ \+[!#]' && b:test =~ '[^ 0-9\t]' + let b:fortran_fixed_source = 0 + break + endif + let b:ln = b:ln + 1 + endwhile + unlet b:lmax b:ln b:test + endif +endif + +syn case ignore + +if b:fortran_dialect == "f77" + syn match fortranIdentifier "\<\a\(\a\|\d\)*\>" contains=fortranSerialNumber +else + syn match fortran90Identifier "\<\a\w*\>" contains=fortranSerialNumber + if version >= 600 + if b:fortran_fixed_source == 1 + syn match fortranConstructName "^\s\{6,}\zs\a\w*\ze\s*:" + else + syn match fortranConstructName "^\s*\zs\a\w*\ze\s*:" + endif + if exists("fortran_more_precise") + syn match fortranConstructName "\(\<end\s*do\s\+\)\@<=\a\w*" + syn match fortranConstructName "\(\<end\s*if\s\+\)\@<=\a\w*" + syn match fortranConstructName "\(\<end\s*select\s\+\)\@<=\a\w*" + endif + else + if b:fortran_fixed_source == 1 + syn match fortranConstructName "^\s\{6,}\a\w*\s*:" + else + syn match fortranConstructName "^\s*\a\w*\s*:" + endif + endif +endif + +syn match fortranUnitHeader "\<end\>" + +syn keyword fortranType character complex integer +syn keyword fortranType intrinsic +syn match fortranType "\<implicit\>" +syn keyword fortranStructure dimension +syn keyword fortranStorageClass parameter save +syn match fortranUnitHeader "\<subroutine\>" +syn keyword fortranCall call +syn match fortranUnitHeader "\<function\>" +syn match fortranUnitHeader "\<program\>" +syn keyword fortranStatement return stop +syn keyword fortranConditional else then +syn match fortranConditional "\<if\>" +syn match fortranRepeat "\<do\>" + +syn keyword fortranTodo contained todo fixme + +"Catch errors caused by too many right parentheses +syn region fortranParen transparent start="(" end=")" contains=ALLBUT,fortranParenError,@fortranCommentGroup,cIncluded +syn match fortranParenError ")" + +syn match fortranOperator "\.\s*n\=eqv\s*\." +syn match fortranOperator "\.\s*\(and\|or\|not\)\s*\." +syn match fortranOperator "\(+\|-\|/\|\*\)" + +syn match fortranBoolean "\.\s*\(true\|false\)\s*\." + +syn keyword fortranReadWrite backspace close inquire open rewind endfile +syn keyword fortranReadWrite read write print + +"If tabs are allowed then the left margin checks do not work +if exists("fortran_have_tabs") + syn match fortranTab "\t" transparent +else + syn match fortranTab "\t" +endif + +syn keyword fortranIO unit file iostat access blank fmt form +syn keyword fortranIO recl status exist opened number named name +syn keyword fortranIO sequential direct rec +syn keyword fortranIO formatted unformatted nextrec + +syn keyword fortran66Intrinsic cabs ccos cexp clog csin csqrt +syn keyword fortran66Intrinsic dacos dasin datan datan2 dcos dcosh +syn keyword fortran66Intrinsic ddim dexp dint dlog dlog10 dmod dabs +syn keyword fortran66Intrinsic dnint dsign dsin dsinh dsqrt dtan +syn keyword fortran66Intrinsic dtanh iabs idim idnint isign idint ifix +syn keyword fortran66Intrinsic amax0 amax1 dmax1 max0 max1 +syn keyword fortran66Intrinsic amin0 amin1 dmin1 min0 min1 +syn keyword fortran66Intrinsic amod float sngl alog alog10 + +" Intrinsics provided by some vendors +syn keyword fortranExtraIntrinsic cdabs cdcos cdexp cdlog cdsin cdsqrt +syn keyword fortranExtraIntrinsic cqabs cqcos cqexp cqlog cqsin cqsqrt +syn keyword fortranExtraIntrinsic qacos qasin qatan qatan2 qcos qcosh +syn keyword fortranExtraIntrinsic qdim qexp iqint qlog qlog10 qmod qabs +syn keyword fortranExtraIntrinsic qnint qsign qsin qsinh qsqrt qtan +syn keyword fortranExtraIntrinsic qtanh qmax1 qmin1 +syn keyword fortranExtraIntrinsic dimag qimag dcmplx qcmplx dconjg qconjg +syn keyword fortranExtraIntrinsic gamma dgamma qgamma algama dlgama qlgama +syn keyword fortranExtraIntrinsic erf derf qerf erfc derfc qerfc +syn keyword fortranExtraIntrinsic dfloat + +syn keyword fortran77Intrinsic abs acos aimag aint anint asin atan atan2 +syn keyword fortran77Intrinsic cos sin tan sinh cosh tanh exp log log10 +syn keyword fortran77Intrinsic sign sqrt int cmplx nint min max conjg +syn keyword fortran77Intrinsic char ichar index +syn match fortran77Intrinsic "\<len\s*[(,]"me=s+3 +syn match fortran77Intrinsic "\<real\s*("me=s+4 +syn match fortranType "\<implicit\s\+real" +syn match fortranType "^\s*real\>" +syn match fortran90Intrinsic "\<logical\s*("me=s+7 +syn match fortranType "\<implicit\s\+logical" +syn match fortranType "^\s*logical\>" + +"Numbers of various sorts +" Integers +syn match fortranNumber display "\<\d\+\(_\a\w*\)\=\>" +" floating point number, without a decimal point +syn match fortranFloatNoDec display "\<\d\+[deq][-+]\=\d\+\(_\a\w*\)\=\>" +" floating point number, starting with a decimal point +syn match fortranFloatIniDec display "\.\d\+\([deq][-+]\=\d\+\)\=\(_\a\w*\)\=\>" +" floating point number, no digits after decimal +syn match fortranFloatEndDec display "\<\d\+\.\([deq][-+]\=\d\+\)\=\(_\a\w*\)\=\>" +" floating point number, D or Q exponents +syn match fortranFloatDExp display "\<\d\+\.\d\+\([dq][-+]\=\d\+\)\=\(_\a\w*\)\=\>" +" floating point number +syn match fortranFloat display "\<\d\+\.\d\+\(e[-+]\=\d\+\)\=\(_\a\w*\)\=\>" +" Numbers in formats +syn match fortranFormatSpec display "\d*f\d\+\.\d\+" +syn match fortranFormatSpec display "\d*e[sn]\=\d\+\.\d\+\(e\d+\>\)\=" +syn match fortranFormatSpec display "\d*\(d\|q\|g\)\d\+\.\d\+\(e\d+\)\=" +syn match fortranFormatSpec display "\d\+x\>" +" The next match cannot be used because it would pick up identifiers as well +" syn match fortranFormatSpec display "\<\(a\|i\)\d\+" + +" Numbers as labels +syn match fortranLabelNumber display "^\d\{1,5}\s"me=e-1 +syn match fortranLabelNumber display "^ \d\{1,4}\s"ms=s+1,me=e-1 +syn match fortranLabelNumber display "^ \d\{1,3}\s"ms=s+2,me=e-1 +syn match fortranLabelNumber display "^ \d\d\=\s"ms=s+3,me=e-1 +syn match fortranLabelNumber display "^ \d\s"ms=s+4,me=e-1 + +if version >= 600 && exists("fortran_more_precise") + " Numbers as targets + syn match fortranTarget display "\(\<if\s*(.\+)\s*\)\@<=\(\d\+\s*,\s*\)\{2}\d\+\>" + syn match fortranTarget display "\(\<do\s\+\)\@<=\d\+\>" + syn match fortranTarget display "\(\<go\s*to\s*(\=\)\@<=\(\d\+\s*,\s*\)*\d\+\>" +endif + +syn keyword fortranTypeEx external +syn keyword fortranIOEx format +syn keyword fortranStatementEx continue +syn match fortranStatementEx "\<go\s*to\>" +syn region fortranStringEx start=+'+ end=+'+ contains=fortranContinueMark,fortranLeftMargin,fortranSerialNumber +syn keyword fortran77IntrinsicEx dim lge lgt lle llt mod +syn keyword fortranStatementOb assign pause to + +if b:fortran_dialect != "f77" + + syn keyword fortranType type none + + syn keyword fortranStructure private public intent optional + syn keyword fortranStructure pointer target allocatable + syn keyword fortranStorageClass in out + syn match fortranStorageClass "\<kind\s*="me=s+4 + syn match fortranStorageClass "\<len\s*="me=s+3 + + syn match fortranUnitHeader "\<module\>" + syn keyword fortranUnitHeader use only contains + syn keyword fortranUnitHeader result operator assignment + syn match fortranUnitHeader "\<interface\>" + syn match fortranUnitHeader "\<recursive\>" + syn keyword fortranStatement allocate deallocate nullify cycle exit + syn match fortranConditional "\<select\>" + syn keyword fortranConditional case default where elsewhere + + syn match fortranOperator "\(\(>\|<\)=\=\|==\|/=\|=\)" + syn match fortranOperator "=>" + + syn region fortranString start=+"+ end=+"+ contains=fortranLeftMargin,fortranContinueMark,fortranSerialNumber + syn keyword fortranIO pad position action delim readwrite + syn keyword fortranIO eor advance nml + + syn keyword fortran90Intrinsic adjustl adjustr all allocated any + syn keyword fortran90Intrinsic associated bit_size btest ceiling + syn keyword fortran90Intrinsic count cshift date_and_time + syn keyword fortran90Intrinsic digits dot_product eoshift epsilon exponent + syn keyword fortran90Intrinsic floor fraction huge iand ibclr ibits ibset ieor + syn keyword fortran90Intrinsic ior ishft ishftc lbound len_trim + syn keyword fortran90Intrinsic matmul maxexponent maxloc maxval merge + syn keyword fortran90Intrinsic minexponent minloc minval modulo mvbits nearest + syn keyword fortran90Intrinsic pack present product radix random_number + syn match fortran90Intrinsic "\<not\>\(\s*\.\)\@!"me=s+3 + syn keyword fortran90Intrinsic random_seed range repeat reshape rrspacing scale + syn keyword fortran90Intrinsic selected_int_kind selected_real_kind scan + syn keyword fortran90Intrinsic shape size spacing spread set_exponent + syn keyword fortran90Intrinsic tiny transpose trim ubound unpack verify + syn keyword fortran90Intrinsic precision sum system_clock + syn match fortran90Intrinsic "\<kind\>\s*[(,]"me=s+4 + + syn match fortranUnitHeader "\<end\s*function" + syn match fortranUnitHeader "\<end\s*interface" + syn match fortranUnitHeader "\<end\s*module" + syn match fortranUnitHeader "\<end\s*program" + syn match fortranUnitHeader "\<end\s*subroutine" + syn match fortranRepeat "\<end\s*do" + syn match fortranConditional "\<end\s*where" + syn match fortranConditional "\<select\s*case" + syn match fortranConditional "\<end\s*select" + syn match fortranType "\<end\s*type" + syn match fortranType "\<in\s*out" + + syn keyword fortranUnitHeaderEx procedure + syn keyword fortranIOEx namelist + syn keyword fortranConditionalEx while + syn keyword fortran90IntrinsicEx achar iachar transfer + + syn keyword fortranInclude include + syn keyword fortran90StorageClassR sequence +endif + +syn match fortranConditional "\<end\s*if" +syn match fortranIO contains=fortranOperator "\<e\(nd\|rr\)\s*=\s*\d\+" +syn match fortranConditional "\<else\s*if" + +syn keyword fortranUnitHeaderR entry +syn match fortranTypeR display "double\s\+precision" +syn match fortranTypeR display "double\s\+complex" +syn match fortranUnitHeaderR display "block\s\+data" +syn keyword fortranStorageClassR common equivalence data +syn keyword fortran77IntrinsicR dble dprod +syn match fortran77OperatorR "\.\s*[gl][et]\s*\." +syn match fortran77OperatorR "\.\s*\(eq\|ne\)\s*\." + +if b:fortran_dialect == "f95" + syn keyword fortranRepeat forall + syn match fortranRepeat "\<end\s*forall" + syn keyword fortran95Intrinsic null cpu_time + syn match fortranType "\<elemental\>" + syn match fortranType "\<pure\>" + if exists("fortran_more_precise") + syn match fortranConstructName "\(\<end\s*forall\s\+\)\@<=\a\w*\>" + endif +endif + +syn cluster fortranCommentGroup contains=fortranTodo + +if (b:fortran_fixed_source == 1) + if !exists("fortran_have_tabs") + "Flag items beyond column 72 + syn match fortranSerialNumber excludenl "^.\{73,}$"lc=72 + "Flag left margin errors + syn match fortranLabelError "^.\{-,4}[^0-9 ]" contains=fortranTab + syn match fortranLabelError "^.\{4}\d\S" + endif + syn match fortranComment excludenl "^[!c*].*$" contains=@fortranCommentGroup + syn match fortranLeftMargin transparent "^ \{5}" + syn match fortranContinueMark display "^.\{5}\S"lc=5 +else + syn match fortranContinueMark display "&" +endif + +if b:fortran_dialect != "f77" + syn match fortranComment excludenl "!.*$" contains=@fortranCommentGroup +endif + +"cpp is often used with Fortran +syn match cPreProc "^\s*#\s*\(define\|ifdef\)\>.*" +syn match cPreProc "^\s*#\s*\(elif\|if\)\>.*" +syn match cPreProc "^\s*#\s*\(ifndef\|undef\)\>.*" +syn match cPreCondit "^\s*#\s*\(else\|endif\)\>.*" +syn region cIncluded contained start=+"[^(]+ skip=+\\\\\|\\"+ end=+"+ contains=fortranLeftMargin,fortranContinueMark,fortranSerialNumber +syn match cIncluded contained "<[^>]*>" +syn match cInclude "^\s*#\s*include\>\s*["<]" contains=cIncluded + +"Synchronising limits assume that comment and continuation lines are not mixed +if (b:fortran_fixed_source == 0) + syn sync linecont "&" maxlines=40 +else + syn sync minlines=20 +endif + +if version >= 600 && exists("fortran_fold") + + syn sync fromstart + if (b:fortran_fixed_source == 1) + syn region fortranProgram transparent fold keepend start="^\s*program\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\(program\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranModule + syn region fortranModule transparent fold keepend start="^\s*module\s\+\(procedure\)\@!\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\(module\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram + syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|recursive \)\=\s*function\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule + syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule + syn region fortranBlockData transparent fold keepend start="\<block\s*data\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|block\s*data\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock + syn region fortranInterface transparent fold keepend extend start="^\s*interface\>" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock + else + syn region fortranProgram transparent fold keepend start="^\s*program\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\(program\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranModule + syn region fortranModule transparent fold keepend start="^\s*module\s\+\(procedure\)\@!\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\(module\(\s\+\z1\>\)\=\|$\)" contains=ALLBUT,fortranProgram + syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|recursive \)\=\s*function\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule + syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule + syn region fortranBlockData transparent fold keepend start="\<block\s*data\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|block\s*data\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock + syn region fortranInterface transparent fold keepend extend start="^\s*interface\>" skip="^\s*[!#].*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock + endif + + if exists("fortran_fold_conditionals") + if (b:fortran_fixed_source == 1) + syn region fortran77Loop transparent fold keepend start="\<do\s\+\z(\d\+\)" end="^\s*\z1\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData + syn region fortran90Loop transparent fold keepend extend start="\(\<end\s\+\)\@<!\<do\(\s\+\a\|\s*$\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData + syn region fortranIfBlock transparent fold keepend extend start="\(\<e\(nd\|lse\)\s\+\)\@<!\<if\s*(.\+)\s*then\>" skip="^\([!c*]\|\s*#\).*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData + syn region fortranCase transparent fold keepend extend start="\<select\s*case\>" skip="^\([!c*]\|\s*#\).*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData + else + syn region fortran77Loop transparent fold keepend start="\<do\s\+\z(\d\+\)" end="^\s*\z1\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData + syn region fortran90Loop transparent fold keepend extend start="\(\<end\s\+\)\@<!\<do\(\s\+\a\|\s*$\)" skip="^\s*[!#].*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData + syn region fortranIfBlock transparent fold keepend extend start="\(\<e\(nd\|lse\)\s\+\)\@<!\<if\s*(.\+)\s*then\>" skip="^\s*[!#].*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData + syn region fortranCase transparent fold keepend extend start="\<select\s*case\>" skip="^\s*[!#].*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData + endif + endif + + if exists("fortran_fold_multilinecomments") + if (b:fortran_fixed_source == 1) + syn match fortranMultiLineComments transparent fold "\(^[!c*].*\(\n\|\%$\)\)\{4,}" contains=ALLBUT,fortranMultiCommentLines + else + syn match fortranMultiLineComments transparent fold "\(^\s*!.*\(\n\|\%$\)\)\{4,}" contains=ALLBUT,fortranMultiCommentLines + endif + endif +endif + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_fortran_syn_inits") + if version < 508 + let did_fortran_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default highlighting differs for each dialect. + " Transparent groups: + " fortranParen, fortranLeftMargin + " fortranProgram, fortranModule, fortranSubroutine, fortranFunction, + " fortranBlockData + " fortran77Loop, fortran90Loop, fortranIfBlock, fortranCase + " fortranMultiCommentLines + HiLink fortranStatement Statement + HiLink fortranConstructName Special + HiLink fortranConditional Conditional + HiLink fortranRepeat Repeat + HiLink fortranTodo Todo + HiLink fortranContinueMark Todo + HiLink fortranString String + HiLink fortranNumber Number + HiLink fortranOperator Operator + HiLink fortranBoolean Boolean + HiLink fortranLabelError Error + HiLink fortranObsolete Todo + HiLink fortranType Type + HiLink fortranStructure Type + HiLink fortranStorageClass StorageClass + HiLink fortranCall fortranUnitHeader + HiLink fortranUnitHeader fortranPreCondit + HiLink fortranReadWrite fortran90Intrinsic + HiLink fortranIO fortran90Intrinsic + HiLink fortran95Intrinsic fortran90Intrinsic + HiLink fortran77Intrinsic fortran90Intrinsic + HiLink fortran90Intrinsic Special + + if ( b:fortran_dialect == "elf" || b:fortran_dialect == "F" ) + HiLink fortranStatementOb fortranObsolete + HiLink fortran66Intrinsic fortranObsolete + HiLink fortran77IntrinsicR fortranObsolete + HiLink fortranUnitHeaderR fortranObsolete + HiLink fortranTypeR fortranObsolete + HiLink fortranStorageClassR fortranObsolete + HiLink fortran90StorageClassR fortranObsolete + HiLink fortran77OperatorR fortranObsolete + HiLink fortranInclude fortranObsolete + else + HiLink fortranStatementOb Statement + HiLink fortran66Intrinsic fortran90Intrinsic + HiLink fortran77IntrinsicR fortran90Intrinsic + HiLink fortranUnitHeaderR fortranPreCondit + HiLink fortranTypeR fortranType + HiLink fortranStorageClassR fortranStorageClass + HiLink fortran77OperatorR fortranOperator + HiLink fortranInclude Include + HiLink fortran90StorageClassR fortranStorageClass + endif + + if ( b:fortran_dialect == "F" ) + HiLink fortranLabelNumber fortranObsolete + HiLink fortranTarget fortranObsolete + HiLink fortranFormatSpec fortranObsolete + HiLink fortranFloatDExp fortranObsolete + HiLink fortranFloatNoDec fortranObsolete + HiLink fortranFloatIniDec fortranObsolete + HiLink fortranFloatEndDec fortranObsolete + HiLink fortranTypeEx fortranObsolete + HiLink fortranIOEx fortranObsolete + HiLink fortranStatementEx fortranObsolete + HiLink fortranStringEx fortranObsolete + HiLink fortran77IntrinsicEx fortranObsolete + HiLink fortranUnitHeaderEx fortranObsolete + HiLink fortranConditionalEx fortranObsolete + HiLink fortran90IntrinsicEx fortranObsolete + else + HiLink fortranLabelNumber Special + HiLink fortranTarget Special + HiLink fortranFormatSpec Identifier + HiLink fortranFloatDExp fortranFloat + HiLink fortranFloatNoDec fortranFloat + HiLink fortranFloatIniDec fortranFloat + HiLink fortranFloatEndDec fortranFloat + HiLink fortranTypeEx fortranType + HiLink fortranIOEx fortranIO + HiLink fortranStatementEx fortranStatement + HiLink fortranStringEx fortranString + HiLink fortran77IntrinsicEx fortran90Intrinsic + HiLink fortranUnitHeaderEx fortranUnitHeader + HiLink fortranConditionalEx fortranConditional + HiLink fortran90IntrinsicEx fortran90Intrinsic + endif + + HiLink fortranFloat Float + HiLink fortran90Identifier fortranIdentifier + "Uncomment the next line if you want all fortran variables to be highlighted + "HiLink fortranIdentifier Identifier + HiLink fortranPreCondit PreCondit + HiLink fortranInclude Include + HiLink cIncluded fortranString + HiLink cInclude Include + HiLink cPreProc PreProc + HiLink cPreCondit PreCondit + HiLink fortranParenError Error + HiLink fortranComment Comment + HiLink fortranSerialNumber Todo + HiLink fortranTab Error + " Vendor extensions + HiLink fortranExtraIntrinsic Special + + delcommand HiLink +endif + +let b:current_syntax = "fortran" + +" vim: ts=8 tw=132 diff --git a/runtime/syntax/foxpro.vim b/runtime/syntax/foxpro.vim new file mode 100644 index 000000000..8fabd2325 --- /dev/null +++ b/runtime/syntax/foxpro.vim @@ -0,0 +1,692 @@ +" Vim syntax file +" Language: FoxPro for DOS v2.x +" Maintainer: Powing Tse <powing@hkem.com> +" Last Change: 06 September 2001 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syntax case ignore + +" Highlight special characters +syn match foxproSpecial "^\s*!" +syn match foxproSpecial "&" +syn match foxproSpecial ";\s*$" +syn match foxproSpecial "^\s*=" +syn match foxproSpecial "^\s*\\" +syn match foxproSpecial "^\s*\\\\" +syn match foxproSpecial "^\s*?" +syn match foxproSpecial "^\s*??" +syn match foxproSpecial "^\s*???" +syn match foxproSpecial "\<m\>\." + +" @ Statements +syn match foxproAtSymbol contained "^\s*@" +syn match foxproAtCmd contained "\<say\>\|\<get\>\|\<edit\>\|\<box\>\|\<clea\%[r]\>\|\<fill\>\|\<menu\>\|\<prom\%[pt]\>\|\<scro\%[ll]\>\|\<to\>" +syn match foxproAtStart transparent "^\s*@.*" contains=ALL + +" preprocessor directives +syn match foxproPreProc "^\s*#\s*\(\<if\>\|\<elif\>\|\<else\>\|\<endi\%[f]\>\)" +syn match foxproPreProc "^\s*#\s*\(\<defi\%[ne]\>\|\<unde\%[f]\>\)" +syn match foxproPreProc "^\s*#\s*\<regi\%[on]\>" + +" Functions +syn match foxproFunc "\<abs\>\s*("me=e-1 +syn match foxproFunc "\<acop\%[y]\>\s*("me=e-1 +syn match foxproFunc "\<acos\>\s*("me=e-1 +syn match foxproFunc "\<adel\>\s*("me=e-1 +syn match foxproFunc "\<adir\>\s*("me=e-1 +syn match foxproFunc "\<aele\%[ment]\>\s*("me=e-1 +syn match foxproFunc "\<afie\%[lds]\>\s*("me=e-1 +syn match foxproFunc "\<afon\%[t]\>\s*("me=e-1 +syn match foxproFunc "\<ains\>\s*("me=e-1 +syn match foxproFunc "\<alen\>\s*("me=e-1 +syn match foxproFunc "\<alia\%[s]\>\s*("me=e-1 +syn match foxproFunc "\<allt\%[rim]\>\s*("me=e-1 +syn match foxproFunc "\<ansi\%[tooem]\>\s*("me=e-1 +syn match foxproFunc "\<asc\>\s*("me=e-1 +syn match foxproFunc "\<asca\%[n]\>\s*("me=e-1 +syn match foxproFunc "\<asin\>\s*("me=e-1 +syn match foxproFunc "\<asor\%[t]\>\s*("me=e-1 +syn match foxproFunc "\<asub\%[script]\>\s*("me=e-1 +syn match foxproFunc "\<at\>\s*("me=e-1 +syn match foxproFunc "\<atan\>\s*("me=e-1 +syn match foxproFunc "\<atc\>\s*("me=e-1 +syn match foxproFunc "\<atcl\%[ine]\>\s*("me=e-1 +syn match foxproFunc "\<atli\%[ne]\>\s*("me=e-1 +syn match foxproFunc "\<atn2\>\s*("me=e-1 +syn match foxproFunc "\<bar\>\s*("me=e-1 +syn match foxproFunc "\<barc\%[ount]\>\s*("me=e-1 +syn match foxproFunc "\<barp\%[rompt]\>\s*("me=e-1 +syn match foxproFunc "\<betw\%[een]\>\s*("me=e-1 +syn match foxproFunc "\<bof\>\s*("me=e-1 +syn match foxproFunc "\<caps\%[lock]\>\s*("me=e-1 +syn match foxproFunc "\<cdow\>\s*("me=e-1 +syn match foxproFunc "\<cdx\>\s*("me=e-1 +syn match foxproFunc "\<ceil\%[ing]\>\s*("me=e-1 +syn match foxproFunc "\<chr\>\s*("me=e-1 +syn match foxproFunc "\<chrs\%[aw]\>\s*("me=e-1 +syn match foxproFunc "\<chrt\%[ran]\>\s*("me=e-1 +syn match foxproFunc "\<cmon\%[th]\>\s*("me=e-1 +syn match foxproFunc "\<cntb\%[ar]\>\s*("me=e-1 +syn match foxproFunc "\<cntp\%[ad]\>\s*("me=e-1 +syn match foxproFunc "\<col\>\s*("me=e-1 +syn match foxproFunc "\<cos\>\s*("me=e-1 +syn match foxproFunc "\<cpco\%[nvert]\>\s*("me=e-1 +syn match foxproFunc "\<cpcu\%[rrent]\>\s*("me=e-1 +syn match foxproFunc "\<cpdb\%[f]\>\s*("me=e-1 +syn match foxproFunc "\<ctod\>\s*("me=e-1 +syn match foxproFunc "\<curd\%[ir]\>\s*("me=e-1 +syn match foxproFunc "\<date\>\s*("me=e-1 +syn match foxproFunc "\<day\>\s*("me=e-1 +syn match foxproFunc "\<dbf\>\s*("me=e-1 +syn match foxproFunc "\<ddea\%[borttrans]\>\s*("me=e-1 +syn match foxproFunc "\<ddea\%[dvise]\>\s*("me=e-1 +syn match foxproFunc "\<ddee\%[nabled]\>\s*("me=e-1 +syn match foxproFunc "\<ddee\%[xecute]\>\s*("me=e-1 +syn match foxproFunc "\<ddei\%[nitiate]\>\s*("me=e-1 +syn match foxproFunc "\<ddel\%[asterror]\>\s*("me=e-1 +syn match foxproFunc "\<ddep\%[oke]\>\s*("me=e-1 +syn match foxproFunc "\<dder\%[equest]\>\s*("me=e-1 +syn match foxproFunc "\<ddes\%[etoption]\>\s*("me=e-1 +syn match foxproFunc "\<ddes\%[etservice]\>\s*("me=e-1 +syn match foxproFunc "\<ddes\%[ettopic]\>\s*("me=e-1 +syn match foxproFunc "\<ddet\%[erminate]\>\s*("me=e-1 +syn match foxproFunc "\<dele\%[ted]\>\s*("me=e-1 +syn match foxproFunc "\<desc\%[ending]\>\s*("me=e-1 +syn match foxproFunc "\<diff\%[erence]\>\s*("me=e-1 +syn match foxproFunc "\<disk\%[space]\>\s*("me=e-1 +syn match foxproFunc "\<dmy\>\s*("me=e-1 +syn match foxproFunc "\<dow\>\s*("me=e-1 +syn match foxproFunc "\<dtoc\>\s*("me=e-1 +syn match foxproFunc "\<dtor\>\s*("me=e-1 +syn match foxproFunc "\<dtos\>\s*("me=e-1 +syn match foxproFunc "\<empt\%[y]\>\s*("me=e-1 +syn match foxproFunc "\<eof\>\s*("me=e-1 +syn match foxproFunc "\<erro\%[r]\>\s*("me=e-1 +syn match foxproFunc "\<eval\%[uate]\>\s*("me=e-1 +syn match foxproFunc "\<exp\>\s*("me=e-1 +syn match foxproFunc "\<fchs\%[ize]\>\s*("me=e-1 +syn match foxproFunc "\<fclo\%[se]\>\s*("me=e-1 +syn match foxproFunc "\<fcou\%[nt]\>\s*("me=e-1 +syn match foxproFunc "\<fcre\%[ate]\>\s*("me=e-1 +syn match foxproFunc "\<fdat\%[e]\>\s*("me=e-1 +syn match foxproFunc "\<feof\>\s*("me=e-1 +syn match foxproFunc "\<ferr\%[or]\>\s*("me=e-1 +syn match foxproFunc "\<fflu\%[sh]\>\s*("me=e-1 +syn match foxproFunc "\<fget\%[s]\>\s*("me=e-1 +syn match foxproFunc "\<fiel\%[d]\>\s*("me=e-1 +syn match foxproFunc "\<file\>\s*("me=e-1 +syn match foxproFunc "\<filt\%[er]\>\s*("me=e-1 +syn match foxproFunc "\<fkla\%[bel]\>\s*("me=e-1 +syn match foxproFunc "\<fkma\%[x]\>\s*("me=e-1 +syn match foxproFunc "\<fldl\%[ist]\>\s*("me=e-1 +syn match foxproFunc "\<floc\%[k]\>\s*("me=e-1 +syn match foxproFunc "\<floo\%[r]\>\s*("me=e-1 +syn match foxproFunc "\<font\%[metric]\>\s*("me=e-1 +syn match foxproFunc "\<fope\%[n]\>\s*("me=e-1 +syn match foxproFunc "\<for\>\s*("me=e-1 +syn match foxproFunc "\<foun\%[d]\>\s*("me=e-1 +syn match foxproFunc "\<fput\%[s]\>\s*("me=e-1 +syn match foxproFunc "\<frea\%[d]\>\s*("me=e-1 +syn match foxproFunc "\<fsee\%[k]\>\s*("me=e-1 +syn match foxproFunc "\<fsiz\%[e]\>\s*("me=e-1 +syn match foxproFunc "\<ftim\%[e]\>\s*("me=e-1 +syn match foxproFunc "\<full\%[path]\>\s*("me=e-1 +syn match foxproFunc "\<fv\>\s*("me=e-1 +syn match foxproFunc "\<fwri\%[te]\>\s*("me=e-1 +syn match foxproFunc "\<getb\%[ar]\>\s*("me=e-1 +syn match foxproFunc "\<getd\%[ir]\>\s*("me=e-1 +syn match foxproFunc "\<gete\%[nv]\>\s*("me=e-1 +syn match foxproFunc "\<getf\%[ile]\>\s*("me=e-1 +syn match foxproFunc "\<getf\%[ont]\>\s*("me=e-1 +syn match foxproFunc "\<getp\%[ad]\>\s*("me=e-1 +syn match foxproFunc "\<gomo\%[nth]\>\s*("me=e-1 +syn match foxproFunc "\<head\%[er]\>\s*("me=e-1 +syn match foxproFunc "\<home\>\s*("me=e-1 +syn match foxproFunc "\<idxc\%[ollate]\>\s*("me=e-1 +syn match foxproFunc "\<iif\>\s*("me=e-1 +syn match foxproFunc "\<inke\%[y]\>\s*("me=e-1 +syn match foxproFunc "\<inli\%[st]\>\s*("me=e-1 +syn match foxproFunc "\<insm\%[ode]\>\s*("me=e-1 +syn match foxproFunc "\<int\>\s*("me=e-1 +syn match foxproFunc "\<isal\%[pha]\>\s*("me=e-1 +syn match foxproFunc "\<isbl\%[ank]\>\s*("me=e-1 +syn match foxproFunc "\<isco\%[lor]\>\s*("me=e-1 +syn match foxproFunc "\<isdi\%[git]\>\s*("me=e-1 +syn match foxproFunc "\<islo\%[wer]\>\s*("me=e-1 +syn match foxproFunc "\<isre\%[adonly]\>\s*("me=e-1 +syn match foxproFunc "\<isup\%[per]\>\s*("me=e-1 +syn match foxproFunc "\<key\>\s*("me=e-1 +syn match foxproFunc "\<keym\%[atch]\>\s*("me=e-1 +syn match foxproFunc "\<last\%[key]\>\s*("me=e-1 +syn match foxproFunc "\<left\>\s*("me=e-1 +syn match foxproFunc "\<len\>\s*("me=e-1 +syn match foxproFunc "\<like\>\s*("me=e-1 +syn match foxproFunc "\<line\%[no]\>\s*("me=e-1 +syn match foxproFunc "\<locf\%[ile]\>\s*("me=e-1 +syn match foxproFunc "\<lock\>\s*("me=e-1 +syn match foxproFunc "\<log\>\s*("me=e-1 +syn match foxproFunc "\<log1\%[0]\>\s*("me=e-1 +syn match foxproFunc "\<look\%[up]\>\s*("me=e-1 +syn match foxproFunc "\<lowe\%[r]\>\s*("me=e-1 +syn match foxproFunc "\<ltri\%[m]\>\s*("me=e-1 +syn match foxproFunc "\<lupd\%[ate]\>\s*("me=e-1 +syn match foxproFunc "\<max\>\s*("me=e-1 +syn match foxproFunc "\<mcol\>\s*("me=e-1 +syn match foxproFunc "\<mdow\%[n]\>\s*("me=e-1 +syn match foxproFunc "\<mdx\>\s*("me=e-1 +syn match foxproFunc "\<mdy\>\s*("me=e-1 +syn match foxproFunc "\<meml\%[ines]\>\s*("me=e-1 +syn match foxproFunc "\<memo\%[ry]\>\s*("me=e-1 +syn match foxproFunc "\<menu\>\s*("me=e-1 +syn match foxproFunc "\<mess\%[age]\>\s*("me=e-1 +syn match foxproFunc "\<min\>\s*("me=e-1 +syn match foxproFunc "\<mlin\%[e]\>\s*("me=e-1 +syn match foxproFunc "\<mod\>\s*("me=e-1 +syn match foxproFunc "\<mont\%[h]\>\s*("me=e-1 +syn match foxproFunc "\<mrkb\%[ar]\>\s*("me=e-1 +syn match foxproFunc "\<mrkp\%[ad]\>\s*("me=e-1 +syn match foxproFunc "\<mrow\>\s*("me=e-1 +syn match foxproFunc "\<mwin\%[dow]\>\s*("me=e-1 +syn match foxproFunc "\<ndx\>\s*("me=e-1 +syn match foxproFunc "\<norm\%[alize]\>\s*("me=e-1 +syn match foxproFunc "\<numl\%[ock]\>\s*("me=e-1 +syn match foxproFunc "\<objn\%[um]\>\s*("me=e-1 +syn match foxproFunc "\<objv\%[ar]\>\s*("me=e-1 +syn match foxproFunc "\<occu\%[rs]\>\s*("me=e-1 +syn match foxproFunc "\<oemt\%[oansi]\>\s*("me=e-1 +syn match foxproFunc "\<on\>\s*("me=e-1 +syn match foxproFunc "\<orde\%[r]\>\s*("me=e-1 +syn match foxproFunc "\<os\>\s*("me=e-1 +syn match foxproFunc "\<pad\>\s*("me=e-1 +syn match foxproFunc "\<padc\>\s*("me=e-1 +syn match foxproFunc "\<padl\>\s*("me=e-1 +syn match foxproFunc "\<padr\>\s*("me=e-1 +syn match foxproFunc "\<para\%[meters]\>\s*("me=e-1 +syn match foxproFunc "\<paym\%[ent]\>\s*("me=e-1 +syn match foxproFunc "\<pcol\>\s*("me=e-1 +syn match foxproFunc "\<pi\>\s*("me=e-1 +syn match foxproFunc "\<popu\%[p]\>\s*("me=e-1 +syn match foxproFunc "\<prin\%[tstatus]\>\s*("me=e-1 +syn match foxproFunc "\<prmb\%[ar]\>\s*("me=e-1 +syn match foxproFunc "\<prmp\%[ad]\>\s*("me=e-1 +syn match foxproFunc "\<prog\%[ram]\>\s*("me=e-1 +syn match foxproFunc "\<prom\%[pt]\>\s*("me=e-1 +syn match foxproFunc "\<prop\%[er]\>\s*("me=e-1 +syn match foxproFunc "\<prow\>\s*("me=e-1 +syn match foxproFunc "\<prti\%[nfo]\>\s*("me=e-1 +syn match foxproFunc "\<putf\%[ile]\>\s*("me=e-1 +syn match foxproFunc "\<pv\>\s*("me=e-1 +syn match foxproFunc "\<rand\>\s*("me=e-1 +syn match foxproFunc "\<rat\>\s*("me=e-1 +syn match foxproFunc "\<ratl\%[ine]\>\s*("me=e-1 +syn match foxproFunc "\<rdle\%[vel]\>\s*("me=e-1 +syn match foxproFunc "\<read\%[key]\>\s*("me=e-1 +syn match foxproFunc "\<recc\%[ount]\>\s*("me=e-1 +syn match foxproFunc "\<recn\%[o]\>\s*("me=e-1 +syn match foxproFunc "\<recs\%[ize]\>\s*("me=e-1 +syn match foxproFunc "\<rela\%[tion]\>\s*("me=e-1 +syn match foxproFunc "\<repl\%[icate]\>\s*("me=e-1 +syn match foxproFunc "\<rgbs\%[cheme]\>\s*("me=e-1 +syn match foxproFunc "\<righ\%[t]\>\s*("me=e-1 +syn match foxproFunc "\<rloc\%[k]\>\s*("me=e-1 +syn match foxproFunc "\<roun\%[d]\>\s*("me=e-1 +syn match foxproFunc "\<row\>\s*("me=e-1 +syn match foxproFunc "\<rtod\>\s*("me=e-1 +syn match foxproFunc "\<rtri\%[m]\>\s*("me=e-1 +syn match foxproFunc "\<sche\%[me]\>\s*("me=e-1 +syn match foxproFunc "\<scol\%[s]\>\s*("me=e-1 +syn match foxproFunc "\<seco\%[nds]\>\s*("me=e-1 +syn match foxproFunc "\<seek\>\s*("me=e-1 +syn match foxproFunc "\<sele\%[ct]\>\s*("me=e-1 +syn match foxproFunc "\<set\>\s*("me=e-1 +syn match foxproFunc "\<sign\>\s*("me=e-1 +syn match foxproFunc "\<sin\>\s*("me=e-1 +syn match foxproFunc "\<skpb\%[ar]\>\s*("me=e-1 +syn match foxproFunc "\<skpp\%[ad]\>\s*("me=e-1 +syn match foxproFunc "\<soun\%[dex]\>\s*("me=e-1 +syn match foxproFunc "\<spac\%[e]\>\s*("me=e-1 +syn match foxproFunc "\<sqrt\>\s*("me=e-1 +syn match foxproFunc "\<srow\%[s]\>\s*("me=e-1 +syn match foxproFunc "\<str\>\s*("me=e-1 +syn match foxproFunc "\<strt\%[ran]\>\s*("me=e-1 +syn match foxproFunc "\<stuf\%[f]\>\s*("me=e-1 +syn match foxproFunc "\<subs\%[tr]\>\s*("me=e-1 +syn match foxproFunc "\<sysm\%[etric]\>\s*("me=e-1 +syn match foxproFunc "\<sys\>\s*("me=e-1 +syn match foxproFunc "\<tag\>\s*("me=e-1 +syn match foxproFunc "\<tagc\%[ount]\>\s*("me=e-1 +syn match foxproFunc "\<tagn\%[o]\>\s*("me=e-1 +syn match foxproFunc "\<tan\>\s*("me=e-1 +syn match foxproFunc "\<targ\%[et]\>\s*("me=e-1 +syn match foxproFunc "\<time\>\s*("me=e-1 +syn match foxproFunc "\<tran\%[sform]\>\s*("me=e-1 +syn match foxproFunc "\<trim\>\s*("me=e-1 +syn match foxproFunc "\<txtw\%[idth]\>\s*("me=e-1 +syn match foxproFunc "\<type\>\s*("me=e-1 +syn match foxproFunc "\<uniq\%[ue]\>\s*("me=e-1 +syn match foxproFunc "\<upda\%[ted]\>\s*("me=e-1 +syn match foxproFunc "\<uppe\%[r]\>\s*("me=e-1 +syn match foxproFunc "\<used\>\s*("me=e-1 +syn match foxproFunc "\<val\>\s*("me=e-1 +syn match foxproFunc "\<varr\%[ead]\>\s*("me=e-1 +syn match foxproFunc "\<vers\%[ion]\>\s*("me=e-1 +syn match foxproFunc "\<wbor\%[der]\>\s*("me=e-1 +syn match foxproFunc "\<wchi\%[ld]\>\s*("me=e-1 +syn match foxproFunc "\<wcol\%[s]\>\s*("me=e-1 +syn match foxproFunc "\<wexi\%[st]\>\s*("me=e-1 +syn match foxproFunc "\<wfon\%[t]\>\s*("me=e-1 +syn match foxproFunc "\<wlas\%[t]\>\s*("me=e-1 +syn match foxproFunc "\<wlco\%[l]\>\s*("me=e-1 +syn match foxproFunc "\<wlro\%[w]\>\s*("me=e-1 +syn match foxproFunc "\<wmax\%[imum]\>\s*("me=e-1 +syn match foxproFunc "\<wmin\%[imum]\>\s*("me=e-1 +syn match foxproFunc "\<wont\%[op]\>\s*("me=e-1 +syn match foxproFunc "\<wout\%[put]\>\s*("me=e-1 +syn match foxproFunc "\<wpar\%[ent]\>\s*("me=e-1 +syn match foxproFunc "\<wrea\%[d]\>\s*("me=e-1 +syn match foxproFunc "\<wrow\%[s]\>\s*("me=e-1 +syn match foxproFunc "\<wtit\%[le]\>\s*("me=e-1 +syn match foxproFunc "\<wvis\%[ible]\>\s*("me=e-1 +syn match foxproFunc "\<year\>\s*("me=e-1 + +" Commands +syn match foxproCmd "^\s*\<acce\%[pt]\>" +syn match foxproCmd "^\s*\<acti\%[vate]\>\s*\<menu\>" +syn match foxproCmd "^\s*\<acti\%[vate]\>\s*\<popu\%[p]\>" +syn match foxproCmd "^\s*\<acti\%[vate]\>\s*\<scre\%[en]\>" +syn match foxproCmd "^\s*\<acti\%[vate]\>\s*\<wind\%[ow]\>" +syn match foxproCmd "^\s*\<appe\%[nd]\>" +syn match foxproCmd "^\s*\<appe\%[nd]\>\s*\<from\>" +syn match foxproCmd "^\s*\<appe\%[nd]\>\s*\<from\>\s*\<arra\%[y]\>" +syn match foxproCmd "^\s*\<appe\%[nd]\>\s*\<gene\%[ral]\>" +syn match foxproCmd "^\s*\<appe\%[nd]\>\s*\<memo\>" +syn match foxproCmd "^\s*\<assi\%[st]\>" +syn match foxproCmd "^\s*\<aver\%[age]\>" +syn match foxproCmd "^\s*\<blan\%[k]\>" +syn match foxproCmd "^\s*\<brow\%[se]\>" +syn match foxproCmd "^\s*\<buil\%[d]\>\s*\<app\>" +syn match foxproCmd "^\s*\<buil\%[d]\>\s*\<exe\>" +syn match foxproCmd "^\s*\<buil\%[d]\>\s*\<proj\%[ect]\>" +syn match foxproCmd "^\s*\<calc\%[ulate]\>" +syn match foxproCmd "^\s*\<call\>" +syn match foxproCmd "^\s*\<canc\%[el]\>" +syn match foxproCmd "^\s*\<chan\%[ge]\>" +syn match foxproCmd "^\s*\<clea\%[r]\>" +syn match foxproCmd "^\s*\<clos\%[e]\>" +syn match foxproCmd "^\s*\<clos\%[e]\>\s*\<memo\>" +syn match foxproCmd "^\s*\<comp\%[ile]\>" +syn match foxproCmd "^\s*\<cont\%[inue]\>" +syn match foxproCmd "^\s*\<copy\>\s*\<file\>" +syn match foxproCmd "^\s*\<copy\>\s*\<inde\%[xes]\>" +syn match foxproCmd "^\s*\<copy\>\s*\<memo\>" +syn match foxproCmd "^\s*\<copy\>\s*\<stru\%[cture]\>" +syn match foxproCmd "^\s*\<copy\>\s*\<stru\%[cture]\>\s*\<exte\%[nded]\>" +syn match foxproCmd "^\s*\<copy\>\s*\<tag\>" +syn match foxproCmd "^\s*\<copy\>\s*\<to\>" +syn match foxproCmd "^\s*\<copy\>\s*\<to\>\s*\<arra\%[y]\>" +syn match foxproCmd "^\s*\<coun\%[t]\>" +syn match foxproCmd "^\s*\<crea\%[te]\>" +syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<colo\%[r]\>\s*\<set\>" +syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<curs\%[or]\>" +syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<from\>" +syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<labe\%[l]\>" +syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<menu\>" +syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<proj\%[ect]\>" +syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<quer\%[y]\>" +syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<repo\%[rt]\>" +syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<scre\%[en]\>" +syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<tabl\%[e]\>" +syn match foxproCmd "^\s*\<crea\%[te]\>\s*\<view\>" +syn match foxproCmd "^\s*\<dde\>" +syn match foxproCmd "^\s*\<deac\%[tivate]\>\s*\<menu\>" +syn match foxproCmd "^\s*\<deac\%[tivate]\>\s*\<popu\%[p]\>" +syn match foxproCmd "^\s*\<deac\%[tivate]\>\s*\<wind\%[ow]\>" +syn match foxproCmd "^\s*\<decl\%[are]\>" +syn match foxproCmd "^\s*\<defi\%[ne]\>\s*\<bar\>" +syn match foxproCmd "^\s*\<defi\%[ne]\>\s*\<box\>" +syn match foxproCmd "^\s*\<defi\%[ne]\>\s*\<menu\>" +syn match foxproCmd "^\s*\<defi\%[ne]\>\s*\<pad\>" +syn match foxproCmd "^\s*\<defi\%[ne]\>\s*\<popu\%[p]\>" +syn match foxproCmd "^\s*\<defi\%[ne]\>\s*\<wind\%[ow]\>" +syn match foxproCmd "^\s*\<dele\%[te]\>" +syn match foxproCmd "^\s*\<dele\%[te]\>\s*\<file\>" +syn match foxproCmd "^\s*\<dele\%[te]\>\s*\<tag\>" +syn match foxproCmd "^\s*\<dime\%[nsion]\>" +syn match foxproCmd "^\s*\<dire\%[ctory]\>" +syn match foxproCmd "^\s*\<disp\%[lay]\>" +syn match foxproCmd "^\s*\<disp\%[lay]\>\s*\<file\%[s]\>" +syn match foxproCmd "^\s*\<disp\%[lay]\>\s*\<memo\%[ry]\>" +syn match foxproCmd "^\s*\<disp\%[lay]\>\s*\<stat\%[us]\>" +syn match foxproCmd "^\s*\<disp\%[lay]\>\s*\<stru\%[cture]\>" +syn match foxproCmd "^\s*\<do\>" +syn match foxproCmd "^\s*\<edit\>" +syn match foxproCmd "^\s*\<ejec\%[t]\>" +syn match foxproCmd "^\s*\<ejec\%[t]\>\s*\<page\>" +syn match foxproCmd "^\s*\<eras\%[e]\>" +syn match foxproCmd "^\s*\<exit\>" +syn match foxproCmd "^\s*\<expo\%[rt]\>" +syn match foxproCmd "^\s*\<exte\%[rnal]\>" +syn match foxproCmd "^\s*\<file\%[r]\>" +syn match foxproCmd "^\s*\<find\>" +syn match foxproCmd "^\s*\<flus\%[h]\>" +syn match foxproCmd "^\s*\<func\%[tion]\>" +syn match foxproCmd "^\s*\<gath\%[er]\>" +syn match foxproCmd "^\s*\<gete\%[xpr]\>" +syn match foxproCmd "^\s*\<go\>" +syn match foxproCmd "^\s*\<goto\>" +syn match foxproCmd "^\s*\<help\>" +syn match foxproCmd "^\s*\<hide\>\s*\<menu\>" +syn match foxproCmd "^\s*\<hide\>\s*\<popu\%[p]\>" +syn match foxproCmd "^\s*\<hide\>\s*\<wind\%[ow]\>" +syn match foxproCmd "^\s*\<impo\%[rt]\>" +syn match foxproCmd "^\s*\<inde\%[x]\>" +syn match foxproCmd "^\s*\<inpu\%[t]\>" +syn match foxproCmd "^\s*\<inse\%[rt]\>" +syn match foxproCmd "^\s*\<join\>" +syn match foxproCmd "^\s*\<keyb\%[oard]\>" +syn match foxproCmd "^\s*\<labe\%[l]\>" +syn match foxproCmd "^\s*\<list\>" +syn match foxproCmd "^\s*\<load\>" +syn match foxproCmd "^\s*\<loca\%[te]\>" +syn match foxproCmd "^\s*\<loop\>" +syn match foxproCmd "^\s*\<menu\>" +syn match foxproCmd "^\s*\<menu\>\s*\<to\>" +syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<comm\%[and]\>" +syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<file\>" +syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<gene\%[ral]\>" +syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<labe\%[l]\>" +syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<memo\>" +syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<menu\>" +syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<proj\%[ect]\>" +syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<quer\%[y]\>" +syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<repo\%[rt]\>" +syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<scre\%[en]\>" +syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<stru\%[cture]\>" +syn match foxproCmd "^\s*\<modi\%[fy]\>\s*\<wind\%[ow]\>" +syn match foxproCmd "^\s*\<move\>\s*\<popu\%[p]\>" +syn match foxproCmd "^\s*\<move\>\s*\<wind\%[ow]\>" +syn match foxproCmd "^\s*\<note\>" +syn match foxproCmd "^\s*\<on\>\s*\<apla\%[bout]\>" +syn match foxproCmd "^\s*\<on\>\s*\<bar\>" +syn match foxproCmd "^\s*\<on\>\s*\<erro\%[r]\>" +syn match foxproCmd "^\s*\<on\>\s*\<esca\%[pe]\>" +syn match foxproCmd "^\s*\<on\>\s*\<exit\>\s*\<bar\>" +syn match foxproCmd "^\s*\<on\>\s*\<exit\>\s*\<menu\>" +syn match foxproCmd "^\s*\<on\>\s*\<exit\>\s*\<pad\>" +syn match foxproCmd "^\s*\<on\>\s*\<exit\>\s*\<popu\%[p]\>" +syn match foxproCmd "^\s*\<on\>\s*\<key\>" +syn match foxproCmd "^\s*\<on\>\s*\<key\>\s*\<=\>" +syn match foxproCmd "^\s*\<on\>\s*\<key\>\s*\<labe\%[l]\>" +syn match foxproCmd "^\s*\<on\>\s*\<mach\%[elp]\>" +syn match foxproCmd "^\s*\<on\>\s*\<pad\>" +syn match foxproCmd "^\s*\<on\>\s*\<page\>" +syn match foxproCmd "^\s*\<on\>\s*\<read\%[error]\>" +syn match foxproCmd "^\s*\<on\>\s*\<sele\%[ction]\>\s*\<bar\>" +syn match foxproCmd "^\s*\<on\>\s*\<sele\%[ction]\>\s*\<menu\>" +syn match foxproCmd "^\s*\<on\>\s*\<sele\%[ction]\>\s*\<pad\>" +syn match foxproCmd "^\s*\<on\>\s*\<sele\%[ction]\>\s*\<popu\%[p]\>" +syn match foxproCmd "^\s*\<on\>\s*\<shut\%[down]\>" +syn match foxproCmd "^\s*\<pack\>" +syn match foxproCmd "^\s*\<para\%[meters]\>" +syn match foxproCmd "^\s*\<play\>\s*\<macr\%[o]\>" +syn match foxproCmd "^\s*\<pop\>\s*\<key\>" +syn match foxproCmd "^\s*\<pop\>\s*\<menu\>" +syn match foxproCmd "^\s*\<pop\>\s*\<popu\%[p]\>" +syn match foxproCmd "^\s*\<priv\%[ate]\>" +syn match foxproCmd "^\s*\<proc\%[edure]\>" +syn match foxproCmd "^\s*\<publ\%[ic]\>" +syn match foxproCmd "^\s*\<push\>\s*\<key\>" +syn match foxproCmd "^\s*\<push\>\s*\<menu\>" +syn match foxproCmd "^\s*\<push\>\s*\<popu\%[p]\>" +syn match foxproCmd "^\s*\<quit\>" +syn match foxproCmd "^\s*\<read\>" +syn match foxproCmd "^\s*\<read\>\s*\<menu\>" +syn match foxproCmd "^\s*\<reca\%[ll]\>" +syn match foxproCmd "^\s*\<rein\%[dex]\>" +syn match foxproCmd "^\s*\<rele\%[ase]\>" +syn match foxproCmd "^\s*\<rele\%[ase]\>\s*\<modu\%[le]\>" +syn match foxproCmd "^\s*\<rena\%[me]\>" +syn match foxproCmd "^\s*\<repl\%[ace]\>" +syn match foxproCmd "^\s*\<repl\%[ace]\>\s*\<from\>\s*\<arra\%[y]\>" +syn match foxproCmd "^\s*\<repo\%[rt]\>" +syn match foxproCmd "^\s*\<rest\%[ore]\>\s*\<from\>" +syn match foxproCmd "^\s*\<rest\%[ore]\>\s*\<macr\%[os]\>" +syn match foxproCmd "^\s*\<rest\%[ore]\>\s*\<scre\%[en]\>" +syn match foxproCmd "^\s*\<rest\%[ore]\>\s*\<wind\%[ow]\>" +syn match foxproCmd "^\s*\<resu\%[me]\>" +syn match foxproCmd "^\s*\<retr\%[y]\>" +syn match foxproCmd "^\s*\<retu\%[rn]\>" +syn match foxproCmd "^\s*\<run\>" +syn match foxproCmd "^\s*\<run\>\s*\/n" +syn match foxproCmd "^\s*\<runs\%[cript]\>" +syn match foxproCmd "^\s*\<save\>\s*\<macr\%[os]\>" +syn match foxproCmd "^\s*\<save\>\s*\<scre\%[en]\>" +syn match foxproCmd "^\s*\<save\>\s*\<to\>" +syn match foxproCmd "^\s*\<save\>\s*\<wind\%[ows]\>" +syn match foxproCmd "^\s*\<scat\%[ter]\>" +syn match foxproCmd "^\s*\<scro\%[ll]\>" +syn match foxproCmd "^\s*\<seek\>" +syn match foxproCmd "^\s*\<sele\%[ct]\>" +syn match foxproCmd "^\s*\<set\>" +syn match foxproCmd "^\s*\<set\>\s*\<alte\%[rnate]\>" +syn match foxproCmd "^\s*\<set\>\s*\<ansi\>" +syn match foxproCmd "^\s*\<set\>\s*\<apla\%[bout]\>" +syn match foxproCmd "^\s*\<set\>\s*\<auto\%[save]\>" +syn match foxproCmd "^\s*\<set\>\s*\<bell\>" +syn match foxproCmd "^\s*\<set\>\s*\<blin\%[k]\>" +syn match foxproCmd "^\s*\<set\>\s*\<bloc\%[ksize]\>" +syn match foxproCmd "^\s*\<set\>\s*\<bord\%[er]\>" +syn match foxproCmd "^\s*\<set\>\s*\<brst\%[atus]\>" +syn match foxproCmd "^\s*\<set\>\s*\<carr\%[y]\>" +syn match foxproCmd "^\s*\<set\>\s*\<cent\%[ury]\>" +syn match foxproCmd "^\s*\<set\>\s*\<clea\%[r]\>" +syn match foxproCmd "^\s*\<set\>\s*\<cloc\%[k]\>" +syn match foxproCmd "^\s*\<set\>\s*\<coll\%[ate]\>" +syn match foxproCmd "^\s*\<set\>\s*\<colo\%[r]\>\s*\<of\>" +syn match foxproCmd "^\s*\<set\>\s*\<colo\%[r]\>\s*\<of\>\s*\<sche\%[me]\>" +syn match foxproCmd "^\s*\<set\>\s*\<colo\%[r]\>\s*\<set\>" +syn match foxproCmd "^\s*\<set\>\s*\<colo\%[r]\>\s*\<to\>" +syn match foxproCmd "^\s*\<set\>\s*\<comp\%[atible]\>" +syn match foxproCmd "^\s*\<set\>\s*\<conf\%[irm]\>" +syn match foxproCmd "^\s*\<set\>\s*\<cons\%[ole]\>" +syn match foxproCmd "^\s*\<set\>\s*\<curr\%[ency]\>" +syn match foxproCmd "^\s*\<set\>\s*\<curs\%[or]\>" +syn match foxproCmd "^\s*\<set\>\s*\<date\>" +syn match foxproCmd "^\s*\<set\>\s*\<debu\%[g]\>" +syn match foxproCmd "^\s*\<set\>\s*\<deci\%[mals]\>" +syn match foxproCmd "^\s*\<set\>\s*\<defa\%[ult]\>" +syn match foxproCmd "^\s*\<set\>\s*\<dele\%[ted]\>" +syn match foxproCmd "^\s*\<set\>\s*\<deli\%[miters]\>" +syn match foxproCmd "^\s*\<set\>\s*\<deve\%[lopment]\>" +syn match foxproCmd "^\s*\<set\>\s*\<devi\%[ce]\>" +syn match foxproCmd "^\s*\<set\>\s*\<disp\%[lay]\>" +syn match foxproCmd "^\s*\<set\>\s*\<dohi\%[story]\>" +syn match foxproCmd "^\s*\<set\>\s*\<echo\>" +syn match foxproCmd "^\s*\<set\>\s*\<esca\%[pe]\>" +syn match foxproCmd "^\s*\<set\>\s*\<exac\%[t]\>" +syn match foxproCmd "^\s*\<set\>\s*\<excl\%[usive]\>" +syn match foxproCmd "^\s*\<set\>\s*\<fiel\%[ds]\>" +syn match foxproCmd "^\s*\<set\>\s*\<filt\%[er]\>" +syn match foxproCmd "^\s*\<set\>\s*\<fixe\%[d]\>" +syn match foxproCmd "^\s*\<set\>\s*\<form\%[at]\>" +syn match foxproCmd "^\s*\<set\>\s*\<full\%[path]\>" +syn match foxproCmd "^\s*\<set\>\s*\<func\%[tion]\>" +syn match foxproCmd "^\s*\<set\>\s*\<head\%[ings]\>" +syn match foxproCmd "^\s*\<set\>\s*\<help\>" +syn match foxproCmd "^\s*\<set\>\s*\<help\%[filter]\>" +syn match foxproCmd "^\s*\<set\>\s*\<hour\%[s]\>" +syn match foxproCmd "^\s*\<set\>\s*\<inde\%[x]\>" +syn match foxproCmd "^\s*\<set\>\s*\<inte\%[nsity]\>" +syn match foxproCmd "^\s*\<set\>\s*\<key\>" +syn match foxproCmd "^\s*\<set\>\s*\<keyc\%[omp]\>" +syn match foxproCmd "^\s*\<set\>\s*\<libr\%[ary]\>" +syn match foxproCmd "^\s*\<set\>\s*\<lock\>" +syn match foxproCmd "^\s*\<set\>\s*\<loge\%[rrors]\>" +syn match foxproCmd "^\s*\<set\>\s*\<macd\%[esktop]\>" +syn match foxproCmd "^\s*\<set\>\s*\<mach\%[elp]\>" +syn match foxproCmd "^\s*\<set\>\s*\<mack\%[ey]\>" +syn match foxproCmd "^\s*\<set\>\s*\<marg\%[in]\>" +syn match foxproCmd "^\s*\<set\>\s*\<mark\>\s*\<of\>" +syn match foxproCmd "^\s*\<set\>\s*\<mark\>\s*\<to\>" +syn match foxproCmd "^\s*\<set\>\s*\<memo\%[width]\>" +syn match foxproCmd "^\s*\<set\>\s*\<mess\%[age]\>" +syn match foxproCmd "^\s*\<set\>\s*\<mous\%[e]\>" +syn match foxproCmd "^\s*\<set\>\s*\<mult\%[ilocks]\>" +syn match foxproCmd "^\s*\<set\>\s*\<near\>" +syn match foxproCmd "^\s*\<set\>\s*\<nocp\%[trans]\>" +syn match foxproCmd "^\s*\<set\>\s*\<noti\%[fy]\>" +syn match foxproCmd "^\s*\<set\>\s*\<odom\%[eter]\>" +syn match foxproCmd "^\s*\<set\>\s*\<opti\%[mize]\>" +syn match foxproCmd "^\s*\<set\>\s*\<orde\%[r]\>" +syn match foxproCmd "^\s*\<set\>\s*\<pale\%[tte]\>" +syn match foxproCmd "^\s*\<set\>\s*\<path\>" +syn match foxproCmd "^\s*\<set\>\s*\<pdse\%[tup]\>" +syn match foxproCmd "^\s*\<set\>\s*\<poin\%[t]\>" +syn match foxproCmd "^\s*\<set\>\s*\<prin\%[ter]\>" +syn match foxproCmd "^\s*\<set\>\s*\<proc\%[edure]\>" +syn match foxproCmd "^\s*\<set\>\s*\<read\%[border]\>" +syn match foxproCmd "^\s*\<set\>\s*\<refr\%[esh]\>" +syn match foxproCmd "^\s*\<set\>\s*\<rela\%[tion]\>" +syn match foxproCmd "^\s*\<set\>\s*\<rela\%[tion]\>\s*\<off\>" +syn match foxproCmd "^\s*\<set\>\s*\<repr\%[ocess]\>" +syn match foxproCmd "^\s*\<set\>\s*\<reso\%[urce]\>" +syn match foxproCmd "^\s*\<set\>\s*\<safe\%[ty]\>" +syn match foxproCmd "^\s*\<set\>\s*\<scor\%[eboard]\>" +syn match foxproCmd "^\s*\<set\>\s*\<sepa\%[rator]\>" +syn match foxproCmd "^\s*\<set\>\s*\<shad\%[ows]\>" +syn match foxproCmd "^\s*\<set\>\s*\<skip\>" +syn match foxproCmd "^\s*\<set\>\s*\<skip\>\s*\<of\>" +syn match foxproCmd "^\s*\<set\>\s*\<spac\%[e]\>" +syn match foxproCmd "^\s*\<set\>\s*\<stat\%[us]\>" +syn match foxproCmd "^\s*\<set\>\s*\<stat\%[us]\>\s*\<bar\>" +syn match foxproCmd "^\s*\<set\>\s*\<step\>" +syn match foxproCmd "^\s*\<set\>\s*\<stic\%[ky]\>" +syn match foxproCmd "^\s*\<set\>\s*\<sysm\%[enu]\>" +syn match foxproCmd "^\s*\<set\>\s*\<talk\>" +syn match foxproCmd "^\s*\<set\>\s*\<text\%[merge]\>" +syn match foxproCmd "^\s*\<set\>\s*\<text\%[merge]\>\s*\<deli\%[miters]\>" +syn match foxproCmd "^\s*\<set\>\s*\<topi\%[c]\>" +syn match foxproCmd "^\s*\<set\>\s*\<trbe\%[tween]\>" +syn match foxproCmd "^\s*\<set\>\s*\<type\%[ahead]\>" +syn match foxproCmd "^\s*\<set\>\s*\<udfp\%[arms]\>" +syn match foxproCmd "^\s*\<set\>\s*\<uniq\%[ue]\>" +syn match foxproCmd "^\s*\<set\>\s*\<view\>" +syn match foxproCmd "^\s*\<set\>\s*\<volu\%[me]\>" +syn match foxproCmd "^\s*\<set\>\s*\<wind\%[ow]\>\s*\<of\>\s*\<memo\>" +syn match foxproCmd "^\s*\<set\>\s*\<xcmd\%[file]\>" +syn match foxproCmd "^\s*\<show\>\s*\<get\>" +syn match foxproCmd "^\s*\<show\>\s*\<gets\>" +syn match foxproCmd "^\s*\<show\>\s*\<menu\>" +syn match foxproCmd "^\s*\<show\>\s*\<obje\%[ct]\>" +syn match foxproCmd "^\s*\<show\>\s*\<popu\%[p]\>" +syn match foxproCmd "^\s*\<show\>\s*\<wind\%[ow]\>" +syn match foxproCmd "^\s*\<size\>\s*\<popu\%[p]\>" +syn match foxproCmd "^\s*\<skip\>" +syn match foxproCmd "^\s*\<sort\>" +syn match foxproCmd "^\s*\<stor\%[e]\>" +syn match foxproCmd "^\s*\<sum\>" +syn match foxproCmd "^\s*\<susp\%[end]\>" +syn match foxproCmd "^\s*\<tota\%[l]\>" +syn match foxproCmd "^\s*\<type\>" +syn match foxproCmd "^\s*\<unlo\%[ck]\>" +syn match foxproCmd "^\s*\<upda\%[te]\>" +syn match foxproCmd "^\s*\<use\>" +syn match foxproCmd "^\s*\<wait\>" +syn match foxproCmd "^\s*\<zap\>" +syn match foxproCmd "^\s*\<zoom\>\s*\<wind\%[ow]\>" + +" Enclosed Block +syn match foxproEnBlk "^\s*\<do\>\s*\<case\>" +syn match foxproEnBlk "^\s*\<case\>" +syn match foxproEnBlk "^\s*\<othe\%[rwise]\>" +syn match foxproEnBlk "^\s*\<endc\%[ase]\>" +syn match foxproEnBlk "^\s*\<do\>\s*\<whil\%[e]\>" +syn match foxproEnBlk "^\s*\<endd\%[o]\>" +syn match foxproEnBlk "^\s*\<for\>" +syn match foxproEnBlk "^\s*\<endf\%[or]\>" +syn match foxproEnBlk "^\s*\<next\>" +syn match foxproEnBlk "^\s*\<if\>" +syn match foxproEnBlk "^\s*\<else\>" +syn match foxproEnBlk "^\s*\<endi\%[f]\>" +syn match foxproEnBlk "^\s*\<prin\%[tjob]\>" +syn match foxproEnBlk "^\s*\<endp\%[rintjob]\>" +syn match foxproEnBlk "^\s*\<scan\>" +syn match foxproEnBlk "^\s*\<ends\%[can]\>" +syn match foxproEnBlk "^\s*\<text\>" +syn match foxproEnBlk "^\s*\<endt\%[ext]\>" + +" System Variables +syn keyword foxproSysVar _alignment _assist _beautify _box _calcmem _calcvalue +syn keyword foxproSysVar _cliptext _curobj _dblclick _diarydate _dos _foxdoc +syn keyword foxproSysVar _foxgraph _gengraph _genmenu _genpd _genscrn _genxtab +syn keyword foxproSysVar _indent _lmargin _mac _mline _padvance _pageno _pbpage +syn keyword foxproSysVar _pcolno _pcopies _pdriver _pdsetup _pecode _peject _pepage +syn keyword foxproSysVar _plength _plineno _ploffset _ppitch _pquality _pretext +syn keyword foxproSysVar _pscode _pspacing _pwait _rmargin _shell _spellchk +syn keyword foxproSysVar _startup _tabs _tally _text _throttle _transport _unix +syn keyword foxproSysVar _windows _wrap + +" Strings +syn region foxproString start=+"+ end=+"+ oneline +syn region foxproString start=+'+ end=+'+ oneline +syn region foxproString start=+\[+ end=+\]+ oneline + +" Constants +syn match foxproConst "\.t\." +syn match foxproConst "\.f\." + +"integer number, or floating point number without a dot and with "f". +syn match foxproNumber "\<[0-9]\+\>" +"floating point number, with dot, optional exponent +syn match foxproFloat "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=\>" +"floating point number, starting with a dot, optional exponent +syn match foxproFloat "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\>" +"floating point number, without dot, with exponent +syn match foxproFloat "\<[0-9]\+e[-+]\=[0-9]\+\>" + +syn match foxproComment "^\s*\*.*" +syn match foxproComment "&&.*" + +"catch errors caused by wrong parenthesis +syn region foxproParen transparent start='(' end=')' contains=ALLBUT,foxproParenErr +syn match foxproParenErr ")" + +syn sync minlines=1 maxlines=3 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_foxpro_syn_inits") + if version < 508 + let did_foxpro_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink foxproSpecial Special + HiLink foxproAtSymbol Special + HiLink foxproAtCmd Statement + HiLink foxproPreProc PreProc + HiLink foxproFunc Identifier + HiLink foxproCmd Statement + HiLink foxproEnBlk Type + HiLink foxproSysVar String + HiLink foxproString String + HiLink foxproConst Constant + HiLink foxproNumber Number + HiLink foxproFloat Float + HiLink foxproComment Comment + HiLink foxproParenErr Error + + delcommand HiLink +endif + +let b:current_syntax = "foxpro" diff --git a/runtime/syntax/fstab.vim b/runtime/syntax/fstab.vim new file mode 100644 index 000000000..c765f33b3 --- /dev/null +++ b/runtime/syntax/fstab.vim @@ -0,0 +1,208 @@ +" Vim syntax file +" Language: fstab file +" Maintaner: Radu Dineiu <littledragon@altern.org> +" URL: http://ld.yi.org/vim/fstab.vim +" ChangeLog: http://ld.yi.org/vim/fstab.ChangeLog +" Last Change: 2003 Apr 30 +" Version: 0.61 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" General +syn cluster fsGeneralCluster contains=fsComment +syn match fsComment /\s*#.*/ +syn match fsOperator /[,=]/ + +" Device +syn cluster fsDeviceCluster contains=fsOperator,fsDeviceKeyword,fsDeviceError +syn match fsDeviceError /\%([^a-zA-Z0-9_\/#@]\|^\w\{-}\ze\W\)/ contained +syn keyword fsDeviceKeyword contained none proc linproc tmpfs +syn keyword fsDeviceKeyword contained LABEL nextgroup=fsDeviceLabel +syn match fsDeviceLabel contained /=[^ \t]\+/hs=s+1 contains=fsOperator + +" Mount Point +syn cluster fsMountPointCluster contains=fsMountPointKeyword,fsMountPointError +syn match fsMountPointError /\%([^ \ta-zA-Z0-9_\/#@]\|\s\+\zs\w\{-}\ze\s\)/ contained +syn keyword fsMountPointKeyword contained none swap + +" Type +syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeError +syn match fsTypeError /\s\+\zs\w\+/ contained +syn keyword fsTypeKeyword contained adfs affs auto autofs cd9660 coda cramfs devfs devpts efs ext2 ext3 fdesc hfs hpfs iso9660 kernfs linprocfs mfs minix msdos ncpfs nfs ntfs nwfs null portal proc procfs qnx4 reiserfs romfs smbfs std sysv swap tmpfs udf ufs umap umsdos union vfat xfs + +" Options +" ------- +" Options: General +syn cluster fsOptionsCluster contains=fsOperator,fsOptionsGeneral,fsOptionsKeywords,fsTypeError +syn match fsOptionsNumber /\d\+/ +syn match fsOptionsNumberOctal /[0-8]\+/ +syn match fsOptionsString /[a-zA-Z0-9_-]\+/ +syn keyword fsOptionsYesNo yes no +syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck +syn keyword fsOptionsSize 512 1024 2048 +syn keyword fsOptionsGeneral async atime auto current defaults dev exec force fstab noatime noauto noclusterr noclusterw nodev noexec nosuid nosymfollow nouser owner ro rdonly rw rq sw xx suid suiddir sync kudzu union update user supermount +syn match fsOptionsGeneral /_netdev/ + +" Options: adfs +syn match fsOptionsKeywords contained /\%([ug]id\|o\%(wn\|th\)mask\)=/ nextgroup=fsOptionsNumber + +" Options: affs +syn match fsOptionsKeywords contained /\%(set[ug]id\|mode\|reserved\)=/ nextgroup=fsOptionsNumber +syn match fsOptionsKeywords contained /\%(prefix\|volume\|root\)=/ nextgroup=fsOptionsString +syn match fsOptionsKeywords contained /bs=/ nextgroup=fsOptionsSize +syn keyword fsOptionsKeywords contained protect usemp verbose + +" Options: cd9660 +syn keyword fsOptionsKeywords contained extatt gens norrip nostrictjoilet + +" Options: devpts +" -- everything already defined + +" Options: ext2 +syn match fsOptionsKeywords contained /check=*/ nextgroup=@fsOptionsCheckCluster +syn match fsOptionsKeywords contained /errors=/ nextgroup=fsOptionsExt2Errors +syn match fsOptionsKeywords contained /\%(res[gu]id\|sb\)=/ nextgroup=fsOptionsNumber +syn keyword fsOptionsExt2Check contained none normal strict +syn keyword fsOptionsExt2Errors contained continue panic +syn match fsOptionsExt2Errors contained /remount-ro/ +syn keyword fsOptionsKeywords contained bsddf minixdf debug grpid bsdgroups nocheck nogrpid sysvgroups nouid32 + +" Options: ext3 +syn match fsOptionsKeywords contained /journal=/ nextgroup=fsOptionsExt3Journal +syn match fsOptionsKeywords contained /data=/ nextgroup=fsOptionsExt3Data +syn keyword fsOptionsExt3Journal contained update inum +syn keyword fsOptionsExt3Data contained journal ordered writeback +syn keyword fsOptionsKeywords contained noload + +" Options: fat +syn match fsOptionsKeywords contained /blocksize=/ nextgroup=fsOptionsSize +syn match fsOptionsKeywords contained /\%([dfu]mask\|codepage\)=/ nextgroup=fsOptionsNumberOctal +syn match fsOptionsKeywords contained /\%(cvf_\%(format\|option\)\|iocharset\)=/ nextgroup=fsOptionsString +syn match fsOptionsKeywords contained /check=/ nextgroup=@fsOptionsCheckCluster +syn match fsOptionsKeywords contained /conv=*/ nextgroup=fsOptionsConv +syn match fsOptionsKeywords contained /fat=/ nextgroup=fsOptionsFatType +syn match fsOptionsKeywords contained /dotsOK=/ nextgroup=fsOptionsYesNo +syn keyword fsOptionsFatCheck contained r n s relaxed normal strict +syn keyword fsOptionsConv contained b t a binary text auto +syn keyword fsOptionsFatType contained 12 16 32 +syn keyword fsOptionsKeywords contained quiet sys_immutable showexec dots nodots + +" Options: hpfs +syn match fsOptionsKeywords contained /case=/ nextgroup=fsOptionsHpfsCase +syn keyword fsOptionsHpfsCase contained lower asis + +" Options: iso9660 +syn match fsOptionsKeywords contained /map=/ nextgroup=fsOptionsIsoMap +syn match fsOptionsKeywords contained /block=/ nextgroup=fsOptionsSize +syn match fsOptionsKeywords contained /\%(session\|sbsector\)=/ nextgroup=fsOptionsNumber +syn keyword fsOptionsIsoMap contained n o a normal off acorn +syn keyword fsOptionsKeywords contained norock nojoilet unhide cruft +syn keyword fsOptionsConv contained m mtext + +" Options: nfs +syn match fsOptionsKeywords contained /\%(rsize\|wsize\|timeo\|retrans\|acregmin\|acregmax\|acdirmin\|acdirmax\|actimeo\|retry\|port\|mountport\|mounthost\|mountprog\|mountvers\|nfsprog\|nfsvers\|namelen\)=/ nextgroup=fsOptionsString +syn keyword fsOptionsKeywords contained bg fg soft hard intr cto ac tcp udp lock nobg nofg nosoft nohard nointr noposix nocto noac notcp noudp nolock + +" Options: ntfs +syn match fsOptionsKeywords contained /\%(posix=*\|uni_xlate=\)/ nextgroup=fsOptionsNumber +syn keyword fsOptionsKeywords contained utf8 + +" Options: proc +" -- everything already defined + +" Options: reiserfs +syn match fsOptionsKeywords contained /hash=/ nextgroup=fsOptionsReiserHash +syn match fsOptionsKeywords contained /resize=/ nextgroup=fsOptionsNumber +syn keyword fsOptionsReiserHash contained rupasov tea r5 detect +syn keyword fsOptionsKeywords contained hashed_relocation noborder nolog notail no_unhashed_relocation replayonly + +" Options: udf +syn match fsOptionsKeywords contained /\%(anchor\|partition\|lastblock\|fileset\|rootdir\)=/ nextgroup=fsOptionsString +syn keyword fsOptionsKeywords contained unhide undelete strict novrs + +" Options: ufs +syn match fsOptionsKeywords contained /ufstype=/ nextgroup=fsOptionsUfsType +syn match fsOptionsKeywords contained /onerror=/ nextgroup=fsOptionsUfsError +syn keyword fsOptionsUfsType contained old 44bsd sun sunx86 nextstep openstep +syn match fsOptionsUfsType contained /nextstep-cd/ +syn keyword fsOptionsUfsError contained panic lock umount repair + +" Options: vfat +syn keyword fsOptionsKeywords contained nonumtail posix utf8 +syn match fsOptionsKeywords contained /shortname=/ nextgroup=fsOptionsVfatShortname +syn keyword fsOptionsVfatShortname contained lower win95 winnt mixed + +" Options: xfs +syn match fsOptionsKeywords contained /\%(biosize\|logbufs\|logbsize\|logdev\|rtdev\|sunit\|swidth\)=/ nextgroup=fsOptionsString +syn keyword fsOptionsKeywords contained dmapi xdsm noalign noatime norecovery osyncisdsync quota usrquota uquoenforce grpquota gquoenforce + +" Frequency / Pass No. +syn cluster fsFreqPassCluster contains=fsFreqPassNumber,fsFreqPassError +syn match fsFreqPassError /\s\+\zs\%(\D.*\|\S.*\|\d\+\s\+[^012]\)\ze/ contained +syn match fsFreqPassNumber /\d\+\s\+[012]\s*/ contained + +" Groups +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 fsFreqPass /\s\+.\{-}$/ contains=@fsFreqPassCluster,@fsGeneralCluster contained + +" Whole line comments +syn match fsCommentLine /^#.*$/ + +if version >= 508 || !exists("did_config_syntax_inits") + if version < 508 + let did_config_syntax_inits = 1 + command! -nargs=+ HiLink hi link <args> + else + command! -nargs=+ HiLink hi def link <args> + endif + + HiLink fsOperator Operator + HiLink fsComment Comment + HiLink fsCommentLine Comment + + HiLink fsTypeKeyword Type + HiLink fsDeviceKeyword Identifier + HiLink fsDeviceLabel String + HiLink fsFreqPassNumber Number + + HiLink fsTypeError Error + HiLink fsDeviceError Error + HiLink fsMountPointError Error + HiLink fsMountPointKeyword Keyword + HiLink fsFreqPassError Error + + HiLink fsOptionsGeneral Type + HiLink fsOptionsKeywords Keyword + HiLink fsOptionsNumber Number + HiLink fsOptionsNumberOctal Number + HiLink fsOptionsString String + HiLink fsOptionsSize Number + HiLink fsOptionsExt2Check String + HiLink fsOptionsExt2Errors String + HiLink fsOptionsExt3Journal String + HiLink fsOptionsExt3Data String + HiLink fsOptionsFatCheck String + HiLink fsOptionsConv String + HiLink fsOptionsFatType Number + HiLink fsOptionsYesNo String + HiLink fsOptionsHpfsCase String + HiLink fsOptionsIsoMap String + HiLink fsOptionsReiserHash String + HiLink fsOptionsUfsType String + HiLink fsOptionsUfsError String + + HiLink fsOptionsVfatShortname String + + delcommand HiLink +endif + +let b:current_syntax = "fstab" + +" vim: ts=8 ft=vim diff --git a/runtime/syntax/fvwm.vim b/runtime/syntax/fvwm.vim new file mode 100644 index 000000000..ff1b78399 --- /dev/null +++ b/runtime/syntax/fvwm.vim @@ -0,0 +1,349 @@ +" Vim syntax file +" Language: Fvwm{1,2} configuration file +" Maintainer: Haakon Riiser <hakonrk@fys.uio.no> +" Last Change: 2002 Jun 2 +" +" Thanks to David Necas (Yeti) for adding Fvwm 2.4 support. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +" Fvwm configuration files are case insensitive +syn case ignore + +" Identifiers in Fvwm can contain most characters, so we only +" include the most common ones here. +if version >= 600 + setlocal iskeyword=_,-,+,.,a-z,A-Z,48-57 +else + set iskeyword=_,-,+,.,a-z,A-Z,48-57 +endif + +" Read system colors from the color database (rgb.txt) +if exists("rgb_file") + " We don't want any hit-return prompts, so we make sure that + " &shortmess is set to `O' + let __fvwm_oldshm = &shortmess + set shortmess=O + + " And we set &report to a huge number, so that no hit-return prompts + " will be given + let __fvwm_oldreport = &report + set report=10000 + + " Append the color database to the fvwm configuration, and read the + " colors from this buffer + let __fvwm_i = line("$") + 1 + exe "$r" rgb_file + let __fvwm_lastline = line("$") + while __fvwm_i <= __fvwm_lastline + let __fvwm_s = matchstr(getline(__fvwm_i), '^\s*\d\+\s\+\d\+\s\+\d\+\s\+\h.*$') + if __fvwm_s != "" + exe "syn keyword fvwmColors ".substitute(__fvwm_s, '^\s*\d\+\s\+\d\+\s\+\d\+\s\+\(\h.*\)$', '\1', "") + endif + let __fvwm_i = __fvwm_i + 1 + endwhile + + " Remove the appended data + undo + + " Goto first line again + 1 + + " and restore the old values of the variables + let &shortmess = __fvwm_oldshm + let &report = __fvwm_oldreport + unlet __fvwm_i __fvwm_s __fvwm_lastline __fvwm_oldshm __fvwm_oldreport +endif +" done reading colors + +syn match fvwmWhitespace "\s\+" contained +syn match fvwmEnvVar "\$\w\+" +syn match fvwmModConf "^\s*\*\a\+" contains=fvwmWhitespace +syn match fvwmString '".\{-}"' +syn match fvwmRGBValue "#\x\{3}" +syn match fvwmRGBValue "#\x\{6}" +syn match fvwmRGBValue "#\x\{9}" +syn match fvwmRGBValue "#\x\{12}" +syn match fvwmRGBValue "rgb:\x\{1,4}/\x\{1,4}/\x\{1,4}" +syn match fvwmPath "\<IconPath\s.*$"lc=8 contains=fvwmEnvVar +syn match fvwmPath "\<ModulePath\s.*$"lc=10 contains=fvwmEnvVar +syn match fvwmPath "\<PixmapPath\s.*$"lc=10 contains=fvwmEnvVar +syn match fvwmModule "\<Module\s\+\w\+"he=s+6 +syn match fvwmKey "\<Key\s\+\w\+"he=s+3 +syn keyword fvwmExec Exec +syn match fvwmComment "^#.*$" + +if (exists("b:fvwm_version") && b:fvwm_version == 1) || (exists("use_fvwm_1") && use_fvwm_1) + syn match fvwmEnvVar "\$(\w\+)" + syn region fvwmStyle matchgroup=fvwmFunction start="^\s*Style\>"hs=e-5 end="$" oneline keepend contains=fvwmString,fvwmKeyword,fvwmWhiteSpace + + syn keyword fvwmFunction AppsBackingStore AutoRaise BackingStore + syn keyword fvwmFunction Beep BoundaryWidth ButtonStyle + syn keyword fvwmFunction CenterOnCirculate CirculateDown + syn keyword fvwmFunction CirculateHit CirculateSkip + syn keyword fvwmFunction CirculateSkipIcons CirculateUp + syn keyword fvwmFunction ClickTime ClickToFocus Close Cursor + syn keyword fvwmFunction CursorMove DecorateTransients Delete + syn keyword fvwmFunction Desk DeskTopScale DeskTopSize Destroy + syn keyword fvwmFunction DontMoveOff EdgeResistance EdgeScroll + syn keyword fvwmFunction EndFunction EndMenu EndPopup Focus + syn keyword fvwmFunction Font Function GotoPage HiBackColor + syn keyword fvwmFunction HiForeColor Icon IconBox IconFont + syn keyword fvwmFunction Iconify IconPath Key Lenience Lower + syn keyword fvwmFunction Maximize MenuBackColor MenuForeColor + syn keyword fvwmFunction MenuStippleColor Module ModulePath Mouse + syn keyword fvwmFunction Move MWMBorders MWMButtons MWMDecorHints + syn keyword fvwmFunction MWMFunctionHints MWMHintOverride MWMMenus + syn keyword fvwmFunction NoBorder NoBoundaryWidth Nop NoPPosition + syn keyword fvwmFunction NoTitle OpaqueMove OpaqueResize Pager + syn keyword fvwmFunction PagerBackColor PagerFont PagerForeColor + syn keyword fvwmFunction PagingDefault PixmapPath Popup Quit Raise + syn keyword fvwmFunction RaiseLower RandomPlacement Refresh Resize + syn keyword fvwmFunction Restart SaveUnders Scroll SloppyFocus + syn keyword fvwmFunction SmartPlacement StartsOnDesk StaysOnTop + syn keyword fvwmFunction StdBackColor StdForeColor Stick Sticky + syn keyword fvwmFunction StickyBackColor StickyForeColor + syn keyword fvwmFunction StickyIcons StubbornIconPlacement + syn keyword fvwmFunction StubbornIcons StubbornPlacement + syn keyword fvwmFunction SuppressIcons Title TogglePage Wait Warp + syn keyword fvwmFunction WindowFont WindowList WindowListSkip + syn keyword fvwmFunction WindowsDesk WindowShade XORvalue + + " These keywords are only used after the "Style" command. To avoid + " name collision with several commands, they are contained. + syn keyword fvwmKeyword BackColor BorderWidth BoundaryWidth contained + syn keyword fvwmKeyword Button CirculateHit CirculateSkip Color contained + syn keyword fvwmKeyword DoubleClick ForeColor Handles HandleWidth contained + syn keyword fvwmKeyword Icon IconTitle NoBorder NoBoundaryWidth contained + syn keyword fvwmKeyword NoButton NoHandles NoIcon NoIconTitle contained + syn keyword fvwmKeyword NoTitle Slippery StartIconic StartNormal contained + syn keyword fvwmKeyword StartsAnyWhere StartsOnDesk StaysOnTop contained + syn keyword fvwmKeyword StaysPut Sticky Title WindowListHit contained + syn keyword fvwmKeyword WindowListSkip contained +elseif (exists("b:fvwm_version") && b:fvwm_version == 2) || (exists("use_fvwm_2") && use_fvwm_2) + syn match fvwmEnvVar "\${\w\+}" + syn match fvwmEnvVar "\$\[[^]]\+\]" + syn match fvwmEnvVar "\$[$0-9*]" + syn match fvwmDef '^\s*+\s*".\{-}"' contains=fvwmMenuString,fvwmWhitespace + syn match fvwmIcon '%.\{-}%' contained + syn match fvwmIcon '\*.\{-}\*' contained + syn match fvwmMenuString '".\{-}"' contains=fvwmIcon,fvwmShortcutKey contained + syn match fvwmShortcutKey "&." contained + syn match fvwmModule "\<KillModule\s\+\w\+"he=s+10 contains=fvwmModuleName + syn match fvwmModule "\<SendToModule\s\+\w\+"he=s+12 contains=fvwmModuleName + syn match fvwmModule "\<DestroyModuleConfig\s\+\w\+"he=s+19 contains=fvwmModuleName + + syn keyword fvwmFunction AddButtonStyle AddTitleStyle AddToDecor AddToFunc + syn keyword fvwmFunction AddToMenu AnimatedMove Beep BorderStyle BugOpts + syn keyword fvwmFunction BusyCursor ButtonState ButtonStyle ChangeDecor + syn keyword fvwmFunction ChangeMenuStyle ClickTime Close ColorLimit + syn keyword fvwmFunction ColormapFocus CopyMenuStyle Current CursorMove + syn keyword fvwmFunction CursorStyle DefaultColors DefaultColorset + syn keyword fvwmFunction DefaultFont DefaultIcon DefaultLayers Delete Desk + syn keyword fvwmFunction DeskTopSize Destroy DestroyDecor DestroyFunc + syn keyword fvwmFunction DestroyMenu DestroyMenuStyle Direction Echo + syn keyword fvwmFunction EdgeResistance EdgeScroll EdgeThickness Emulate + syn keyword fvwmFunction EscapeFunc Exec ExecUseShell ExitFunction + syn keyword fvwmFunction FakeClick FlipFocus Focus Function GlobalOpts + syn keyword fvwmFunction GnomeButton GotoDesk GotoDeskAndPage GotoPage + syn keyword fvwmFunction HideGeometryWindow HilightColor HilightColorset + syn keyword fvwmFunction IconFont IconPath Iconify IgnoreModifiers + syn keyword fvwmFunction ImagePath Key Layer Lower Maximize Menu MenuStyle + syn keyword fvwmFunction ModulePath ModuleSynchronous ModuleTimeout + syn keyword fvwmFunction Mouse Move MoveThreshold MoveToDesk MoveToPage + syn keyword fvwmFunction MoveToScreen Next None Nop OpaqueMoveSize + syn keyword fvwmFunction PipeRead PixmapPath PlaceAgain PointerKey + syn keyword fvwmFunction Popup Prev Quit QuitScreen QuitSession Raise + syn keyword fvwmFunction RaiseLower Read Recapture RecaptureWindow + syn keyword fvwmFunction Refresh RefreshWindow Resize ResizeMove + syn keyword fvwmFunction Restart SaveQuitSession SaveSession Scroll + syn keyword fvwmFunction SetAnimation SetEnv SetMenuDelay SetMenuStyle + syn keyword fvwmFunction Silent SnapAttraction SnapGrid Stick Stroke + syn keyword fvwmFunction StrokeFunc Style Title TitleStyle UnsetEnv + syn keyword fvwmFunction UpdateDecor UpdateStyles Wait WarpToWindow + syn keyword fvwmFunction WindowFont WindowId WindowList WindowShade + syn keyword fvwmFunction WindowShadeAnimate WindowsDesk Xinerama + syn keyword fvwmFunction XineramaPrimaryScreen XineramaSls XineramaSlsSize + syn keyword fvwmFunction XorPixmap XorValue + + syn keyword fvwmKeyword Active ActiveColorset ActiveDown + syn keyword fvwmKeyword ActiveFore ActiveForeOff ActivePlacement + syn keyword fvwmKeyword ActivePlacementHonorsStartsOnPage + syn keyword fvwmKeyword ActivePlacementIgnoresStartsOnPage ActiveUp All + syn keyword fvwmKeyword AllowRestack Alphabetic Anim Animated Animation + syn keyword fvwmKeyword AnimationOff AutomaticHotkeys AutomaticHotkeysOff + syn keyword fvwmKeyword BGradient BackColor Background BackingStore + syn keyword fvwmKeyword BackingStoreOff BorderColorset BorderWidth + syn keyword fvwmKeyword Bottom Button Button0 Button1 Button2 Button3 + syn keyword fvwmKeyword Button4 Button5 Button6 Button7 Button8 + syn keyword fvwmKeyword Button9 CGradient CaptureHonorsStartsOnPage + syn keyword fvwmKeyword CaptureIgnoresStartsOnPage CascadePlacement + syn keyword fvwmKeyword Centered CirculateHit CirculateHitIcon + syn keyword fvwmKeyword CirculateHitShaded CirculateSkip + syn keyword fvwmKeyword CirculateSkipIcon CirculateSkipShaded Clear + syn keyword fvwmKeyword ClickToFocus ClickToFocusDoesntPassClick + syn keyword fvwmKeyword ClickToFocusDoesntRaise ClickToFocusPassesClick + syn keyword fvwmKeyword ClickToFocusPassesClickOff ClickToFocusRaises + syn keyword fvwmKeyword ClickToFocusRaisesOff Color Colorset Context + syn keyword fvwmKeyword CurrentDesk CurrentPage CurrentPageAnyDesk + syn keyword fvwmKeyword DGradient DecorateTransient Default + syn keyword fvwmKeyword DepressableBorder Desk DontLowerTransient + syn keyword fvwmKeyword DontRaiseTransient DontStackTransientParent + syn keyword fvwmKeyword DoubleClickTime Down DumbPlacement DynamicMenu + syn keyword fvwmKeyword DynamicPopDownAction DynamicPopUpAction + syn keyword fvwmKeyword East Expect FVWM FirmBorder Fixed + syn keyword fvwmKeyword FixedPosition Flat FlickeringMoveWorkaround + syn keyword fvwmKeyword FlickeringQtDialogsWorkaround FocusFollowsMouse + syn keyword fvwmKeyword FollowsFocus FollowsMouse Font ForeColor + syn keyword fvwmKeyword Foreground Function Fvwm FvwmBorder + syn keyword fvwmKeyword FvwmButtons GNOMEIgnoreHints GNOMEUseHints + syn keyword fvwmKeyword GrabFocus GrabFocusOff GrabFocusTransient + syn keyword fvwmKeyword GrabFocusTransientOff Greyed GreyedColorset + syn keyword fvwmKeyword HGradient HandleWidth Handles Height + syn keyword fvwmKeyword HiddenHandles Hilight3DOff Hilight3DThick + syn keyword fvwmKeyword Hilight3DThickness Hilight3DThin HilightBack + syn keyword fvwmKeyword HilightBackOff HilightBorderColorset + syn keyword fvwmKeyword HilightColorset HilightFore HintOverride + syn keyword fvwmKeyword HoldSubmenus Icon IconBox IconFill IconFont + syn keyword fvwmKeyword IconGrid IconOverride IconTitle Iconic + syn keyword fvwmKeyword IconifyWindowGroups IconifyWindowGroupsOff + syn keyword fvwmKeyword Icons IgnoreRestack Inactive Interior Item + syn keyword fvwmKeyword ItemFormat KeepWindowGroupsOnDesk Layer Left + syn keyword fvwmKeyword LeftJustified Lenience LowerTransient MWM + syn keyword fvwmKeyword MWMBorder MWMButtons MWMDecor MWMDecorMax + syn keyword fvwmKeyword MWMDecorMenu MWMDecorMin MWMFunctions + syn keyword fvwmKeyword ManualPlacement ManualPlacementHonorsStartsOnPage + syn keyword fvwmKeyword ManualPlacementIgnoresStartsOnPage MaxWindowSize + syn keyword fvwmKeyword Maximized Menu MenuColorset MenuFace + syn keyword fvwmKeyword MinOverlapPercentPlacement MinOverlapPlacement + syn keyword fvwmKeyword MiniIcon MixedVisualWorkaround ModalityIsEvil + syn keyword fvwmKeyword ModuleSynchronous Mouse MouseFocus + syn keyword fvwmKeyword MouseFocusClickDoesntRaise MouseFocusClickRaises + syn keyword fvwmKeyword MouseFocusClickRaisesOff Move Mwm MwmBorder + syn keyword fvwmKeyword MwmButtons MwmDecor MwmFunctions NakedTransient + syn keyword fvwmKeyword Never NeverFocus NoActiveIconOverride NoButton + syn keyword fvwmKeyword NoDecorHint NoDeskSort NoFuncHint NoGeometry + syn keyword fvwmKeyword NoGeometryWithInfo NoHandles NoHotkeys NoIcon + syn keyword fvwmKeyword NoIconOverride NoIconPosition NoIconTitle + syn keyword fvwmKeyword NoIcons NoInset NoLenience NoNormal + syn keyword fvwmKeyword NoOLDecor NoOnBottom NoOnTop NoOverride + syn keyword fvwmKeyword NoPPosition NoResizeOverride NoSticky + syn keyword fvwmKeyword NoStipledTitles NoTitle NoTransientPPosition + syn keyword fvwmKeyword NoTransientUSPosition NoUSPosition + syn keyword fvwmKeyword NoWarp Normal North Northeast Northwest + syn keyword fvwmKeyword NotAlphabetic OLDecor OnBottom OnTop Once + syn keyword fvwmKeyword OnlyIcons OnlyListSkip OnlyNormal OnlyOnBottom + syn keyword fvwmKeyword OnlyOnTop OnlySticky Opacity ParentalRelativity + syn keyword fvwmKeyword Pixmap PopdownDelayed PopdownDelay PopupDelay + syn keyword fvwmKeyword PopupAsRootMenu PopupAsSubmenu PopdownImmediately + syn keyword fvwmKeyword PopupDelayed PopupImmediately PopupOffset + syn keyword fvwmKeyword Quiet RGradient RaiseOverNativeWindows + syn keyword fvwmKeyword RaiseOverUnmanaged RaiseTransient + syn keyword fvwmKeyword Raised Read RecaptureHonorsStartsOnPage + syn keyword fvwmKeyword RecaptureIgnoresStartsOnPage Rectangle + syn keyword fvwmKeyword RemoveSubmenus Reset Resize ResizeHintOverride + syn keyword fvwmKeyword ResizeOpaque ResizeOutline ReverseOrder + syn keyword fvwmKeyword Right RightJustified Root SGradient SameType + syn keyword fvwmKeyword SaveUnder SaveUnderOff ScatterWindowGroups + syn keyword fvwmKeyword Screen SelectInPlace SelectOnRelease + syn keyword fvwmKeyword SelectWarp SeparatorsLong SeparatorsShort + syn keyword fvwmKeyword ShowMapping SideColor SidePic Simple + syn keyword fvwmKeyword SkipMapping Slippery SlipperyIcon SloppyFocus + syn keyword fvwmKeyword SmartPlacement SmartPlacementIsNormal + syn keyword fvwmKeyword SmartPlacementIsReallySmart Solid South + syn keyword fvwmKeyword Southeast Southwest StackTransientParent + syn keyword fvwmKeyword StartIconic StartNormal StartsAnyWhere + syn keyword fvwmKeyword StartsLowered StartsOnDesk StartsOnPage + syn keyword fvwmKeyword StartsOnPageIgnoresTransients + syn keyword fvwmKeyword StartsOnPageIncludesTransients StartsOnScreen + syn keyword fvwmKeyword StartsRaised StaysOnBottom StaysOnTop StaysPut + syn keyword fvwmKeyword Sticky StickyIcon StipledTitles StippledTitle + syn keyword fvwmKeyword StippledTitleOff SubmenusLeft SubmenusRight Sunk + syn keyword fvwmKeyword This TileCascadePlacement TileManualPlacement + syn keyword fvwmKeyword TiledPixmap Timeout Title TitleAtBottom + syn keyword fvwmKeyword TitleAtTop TitleUnderlines0 TitleUnderlines1 + syn keyword fvwmKeyword TitleUnderlines2 TitleWarp TitleWarpOff Top + syn keyword fvwmKeyword Transient TrianglesRelief TrianglesSolid + syn keyword fvwmKeyword Up UseBorderStyle UseDecor UseIconName + syn keyword fvwmKeyword UseIconPosition UseListSkip UsePPosition + syn keyword fvwmKeyword UseStyle UseTitleStyle UseTransientPPosition + syn keyword fvwmKeyword UseTransientUSPosition UseUSPosition VGradient + syn keyword fvwmKeyword VariablePosition Vector VerticalItemSpacing + syn keyword fvwmKeyword VerticalTitleSpacing WIN Wait Warp WarpTitle + syn keyword fvwmKeyword West Win Window WindowListHit WindowListSkip + syn keyword fvwmKeyword WindowShadeScrolls WindowShadeShrinks + syn keyword fvwmKeyword WindowShadeSteps Windows XineramaRoot YGradient + syn keyword fvwmKeyword bottomright default pointer prev quiet + syn keyword fvwmKeyword True False Toggle + + syn keyword fvwmConditionName AcceptsFocus CurrentDesk CurrentGlobalPage + syn keyword fvwmConditionName CurrentGlobalPageAnyDesk CurrentPage + syn keyword fvwmConditionName CurrentPageAnyDesk CurrentScreen Iconic Layer + syn keyword fvwmConditionName Maximized PlacedByButton3 PlacedByFvwm Raised + syn keyword fvwmConditionName Shaded Sticky Transient Visible + + syn keyword fvwmContextName BOTTOM BOTTOM_EDGE BOTTOM_LEFT BOTTOM_RIGHT + syn keyword fvwmContextName DEFAULT DESTROY LEFT LEFT_EDGE MENU MOVE + syn keyword fvwmContextName RESIZE RIGHT RIGHT_EDGE ROOT SELECT STROKE SYS + syn keyword fvwmContextName TITLE TOP TOP_EDGE TOP_LEFT TOP_RIGHT WAIT + syn keyword fvwmContextName POSITION + + syn keyword fvwmFunctionName contained FvwmAnimate FvwmAudio FvwmAuto + syn keyword fvwmFunctionName contained FvwmBacker FvwmBanner FvwmButtons + syn keyword fvwmFunctionName contained FvwmCascade FvwmCommandS + syn keyword fvwmFunctionName contained FvwmConsole FvwmConsoleC FvwmCpp + syn keyword fvwmFunctionName contained FvwmDebug FvwmDragWell FvwmEvent + syn keyword fvwmFunctionName contained FvwmForm FvwmGtk FvwmIconBox + syn keyword fvwmFunctionName contained FvwmIconMan FvwmIdent FvwmM4 + syn keyword fvwmFunctionName contained FvwmPager FvwmRearrange FvwmSave + syn keyword fvwmFunctionName contained FvwmSaveDesk FvwmScript FvwmScroll + syn keyword fvwmFunctionName contained FvwmTalk FvwmTaskBar FvwmTheme + syn keyword fvwmFunctionName contained FvwmTile FvwmWharf FvwmWinList + + syn keyword fvwmFunctionName StartFunction InitFunction RestartFunction + syn keyword fvwmFunctionName ExitFunction SessionInitFunction + syn keyword fvwmFunctionName SessionRestartFunction SessionExitFunction + syn keyword fvwmFunctionName MissingSubmenuFunction +endif + +if version >= 508 || !exists("did_fvwm_syntax_inits") + if version < 508 + let did_fvwm_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink fvwmComment Comment + HiLink fvwmEnvVar Macro + HiLink fvwmExec Function + HiLink fvwmFunction Function + HiLink fvwmFunctionName Special + HiLink fvwmContextName Function + HiLink fvwmConditionName Function + HiLink fvwmIcon Comment + HiLink fvwmKey Function + HiLink fvwmKeyword Keyword + HiLink fvwmMenuString String + HiLink fvwmModConf Macro + HiLink fvwmModule Function + HiLink fvwmModuleName Special + HiLink fvwmRGBValue Type + HiLink fvwmShortcutKey SpecialChar + HiLink fvwmString String + + if exists("rgb_file") + HiLink fvwmColors Type + endif + + delcommand HiLink +endif + +let b:current_syntax = "fvwm" +" vim: sts=4 sw=4 ts=8 diff --git a/runtime/syntax/fvwm2m4.vim b/runtime/syntax/fvwm2m4.vim new file mode 100644 index 000000000..243da18fa --- /dev/null +++ b/runtime/syntax/fvwm2m4.vim @@ -0,0 +1,43 @@ +" Vim syntax file +" Language: FvwmM4 preprocessed Fvwm2 configuration files +" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> +" Last Change: 2002-06-02 +" URI: http://physics.muni.cz/~yeti/download/syntax/fvwmm4.vim + +" Setup +if version >= 600 + if exists('b:current_syntax') + finish + endif +else + syntax clear +endif + +" Let included files know they are included +if !exists('main_syntax') + let main_syntax = 'fvwm2m4' +endif + +" Include M4 syntax +if version >= 600 + runtime! syntax/m4.vim +else + so <sfile>:p:h/m4.vim +endif +unlet b:current_syntax + +" Include Fvwm2 syntax (Fvwm1 doesn't have M4 preprocessor) +if version >= 600 + runtime! syntax/fvwm.vim +else + so <sfile>:p:h/fvwm.vim +endif +unlet b:current_syntax + +" That's all! +let b:current_syntax = 'fvwm2m4' + +if main_syntax == 'fvwm2m4' + unlet main_syntax +endif + diff --git a/runtime/syntax/gdb.vim b/runtime/syntax/gdb.vim new file mode 100644 index 000000000..c874a0465 --- /dev/null +++ b/runtime/syntax/gdb.vim @@ -0,0 +1,111 @@ +" Vim syntax file +" Language: GDB command files +" Maintainer: Claudio Fleiner <claudio@fleiner.com> +" URL: http://www.fleiner.com/vim/syntax/gdb.vim +" Last Change: 2003 Jan 04 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn keyword gdbInfo contained address architecture args breakpoints catch common copying dcache +syn keyword gdbInfo contained display files float frame functions handle line +syn keyword gdbInfo contained locals program registers scope set sharedlibrary signals +syn keyword gdbInfo contained source sources stack symbol target terminal threads +syn keyword gdbInfo contained syn keyword tracepoints types udot variables warranty watchpoints +syn match gdbInfo contained "all-registers" + + +syn keyword gdbStatement contained actions apply attach awatch backtrace break bt call catch cd clear collect commands +syn keyword gdbStatement contained complete condition continue delete detach directory disable disassemble display down +syn keyword gdbStatement contained echo else enable end file finish frame handle hbreak help if ignore +syn keyword gdbStatement contained inspect jump kill list load maintenance make next nexti ni output overlay +syn keyword gdbStatement contained passcount path print printf ptype pwd quit rbreak remote return run rwatch +syn keyword gdbStatement contained search section set sharedlibrary shell show si signal source step stepi stepping +syn keyword gdbStatement contained stop target tbreak tdump tfind thbreak thread tp trace tstart tstatus tstop +syn keyword gdbStatement contained tty undisplay unset until up watch whatis where while ws x +syn match gdbFuncDef "\<define\>.*" +syn match gdbStatmentContainer "^\s*\S\+" contains=gdbStatement,gdbFuncDef +syn match gdbStatement "^\s*info" nextgroup=gdbInfo skipwhite skipempty + +" some commonly used abreviations +syn keyword gdbStatement c disp undisp disas p + +syn region gdbDocument matchgroup=gdbFuncDef start="\<document\>.*$" matchgroup=gdbFuncDef end="^end$" + +syn match gdbStatement "\<add-shared-symbol-files\>" +syn match gdbStatement "\<add-symbol-file\>" +syn match gdbStatement "\<core-file\>" +syn match gdbStatement "\<dont-repeat\>" +syn match gdbStatement "\<down-silently\>" +syn match gdbStatement "\<exec-file\>" +syn match gdbStatement "\<forward-search\>" +syn match gdbStatement "\<reverse-search\>" +syn match gdbStatement "\<save-tracepoints\>" +syn match gdbStatement "\<select-frame\>" +syn match gdbStatement "\<symbol-file\>" +syn match gdbStatement "\<up-silently\>" +syn match gdbStatement "\<while-stepping\>" + +syn keyword gdbSet annotate architecture args check complaints confirm editing endian +syn keyword gdbSet environment gnutarget height history language listsize print prompt +syn keyword gdbSet radix remotebaud remotebreak remotecache remotedebug remotedevice remotelogbase +syn keyword gdbSet remotelogfile remotetimeout remotewritesize targetdebug variable verbose +syn keyword gdbSet watchdog width write +syn match gdbSet "\<auto-solib-add\>" +syn match gdbSet "\<solib-absolute-prefix\>" +syn match gdbSet "\<solib-search-path\>" +syn match gdbSet "\<stop-on-solib-events\>" +syn match gdbSet "\<symbol-reloading\>" +syn match gdbSet "\<input-radix\>" +syn match gdbSet "\<demangle-style\>" +syn match gdbSet "\<output-radix\>" + +syn match gdbComment "^\s*#.*" + +syn match gdbVariable "\$\K\k*" + +" Strings and constants +syn region gdbString start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match gdbCharacter "'[^']*'" contains=gdbSpecialChar,gdbSpecialCharError +syn match gdbCharacter "'\\''" contains=gdbSpecialChar +syn match gdbCharacter "'[^\\]'" +syn match gdbNumber "\<[0-9_]\+\>" +syn match gdbNumber "\<0x[0-9a-fA-F_]\+\>" + + +if !exists("gdb_minlines") + let gdb_minlines = 10 +endif +exec "syn sync ccomment gdbComment minlines=" . gdb_minlines + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_gdb_syn_inits") + if version < 508 + let did_gdb_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + HiLink gdbFuncDef Function + HiLink gdbComment Comment + HiLink gdbStatement Statement + HiLink gdbString String + HiLink gdbCharacter Character + HiLink gdbVariable Identifier + HiLink gdbSet Constant + HiLink gdbInfo Type + HiLink gdbDocument Special + HiLink gdbNumber Number + delcommand HiLink +endif + +let b:current_syntax = "gdb" + +" vim: ts=8 diff --git a/runtime/syntax/gdmo.vim b/runtime/syntax/gdmo.vim new file mode 100644 index 000000000..08a6b357f --- /dev/null +++ b/runtime/syntax/gdmo.vim @@ -0,0 +1,96 @@ +" Vim syntax file +" Language: GDMO +" (ISO-10165-4; Guidelines for the Definition of Managed Object) +" Maintainer: Gyuman Kim <violino@dooly.modacom.co.kr> +" URL: http://dooly.modacom.co.kr/gdmo.vim +" Last change: 2001 Sep 02 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" keyword definitions +syn match gdmoCategory "MANAGED\s\+OBJECT\s\+CLASS" +syn keyword gdmoCategory NOTIFICATION ATTRIBUTE BEHAVIOUR PACKAGE ACTION +syn match gdmoCategory "NAME\s\+BINDING" +syn match gdmoRelationship "DERIVED\s\+FROM" +syn match gdmoRelationship "SUPERIOR\s\+OBJECT\s\+CLASS" +syn match gdmoRelationship "SUBORDINATE\s\+OBJECT\s\+CLASS" +syn match gdmoExtension "AND\s\+SUBCLASSES" +syn match gdmoDefinition "DEFINED\s\+AS" +syn match gdmoDefinition "REGISTERED\s\+AS" +syn match gdmoExtension "ORDER\s\+BY" +syn match gdmoReference "WITH\s\+ATTRIBUTE" +syn match gdmoReference "WITH\s\+INFORMATION\s\+SYNTAX" +syn match gdmoReference "WITH\s\+REPLY\s\+SYNTAX" +syn match gdmoReference "WITH\s\+ATTRIBUTE\s\+SYNTAX" +syn match gdmoExtension "AND\s\+ATTRIBUTE\s\+IDS" +syn match gdmoExtension "MATCHES\s\+FOR" +syn match gdmoReference "CHARACTERIZED\s\+BY" +syn match gdmoReference "CONDITIONAL\s\+PACKAGES" +syn match gdmoExtension "PRESENT\s\+IF" +syn match gdmoExtension "DEFAULT\s\+VALUE" +syn match gdmoExtension "PERMITTED\s\+VALUES" +syn match gdmoExtension "REQUIRED\s\+VALUES" +syn match gdmoExtension "NAMED\s\+BY" +syn keyword gdmoReference ATTRIBUTES NOTIFICATIONS ACTIONS +syn keyword gdmoExtension DELETE CREATE +syn keyword gdmoExtension EQUALITY SUBSTRINGS ORDERING +syn match gdmoExtension "REPLACE-WITH-DEFAULT" +syn match gdmoExtension "GET" +syn match gdmoExtension "GET-REPLACE" +syn match gdmoExtension "ADD-REMOVE" +syn match gdmoExtension "WITH-REFERENCE-OBJECT" +syn match gdmoExtension "WITH-AUTOMATIC-INSTANCE-NAMING" +syn match gdmoExtension "ONLY-IF-NO-CONTAINED-OBJECTS" + + +" Strings and constants +syn match gdmoSpecial contained "\\\d\d\d\|\\." +syn region gdmoString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gdmoSpecial +syn match gdmoCharacter "'[^\\]'" +syn match gdmoSpecialCharacter "'\\.'" +syn match gdmoNumber "0[xX][0-9a-fA-F]\+\>" +syn match gdmoLineComment "--.*" +syn match gdmoLineComment "--.*--" + +syn match gdmoDefinition "^\s*[a-zA-Z][-a-zA-Z0-9_.\[\] \t{}]* *::="me=e-3 +syn match gdmoBraces "[{}]" + +syn sync ccomment gdmoComment + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_gdmo_syntax_inits") + if version < 508 + let did_gdmo_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink gdmoCategory Structure + HiLink gdmoRelationship Macro + HiLink gdmoDefinition Statement + HiLink gdmoReference Type + HiLink gdmoExtension Operator + HiLink gdmoBraces Function + HiLink gdmoSpecial Special + HiLink gdmoString String + HiLink gdmoCharacter Character + HiLink gdmoSpecialCharacter gdmoSpecial + HiLink gdmoComment Comment + HiLink gdmoLineComment gdmoComment + HiLink gdmoType Type + + delcommand HiLink +endif + +let b:current_syntax = "gdmo" + +" vim: ts=8 diff --git a/runtime/syntax/gedcom.vim b/runtime/syntax/gedcom.vim new file mode 100644 index 000000000..98851cc94 --- /dev/null +++ b/runtime/syntax/gedcom.vim @@ -0,0 +1,66 @@ +" Vim syntax file +" Language: Gedcom +" Maintainer: Paul Johnson (pjcj@transeda.com) +" Version 1.059 - 23rd December 1999 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syntax case match + +syntax keyword gedcom_record ABBR ADDR ADOP ADR1 ADR2 AFN AGE AGNC ALIA ANCE +syntax keyword gedcom_record ANCI ANUL ASSO AUTH BAPL BAPM BARM BASM BIRT BLES +syntax keyword gedcom_record BLOB BURI CALN CAST CAUS CENS CHAN CHAR CHIL CHR +syntax keyword gedcom_record CHRA CITY CONC CONF CONL CONT COPR CORP CREM CTRY +syntax keyword gedcom_record DATA DEAT DESC DESI DEST DIV DIVF DSCR EDUC EMIG +syntax keyword gedcom_record ENDL ENGA EVEN FAM FAMC FAMF FAMS FCOM FILE FORM +syntax keyword gedcom_record GEDC GIVN GRAD HEAD HUSB IDNO IMMI INDI LANG MARB +syntax keyword gedcom_record MARC MARL MARR MARS MEDI NATI NATU NCHI NICK NMR +syntax keyword gedcom_record NOTE NPFX NSFX OBJE OCCU ORDI ORDN PAGE PEDI PHON +syntax keyword gedcom_record PLAC POST PROB PROP PUBL QUAY REFN RELA RELI REPO +syntax keyword gedcom_record RESI RESN RETI RFN RIN ROLE SEX SLGC SLGS SOUR +syntax keyword gedcom_record SPFX SSN STAE STAT SUBM SUBN SURN TEMP TEXT TIME +syntax keyword gedcom_record TITL TRLR TYPE VERS WIFE WILL +syntax keyword gedcom_record DATE nextgroup=gedcom_date +syntax keyword gedcom_record NAME nextgroup=gedcom_name + +syntax case ignore + +syntax region gedcom_id start="@" end="@" oneline contains=gedcom_ii, gedcom_in +syntax match gedcom_ii "\I\+" contained nextgroup=gedcom_in +syntax match gedcom_in "\d\+" contained +syntax region gedcom_name start="" end="$" skipwhite oneline contains=gedcom_cname, gedcom_surname contained +syntax match gedcom_cname "\i\+" contained +syntax match gedcom_surname "/\(\i\|\s\)*/" contained +syntax match gedcom_date "\d\{1,2}\s\+\(jan\|feb\|mar\|apr\|may\|jun\|jul\|aug\|sep\|oct\|nov\|dec\)\s\+\d\+" +syntax match gedcom_date ".*" contained + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_gedcom_syntax_inits") + if version < 508 + let did_gedcom_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink gedcom_record Statement + HiLink gedcom_id Comment + HiLink gedcom_ii PreProc + HiLink gedcom_in Type + HiLink gedcom_name PreProc + HiLink gedcom_cname Type + HiLink gedcom_surname Identifier + HiLink gedcom_date Constant + + delcommand HiLink +endif + +let b:current_syntax = "gedcom" diff --git a/runtime/syntax/gkrellmrc.vim b/runtime/syntax/gkrellmrc.vim new file mode 100644 index 000000000..6ce123841 --- /dev/null +++ b/runtime/syntax/gkrellmrc.vim @@ -0,0 +1,91 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: gkrellm theme files `gkrellmrc' +" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> +" Last Change: 2003-04-30 +" URL: http://trific.ath.cx/Ftp/vim/syntax/gkrellmrc.vim + +" Setup +if version >= 600 + if exists("b:current_syntax") + finish + endif +else + syntax clear +endif + +if version >= 600 + setlocal iskeyword=_,-,a-z,A-Z,48-57 +else + set iskeyword=_,-,a-z,A-Z,48-57 +endif + +syn case match + +" Base constructs +syn match gkrellmrcComment "#.*$" contains=gkrellmrcFixme +syn keyword gkrellmrcFixme FIXME TODO XXX NOT contained +syn region gkrellmrcString start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline +syn match gkrellmrcNumber "^-\=\(\d\+\)\=\.\=\d\+" +syn match gkrellmrcNumber "\W-\=\(\d\+\)\=\.\=\d\+"lc=1 +syn keyword gkrellmrcConstant none +syn match gkrellmrcRGBColor "#\(\x\{12}\|\x\{9}\|\x\{6}\|\x\{3}\)\>" + +" Keywords +syn keyword gkrellmrcBuiltinExt cpu_nice_color cpu_nice_grid_color krell_depth krell_expand krell_left_margin krell_right_margin krell_x_hot krell_yoff mem_krell_buffers_depth mem_krell_buffers_expand mem_krell_buffers_x_hot mem_krell_buffers_yoff mem_krell_cache_depth mem_krell_cache_expand mem_krell_cache_x_hot mem_krell_cache_yoff sensors_bg_volt timer_bg_timer +syn keyword gkrellmrcGlobal allow_scaling author chart_width_ref theme_alternatives +syn keyword gkrellmrcSetCmd set_image_border set_integer set_string +syn keyword gkrellmrcGlobal bg_slider_meter_border bg_slider_panel_border +syn keyword gkrellmrcGlobal frame_bottom_height frame_left_width frame_right_width frame_top_height frame_left_chart_overlap frame_right_chart_overlap frame_left_panel_overlap frame_right_panel_overlap frame_left_spacer_overlap frame_right_spacer_overlap spacer_overlap_off cap_images_off +syn keyword gkrellmrcGlobal frame_bottom_border frame_left_border frame_right_border frame_top_border spacer_top_border spacer_bottom_border frame_left_chart_border frame_right_chart_border frame_left_panel_border frame_right_panel_border +syn keyword gkrellmrcGlobal chart_in_color chart_in_color_grid chart_out_color chart_out_color_grid +syn keyword gkrellmrcGlobal bg_separator_height bg_grid_mode +syn keyword gkrellmrcGlobal rx_led_x rx_led_y tx_led_x tx_led_y +syn keyword gkrellmrcGlobal decal_mail_frames decal_mail_delay +syn keyword gkrellmrcGlobal decal_alarm_frames decal_warn_frames +syn keyword gkrellmrcGlobal krell_slider_depth krell_slider_expand krell_slider_x_hot +syn keyword gkrellmrcGlobal button_panel_border button_meter_border +syn keyword gkrellmrcGlobal large_font normal_font small_font +syn keyword gkrellmrcGlobal spacer_bottom_height spacer_top_height spacer_bottom_height_chart spacer_top_height_chart spacer_bottom_height_meter spacer_top_height_meter +syn keyword gkrellmrcExpandMode left right bar-mode left-scaled right-scaled bar-mode-scaled +syn keyword gkrellmrcMeterName apm cal clock fs host mail mem swap timer sensors uptime +syn keyword gkrellmrcChartName cpu proc disk inet and net +syn match gkrellmrcSpecialClassName "\*" +syn keyword gkrellmrcStyleCmd StyleMeter StyleChart StylePanel +syn keyword gkrellmrcStyleItem textcolor alt_textcolor font alt_font transparency border label_position margin margins left_margin right_margin top_margin bottom_margin krell_depth krell_yoff krell_x_hot krell_expand krell_left_margin krell_right_margin + +" Define the default highlighting +if version >= 508 || !exists("did_gtkrc_syntax_inits") + if version < 508 + let did_gtkrc_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink gkrellmrcComment Comment + HiLink gkrellmrcFixme Todo + + HiLink gkrellmrcString gkrellmrcConstant + HiLink gkrellmrcNumber gkrellmrcConstant + HiLink gkrellmrcRGBColor gkrellmrcConstant + HiLink gkrellmrcExpandMode gkrellmrcConstant + HiLink gkrellmrcConstant Constant + + HiLink gkrellmrcMeterName gkrellmrcClass + HiLink gkrellmrcChartName gkrellmrcClass + HiLink gkrellmrcSpecialClassName gkrellmrcClass + HiLink gkrellmrcClass Type + + HiLink gkrellmrcGlobal gkrellmrcItem + HiLink gkrellmrcBuiltinExt gkrellmrcItem + HiLink gkrellmrcStyleItem gkrellmrcItem + HiLink gkrellmrcItem Function + + HiLink gkrellmrcSetCmd Special + HiLink gkrellmrcStyleCmd Statement + + delcommand HiLink +endif + +let b:current_syntax = "gkrellmrc" diff --git a/runtime/syntax/gnuplot.vim b/runtime/syntax/gnuplot.vim new file mode 100644 index 000000000..a6fa716e2 --- /dev/null +++ b/runtime/syntax/gnuplot.vim @@ -0,0 +1,198 @@ +" Vim syntax file +" Language: gnuplot 3.8i.0 +" Maintainer: John Hoelzel johnh51@users.sourceforge.net +" Last Change: Mon May 26 02:33:33 UTC 2003 +" Filenames: *.gpi *.gih scripts: #!*gnuplot +" URL: http://johnh51.get.to/vim/syntax/gnuplot.vim +" + +" thanks to "David Necas (Yeti)" <yeti@physics.muni.cz> for heads up - working on more changes . +" *.gpi = GnuPlot Input - what I use because there is no other guideline. jeh 11/2000 +" *.gih = makes using cut/pasting from gnuplot.gih easier ... +" #!*gnuplot = for Linux bash shell scripts of gnuplot commands. +" emacs used a suffix of '<gp?>' +" gnuplot demo files show no preference. +" I will post mail and newsgroup comments on a standard suffix in 'URL' directory. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" some shortened names to make demo files look clean... jeh. 11/2000 +" demos -> 3.8i ... jeh. 5/2003 - a work in progress... + +" commands + +syn keyword gnuplotStatement cd call clear exit set unset plot splot help +syn keyword gnuplotStatement load pause quit fit rep[lot] if +syn keyword gnuplotStatement FIT_LIMIT FIT_MAXITER FIT_START_LAMBDA +syn keyword gnuplotStatement FIT_LAMBDA_FACTOR FIT_LOG FIT_SCRIPT +syn keyword gnuplotStatement print pwd reread reset save show test ! functions var +syn keyword gnuplotConditional if +" if is cond + stmt - ok? + +" numbers fm c.vim + +" integer number, or floating point number without a dot and with "f". +syn case ignore +syn match gnuplotNumber "\<[0-9]\+\(u\=l\=\|lu\|f\)\>" +" floating point number, with dot, optional exponent +syn match gnuplotFloat "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=[fl]\=\>" +" floating point number, starting with a dot, optional exponent +syn match gnuplotFloat "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=[fl]\=\>" +" floating point number, without dot, with exponent +syn match gnuplotFloat "\<[0-9]\+e[-+]\=[0-9]\+[fl]\=\>" +" hex number +syn match gnuplotNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>" +syn case match +" flag an octal number with wrong digits by not hilighting +syn match gnuplotOctalError "\<0[0-7]*[89]" + +" plot args + +syn keyword gnuplotType u[sing] tit[le] notit[le] wi[th] steps fs[teps] +syn keyword gnuplotType title notitle t +syn keyword gnuplotType with w +syn keyword gnuplotType li[nes] l +" t - too much? w - too much? l - too much? +syn keyword gnuplotType linespoints via + +" funcs + +syn keyword gnuplotFunc abs acos acosh arg asin asinh atan atanh atan2 +syn keyword gnuplotFunc besj0 besj1 besy0 besy1 +syn keyword gnuplotFunc ceil column cos cosh erf erfc exp floor gamma +syn keyword gnuplotFunc ibeta inverf igamma imag invnorm int lgamma +syn keyword gnuplotFunc log log10 norm rand real sgn sin sinh sqrt tan +syn keyword gnuplotFunc lambertw +syn keyword gnuplotFunc tanh valid +syn keyword gnuplotFunc tm_hour tm_mday tm_min tm_mon tm_sec +syn keyword gnuplotFunc tm_wday tm_yday tm_year + +" set vars + +syn keyword gnuplotType xdata timefmt grid noytics ytics fs +syn keyword gnuplotType logscale time notime mxtics nomxtics style mcbtics +syn keyword gnuplotType nologscale +syn keyword gnuplotType axes x1y2 unique acs[plines] +syn keyword gnuplotType size origin multiplot xtics xr[ange] yr[ange] square nosquare ratio noratio +syn keyword gnuplotType binary matrix index every thru sm[ooth] +syn keyword gnuplotType all angles degrees radians +syn keyword gnuplotType arrow noarrow autoscale noautoscale arrowstyle +" autoscale args = x y xy z t ymin ... - too much? +" needs code to: using title vs autoscale t +syn keyword gnuplotType x y z zcb +syn keyword gnuplotType linear cubicspline bspline order level[s] +syn keyword gnuplotType auto disc[rete] incr[emental] from to head nohead +syn keyword gnuplotType graph base both nosurface table out[put] data +syn keyword gnuplotType bar border noborder boxwidth +syn keyword gnuplotType clabel noclabel clip noclip cntrp[aram] +syn keyword gnuplotType contour nocontour +syn keyword gnuplotType dgrid3d nodgrid3d dummy encoding format +" set encoding args not included - yet. +syn keyword gnuplotType function grid nogrid hidden[3d] nohidden[3d] isosample[s] key nokey +syn keyword gnuplotType historysize nohistorysize +syn keyword gnuplotType defaults offset nooffset trianglepattern undefined noundefined altdiagonal bentover noaltdiagonal nobentover +syn keyword gnuplotType left right top bottom outside below samplen spacing width height box nobox linestyle ls linetype lt linewidth lw +syn keyword gnuplotType Left Right autotitles noautotitles enhanced noenhanced +syn keyword gnuplotType isosamples +syn keyword gnuplotType label nolabel logscale nolog[scale] missing center font locale +syn keyword gnuplotType mapping margin bmargin lmargin rmargin tmargin spherical cylindrical cartesian +syn keyword gnuplotType linestyle nolinestyle linetype lt linewidth lw pointtype pt pointsize ps +syn keyword gnuplotType mouse nomouse +syn keyword gnuplotType nooffsets data candlesticks financebars linespoints lp vector nosurface +syn keyword gnuplotType term[inal] linux aed767 aed512 gpic +syn keyword gnuplotType regis tek410x tek40 vttek kc-tek40xx +syn keyword gnuplotType km-tek40xx selanar bitgraph xlib x11 X11 +" x11 args +syn keyword gnuplotType aifm cgm dumb fig gif small large size nofontlist winword6 corel dxf emf +syn keyword gnuplotType hpgl +" syn keyword gnuplotType transparent hp2623a hp2648 hp500c pcl5 why jeh +syn keyword gnuplotType hp2623a hp2648 hp500c pcl5 +syn match gnuplotType "\<transparent\>" +syn keyword gnuplotType hpljii hpdj hppj imagen mif pbm png svg +syn keyword gnuplotType postscript enhanced_postscript qms table +" postscript editing values? +syn keyword gnuplotType tgif tkcanvas epson-180dpi epson-60dpi +syn keyword gnuplotType epson-lx800 nec-cp6 okidata starc +syn keyword gnuplotType tandy-60dpi latex emtex pslatex pstex epslatex +syn keyword gnuplotType eepic tpic pstricks texdraw mf metafont mpost mp +syn keyword gnuplotType timestamp notimestamp +syn keyword gnuplotType variables version +syn keyword gnuplotType x2data y2data ydata zdata +syn keyword gnuplotType reverse writeback noreverse nowriteback +syn keyword gnuplotType axis mirror autofreq nomirror rotate autofreq norotate +syn keyword gnuplotType update +syn keyword gnuplotType multiplot nomultiplot mytics +syn keyword gnuplotType nomytics mztics nomztics mx2tics nomx2tics +syn keyword gnuplotType my2tics nomy2tics offsets origin output +syn keyword gnuplotType para[metric] nopara[metric] pointsize polar nopolar +syn keyword gnuplotType zrange x2range y2range rrange cbrange +syn keyword gnuplotType trange urange vrange sample[s] size +syn keyword gnuplotType bezier boxerrorbars boxes bargraph bar[s] +syn keyword gnuplotType boxxy[errorbars] csplines dots fsteps histeps impulses +syn keyword gnuplotType line[s] linesp[oints] points poiinttype sbezier splines steps +" w lt lw ls = optional +syn keyword gnuplotType vectors xerr[orbars] xyerr[orbars] yerr[orbars] financebars candlesticks vector +syn keyword gnuplotType errorb[ars surface +syn keyword gnuplotType filledcurve[s] pm3d x1 x2 y1 y2 xy closed +syn keyword gnuplotType at pi front +syn keyword gnuplotType errorlines xerrorlines yerrorlines xyerrorlines +syn keyword gnuplotType tics ticslevel ticscale time timefmt view +syn keyword gnuplotType xdata xdtics noxdtics ydtics noydtics +syn keyword gnuplotType zdtics nozdtics x2dtics nox2dtics y2dtics noy2dtics +syn keyword gnuplotType xlab[el] ylab[el] zlab[el] cblab[el] x2label y2label xmtics +syn keyword gnuplotType xmtics noxmtics ymtics noymtics zmtics nozmtics +syn keyword gnuplotType x2mtics nox2mtics y2mtics noy2mtics +syn keyword gnuplotType cbdtics nocbdtics cbmtics nocbmtics cbtics nocbtics +syn keyword gnuplotType xtics noxtics ytics noytics +syn keyword gnuplotType ztics noztics x2tics nox2tics +syn keyword gnuplotType y2tics noy2tics zero nozero zeroaxis nozeroaxis +syn keyword gnuplotType xzeroaxis noxzeroaxis yzeroaxis noyzeroaxis +syn keyword gnuplotType x2zeroaxis nox2zeroaxis y2zeroaxis noy2zeroaxis +syn keyword gnuplotType angles one two fill empty solid pattern +syn keyword gnuplotType default +syn keyword gnuplotType scansautomatic flush b[egin] noftriangles implicit +" b too much? - used in demo +syn keyword gnuplotType palette positive negative ps_allcF nops_allcF maxcolors +syn keyword gnuplotType push fontfile pop +syn keyword gnuplotType rgbformulae defined file color model gradient colornames +syn keyword gnuplotType RGB HSV CMY YIQ XYZ +syn keyword gnuplotType colorbox vertical horizontal user bdefault +syn keyword gnuplotType loadpath fontpath decimalsign in out + +" comments + strings +syn region gnuplotComment start="#" end="$" +syn region gnuplotComment start=+"+ skip=+\\"+ end=+"+ +syn region gnuplotComment start=+'+ end=+'+ + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_gnuplot_syntax_inits") + if version < 508 + let did_gnuplot_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink gnuplotStatement Statement + HiLink gnuplotConditional Conditional + HiLink gnuplotNumber Number + HiLink gnuplotFloat Float + HiLink gnuplotOctalError Error + HiLink gnuplotFunc Type + HiLink gnuplotType Type + HiLink gnuplotComment Comment + + delcommand HiLink +endif + +let b:current_syntax = "gnuplot" + +" vim: ts=8 diff --git a/runtime/syntax/gp.vim b/runtime/syntax/gp.vim new file mode 100644 index 000000000..1999749c0 --- /dev/null +++ b/runtime/syntax/gp.vim @@ -0,0 +1,79 @@ +" Vim syntax file +" Language: gp (version 2.1) +" Maintainer: Karim Belabas <Karim.Belabas@math.u-psud.fr> +" Last change: 2001 Sep 02 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" some control statements +syntax keyword gpStatement break return next +syntax keyword gpConditional if +syntax keyword gpRepeat until while for fordiv forprime forstep forvec +syntax keyword gpScope local global + +syntax keyword gpInterfaceKey buffersize colors compatible debug debugmem +syntax keyword gpInterfaceKey echo format help histsize log logfile output +syntax keyword gpInterfaceKey parisize path primelimit prompt psfile +syntax keyword gpInterfaceKey realprecision seriesprecision simplify +syntax keyword gpInterfaceKey strictmatch timer + +syntax match gpInterface "^\s*\\[a-z].*" +syntax keyword gpInterface default +syntax keyword gpInput read input + +" functions +syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*[^ \t=]"me=e-1 contains=gpFunction,gpArgs +syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*$" contains=gpFunction,gpArgs +syntax match gpArgs contained "[a-zA-Z][_a-zA-Z0-9]*" +syntax match gpFunction contained "^\s*[a-zA-Z][_a-zA-Z0-9]*("me=e-1 + +" String and Character constants +" Highlight special (backslash'ed) characters differently +syntax match gpSpecial contained "\\[ent\\]" +syntax region gpString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gpSpecial + +"comments +syntax region gpComment start="/\*" end="\*/" contains=gpTodo +syntax match gpComment "\\\\.*" contains=gpTodo +syntax keyword gpTodo contained TODO +syntax sync ccomment gpComment minlines=10 + +"catch errors caused by wrong parenthesis +syntax region gpParen transparent start='(' end=')' contains=ALLBUT,gpParenError,gpTodo,gpFunction,gpArgs,gpSpecial +syntax match gpParenError ")" +syntax match gpInParen contained "[{}]" + +if version >= 508 || !exists("did_gp_syn_inits") + if version < 508 + let did_gp_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink gpConditional Conditional + HiLink gpRepeat Repeat + HiLink gpError Error + HiLink gpParenError gpError + HiLink gpInParen gpError + HiLink gpStatement Statement + HiLink gpString String + HiLink gpComment Comment + HiLink gpInterface Type + HiLink gpInput Type + HiLink gpInterfaceKey Statement + HiLink gpFunction Function + HiLink gpScope Type + " contained ones + HiLink gpSpecial Special + HiLink gpTodo Todo + HiLink gpArgs Type + delcommand HiLink +endif + +let b:current_syntax = "gp" +" vim: ts=8 diff --git a/runtime/syntax/gpg.vim b/runtime/syntax/gpg.vim new file mode 100644 index 000000000..23401969a --- /dev/null +++ b/runtime/syntax/gpg.vim @@ -0,0 +1,72 @@ +" Vim syntax file +" Language: GnuPG Configuration File. +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/gpg/ +" Latest Revision: 2004-05-06 +" arch-tag: 602305f7-d8ae-48ef-a68f-4d54f12af70a + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Set iskeyword since we need `-' (and potentially others) in keywords. +" For version 5.x: Set it globally +" For version 6.x: Set it locally +if version >= 600 + command -nargs=1 SetIsk setlocal iskeyword=<args> +else + command -nargs=1 SetIsk set iskeyword=<args> +endif +SetIsk 48-57,65-90,97-122,- +delcommand SetIsk + +" comments +syn region gpgComment contained display oneline start="#" end="$" contains=gpgTodo,gpgID + +" todo +syn keyword gpgTodo contained FIXME TODO XXX NOTE + +" ids +syn match gpgID contained display "\<\(0x\)\=\x\{8,}\>" + +syn match gpgBegin "^" skipwhite nextgroup=gpgComment,gpgOption,gpgCommand + +" commands that take args +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 +" commands that take no args +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 + +" options that take args +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 +" options that take no args +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 + +" arguments to commands and options +syn match gpgArg contained display "\S\+\(\s\+\S\+\)*" contains=gpgID +syn match gpgArgError contained display "\S\+\(\s\+\S\+\)*" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_gpg_syn_inits") + if version < 508 + let did_gpg_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink gpgComment Comment + HiLink gpgTodo Todo + HiLink gpgID Number + HiLink gpgOption Keyword + HiLink gpgCommand Error + HiLink gpgArgError Error + delcommand HiLink +endif + +let b:current_syntax = "gpg" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/grads.vim b/runtime/syntax/grads.vim new file mode 100644 index 000000000..0b88549d4 --- /dev/null +++ b/runtime/syntax/grads.vim @@ -0,0 +1,86 @@ +" Vim syntax file +" Language: grads (GrADS scripts) +" Maintainer: Stefan Fronzek (sfronzek at gmx dot net) +" Last change: 13 Feb 2004 + +" Grid Analysis and Display System (GrADS); http://grads.iges.org/grads +" This syntax file defines highlighting for only very few features of +" the GrADS scripting language. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" GrADS is entirely case-insensitive. +syn case ignore + +" The keywords + +syn keyword gradsStatement if else endif break exit return +syn keyword gradsStatement while endwhile say prompt pull function +syn keyword gradsStatement subwrd sublin substr read write close +" String + +syn region gradsString start=+'+ end=+'+ + +" Integer number +syn match gradsNumber "[+-]\=\<[0-9]\+\>" + +" Operator + +"syn keyword gradsOperator | ! % & != >= +"syn match gradsOperator "[^\.]not[^a-zA-Z]" + +" Variables + +syn keyword gradsFixVariables lat lon lev result rec rc +syn match gradsglobalVariables "_[a-zA-Z][a-zA-Z0-9]*" +syn match gradsVariables "[a-zA-Z][a-zA-Z0-9]*" +syn match gradsConst "#[A-Z][A-Z_]+" + +" Comments + +syn match gradsComment "\*.*" + +" Typical Typos + +" for C programmers: +" syn match gradsTypos "==" +" syn match gradsTypos "!=" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't hgs highlighting+yet +if version >= 508 || !exists("did_gs_syn_inits") + if version < 508 + let did_gs_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink gradsStatement Statement + + HiLink gradsString String + HiLink gradsNumber Number + + HiLink gradsFixVariables Special + HiLink gradsVariables Identifier + HiLink gradsglobalVariables Special + HiLink gradsConst Special + + HiLink gradsClassMethods Function + + HiLink gradsOperator Operator + HiLink gradsComment Comment + + HiLink gradsTypos Error + + delcommand HiLink +endif + +let b:current_syntax = "grads" diff --git a/runtime/syntax/groff.vim b/runtime/syntax/groff.vim new file mode 100644 index 000000000..d4dc0cc4f --- /dev/null +++ b/runtime/syntax/groff.vim @@ -0,0 +1,10 @@ +" VIM syntax file +" Language: groff +" Maintainer: Alejandro López-Valencia <dradul@yahoo.com> +" URL: http://dradul.tripod.com/vim +" Last Change: 2003-05-08-12:41:13 GMT-5. + +" This uses the nroff.vim syntax file. +let b:main_syntax = "nroff" +let b:nroff_is_groff = 1 +runtime! syntax/nroff.vim diff --git a/runtime/syntax/grub.vim b/runtime/syntax/grub.vim new file mode 100644 index 000000000..e87a8d93e --- /dev/null +++ b/runtime/syntax/grub.vim @@ -0,0 +1,77 @@ +" Vim syntax file +" Language: GRUB Configuration File +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/grub/ +" Latest Revision: 2004-05-06 +" arch-tag: 7a56ddd0-e551-44bc-b8c0-235fedbdf3c0 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" comments +syn region grubComment display oneline start="^#" end="$" contains=grubTodo + +" todo +syn keyword grubTodo contained TODO FIXME XXX NOTE + +" devices +syn match grubDevice display "(\([fh]d\d\|\d\+\|0x\x\+\)\(,\d\+\)\=\(,\l\)\=)" + +" block lists +syn match grubBlock display "\(\d\+\)\=+\d\+\(,\(\d\+\)\=+\d\+\)*" + +" numbers +syn match grubNumbers display "+\=\<\d\+\|0x\x\+\>" + +syn match grubBegin display "^" nextgroup=grubCommand,grubComment skipwhite + +" menu commands +syn keyword grubCommand contained default fallback hiddenmenu timeout title + +" general commands +syn keyword grubCommand contained bootp color device dhcp hide ifconfig pager +syn keyword grubCommand contained partnew parttype password rarp serial setkey +syn keyword grubCommand contained terminal tftpserver unhide blocklist boot cat +syn keyword grubCommand contained chainloader cmp configfile debug displayapm +syn keyword grubCommand contained displaymem embed find fstest geometry halt help +syn keyword grubCommand contained impsprobe initrd install ioprobe kernel lock +syn keyword grubCommand contained makeactive map md5crypt module modulenounzip pause +syn keyword grubCommand contained quit reboot read root rootnoverify savedefault +syn keyword grubCommand contained setup testload testvbe uppermem vbeprobe + +" colors +syn match grubColor "\(blink-\)\=\(black\|blue\|green\|cyan\|red\|magenta\|brown\|yellow\|white\)" +syn match grubColor "\<\(blink-\)\=light-\(gray\|blue\|green\|cyan\|red\|magenta\)" +syn match grubColor "\<\(blink-\)\=dark-gray" + +" specials +syn keyword grubSpecial saved + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_grub_syn_inits") + if version < 508 + let did_grub_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink grubComment Comment + HiLink grubTodo Todo + HiLink grubNumbers Number + HiLink grubDevice Identifier + HiLink grubBlock Identifier + HiLink grubCommand Keyword + HiLink grubColor Identifier + HiLink grubSpecial Special + delcommand HiLink +endif + +let b:current_syntax = "grub" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/gsp.vim b/runtime/syntax/gsp.vim new file mode 100644 index 000000000..e7766c5b5 --- /dev/null +++ b/runtime/syntax/gsp.vim @@ -0,0 +1,59 @@ +" Vim syntax file +" Language: GSP - GNU Server Pages (v. 0.86) +" Created By: Nathaniel Harward nharward@yahoo.com +" Last Changed: Dec. 12, 2000 +" Filenames: *.gsp +" URL: http://www.constructicon.com/~nharward/vim/syntax/gsp.vim + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'gsp' +endif + +" Source HTML syntax +if version < 600 + source <sfile>:p:h/html.vim +else + runtime! syntax/html.vim +endif +unlet b:current_syntax + +syn case match + +" Include Java syntax +if version < 600 + syn include @gspJava <sfile>:p:h/java.vim +else + syn include @gspJava syntax/java.vim +endif + +" Add <java> as an HTML tag name along with its args +syn keyword htmlTagName contained java +syn keyword htmlArg contained type file page + +" Redefine some HTML things to include (and highlight) gspInLine code in +" places where it's likely to be found +syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,gspInLine +syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,gspInLine +syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc,gspInLine +syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError,gspInLine +syn region htmlTag start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,gspInLine +syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster,gspInLine +syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster,gspInLine + +" Define the GSP java code blocks +syn region gspJavaBlock start="<java\>[^>]*\>" end="</java>"me=e-7 contains=@gspJava,htmlTag +syn region gspInLine matchgroup=htmlError start="`" end="`" contains=@gspJava + +let b:current_syntax = "gsp" + +if main_syntax == 'gsp' + unlet main_syntax +endif diff --git a/runtime/syntax/gtkrc.vim b/runtime/syntax/gtkrc.vim new file mode 100644 index 000000000..57054a21d --- /dev/null +++ b/runtime/syntax/gtkrc.vim @@ -0,0 +1,142 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: Gtk+ theme files `gtkrc' +" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> +" Last Change: 2002-10-31 +" URL: http://trific.ath.cx/Ftp/vim/syntax/gtkrc.vim + +" Setup +if version >= 600 + if exists("b:current_syntax") + finish + endif +else + syntax clear +endif + +if version >= 600 + setlocal iskeyword=_,-,a-z,A-Z,48-57 +else + set iskeyword=_,-,a-z,A-Z,48-57 +endif + +syn case match + +" Base constructs +syn match gtkrcComment "#.*$" contains=gtkrcFixme +syn keyword gtkrcFixme FIXME TODO XXX NOT contained +syn region gtkrcACString start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline contains=gtkrcWPathSpecial,gtkrcClassName,gtkrcClassNameGnome contained +syn region gtkrcBString start=+"+ skip=+\\\\\|\\"+ end=+"+ oneline contains=gtkrcKeyMod contained +syn region gtkrcString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gtkrcStockName,gtkrcPathSpecial,gtkrcRGBColor +syn match gtkrcPathSpecial "<parent>" contained +syn match gtkrcWPathSpecial "[*?.]" contained +syn match gtkrcNumber "^\(\d\+\)\=\.\=\d\+" +syn match gtkrcNumber "\W\(\d\+\)\=\.\=\d\+"lc=1 +syn match gtkrcRGBColor "#\(\x\{12}\|\x\{9}\|\x\{6}\|\x\{3}\)" contained +syn cluster gtkrcPRIVATE add=gtkrcFixme,gtkrcPathSpecial,gtkrcWPathSpecial,gtkrcRGBColor,gtkrcACString + +" Keywords +syn keyword gtkrcInclude include +syn keyword gtkrcPathSet module_path pixmap_path +syn keyword gtkrcTop binding style +syn keyword gtkrcTop widget widget_class nextgroup=gtkrcACString skipwhite +syn keyword gtkrcTop class nextgroup=gtkrcACString skipwhite +syn keyword gtkrcBind bind nextgroup=gtkrcBString skipwhite +syn keyword gtkrcStateName NORMAL INSENSITIVE PRELIGHT ACTIVE SELECTED +syn keyword gtkrcPriorityName HIGHEST RC APPLICATION GTK LOWEST +syn keyword gtkrcPriorityName highest rc application gtk lowest +syn keyword gtkrcTextDirName LTR RTL +syn keyword gtkrcStyleKeyword fg bg fg_pixmap bg_pixmap bg_text base font font_name fontset stock text +syn match gtkrcKeyMod "<\(alt\|ctrl\|control\|mod[1-5]\|release\|shft\|shift\)>" contained +syn cluster gtkrcPRIVATE add=gtkrcKeyMod + +" Enums and engine words +syn keyword gtkrcKeyword engine image +syn keyword gtkrcImage arrow_direction border detail file gap_border gap_end_border gap_end_file gap_file gap_side gap_side gap_start_border gap_start_file orientation overlay_border overlay_file overlay_stretch recolorable shadow state stretch thickness +syn keyword gtkrcConstant TRUE FALSE NONE IN OUT LEFT RIGHT TOP BOTTOM UP DOWN VERTICAL HORIZONTAL ETCHED_IN ETCHED_OUT +syn keyword gtkrcFunction function nextgroup=gtkrcFunctionEq skipwhite +syn match gtkrcFunctionEq "=" nextgroup=gtkrcFunctionName contained skipwhite +syn keyword gtkrcFunctionName ARROW BOX BOX_GAP CHECK CROSS DIAMOND EXTENSION FLAT_BOX FOCUS HANDLE HLINE OPTION OVAL POLYGON RAMP SHADOW SHADOW_GAP SLIDER STRING TAB VLINE contained +syn cluster gtkrcPRIVATE add=gtkrcFunctionName,gtkrcFunctionEq + +" Class names +syn keyword gtkrcClassName GtkAccelLabel GtkAdjustment GtkAlignment GtkArrow GtkAspectFrame GtkBin GtkBox GtkButton GtkButtonBox GtkCList GtkCTree GtkCalendar GtkCheckButton GtkCheckMenuItem GtkColorSelection GtkColorSelectionDialog GtkCombo GtkContainer GtkCurve GtkData GtkDialog GtkDrawingArea GtkEditable GtkEntry GtkEventBox GtkFileSelection GtkFixed GtkFontSelection GtkFontSelectionDialog GtkFrame GtkGammaCurve GtkHBox GtkHButtonBox GtkHPaned GtkHRuler GtkHScale GtkHScrollbar GtkHSeparator GtkHandleBox GtkImage GtkImageMenuItem GtkInputDialog GtkInvisible GtkItem GtkItemFactory GtkLabel GtkLayout GtkList GtkListItem GtkMenu GtkMenuBar GtkMenuItem GtkMenuShell GtkMessageDialog GtkMisc GtkNotebook GtkObject GtkOptionMenu GtkPacker GtkPaned GtkPixmap GtkPlug GtkPreview GtkProgress GtkProgressBar GtkRadioButton GtkRadioMenuItem GtkRange GtkRuler GtkScale GtkScrollbar GtkScrolledWindow GtkSeparatorMenuItem GtkSocket GtkSpinButton GtkStatusbar GtkTable GtkTearoffMenuItem GtkText GtkTextBuffer GtkTextMark GtkTextTag GtkTextView GtkTipsQuery GtkToggleButton GtkToolbar GtkTooltips GtkTree GtkTreeView GtkTreeItem GtkVBox GtkVButtonBox GtkVPaned GtkVRuler GtkVScale GtkVScrollbar GtkVSeparator GtkViewport GtkWidget GtkWindow GtkWindowGroup contained +syn keyword gtkrcClassName AccelLabel Adjustment Alignment Arrow AspectFrame Bin Box Button ButtonBox CList CTree Calendar CheckButton CheckMenuItem ColorSelection ColorSelectionDialog Combo Container Curve Data Dialog DrawingArea Editable Entry EventBox FileSelection Fixed FontSelection FontSelectionDialog Frame GammaCurve HBox HButtonBox HPaned HRuler HScale HScrollbar HSeparator HandleBox Image ImageMenuItem InputDialog Invisible Item ItemFactory Label Layout List ListItem Menu MenuBar MenuItem MenuShell MessageDialog Misc Notebook Object OptionMenu Packer Paned Pixmap Plug Preview Progress ProgressBar RadioButton RadioMenuItem Range Ruler Scale Scrollbar ScrolledWindow SeparatorMenuItem Socket SpinButton Statusbar Table TearoffMenuItem Text TextBuffer TextMark TextTag TextView TipsQuery ToggleButton Toolbar Tooltips Tree TreeView TreeItem VBox VButtonBox VPaned VRuler VScale VScrollbar VSeparator Viewport Widget Window WindowGroup contained +syn keyword gtkrcClassNameGnome GnomeAbout GnomeAnimator GnomeApp GnomeAppBar GnomeCalculator GnomeCanvas GnomeCanvasEllipse GnomeCanvasGroup GnomeCanvasImage GnomeCanvasItem GnomeCanvasLine GnomeCanvasPolygon GnomeCanvasRE GnomeCanvasRect GnomeCanvasText GnomeCanvasWidget GnomeClient GnomeColorPicker GnomeDEntryEdit GnomeDateEdit GnomeDialog GnomeDock GnomeDockBand GnomeDockItem GnomeDockLayout GnomeDruid GnomeDruidPage GnomeDruidPageFinish GnomeDruidPageStandard GnomeDruidPageStart GnomeEntry GnomeFileEntry GnomeFontPicker GnomeFontSelector GnomeHRef GnomeIconEntry GnomeIconList GnomeIconSelection GnomeIconTextItem GnomeLess GnomeMDI GnomeMDIChild GnomeMDIGenericChild GnomeMessageBox GnomeNumberEntry GnomePaperSelector GnomePixmap GnomePixmapEntry GnomeProcBar GnomePropertyBox GnomeScores GnomeSpell GnomeStock GtkClock GtkDial GtkPixmapMenuItem GtkTed contained +syn cluster gtkrcPRIVATE add=gtkrcClassName,gtkrcClassNameGnome + +" Stock item names +syn keyword gtkrcStockName gtk-add gtk-apply gtk-bold gtk-cancel gtk-cdrom gtk-clear gtk-close gtk-convert gtk-copy gtk-cut gtk-delete gtk-dialog-error gtk-dialog-info gtk-dialog-question gtk-dialog-warning gtk-dnd gtk-dnd-multiple gtk-execute gtk-find gtk-find-and-replace gtk-floppy gtk-goto-bottom gtk-goto-first gtk-goto-last gtk-goto-top gtk-go-back gtk-go-down gtk-go-forward gtk-go-up gtk-help gtk-home gtk-index gtk-italic gtk-jump-to gtk-justify-center gtk-justify-fill gtk-justify-left gtk-justify-right gtk-missing-image gtk-new gtk-no gtk-ok gtk-open gtk-paste gtk-preferences gtk-print gtk-print-preview gtk-properties gtk-quit gtk-redo gtk-refresh gtk-remove gtk-revert-to-saved gtk-save gtk-save-as gtk-select-color gtk-select-font gtk-sort-ascending gtk-sort-descending gtk-spell-check gtk-stop gtk-strikethrough gtk-undelete gtk-underline gtk-undo gtk-yes gtk-zoom-100 gtk-zoom-fit gtk-zoom-in gtk-zoom-out contained +syn cluster gtkrcPRIVATE add=gtkrcStockName + +" Gtk Settings +syn keyword gtkrcSettingsName gtk-double-click-time gtk-cursor-blink gtk-cursor-blink-time gtk-split-cursor gtk-theme-name gtk-key-theme-name gtk-menu-bar-accel gtk-dnd-drag-threshold gtk-font-name gtk-color-palette gtk-entry-select-on-focus gtk-can-change-accels gtk-toolbar-style gtk-toolbar-icon-size +syn cluster gtkrcPRIVATE add=gtkrcSettingsName + +" Catch errors caused by wrong parenthesization +syn region gtkrcParen start='(' end=')' transparent contains=ALLBUT,gtkrcParenError,@gtkrcPRIVATE +syn match gtkrcParenError ")" +syn region gtkrcBrace start='{' end='}' transparent contains=ALLBUT,gtkrcBraceError,@gtkrcPRIVATE +syn match gtkrcBraceError "}" +syn region gtkrcBracket start='\[' end=']' transparent contains=ALLBUT,gtkrcBracketError,@gtkrcPRIVATE +syn match gtkrcBracketError "]" + +" Synchronization +syn sync minlines=50 +syn sync match gtkrcSyncClass groupthere NONE "^\s*class\>" + +" Define the default highlighting +if version >= 508 || !exists("did_gtkrc_syntax_inits") + if version < 508 + let did_gtkrc_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink gtkrcComment Comment + HiLink gtkrcFixme Todo + + HiLink gtkrcInclude Preproc + + HiLink gtkrcACString gtkrcString + HiLink gtkrcBString gtkrcString + HiLink gtkrcString String + HiLink gtkrcNumber Number + HiLink gtkrcStateName gtkrcConstant + HiLink gtkrcPriorityName gtkrcConstant + HiLink gtkrcTextDirName gtkrcConstant + HiLink gtkrcSettingsName Function + HiLink gtkrcStockName Function + HiLink gtkrcConstant Constant + + HiLink gtkrcPathSpecial gtkrcSpecial + HiLink gtkrcWPathSpecial gtkrcSpecial + HiLink gtkrcRGBColor gtkrcSpecial + HiLink gtkrcKeyMod gtkrcSpecial + HiLink gtkrcSpecial Special + + HiLink gtkrcTop gtkrcKeyword + HiLink gtkrcPathSet gtkrcKeyword + HiLink gtkrcStyleKeyword gtkrcKeyword + HiLink gtkrcFunction gtkrcKeyword + HiLink gtkrcBind gtkrcKeyword + HiLink gtkrcKeyword Keyword + + HiLink gtkrcClassNameGnome gtkrcGtkClass + HiLink gtkrcClassName gtkrcGtkClass + HiLink gtkrcFunctionName gtkrcGtkClass + HiLink gtkrcGtkClass Type + + HiLink gtkrcImage gtkrcOtherword + HiLink gtkrcOtherword Function + + HiLink gtkrcParenError gtkrcError + HiLink gtkrcBraceError gtkrcError + HiLink gtkrcBracketError gtkrcError + HiLink gtkrcError Error + + delcommand HiLink +endif + +let b:current_syntax = "gtkrc" diff --git a/runtime/syntax/haskell.vim b/runtime/syntax/haskell.vim new file mode 100644 index 000000000..21fcf81f5 --- /dev/null +++ b/runtime/syntax/haskell.vim @@ -0,0 +1,193 @@ +" Vim syntax file +" Language: Haskell +" Maintainer: Haskell Cafe mailinglist <haskell-cafe@haskell.org> +" Last Change: 2004 Feb 23 +" Original Author: John Williams <jrw@pobox.com> +" +" Thanks to Ryan Crumley for suggestions and John Meacham for +" pointing out bugs. Also thanks to Ian Lynagh and Donald Bruce Stewart +" for providing the inspiration for the inclusion of the handling +" of C preprocessor directives, and for pointing out a bug in the +" end-of-line comment handling. +" +" Options-assign a value to these variables to turn the option on: +" +" hs_highlight_delimiters - Highlight delimiter characters--users +" with a light-colored background will +" probably want to turn this on. +" hs_highlight_boolean - Treat True and False as keywords. +" hs_highlight_types - Treat names of primitive types as keywords. +" hs_highlight_more_types - Treat names of other common types as keywords. +" hs_highlight_debug - Highlight names of debugging functions. +" hs_allow_hash_operator - Don't highlight seemingly incorrect C +" preprocessor directives but assume them to be +" operators +" +" 2004 Feb 19: Added C preprocessor directive handling, corrected eol comments +" cleaned away literate haskell support (should be entirely in +" lhaskell.vim) +" 2004 Feb 20: Cleaned up C preprocessor directive handling, fixed single \ +" in eol comment character class +" 2004 Feb 23: Made the leading comments somewhat clearer where it comes +" to attribution of work. + +" Remove any old syntax stuff hanging around +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +" (Qualified) identifiers (no default highlighting) +syn match ConId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[A-Z][a-zA-Z0-9_']*\>" +syn match VarId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[a-z][a-zA-Z0-9_']*\>" + +" Infix operators--most punctuation characters and any (qualified) identifier +" enclosed in `backquotes`. An operator starting with : is a constructor, +" others are variables (e.g. functions). +syn match hsVarSym "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[-!#$%&\*\+/<=>\?@\\^|~.][-!#$%&\*\+/<=>\?@\\^|~:.]*" +syn match hsConSym "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=:[-!#$%&\*\+./<=>\?@\\^|~:]*" +syn match hsVarSym "`\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[a-z][a-zA-Z0-9_']*`" +syn match hsConSym "`\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[A-Z][a-zA-Z0-9_']*`" + +" Reserved symbols--cannot be overloaded. +syn match hsDelimiter "(\|)\|\[\|\]\|,\|;\|_\|{\|}" + +" Strings and constants +syn match hsSpecialChar contained "\\\([0-9]\+\|o[0-7]\+\|x[0-9a-fA-F]\+\|[\"\\'&\\abfnrtv]\|^[A-Z^_\[\\\]]\)" +syn match hsSpecialChar 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 hsSpecialCharError contained "\\&\|'''\+" +syn region hsString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=hsSpecialChar +syn match hsCharacter "[^a-zA-Z0-9_']'\([^\\]\|\\[^']\+\|\\'\)'"lc=1 contains=hsSpecialChar,hsSpecialCharError +syn match hsCharacter "^'\([^\\]\|\\[^']\+\|\\'\)'" contains=hsSpecialChar,hsSpecialCharError +syn match hsNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>" +syn match hsFloat "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>" + +" Keyword definitions. These must be patters instead of keywords +" because otherwise they would match as keywords at the start of a +" "literate" comment (see lhs.vim). +syn match hsModule "\<module\>" +syn match hsImport "\<import\>.*"he=s+6 contains=hsImportMod +syn match hsImportMod contained "\<\(as\|qualified\|hiding\)\>" +syn match hsInfix "\<\(infix\|infixl\|infixr\)\>" +syn match hsStructure "\<\(class\|data\|deriving\|instance\|default\|where\)\>" +syn match hsTypedef "\<\(type\|newtype\)\>" +syn match hsStatement "\<\(do\|case\|of\|let\|in\)\>" +syn match hsConditional "\<\(if\|then\|else\)\>" + +" Not real keywords, but close. +if exists("hs_highlight_boolean") + " Boolean constants from the standard prelude. + syn match hsBoolean "\<\(True\|False\)\>" +endif +if exists("hs_highlight_types") + " Primitive types from the standard prelude and libraries. + syn match hsType "\<\(Int\|Integer\|Char\|Bool\|Float\|Double\|IO\|Void\|Addr\|Array\|String\)\>" +endif +if exists("hs_highlight_more_types") + " Types from the standard prelude libraries. + syn match hsType "\<\(Maybe\|Either\|Ratio\|Complex\|Ordering\|IOError\|IOResult\|ExitCode\)\>" + syn match hsMaybe "\<Nothing\>" + syn match hsExitCode "\<\(ExitSuccess\)\>" + syn match hsOrdering "\<\(GT\|LT\|EQ\)\>" +endif +if exists("hs_highlight_debug") + " Debugging functions from the standard prelude. + syn match hsDebug "\<\(undefined\|error\|trace\)\>" +endif + + +" Comments +syn match hsLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$" +syn region hsBlockComment start="{-" end="-}" contains=hsBlockComment +syn region hsPragma start="{-#" end="#-}" + +" 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")) + syn match cError display "^\s*\(%:\|#\).*$" +endif +" Accept %: for # (C99) +syn region cPreCondit start="^\s*\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=cComment,cCppString,cCommentError +syn match cPreCondit display "^\s*\(%:\|#\)\s*\(else\|endif\)\>" +syn region cCppOut start="^\s*\(%:\|#\)\s*if\s\+0\+\>" end=".\@=\|$" contains=cCppOut2 +syn region cCppOut2 contained start="0" end="^\s*\(%:\|#\)\s*\(endif\>\|else\>\|elif\>\)" contains=cCppSkip +syn region cCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cCppSkip +syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match cIncluded display contained "<[^>]*>" +syn match cInclude display "^\s*\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded +syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cCppOut,cCppOut2,cCppSkip,cCommentStartError +syn region cDefine matchgroup=cPreCondit start="^\s*\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" +syn region cPreProc matchgroup=cPreCondit start="^\s*\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend + +syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=cCommentStartError,cSpaceError contained +syntax match cCommentError display "\*/" contained +syntax match cCommentStartError display "/\*"me=e-1 contained +syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial contained + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_hs_syntax_inits") + if version < 508 + let did_hs_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink hsModule hsStructure + HiLink hsImport Include + HiLink hsImportMod hsImport + HiLink hsInfix PreProc + HiLink hsStructure Structure + HiLink hsStatement Statement + HiLink hsConditional Conditional + HiLink hsSpecialChar SpecialChar + HiLink hsTypedef Typedef + HiLink hsVarSym hsOperator + HiLink hsConSym hsOperator + HiLink hsOperator Operator + if exists("hs_highlight_delimiters") + " Some people find this highlighting distracting. + HiLink hsDelimiter Delimiter + endif + HiLink hsSpecialCharError Error + HiLink hsString String + HiLink hsCharacter Character + HiLink hsNumber Number + HiLink hsFloat Float + HiLink hsConditional Conditional + HiLink hsLiterateComment hsComment + HiLink hsBlockComment hsComment + HiLink hsLineComment hsComment + HiLink hsComment Comment + HiLink hsPragma SpecialComment + HiLink hsBoolean Boolean + HiLink hsType Type + HiLink hsMaybe hsEnumConst + HiLink hsOrdering hsEnumConst + HiLink hsEnumConst Constant + HiLink hsDebug Debug + + HiLink cCppString hsString + HiLink cCommentStart hsComment + HiLink cCommentError hsError + HiLink cCommentStartError hsError + HiLink cInclude Include + HiLink cPreProc PreProc + HiLink cDefine Macro + HiLink cIncluded hsString + HiLink cError Error + HiLink cPreCondit PreCondit + HiLink cComment Comment + HiLink cCppSkip cCppOut + HiLink cCppOut2 cCppOut + HiLink cCppOut Comment + + delcommand HiLink +endif + +let b:current_syntax = "haskell" + +" Options for vi: ts=8 sw=2 sts=2 nowrap noexpandtab ft=vim diff --git a/runtime/syntax/hb.vim b/runtime/syntax/hb.vim new file mode 100644 index 000000000..6df30543b --- /dev/null +++ b/runtime/syntax/hb.vim @@ -0,0 +1,97 @@ +" Vim syntax file +" Language: Hyper Builder +" Maintainer: Alejandro Forero Cuervo +" URL: http://bachue.com/hb/vim/syntax/hb.vim +" Last Change: 2001 Sep 02 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the HTML syntax to start with +"syn include @HTMLStuff <sfile>:p:h/htmlhb.vim + +"this would be nice but we are supposed not to do it +"set mps=<:> + +"syn region HBhtmlString contained start=+"+ end=+"+ contains=htmlSpecialChar +"syn region HBhtmlString contained start=+'+ end=+'+ contains=htmlSpecialChar + +"syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*" + +syn match htmlSpecialChar "&[^;]*;" contained + +syn match HBhtmlTagSk contained "[A-Za-z]*" + +syn match HBhtmlTagS contained "<\s*\(hb\s*\.\s*\(sec\|min\|hour\|day\|mon\|year\|input\|html\|time\|getcookie\|streql\|url-enc\)\|wall\s*\.\s*\(show\|info\|id\|new\|rm\|count\)\|auth\s*\.\s*\(chk\|add\|find\|user\)\|math\s*\.\s*exp\)\s*\([^.A-Za-z0-9]\|$\)" contains=HBhtmlTagSk transparent + +syn match HBhtmlTagN contained "[A-Za-z0-9\/\-]\+" + +syn match HBhtmlTagB contained "<\s*[A-Za-z0-9\/\-]\+\(\s*\.\s*[A-Za-z0-9\/\-]\+\)*" contains=HBhtmlTagS,HBhtmlTagN + +syn region HBhtmlTag contained start=+<+ end=+>+ contains=HBhtmlTagB,HBDirectiveError + +syn match HBFileName ".*" contained + +syn match HBDirectiveKeyword ":\s*\(include\|lib\|set\|out\)\s\+" contained + +syn match HBDirectiveError "^:.*$" contained + +"syn match HBDirectiveBlockEnd "^:\s*$" contained + +"syn match HBDirectiveOutHead "^:\s*out\s\+\S\+.*" contained contains=HBDirectiveKeyword,HBFileName + +"syn match HBDirectiveSetHead "^:\s*set\s\+\S\+.*" contained contains=HBDirectiveKeyword,HBFileName + +syn match HBInvalidLine "^.*$" + +syn match HBDirectiveInclude "^:\s*include\s\+\S\+.*$" contains=HBFileName,HBDirectiveKeyword + +syn match HBDirectiveLib "^:\s*lib\s\+\S\+.*$" contains=HBFileName,HBDirectiveKeyword + +syn region HBText matchgroup=HBDirectiveKeyword start=/^:\(set\|out\)\s*\S\+.*$/ end=/^:\s*$/ contains=HBDirectiveError,htmlSpecialChar,HBhtmlTag keepend + +"syn match HBLine "^:.*$" contains=HBDirectiveInclude,HBDirectiveLib,HBDirectiveError,HBDirectiveSet,HBDirectiveOut + +syn match HBComment "^#.*$" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_hb_syntax_inits") + if version < 508 + let did_hb_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink HBhtmlString String + HiLink HBhtmlTagN Function + HiLink htmlSpecialChar String + + HiLink HBInvalidLine Error + HiLink HBFoobar Comment + hi HBFileName guibg=lightgray guifg=black + HiLink HBDirectiveError Error + HiLink HBDirectiveBlockEnd HBDirectiveKeyword + hi HBDirectiveKeyword guibg=lightgray guifg=darkgreen + HiLink HBComment Comment + HiLink HBhtmlTagSk Statement + + delcommand HiLink +endif + +syn sync match Normal grouphere NONE "^:\s*$" +syn sync match Normal grouphere NONE "^:\s*lib\s\+[^ \t]\+$" +syn sync match Normal grouphere NONE "^:\s*include\s\+[^ \t]\+$" +"syn sync match Block grouphere HBDirectiveSet "^#:\s*set\s\+[^ \t]\+" +"syn sync match Block grouphere HBDirectiveOut "^#:\s*out\s\+[^ \t]\+" + +let b:current_syntax = "hb" + +" vim: ts=8 diff --git a/runtime/syntax/help.vim b/runtime/syntax/help.vim new file mode 100644 index 000000000..0e7a550d3 --- /dev/null +++ b/runtime/syntax/help.vim @@ -0,0 +1,187 @@ +" Vim syntax file +" Language: Vim help file +" Maintainer: Bram Moolenaar (Bram@vim.org) +" Last Change: 2004 May 17 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match helpHeadline "^[A-Z ]\+[ ]\+\*"me=e-1 +syn match helpSectionDelim "^=\{3,}.*===$" +syn match helpSectionDelim "^-\{3,}.*--$" +syn region helpExample matchgroup=helpIgnore start=" >$" start="^>$" end="^[^ \t]"me=e-1 end="^<" +if has("ebcdic") + syn match helpHyperTextJump "\\\@<!|[^"*|]\+|" + syn match helpHyperTextEntry "\*[^"*|]\+\*\s"he=e-1 + syn match helpHyperTextEntry "\*[^"*|]\+\*$" +else + syn match helpHyperTextJump "\\\@<!|[#-)!+-~]\+|" + syn match helpHyperTextEntry "\*[#-)!+-~]\+\*\s"he=e-1 + syn match helpHyperTextEntry "\*[#-)!+-~]\+\*$" +endif +syn match helpNormal "|.*====*|" +syn match helpNormal ":|vim:|" " for :help modeline +syn match helpVim "Vim version [0-9.a-z]\+" +syn match helpVim "VIM REFERENCE.*" +syn match helpOption "'[a-z]\{2,\}'" +syn match helpOption "'t_..'" +syn match helpHeader "\s*\zs.\{-}\ze\s\=\~$" nextgroup=helpIgnore +syn match helpIgnore "." contained +syn keyword helpNote note Note NOTE note: Note: NOTE: Notes Notes: +syn match helpSpecial "\<N\>" +syn match helpSpecial "\<N\.$"me=e-1 +syn match helpSpecial "\<N\.\s"me=e-2 +syn match helpSpecial "(N\>"ms=s+1 +syn match helpSpecial "\[N]" +" avoid highlighting N N in help.txt +syn match helpSpecial "N N"he=s+1 +syn match helpSpecial "Nth"me=e-2 +syn match helpSpecial "N-1"me=e-2 +syn match helpSpecial "{[-a-zA-Z0-9'":%#=[\]<>.,]\+}" +syn match helpSpecial "{[-a-zA-Z0-9'"*+/:%#=[\]<>.,]\+}" +syn match helpSpecial "\s\[[-a-z^A-Z0-9_]\{2,}]"ms=s+1 +syn match helpSpecial "<[-a-zA-Z0-9_]\+>" +syn match helpSpecial "<[SCM]-.>" +syn match helpNormal "<---*>" +syn match helpSpecial "\[range]" +syn match helpSpecial "\[line]" +syn match helpSpecial "\[count]" +syn match helpSpecial "\[offset]" +syn match helpSpecial "\[cmd]" +syn match helpSpecial "\[num]" +syn match helpSpecial "\[+num]" +syn match helpSpecial "\[-num]" +syn match helpSpecial "\[+cmd]" +syn match helpSpecial "\[++opt]" +syn match helpSpecial "\[arg]" +syn match helpSpecial "\[arguments]" +syn match helpSpecial "\[ident]" +syn match helpSpecial "\[addr]" +syn match helpSpecial "\[group]" +syn match helpSpecial "CTRL-." +syn match helpSpecial "CTRL-Break" +syn match helpSpecial "CTRL-PageUp" +syn match helpSpecial "CTRL-PageDown" +syn match helpSpecial "CTRL-Insert" +syn match helpSpecial "CTRL-Del" +syn match helpSpecial "CTRL-{char}" +syn region helpNotVi start="{Vi[: ]" start="{not" start="{only" end="}" contains=helpLeadBlank,helpHyperTextJump +syn match helpLeadBlank "^\s\+" contained + +" Highlight group items in their own color. +syn match helpComment "\t[* ]Comment\t\+[a-z].*" +syn match helpConstant "\t[* ]Constant\t\+[a-z].*" +syn match helpString "\t[* ]String\t\+[a-z].*" +syn match helpCharacter "\t[* ]Character\t\+[a-z].*" +syn match helpNumber "\t[* ]Number\t\+[a-z].*" +syn match helpBoolean "\t[* ]Boolean\t\+[a-z].*" +syn match helpFloat "\t[* ]Float\t\+[a-z].*" +syn match helpIdentifier "\t[* ]Identifier\t\+[a-z].*" +syn match helpFunction "\t[* ]Function\t\+[a-z].*" +syn match helpStatement "\t[* ]Statement\t\+[a-z].*" +syn match helpConditional "\t[* ]Conditional\t\+[a-z].*" +syn match helpRepeat "\t[* ]Repeat\t\+[a-z].*" +syn match helpLabel "\t[* ]Label\t\+[a-z].*" +syn match helpOperator "\t[* ]Operator\t\+["a-z].*" +syn match helpKeyword "\t[* ]Keyword\t\+[a-z].*" +syn match helpException "\t[* ]Exception\t\+[a-z].*" +syn match helpPreProc "\t[* ]PreProc\t\+[a-z].*" +syn match helpInclude "\t[* ]Include\t\+[a-z].*" +syn match helpDefine "\t[* ]Define\t\+[a-z].*" +syn match helpMacro "\t[* ]Macro\t\+[a-z].*" +syn match helpPreCondit "\t[* ]PreCondit\t\+[a-z].*" +syn match helpType "\t[* ]Type\t\+[a-z].*" +syn match helpStorageClass "\t[* ]StorageClass\t\+[a-z].*" +syn match helpStructure "\t[* ]Structure\t\+[a-z].*" +syn match helpTypedef "\t[* ]Typedef\t\+[Aa-z].*" +syn match helpSpecial "\t[* ]Special\t\+[a-z].*" +syn match helpSpecialChar "\t[* ]SpecialChar\t\+[a-z].*" +syn match helpTag "\t[* ]Tag\t\+[a-z].*" +syn match helpDelimiter "\t[* ]Delimiter\t\+[a-z].*" +syn match helpSpecialComment "\t[* ]SpecialComment\t\+[a-z].*" +syn match helpDebug "\t[* ]Debug\t\+[a-z].*" +syn match helpUnderlined "\t[* ]Underlined\t\+[a-z].*" +syn match helpError "\t[* ]Error\t\+[a-z].*" +syn match helpTodo "\t[* ]Todo\t\+[a-z].*" + + +" Additionally load a language-specific syntax file "help_ab.vim". +let i = match(expand("%"), '\.\a\ax$') +if i > 0 + exe "runtime syntax/help_" . strpart(expand("%"), i + 1, 2) . ".vim" +endif + +syn sync minlines=40 + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_help_syntax_inits") + if version < 508 + let did_help_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink helpExampleStart helpIgnore + HiLink helpIgnore Ignore + HiLink helpHyperTextJump Subtitle + HiLink helpHyperTextEntry String + HiLink helpHeadline Statement + HiLink helpHeader PreProc + HiLink helpSectionDelim PreProc + HiLink helpVim Identifier + HiLink helpExample Comment + HiLink helpOption Type + HiLink helpNotVi Special + HiLink helpSpecial Special + HiLink helpNote Todo + HiLink Subtitle Identifier + + HiLink helpComment Comment + HiLink helpConstant Constant + HiLink helpString String + HiLink helpCharacter Character + HiLink helpNumber Number + HiLink helpBoolean Boolean + HiLink helpFloat Float + HiLink helpIdentifier Identifier + HiLink helpFunction Function + HiLink helpStatement Statement + HiLink helpConditional Conditional + HiLink helpRepeat Repeat + HiLink helpLabel Label + HiLink helpOperator Operator + HiLink helpKeyword Keyword + HiLink helpException Exception + HiLink helpPreProc PreProc + HiLink helpInclude Include + HiLink helpDefine Define + HiLink helpMacro Macro + HiLink helpPreCondit PreCondit + HiLink helpType Type + HiLink helpStorageClass StorageClass + HiLink helpStructure Structure + HiLink helpTypedef Typedef + HiLink helpSpecialChar SpecialChar + HiLink helpTag Tag + HiLink helpDelimiter Delimiter + HiLink helpSpecialComment SpecialComment + HiLink helpDebug Debug + HiLink helpUnderlined Underlined + HiLink helpError Error + HiLink helpTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "help" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/hercules.vim b/runtime/syntax/hercules.vim new file mode 100644 index 000000000..02d8e9bb7 --- /dev/null +++ b/runtime/syntax/hercules.vim @@ -0,0 +1,133 @@ +" Vim syntax file +" Language: Hercules +" Maintainer: Dana Edwards <Dana_Edwards@avanticorp.com> +" Extensions: *.vc,*.ev,*.rs +" Last change: Nov. 9, 2001 +" Comment: Hercules physical IC design verification software ensures +" that an IC's physical design matches its logical design and +" satisfies manufacturing rules. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Ignore case +syn case ignore + +" Hercules runset sections +syn keyword herculesType header assign_property alias assign +syn keyword herculesType options preprocess_options +syn keyword herculesType explode_options technology_options +syn keyword herculesType drc_options database_options +syn keyword herculesType text_options lpe_options evaccess_options +syn keyword herculesType check_point compare_group environment +syn keyword herculesType grid_check include layer_stats load_group +syn keyword herculesType restart run_only self_intersect set snap +syn keyword herculesType system variable waiver + +" Hercules commands +syn keyword herculesStatement attach_property boolean cell_extent +syn keyword herculesStatement common_hierarchy connection_points +syn keyword herculesStatement copy data_filter alternate delete +syn keyword herculesStatement explode explode_all fill_pattern find_net +syn keyword herculesStatement flatten +syn keyword herculesStatement level negate polygon_features push +syn keyword herculesStatement rectangles relocate remove_overlap reverse select +syn keyword herculesStatement select_cell select_contains select_edge select_net size +syn keyword herculesStatement text_polygon text_property vertex area cut +syn keyword herculesStatement density enclose external inside_edge +syn keyword herculesStatement internal notch vectorize center_to_center +syn keyword herculesStatement length mask_align moscheck rescheck +syn keyword herculesStatement analysis buildsub init_lpe_db capacitor +syn keyword herculesStatement device gendev nmos pmos diode npn pnp +syn keyword herculesStatement resistor set_param save_property +syn keyword herculesStatement connect disconnect text text_boolean +syn keyword herculesStatement replace_text create_ports label graphics +syn keyword herculesStatement save_netlist_database lpe_stats netlist +syn keyword herculesStatement spice graphics_property graphics_netlist +syn keyword herculesStatement write_milkyway multi_rule_enclose +syn keyword herculesStatement if error_property equate compare +syn keyword herculesStatement antenna_fix c_thru dev_connect_check +syn keyword herculesStatement dev_net_count device_count net_filter +syn keyword herculesStatement net_path_check ratio process_text_opens + +" Hercules keywords +syn keyword herculesStatement black_box_file block compare_dir equivalence +syn keyword herculesStatement format gdsin_dir group_dir group_dir_usage +syn keyword herculesStatement inlib layout_path outlib output_format +syn keyword herculesStatement output_layout_path schematic schematic_format +syn keyword herculesStatement scheme_file output_block else +syn keyword herculesStatement and or not xor andoverlap inside outside by to +syn keyword herculesStatement with connected connected_all texted_with texted +syn keyword herculesStatement by_property cutting edge_touch enclosing inside +syn keyword herculesStatement inside_hole interact touching vertex + +" Hercules comments +syn region herculesComment start="/\*" skip="/\*" end="\*/" contains=herculesTodo +syn match herculesComment "//.*" contains=herculesTodo + +" Preprocessor directives +syn match herculesPreProc "^#.*" +syn match herculesPreProc "^@.*" +syn match herculesPreProc "macros" + +" Hercules COMMENT option +syn match herculesCmdCmnt "comment.*=.*" + +" Spacings, Resolutions, Ranges, Ratios, etc. +syn match herculesNumber "-\=\<[0-9]\+L\=\>\|0[xX][0-9]\+\>" + +" Parenthesis sanity checker +syn region herculesZone matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" transparent contains=ALLBUT,herculesError,herculesBraceError,herculesCurlyError +syn region herculesZone matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" transparent contains=ALLBUT,herculesError,herculesBraceError,herculesParenError +syn region herculesZone matchgroup=Delimiter start="\[" matchgroup=Delimiter end="]" transparent contains=ALLBUT,herculesError,herculesCurlyError,herculesParenError +syn match herculesError "[)\]}]" +syn match herculesBraceError "[)}]" contained +syn match herculesCurlyError "[)\]]" contained +syn match herculesParenError "[\]}]" contained + +" Hercules output format +"syn match herculesOutput "([0-9].*)" +"syn match herculesOutput "([0-9].*\;.*)" +syn match herculesOutput "perm\s*=.*(.*)" +syn match herculesOutput "temp\s*=\s*" +syn match herculesOutput "error\s*=\s*(.*)" + +"Modify the following as needed. The trade-off is performance versus functionality. +syn sync lines=100 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_hercules_syntax_inits") + if version < 508 + let did_hercules_syntax_inits = 1 + " Default methods for highlighting. + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink herculesStatement Statement + HiLink herculesType Type + HiLink herculesComment Comment + HiLink herculesPreProc PreProc + HiLink herculesTodo Todo + HiLink herculesOutput Include + HiLink herculesCmdCmnt Identifier + HiLink herculesNumber Number + HiLink herculesBraceError herculesError + HiLink herculesCurlyError herculesError + HiLink herculesParenError herculesError + HiLink herculesError Error + + delcommand HiLink +endif + +let b:current_syntax = "hercules" + +" vim: ts=8 diff --git a/runtime/syntax/hex.vim b/runtime/syntax/hex.vim new file mode 100644 index 000000000..40c655395 --- /dev/null +++ b/runtime/syntax/hex.vim @@ -0,0 +1,57 @@ +" Vim syntax file +" Language: Intel hex MCS51 +" Maintainer: Sams Ricahrd <sams@ping.at> +" Last Change: 2003 Apr 25 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" storage types + +syn match hexChecksum "[0-9a-fA-F]\{2}$" +syn match hexAdress "^:[0-9a-fA-F]\{6}" contains=hexDataByteCount +syn match hexRecType "^:[0-9a-fA-F]\{8}" contains=hexAdress +syn match hexDataByteCount contained "^:[0-9a-fA-F]\{2}" contains=hexStart +syn match hexStart contained "^:" +syn match hexExtAdrRec "^:02000002[0-9a-fA-F]\{4}" contains=hexSpecRec +syn match hexExtLinAdrRec "^:02000004[0-9a-fA-F]\{4}" contains=hexSpecRec +syn match hexSpecRec contained "^:0[02]00000[124]" contains=hexStart +syn match hexEOF "^:00000001" contains=hexStart + +syn case match + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_hex_syntax_inits") + if version < 508 + let did_hex_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + HiLink hexStart SpecialKey + HiLink hexDataByteCount Constant + HiLink hexAdress Comment + HiLink hexRecType WarningMsg + HiLink hexChecksum Search + HiLink hexExtAdrRec hexAdress + HiLink hexEOF hexSpecRec + HiLink hexExtLinAdrRec hexAdress + HiLink hexSpecRec DiffAdd + + delcommand HiLink +endif + +let b:current_syntax = "hex" + +" vim: ts=8 diff --git a/runtime/syntax/hitest.vim b/runtime/syntax/hitest.vim new file mode 100644 index 000000000..748910106 --- /dev/null +++ b/runtime/syntax/hitest.vim @@ -0,0 +1,149 @@ +" Vim syntax file +" Language: none; used to see highlighting +" Maintainer: Ronald Schild <rs@scutum.de> +" Last Change: 2001 Sep 02 +" Version: 5.4n.1 + +" To see your current highlight settings, do +" :so $VIMRUNTIME/syntax/hitest.vim + +" save global options and registers +let s:hidden = &hidden +let s:lazyredraw = &lazyredraw +let s:more = &more +let s:report = &report +let s:shortmess = &shortmess +let s:wrapscan = &wrapscan +let s:register_a = @a +let s:register_se = @/ + +" set global options +set hidden lazyredraw nomore report=99999 shortmess=aoOstTW wrapscan + +" print current highlight settings into register a +redir @a +highlight +redir END + +" Open a new window if the current one isn't empty +if line("$") != 1 || getline(1) != "" + new +endif + +" edit temporary file +edit Highlight\ test + +" set local options +setlocal autoindent noexpandtab formatoptions=t shiftwidth=16 noswapfile tabstop=16 +let &textwidth=&columns + +" insert highlight settings +% delete +put a + +" remove the colored xxx items +g/xxx /s///e + +" remove color settings (not needed here) +global! /links to/ substitute /\s.*$//e + +" move linked groups to the end of file +global /links to/ move $ + +" move linked group names to the matching preferred groups +% substitute /^\(\w\+\)\s*\(links to\)\s*\(\w\+\)$/\3\t\2 \1/e +global /links to/ normal mz3ElD0#$p'zdd + +" delete empty lines +global /^ *$/ delete + +" precede syntax command +% substitute /^[^ ]*/syn keyword &\t&/ + +" execute syntax commands +syntax clear +% yank a +@a + +" remove syntax commands again +% substitute /^syn keyword // + +" pretty formatting +global /^/ exe "normal Wi\<CR>\t\eAA\ex" +global /^\S/ join + +" find out first syntax highlighting +let b:various = &highlight.',:Normal,:Cursor,:,' +let b:i = 1 +while b:various =~ ':'.substitute(getline(b:i), '\s.*$', ',', '') + let b:i = b:i + 1 + if b:i > line("$") | break | endif +endwhile + +" insert headlines +call append(0, "Highlighting groups for various occasions") +call append(1, "-----------------------------------------") + +if b:i < line("$")-1 + let b:synhead = "Syntax highlighting groups" + if exists("hitest_filetypes") + redir @a + let + redir END + let @a = substitute(@a, 'did_\(\w\+\)_syn\w*_inits\s*#1', ', \1', 'g') + let @a = substitute(@a, "\n\\w[^\n]*", '', 'g') + let @a = substitute(@a, "\n", '', 'g') + let @a = substitute(@a, '^,', '', 'g') + if @a != "" + let b:synhead = b:synhead." - filetype" + if @a =~ ',' + let b:synhead = b:synhead."s" + endif + let b:synhead = b:synhead.":".@a + endif + endif + call append(b:i+1, "") + call append(b:i+2, b:synhead) + call append(b:i+3, substitute(b:synhead, '.', '-', 'g')) +endif + +" remove 'hls' highlighting +nohlsearch +normal 0 + +" add autocommands to remove temporary file from buffer list +aug highlighttest + au! + au BufUnload Highlight\ test if expand("<afile>") == "Highlight test" + au BufUnload Highlight\ test bdelete! Highlight\ test + au BufUnload Highlight\ test endif + au VimLeavePre * if bufexists("Highlight test") + au VimLeavePre * bdelete! Highlight\ test + au VimLeavePre * endif +aug END + +" we don't want to save this temporary file +set nomodified + +" the following trick avoids the "Press RETURN ..." prompt +0 append +. + +" restore global options and registers +let &hidden = s:hidden +let &lazyredraw = s:lazyredraw +let &more = s:more +let &report = s:report +let &shortmess = s:shortmess +let &wrapscan = s:wrapscan +let @a = s:register_a + +" restore last search pattern +call histdel("search", -1) +let @/ = s:register_se + +" remove variables +unlet s:hidden s:lazyredraw s:more s:report s:shortmess +unlet s:wrapscan s:register_a s:register_se + +" vim: ts=8 diff --git a/runtime/syntax/hog.vim b/runtime/syntax/hog.vim new file mode 100644 index 000000000..f39c171d3 --- /dev/null +++ b/runtime/syntax/hog.vim @@ -0,0 +1,350 @@ +" Snort syntax file +" Language: Snort Configuration File (see: http://www.snort.org) +" Maintainer: Phil Wood, cornett@arpa.net +" Last Change: $Date$ +" Filenames: *.hog *.rules snort.conf vision.conf +" URL: http://home.lanl.gov/cpw/vim/syntax/hog.vim +" Snort Version: 1.8 By Martin Roesch (roesch@clark.net, www.snort.org) +" TODO include all 1.8 syntax + +" For version 5.x: Clear all syntax items +if version < 600 + syntax clear +elseif exists("b:current_syntax") +" For version 6.x: Quit when a syntax file was already loaded + finish +endif + +syn match hogComment +\s\#[^\-:.%#=*].*$+lc=1 contains=hogTodo,hogCommentString +syn region hogCommentString contained oneline start='\S\s\+\#+'ms=s+1 end='\#' + +syn match hogJunk "\<\a\+|\s\+$" +syn match hogNumber contained "\<\d\+\>" +syn region hogText contained oneline start='\S' end=',' skipwhite +syn region hogTexts contained oneline start='\S' end=';' skipwhite + +" Environment Variables +" ===================== +"syn match hogEnvvar contained "[\!]\=\$\I\i*" +"syn match hogEnvvar contained "[\!]\=\${\I\i*}" +syn match hogEnvvar contained "\$\I\i*" +syn match hogEnvvar contained "[\!]\=\${\I\i*}" + + +" String handling lifted from vim.vim written by Dr. Charles E. Campbell, Jr. +" Try to catch strings, if nothing else matches (therefore it must precede the others!) +" vmEscapeBrace handles ["] []"] (ie. stays as string) +syn region hogEscapeBrace oneline contained transparent start="[^\\]\(\\\\\)*\[\^\=\]\=" skip="\\\\\|\\\]" end="\]"me=e-1 +syn match hogPatSep contained "\\[|()]" +syn match hogNotPatSep contained "\\\\" +syn region hogString oneline start=+[^:a-zA-Z\->!\\]"+hs=e+1 skip=+\\\\\|\\"+ end=+"\s*;+he=s-1 contains=hogEscapeBrace,hogPatSep,hogNotPatSep oneline +""syn region hogString oneline start=+[^:a-zA-Z>!\\]'+lc=1 skip=+\\\\\|\\'+ end=+'+ contains=hogEscapeBrace,vimPatSep,hogNotPatSep +"syn region hogString oneline start=+=!+lc=1 skip=+\\\\\|\\!+ end=+!+ contains=hogEscapeBrace,hogPatSep,hogNotPatSep +"syn region hogString oneline start="=+"lc=1 skip="\\\\\|\\+" end="+" contains=hogEscapeBrace,hogPatSep,hogNotPatSep +"syn region hogString oneline start="[^\\]+\s*[^a-zA-Z0-9.]"lc=1 skip="\\\\\|\\+" end="+" contains=hogEscapeBrace,hogPatSep,hogNotPatSep +"syn region hogString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=hogEscapeBrace,hogPatSep,hogNotPatSep +"syn match hogString contained +"[^"]*\\$+ skipnl nextgroup=hogStringCont +"syn match hogStringCont contained +\(\\\\\|.\)\{-}[^\\]"+ + + +" Beginners - Patterns that involve ^ +" +syn match hogLineComment +^[ \t]*#.*$+ contains=hogTodo,hogCommentString,hogCommentTitle +syn match hogCommentTitle '#\s*\u\a*\(\s\+\u\a*\)*:'ms=s+1 contained +syn keyword hogTodo contained TODO + +" Rule keywords +syn match hogARPCOpt contained "\d\+,\*,\*" +syn match hogARPCOpt contained "\d\+,\d\+,\*" +syn match hogARPCOpt contained "\d\+,\*,\d\+" +syn match hogARPCOpt contained "\d\+,\d\+,\d" +syn match hogATAGOpt contained "session" +syn match hogATAGOpt contained "host" +syn match hogATAGOpt contained "dst" +syn match hogATAGOpt contained "src" +syn match hogATAGOpt contained "seconds" +syn match hogATAGOpt contained "packets" +syn match hogATAGOpt contained "bytes" +syn keyword hogARespOpt contained rst_snd rst_rcv rst_all skipwhite +syn keyword hogARespOpt contained icmp_net icmp_host icmp_port icmp_all skipwhite +syn keyword hogAReactOpt contained block warn msg skipwhite +syn match hogAReactOpt contained "proxy\d\+" skipwhite +syn keyword hogAFOpt contained logto content_list skipwhite +syn keyword hogAIPOptVal contained eol nop ts sec lsrr lsrre satid ssrr rr skipwhite +syn keyword hogARefGrps contained arachnids skipwhite +syn keyword hogARefGrps contained bugtraq skipwhite +syn keyword hogARefGrps contained cve skipwhite +syn keyword hogSessionVal contained printable all skipwhite +syn match hogAFlagOpt contained "[0FSRPAUfsrpau21]\+" skipwhite +syn match hogAFragOpt contained "[DRMdrm]\+" skipwhite +" +" Output syslog options +" Facilities +syn keyword hogSysFac contained LOG_AUTH LOG_AUTHPRIV LOG_DAEMON LOG_LOCAL0 +syn keyword hogSysFac contained LOG_LOCAL1 LOG_LOCAL2 LOG_LOCAL3 LOG_LOCAL4 +syn keyword hogSysFac contained LOG_LOCAL5 LOG_LOCAL6 LOG_LOCAL7 LOG_USER +" Priorities +syn keyword hogSysPri contained LOG_EMERG ALERT LOG_CRIT LOG_ERR +syn keyword hogSysPri contained LOG_WARNING LOG_NOTICE LOG_INFO LOG_DEBUG +" Options +syn keyword hogSysOpt contained LOG_CONS LOG_NDELAY LOG_PERROR +syn keyword hogSysOpt contained LOG_PID +" RuleTypes +syn keyword hogRuleType contained log pass alert activate dynamic + +" Output log_database arguments and parameters +" Type of database followed by , +" syn keyword hogDBSQL contained mysql postgresql unixodbc +" Parameters param=constant +" are just various constants assigned to parameter names + +" Output log_database arguments and parameters +" Type of database followed by , +syn keyword hogDBType contained alert log +syn keyword hogDBSRV contained mysql postgresql unixodbc +" Parameters param=constant +" are just various constants assigned to parameter names +syn keyword hogDBParam contained dbname host port user password sensor_name + +" Output xml arguments and parameters +" xml args +syn keyword hogXMLArg contained log alert +syn keyword hogXMLParam contained file protocol host port cert key ca server sanitize encoding detail +" +" hog rule handler '(.*)' +syn region hogAOpt contained oneline start="rpc" end=":"me=e-1 nextgroup=hogARPCOptGrp skipwhite +syn region hogARPCOptGrp contained oneline start="."hs=s+1 end=";"me=e-1 contains=hogARPCOpt skipwhite + +syn region hogAOpt contained oneline start="tag" end=":"me=e-1 nextgroup=hogATAGOptGrp skipwhite +syn region hogATAGOptGrp contained oneline start="."hs=s+1 skip="," end=";"me=e-1 contains=hogATAGOpt,hogNumber skipwhite +" +syn region hogAOpt contained oneline start="nocase\|sameip" end=";"me=e-1 skipwhite oneline keepend +" +syn region hogAOpt contained start="resp" end=":"me=e-1 nextgroup=hogARespOpts skipwhite +syn region hogARespOpts contained oneline start="." end="[,;]" contains=hogARespOpt skipwhite nextgroup=hogARespOpts +" +syn region hogAOpt contained start="react" end=":"me=e-1 nextgroup=hogAReactOpts skipwhite +syn region hogAReactOpts contained oneline start="." end="[,;]" contains=hogAReactOpt skipwhite nextgroup=hogAReactOpts + +syn region hogAOpt contained oneline start="depth\|seq\|ttl\|ack\|icmp_seq\|activates\|activated_by\|dsize\|icode\|icmp_id\|count\|itype\|tos\|id\|offset" end=":"me=e-1 nextgroup=hogANOptGrp skipwhite +syn region hogANOptGrp contained oneline start="."hs=s+1 end=";"me=e-1 contains=hogNumber skipwhite oneline keepend + +syn region hogAOpt contained oneline start="classtype" end=":"me=e-1 nextgroup=hogAFileGrp skipwhite + +syn region hogAOpt contained oneline start="regex\|msg\|content" end=":"me=e-1 nextgroup=hogAStrGrp skipwhite +"syn region hogAStrGrp contained oneline start=+:\s*"+hs=s+1 skip="\\;" end=+"\s*;+he=s-1 contains=hogString skipwhite oneline keepend +syn region hogAStrGrp contained oneline start=+:\s*"\|:"+hs=s+1 skip="\\;" end=+"\s*;+he=s-1 contains=hogString skipwhite oneline keepend + +syn region hogAOpt contained oneline start="logto\|content-list" end=":"me=e-1 nextgroup=hogAFileGrp skipwhite +syn region hogAFileGrp contained oneline start="."hs=s+1 end=";"me=e-1 contains=hogFileName skipwhite + +syn region hogAOpt contained oneline start="reference" end=":"me=e-1 nextgroup=hogARefGrp skipwhite +syn region hogARefGrp contained oneline start="."hs=s+1 end=","me=e-1 contains=hogARefGrps nextgroup=hogARefName skipwhite +syn region hogARefName contained oneline start="."hs=s+1 end=";"me=e-1 contains=hogString,hogFileName,hogNumber skipwhite + +syn region hogAOpt contained oneline start="flags" end=":"he=s-1 nextgroup=hogAFlagOpt skipwhite oneline keepend + +syn region hogAOpt contained oneline start="fragbits" end=":"he=s-1 nextgroup=hogAFlagOpt skipwhite oneline keepend + +syn region hogAOpt contained oneline start="ipopts" end=":"he=s-1 nextgroup=hogAIPOptVal skipwhite oneline keepend + +"syn region hogAOpt contained oneline start="." end=":"he=s-1 contains=hogAFOpt nextgroup=hogFileName skipwhite + +syn region hogAOpt contained oneline start="session" end=":"he=s-1 nextgroup=hogSessionVal skipwhite + +syn match nothing "$" +syn region hogRules oneline contains=nothing start='$' end="$" +syn region hogRules oneline contains=hogRule start='('ms=s+1 end=")\s*$" skipwhite +syn region hogRule contained oneline start="." skip="\\;" end=";"he=s-1 contains=hogAOpts, skipwhite keepend +"syn region hogAOpts contained oneline start="." end="[;]"he=s-1 contains=hogAOpt skipwhite +syn region hogAOpts contained oneline start="." end="[;]"me=e-1 contains=hogAOpt skipwhite + + +" ruletype command +syn keyword hogRTypeStart skipwhite ruletype nextgroup=hogRuleName skipwhite +syn region hogRuleName contained start="." end="\s" contains=hogFileName nextgroup=hogRTypeRegion +" type ruletype sub type +syn region hogRtypeRegion contained start="{" end="}" nextgroup=hogRTypeStart +syn keyword hogRTypeStart skipwhite type nextgroup=hogRuleTypes skipwhite +syn region hogRuleTypes contained start="." end="\s" contains=hogRuleType nextgroup=hogOutStart + + +" var command +syn keyword hogVarStart skipwhite var nextgroup=hogVarIdent skipwhite +syn region hogVarIdent contained start="."hs=e+1 end="\s\+"he=s-1 contains=hogEnvvar nextgroup=hogVarRegion skipwhite +syn region hogVarRegion contained oneline start="." contains=hogIPaddr,hogEnvvar,hogNumber,hogString,hogFileName end="$"he=s-1 keepend skipwhite + +" config command +syn keyword hogConfigStart config skipwhite nextgroup=hogConfigType +syn match hogConfigType contained "\<classification\>" nextgroup=hogConfigTypeRegion skipwhite +syn region hogConfigTypeRegion contained oneline start=":"ms=s+1 end="$" contains=hogNumber,hogText keepend skipwhite + + +" include command +syn keyword hogIncStart include skipwhite nextgroup=hogIncRegion +syn region hogIncRegion contained oneline start="\>" contains=hogFileName,hogEnvvar end="$" keepend + +" preprocessor command +" http_decode, minfrag, portscan[-ignorehosts] +syn keyword hogPPrStart preprocessor skipwhite nextgroup=hogPPr +syn match hogPPr contained "\<spade\>" nextgroup=hogPPrRegion skipwhite +syn match hogPPr contained "\<spade-homenet\>" nextgroup=hogPPrRegion skipwhite +syn match hogPPr contained "\<spade-threshlearn\>" nextgroup=hogPPrRegion skipwhite +syn match hogPPr contained "\<spade-adapt\>" nextgroup=hogPPrRegion skipwhite +syn match hogPPr contained "\<spade-adapt2\>" nextgroup=hogPPrRegion skipwhite +syn match hogPPr contained "\<spade-adapt3\>" nextgroup=hogPPrRegion skipwhite +syn match hogPPr contained "\<spade-survey\>" nextgroup=hogPPrRegion skipwhite +syn match hogPPr contained "\<defrag\>" nextgroup=hogPPrRegion skipwhite +syn match hogPPr contained "\<telnet_decode\>" nextgroup=hogPPrRegion skipwhite +syn match hogPPr contained "\<rpc_decode\>" nextgroup=hogPPrRegion skipwhite +syn match hogPPr contained "\<bo\>" nextgroup=hogPPrRegion skipwhite +syn match hogPPr contained "\<stream\>" nextgroup=hogStreamRegion skipwhite +syn match hogPPr contained "\<stream2\>" nextgroup=hogStreamRegion skipwhite +syn match hogPPr contained "\<stream3\>" nextgroup=hogStreamRegion skipwhite +syn match hogPPr contained "\<http_decode\>" nextgroup=hogPPrRegion skipwhite +syn match hogPPr contained "\<minfrag\>" nextgroup=hogPPrRegion skipwhite +syn match hogPPr contained "\<portscan[-ignorehosts]*\>" nextgroup=hogPPrRegion skipwhite +syn region hogPPrRegion contained oneline start="$" end="$" keepend +syn region hogPPrRegion contained oneline start=":" end="$" contains=hogNumber,hogIPaddr,hogEnvvar,hogFileName keepend +syn keyword hogStreamArgs contained timeout ports maxbytes +syn region hogStreamRegion contained oneline start=":" end="$" contains=hogStreamArgs,hogNumber + +" output command +syn keyword hogOutStart output nextgroup=hogOut skipwhite +" +" alert_syslog +syn match hogOut contained "\<alert_syslog\>" nextgroup=hogSyslogRegion skipwhite +syn region hogSyslogRegion contained start=":" end="$" contains=hogSysFac,hogSysPri,hogSysOpt,hogEnvvar oneline skipwhite keepend +" +" alert_fast (full,smb,unixsock, and tcpdump) +syn match hogOut contained "\<alert_fast\|alert_full\|alert_smb\|alert_unixsock\|log_tcpdump\>" nextgroup=hogLogFileRegion skipwhite +syn region hogLogFileRegion contained start=":" end="$" contains=hogFileName,hogEnvvar oneline skipwhite keepend +" +" database +syn match hogOut contained "\<database\>" nextgroup=hogDBTypes skipwhite +syn region hogDBTypes contained start=":" end="," contains=hogDBType,hogEnvvar nextgroup=hogDBSRVs skipwhite +syn region hogDBSRVs contained start="\s\+" end="," contains=hogDBSRV nextgroup=hogDBParams skipwhite +syn region hogDBParams contained start="." end="="me=e-1 contains=hogDBParam nextgroup=hogDBValues +syn region hogDBValues contained start="." end="\>" contains=hogNumber,hogEnvvar,hogAscii nextgroup=hogDBParams oneline skipwhite +syn match hogAscii contained "\<\a\+" +" +" log_tcpdump +syn match hogOut contained "\<log_tcpdump\>" nextgroup=hogLogRegion skipwhite +syn region hogLogRegion oneline start=":" skipwhite end="$" contains=hogEnvvar,hogFileName keepend +" +" xml +syn keyword hogXMLTrans contained http https tcp iap +syn match hogOut contained "\<xml\>" nextgroup=hogXMLRegion skipwhite +syn region hogXMLRegion contained start=":" end="," contains=hogXMLArg,hogEnvvar nextgroup=hogXMLParams skipwhite +"syn region hogXMLParams contained start="." end="="me=e-1 contains=hogXMLProto nextgroup=hogXMLProtos +"syn region hogXMLProtos contained start="." end="\>" contains=hogXMLTrans nextgroup=hogXMLParams +syn region hogXMLParams contained start="." end="="me=e-1 contains=hogXMLParam nextgroup=hogXMLValue +syn region hogXMLValue contained start="." end="\>" contains=hogNumber,hogIPaddr,hogEnvvar,hogAscii,hogFileName nextgroup=hogXMLParams oneline skipwhite keepend +" +" Filename +syn match hogFileName contained "[-./[:alnum:]_~]\+" +syn match hogFileName contained "[-./[:alnum:]_~]\+" +" IP address +syn match hogIPaddr "\<\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\>" +syn match hogIPaddr "\<\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/\d\{1,2}\>" + +syn keyword hogProto tcp TCP ICMP icmp udp UDP + +" hog alert address port pairs +" hog IPaddresses +syn match hogIPaddrAndPort contained "\<\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\>" skipwhite nextgroup=hogPort +syn match hogIPaddrAndPort contained "\<\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/\d\{1,2}\>" skipwhite nextgroup=hogPort +syn match hogIPaddrAndPort contained "\<any\>" skipwhite nextgroup=hogPort +syn match hogIPaddrAndPort contained "\$\I\i*" nextgroup=hogPort skipwhite +syn match hogIPaddrAndPort contained "\${\I\i*}" nextgroup=hogPort skipwhite +"syn match hogPort contained "[\!]\=[\:]\=\d\+L\=\>" skipwhite +syn match hogPort contained "[\:]\=\d\+\>" +syn match hogPort contained "[\!]\=\<any\>" skipwhite +syn match hogPort contained "[\!]\=\d\+L\=:\d\+L\=\>" skipwhite + +" action commands +syn keyword hog7Functions activate skipwhite nextgroup=hogActRegion +syn keyword hog7Functions dynamic skipwhite nextgroup=hogActRegion +syn keyword hogActStart alert skipwhite nextgroup=hogActRegion +syn keyword hogActStart log skipwhite nextgroup=hogActRegion +syn keyword hogActStart pass skipwhite nextgroup=hogActRegion + +syn region hogActRegion contained oneline start="tcp\|TCP\|udp\|UDP\|icmp\|ICMP" end="\s\+"me=s-1 nextgroup=hogActSource oneline keepend skipwhite +syn region hogActSource contained oneline contains=hogIPaddrAndPort start="\s\+"ms=e+1 end="->\|<>"me=e-2 oneline keepend skipwhite nextgroup=hogActDest +syn region hogActDest contained oneline contains=hogIPaddrAndPort start="->\|<>" end="$" oneline keepend +syn region hogActDest contained oneline contains=hogIPaddrAndPort start="->\|<>" end="("me=e-1 oneline keepend skipwhite nextgroup=hogRules + + +" ==================== +if version >= 508 || !exists("did_hog_syn_inits") + if version < 508 + let did_hog_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif +" The default methods for highlighting. Can be overridden later + HiLink hogComment Comment + HiLink hogLineComment Comment + HiLink hogAscii Constant + HiLink hogCommentString Constant + HiLink hogFileName Constant + HiLink hogIPaddr Constant + HiLink hogNotPatSep Constant + HiLink hogNumber Constant + HiLink hogText Constant + HiLink hogString Constant + HiLink hogSysFac Constant + HiLink hogSysOpt Constant + HiLink hogSysPri Constant +" HiLink hogAStrGrp Error + HiLink hogJunk Error + HiLink hogEnvvar Identifier + HiLink hogIPaddrAndPort Identifier + HiLink hogVarIdent Identifier + HiLink hogATAGOpt PreProc + HiLink hogAIPOptVal PreProc + HiLink hogARespOpt PreProc + HiLink hogAReactOpt PreProc + HiLink hogAFlagOpt PreProc + HiLink hogAFragOpt PreProc + HiLink hogCommentTitle PreProc + HiLink hogDBType PreProc + HiLink hogDBSRV PreProc + HiLink hogPort PreProc + HiLink hogARefGrps PreProc + HiLink hogSessionVal PreProc + HiLink hogXMLArg PreProc + HiLink hogARPCOpt PreProc + HiLink hogPatSep Special + HiLink hog7Functions Statement + HiLink hogActStart Statement + HiLink hogIncStart Statement + HiLink hogConfigStart Statement + HiLink hogOutStart Statement + HiLink hogPPrStart Statement + HiLink hogVarStart Statement + HiLink hogRTypeStart Statement + HiLink hogTodo Todo + HiLink hogRuleType Type + HiLink hogAFOpt Type + HiLink hogANoVal Type + HiLink hogAStrOpt Type + HiLink hogANOpt Type + HiLink hogAOpt Type + HiLink hogDBParam Type + HiLink hogStreamArgs Type + HiLink hogOut Type + HiLink hogPPr Type + HiLink hogConfigType Type + HiLink hogActRegion Type + HiLink hogProto Type + HiLink hogXMLParam Type + HiLink resp Todo + HiLink cLabel Label + delcommand HiLink +endif + +let b:current_syntax = "hog" + +" hog: cpw=59 diff --git a/runtime/syntax/html.vim b/runtime/syntax/html.vim new file mode 100644 index 000000000..772babe78 --- /dev/null +++ b/runtime/syntax/html.vim @@ -0,0 +1,291 @@ +" Vim syntax file +" Language: HTML +" Maintainer: Claudio Fleiner <claudio@fleiner.com> +" URL: http://www.fleiner.com/vim/syntax/html.vim +" Last Change: 2004 May 16 + +" Please check :help html.vim for some comments and a description of the options + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if !exists("main_syntax") + if version < 600 + syntax clear + elseif exists("b:current_syntax") + finish + endif + let main_syntax = 'html' +endif + +" don't use standard HiLink, it will not work with included syntax files +if version < 508 + command! -nargs=+ HtmlHiLink hi link <args> +else + command! -nargs=+ HtmlHiLink hi def link <args> +endif + + +syn case ignore + +" mark illegal characters +syn match htmlError "[<>&]" + + +" tags +syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc +syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc +syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc +syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError +syn region htmlTag start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster +syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster +syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster +syn match htmlTagError contained "[^>]<"ms=s+1 + + +" tag names +syn keyword htmlTagName contained address applet area a base basefont +syn keyword htmlTagName contained big blockquote br caption center +syn keyword htmlTagName contained cite code dd dfn dir div dl dt font +syn keyword htmlTagName contained form hr html img +syn keyword htmlTagName contained input isindex kbd li link map menu +syn keyword htmlTagName contained meta ol option param pre p samp span +syn keyword htmlTagName contained select small strike sub sup +syn keyword htmlTagName contained table td textarea th tr tt ul var xmp +syn match htmlTagName contained "\<\(b\|i\|u\|h[1-6]\|em\|strong\|head\|body\|title\)\>" + +" new html 4.0 tags +syn keyword htmlTagName contained abbr acronym bdo button col label +syn keyword htmlTagName contained colgroup del fieldset iframe ins legend +syn keyword htmlTagName contained object optgroup q s tbody tfoot thead + +" legal arg names +syn keyword htmlArg contained action +syn keyword htmlArg contained align alink alt archive background bgcolor +syn keyword htmlArg contained border bordercolor cellpadding +syn keyword htmlArg contained cellspacing checked class clear code codebase color +syn keyword htmlArg contained cols colspan content coords enctype face +syn keyword htmlArg contained gutter height hspace id +syn keyword htmlArg contained link lowsrc marginheight +syn keyword htmlArg contained marginwidth maxlength method name prompt +syn keyword htmlArg contained rel rev rows rowspan scrolling selected shape +syn keyword htmlArg contained size src start target text type url +syn keyword htmlArg contained usemap ismap valign value vlink vspace width wrap +syn match htmlArg contained "\<\(http-equiv\|href\|title\)="me=e-1 + +" Netscape extensions +syn keyword htmlTagName contained frame noframes frameset nobr blink +syn keyword htmlTagName contained layer ilayer nolayer spacer +syn keyword htmlArg contained frameborder noresize pagex pagey above below +syn keyword htmlArg contained left top visibility clip id noshade +syn match htmlArg contained "\<z-index\>" + +" Microsoft extensions +syn keyword htmlTagName contained marquee + +" html 4.0 arg names +syn match htmlArg contained "\<\(accept-charset\|label\)\>" +syn keyword htmlArg contained abbr accept accesskey axis char charoff charset +syn keyword htmlArg contained cite classid codetype compact data datetime +syn keyword htmlArg contained declare defer dir disabled for frame +syn keyword htmlArg contained headers hreflang lang language longdesc +syn keyword htmlArg contained multiple nohref nowrap object profile readonly +syn keyword htmlArg contained rules scheme scope span standby style +syn keyword htmlArg contained summary tabindex valuetype version + +" special characters +syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};" + +" Comments (the real ones or the old netscape ones) +if exists("html_wrong_comments") + syn region htmlComment start=+<!--+ end=+--\s*>+ +else + syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentPart,htmlCommentError + syn match htmlCommentError contained "[^><!]" + syn region htmlCommentPart contained start=+--+ end=+--\s*+ contains=@htmlPreProc +endif +syn region htmlComment start=+<!DOCTYPE+ keepend end=+>+ + +" server-parsed commands +syn region htmlPreProc start=+<!--#+ end=+-->+ contains=htmlPreStmt,htmlPreError,htmlPreAttr +syn match htmlPreStmt contained "<!--#\(config\|echo\|exec\|fsize\|flastmod\|include\|printenv\|set\|if\|elif\|else\|endif\|geoguide\)\>" +syn match htmlPreError contained "<!--#\S*"ms=s+4 +syn match htmlPreAttr contained "\w\+=[^"]\S\+" contains=htmlPreProcAttrError,htmlPreProcAttrName +syn region htmlPreAttr contained start=+\w\+="+ skip=+\\\\\|\\"+ end=+"+ contains=htmlPreProcAttrName keepend +syn match htmlPreProcAttrError contained "\w\+="he=e-1 +syn match htmlPreProcAttrName contained "\(expr\|errmsg\|sizefmt\|timefmt\|var\|cgi\|cmd\|file\|virtual\|value\)="he=e-1 + +if !exists("html_no_rendering") + " rendering + syn cluster htmlTop contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,javaScript,@htmlPreproc + + syn region htmlBold start="<b\>" end="</b>"me=e-4 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic + syn region htmlBold start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic + syn region htmlBoldUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic + syn region htmlBoldItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop,htmlBoldItalicUnderline + syn region htmlBoldItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop,htmlBoldItalicUnderline + syn region htmlBoldUnderlineItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop + syn region htmlBoldUnderlineItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop + syn region htmlBoldItalicUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic + + syn region htmlUnderline start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlUnderlineBold,htmlUnderlineItalic + syn region htmlUnderlineBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop,htmlUnderlineBoldItalic + syn region htmlUnderlineBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop,htmlUnderlineBoldItalic + syn region htmlUnderlineItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop,htmlUnderlineItalicBold + syn region htmlUnderlineItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop,htmlUnderlineItalicBold + syn region htmlUnderlineItalicBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop + syn region htmlUnderlineItalicBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop + syn region htmlUnderlineBoldItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop + syn region htmlUnderlineBoldItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop + + syn region htmlItalic start="<i\>" end="</i>"me=e-4 contains=@htmlTop,htmlItalicBold,htmlItalicUnderline + syn region htmlItalic start="<em\>" end="</em>"me=e-5 contains=@htmlTop + syn region htmlItalicBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop,htmlItalicBoldUnderline + syn region htmlItalicBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop,htmlItalicBoldUnderline + syn region htmlItalicBoldUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop + syn region htmlItalicUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlItalicUnderlineBold + syn region htmlItalicUnderlineBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop + syn region htmlItalicUnderlineBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop + + syn region htmlLink start="<a\>\_[^>]*\<href\>" end="</a>"me=e-4 contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc + syn region htmlH1 start="<h1\>" end="</h1>"me=e-5 contains=@htmlTop + syn region htmlH2 start="<h2\>" end="</h2>"me=e-5 contains=@htmlTop + syn region htmlH3 start="<h3\>" end="</h3>"me=e-5 contains=@htmlTop + syn region htmlH4 start="<h4\>" end="</h4>"me=e-5 contains=@htmlTop + syn region htmlH5 start="<h5\>" end="</h5>"me=e-5 contains=@htmlTop + syn region htmlH6 start="<h6\>" end="</h6>"me=e-5 contains=@htmlTop + syn region htmlHead start="<head\>" end="</head>"me=e-7 end="<body\>"me=e-5 end="<h[1-6]\>"me=e-3 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,htmlTitle,javaScript,cssStyle,@htmlPreproc + syn region htmlTitle start="<title\>" end="</title>"me=e-8 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc +endif + +syn keyword htmlTagName contained noscript +syn keyword htmlSpecialTagName contained script style +if main_syntax != 'java' || exists("java_javascript") + " JAVA SCRIPT + syn include @htmlJavaScript <sfile>:p:h/javascript.vim + unlet b:current_syntax + syn region javaScript start=+<script[^>]*>+ keepend end=+</script>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc + syn region htmlScriptTag contained start=+<script+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent + HtmlHiLink htmlScriptTag htmlTag + + " html events (i.e. arguments that include javascript commands) + if exists("html_extended_events") + syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ contains=htmlEventSQ + syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ contains=htmlEventDQ + else + syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ keepend contains=htmlEventSQ + syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ keepend contains=htmlEventDQ + endif + syn region htmlEventSQ contained start=+'+ms=s+1 end=+'+me=s-1 contains=@htmlJavaScript + syn region htmlEventDQ contained start=+"+ms=s+1 end=+"+me=s-1 contains=@htmlJavaScript + HtmlHiLink htmlEventSQ htmlEvent + HtmlHiLink htmlEventDQ htmlEvent + + " a javascript expression is used as an arg value + syn region javaScriptExpression contained start=+&{+ keepend end=+};+ contains=@htmlJavaScript,@htmlPreproc +endif + +if main_syntax != 'java' || exists("java_vb") + " VB SCRIPT + syn include @htmlVbScript <sfile>:p:h/vb.vim + unlet b:current_syntax + syn region javaScript start=+<script [^>]*language *=[^>]*vbscript[^>]*>+ keepend end=+</script>+me=s-1 contains=@htmlVbScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc +endif + +syn cluster htmlJavaScript add=@htmlPreproc + +if main_syntax != 'java' || exists("java_css") + " embedded style sheets + syn keyword htmlArg contained media + syn include @htmlCss <sfile>:p:h/css.vim + unlet b:current_syntax + syn region cssStyle start=+<style+ keepend end=+</style>+ contains=@htmlCss,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc + syn match htmlCssStyleComment contained "\(<!--\|-->\)" + syn region htmlCssDefinition matchgroup=htmlArg start='style="' keepend matchgroup=htmlString end='"' contains=css.*Attr,css.*Prop,cssComment,cssLength,cssColor,cssURL,cssImportant,cssError,cssString,@htmlPreproc + HtmlHiLink htmlStyleArg htmlString +endif + +if main_syntax == "html" + " synchronizing (does not always work if a comment includes legal + " html tags, but doing it right would mean to always start + " at the first line, which is too slow) + syn sync match htmlHighlight groupthere NONE "<[/a-zA-Z]" + syn sync match htmlHighlight groupthere javaScript "<script" + syn sync match htmlHighlightSkip "^.*['\"].*$" + syn sync minlines=10 +endif + +" The default highlighting. +if version >= 508 || !exists("did_html_syn_inits") + if version < 508 + let did_html_syn_inits = 1 + endif + HtmlHiLink htmlTag Function + HtmlHiLink htmlEndTag Identifier + HtmlHiLink htmlArg Type + HtmlHiLink htmlTagName htmlStatement + HtmlHiLink htmlSpecialTagName Exception + HtmlHiLink htmlValue String + HtmlHiLink htmlSpecialChar Special + + if !exists("html_no_rendering") + HtmlHiLink htmlH1 Title + HtmlHiLink htmlH2 htmlH1 + HtmlHiLink htmlH3 htmlH2 + HtmlHiLink htmlH4 htmlH3 + HtmlHiLink htmlH5 htmlH4 + HtmlHiLink htmlH6 htmlH5 + HtmlHiLink htmlHead PreProc + HtmlHiLink htmlTitle Title + HtmlHiLink htmlBoldItalicUnderline htmlBoldUnderlineItalic + HtmlHiLink htmlUnderlineBold htmlBoldUnderline + HtmlHiLink htmlUnderlineItalicBold htmlBoldUnderlineItalic + HtmlHiLink htmlUnderlineBoldItalic htmlBoldUnderlineItalic + HtmlHiLink htmlItalicUnderline htmlUnderlineItalic + HtmlHiLink htmlItalicBold htmlBoldItalic + HtmlHiLink htmlItalicBoldUnderline htmlBoldUnderlineItalic + HtmlHiLink htmlItalicUnderlineBold htmlBoldUnderlineItalic + HtmlHiLink htmlLink Underlined + if !exists("html_my_rendering") + hi def htmlBold term=bold cterm=bold gui=bold + hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline + hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic + hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline + hi def htmlUnderline term=underline cterm=underline gui=underline + hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline + hi def htmlItalic term=italic cterm=italic gui=italic + endif + endif + + HtmlHiLink htmlPreStmt PreProc + HtmlHiLink htmlPreError Error + HtmlHiLink htmlPreProc PreProc + HtmlHiLink htmlPreAttr String + HtmlHiLink htmlPreProcAttrName PreProc + HtmlHiLink htmlPreProcAttrError Error + HtmlHiLink htmlSpecial Special + HtmlHiLink htmlSpecialChar Special + HtmlHiLink htmlString String + HtmlHiLink htmlStatement Statement + HtmlHiLink htmlComment Comment + HtmlHiLink htmlCommentPart Comment + HtmlHiLink htmlValue String + HtmlHiLink htmlCommentError htmlError + HtmlHiLink htmlTagError htmlError + HtmlHiLink htmlEvent javaScript + HtmlHiLink htmlError Error + + HtmlHiLink javaScript Special + HtmlHiLink javaScriptExpression javaScript + HtmlHiLink htmlCssStyleComment Comment + HtmlHiLink htmlCssDefinition Special +endif + +delcommand HtmlHiLink + +let b:current_syntax = "html" + +if main_syntax == 'html' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/runtime/syntax/htmlcheetah.vim b/runtime/syntax/htmlcheetah.vim new file mode 100644 index 000000000..f57df90de --- /dev/null +++ b/runtime/syntax/htmlcheetah.vim @@ -0,0 +1,32 @@ +" Vim syntax file +" Language: HTML with Cheetah tags +" Maintainer: Max Ischenko <mfi@ukr.net> +" Last Change: 2003-05-11 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'html' +endif + +if version < 600 + so <sfile>:p:h/cheetah.vim + so <sfile>:p:h/html.vim +else + runtime! syntax/cheetah.vim + runtime! syntax/html.vim + unlet b:current_syntax +endif + +syntax cluster htmlPreproc add=cheetahPlaceHolder +syntax cluster htmlString add=cheetahPlaceHolder + +let b:current_syntax = "htmlcheetah" + + diff --git a/runtime/syntax/htmlm4.vim b/runtime/syntax/htmlm4.vim new file mode 100644 index 000000000..3119d2d1a --- /dev/null +++ b/runtime/syntax/htmlm4.vim @@ -0,0 +1,41 @@ +" Vim syntax file +" Language: HTML and M4 +" Maintainer: Claudio Fleiner <claudio@fleiner.com> +" URL: http://www.fleiner.com/vim/syntax/htmlm4.vim +" Last Change: 2001 Apr 30 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" we define it here so that included files can test for it +if !exists("main_syntax") + let main_syntax='htmlm4' +endif + +if version < 600 + so <sfile>:p:h/html.vim +else + runtime! syntax/html.vim +endif +unlet b:current_syntax +syn case match + +if version < 600 + so <sfile>:p:h/m4.vim +else + runtime! syntax/m4.vim +endif +unlet b:current_syntax +syn cluster htmlPreproc add=@m4Top +syn cluster m4StringContents add=htmlTag,htmlEndTag + +let b:current_syntax = "htmlm4" + +if main_syntax == 'htmlm4' + unlet main_syntax +endif diff --git a/runtime/syntax/htmlos.vim b/runtime/syntax/htmlos.vim new file mode 100644 index 000000000..f31b9f654 --- /dev/null +++ b/runtime/syntax/htmlos.vim @@ -0,0 +1,166 @@ +" Vim syntax file +" Language: HTML/OS by Aestiva +" Maintainer: Jason Rust <jrust@westmont.edu> +" URL: http://www.rustyparts.com/vim/syntax/htmlos.vim +" Info: http://www.rustyparts.com/scripts.php +" Last Change: 2003 May 11 +" + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'htmlos' +endif + +if version < 600 + so <sfile>:p:h/html.vim +else + runtime! syntax/html.vim + unlet b:current_syntax +endif + +syn cluster htmlPreproc add=htmlosRegion + +syn case ignore + +" Function names +syn keyword htmlosFunctions expand sleep getlink version system ascii getascii syslock sysunlock cr lf clean postprep listtorow split listtocol coltolist rowtolist tabletolist contained +syn keyword htmlosFunctions cut \display cutall cutx cutallx length reverse lower upper proper repeat left right middle trim trimleft trimright count countx locate locatex replace replacex replaceall replaceallx paste pasteleft pasteleftx pasteleftall pasteleftallx pasteright pasterightall pasterightallx chopleft chopleftx chopright choprightx format concat contained +syn keyword htmlosFunctions goto exitgoto contained +syn keyword htmlosFunctions layout cols rows row items getitem putitem switchitems gettable delrow delrows delcol delcols append merge fillcol fillrow filltable pastetable getcol getrow fillindexcol insindexcol dups nodups maxtable mintable maxcol mincol maxrow minrow avetable avecol averow mediantable mediancol medianrow producttable productcol productrow sumtable sumcol sumrow sumsqrtable sumsqrcol sumsqrrow reversecols reverserows switchcols switchrows inscols insrows insfillcol sortcol reversesortcol sortcoln reversesortcoln sortrow sortrown reversesortrow reversesortrown getcoleq getcoleqn getcolnoteq getcolany getcolbegin getcolnotany getcolnotbegin getcolge getcolgt getcolle getcollt getcolgen getcolgtn getcollen getcoltn getcolend getcolnotend getrowend getrownotend getcolin getcolnotin getcolinbegin getcolnotinbegin getcolinend getcolnotinend getrowin getrownotin getrowinbegin getrownotinbegin getrowinend getrownotinend contained +syn keyword htmlosFunctions dbcreate dbadd dbedit dbdelete dbsearch dbsearchsort dbget dbgetsort dbstatus dbindex dbimport dbfill dbexport dbsort dbgetrec dbremove dbpurge dbfind dbfindsort dbunique dbcopy dbmove dbkill dbtransfer dbpoke dbsearchx dbgetx contained +syn keyword htmlosFunctions syshtmlosname sysstartname sysfixfile fileinfo filelist fileindex domainname page browser regdomain username usernum getenv httpheader copy file ts row sysls syscp sysmv sysmd sysrd filepush filepushlink dirname contained +syn keyword htmlosFunctions mail to address subject netmail netmailopen netmailclose mailfilelist netweb netwebresults webpush netsockopen netsockread netsockwrite netsockclose contained +syn keyword htmlosFunctions today time systime now yesterday tomorrow getday getmonth getyear getminute getweekday getweeknum getyearday getdate gettime getamorpm gethour addhours addminutes adddays timebetween timetill timefrom datetill datefrom mixedtimebetween mixeddatetill mixedtimetill mixedtimefrom mixeddatefrom nextdaybyweekfromdate nextdaybyweekfromtoday nextdaybymonthfromdate nextdaybymonthfromtoday nextdaybyyearfromdate nextdaybyyearfromtoday offsetdaybyweekfromdate offsetdaybyweekfromtoday offsetdaybymonthfromdate offsetdaybymonthfromtoday contained +syn keyword htmlosFunctions isprivate ispublic isfile isdir isblank iserror iserror iseven isodd istrue isfalse islogical istext istag isnumber isinteger isdate istableeq istableeqx istableeqn isfuture ispast istoday isweekday isweekend issamedate iseq isnoteq isge isle ismod10 isvalidstring contained +syn keyword htmlosFunctions celtof celtokel ftocel ftokel keltocel keltof cmtoin intocm fttom mtoft fttomile miletoft kmtomile miletokm mtoyd ydtom galtoltr ltrtogal ltrtoqt qttoltr gtooz oztog kgtolb lbtokg mttoton tontomt contained +syn keyword htmlosFunctions max min abs sign inverse square sqrt cube roundsig round ceiling roundup floor rounddown roundeven rounddowneven roundupeven roundodd roundupodd rounddownodd random factorial summand fibonacci remainder mod radians degrees cos sin tan cotan secant cosecant acos asin atan exp power power10 ln log10 log sinh cosh tanh contained +syn keyword htmlosFunctions xmldelete xmldeletex xmldeleteattr xmldeleteattrx xmledit xmleditx xmleditvalue xmleditvaluex xmleditattr xmleditattrx xmlinsertbefore xmlinsertbeforex smlinsertafter xmlinsertafterx xmlinsertattr xmlinsertattrx smlget xmlgetx xmlgetvalue xmlgetvaluex xmlgetattrvalue xmlgetattrvaluex xmlgetrec xmlgetrecx xmlgetrecattrvalue xmlgetrecattrvaluex xmlchopleftbefore xmlchopleftbeforex xmlchoprightbefore xmlchoprightbeforex xmlchopleftafter xmlchopleftafterx xmlchoprightafter xmlchoprightafterx xmllocatebefore xmllocatebeforex xmllocateafter xmllocateafterx contained + +" Type +syn keyword htmlosType int str dol flt dat grp contained + +" StorageClass +syn keyword htmlosStorageClass locals contained + +" Operator +syn match htmlosOperator "[-=+/\*!]" contained +syn match htmlosRelation "[~]" contained +syn match htmlosRelation "[=~][&!]" contained +syn match htmlosRelation "[!=<>]=" contained +syn match htmlosRelation "[<>]" contained + +" Comment +syn region htmlosComment start="#" end="/#" contained + +" Conditional +syn keyword htmlosConditional if then /if to else elif contained +syn keyword htmlosConditional and or nand nor xor not contained +" Repeat +syn keyword htmlosRepeat while do /while for /for contained + +" Keyword +syn keyword htmlosKeyword name value step do rowname colname rownum contained + +" Repeat +syn keyword htmlosLabel case matched /case switch contained + +" Statement +syn keyword htmlosStatement break exit return continue contained + +" Identifier +syn match htmlosIdentifier "\h\w*[\.]*\w*" contained + +" Special identifier +syn match htmlosSpecialIdentifier "[\$@]" contained + +" Define +syn keyword htmlosDefine function overlay contained + +" Boolean +syn keyword htmlosBoolean true false contained + +" String +syn region htmlosStringDouble keepend matchgroup=None start=+"+ end=+"+ contained +syn region htmlosStringSingle keepend matchgroup=None start=+'+ end=+'+ contained + +" Number +syn match htmlosNumber "-\=\<\d\+\>" contained + +" Float +syn match htmlosFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained + +" Error +syn match htmlosError "ERROR" contained + +" Parent +syn match htmlosParent "[({[\]})]" contained + +" Todo +syn keyword htmlosTodo TODO Todo todo contained + +syn cluster htmlosInside contains=htmlosComment,htmlosFunctions,htmlosIdentifier,htmlosSpecialIdentifier,htmlosConditional,htmlosRepeat,htmlosLabel,htmlosStatement,htmlosOperator,htmlosRelation,htmlosStringSingle,htmlosStringDouble,htmlosNumber,htmlosFloat,htmlosError,htmlosKeyword,htmlosType,htmlosBoolean,htmlosParent + +syn cluster htmlosTop contains=@htmlosInside,htmlosDefine,htmlosError,htmlosStorageClass + +syn region htmlosRegion keepend matchgroup=Delimiter start="<<" skip=+".\{-}?>.\{-}"\|'.\{-}?>.\{-}'\|/\*.\{-}?>.\{-}\*/+ end=">>" contains=@htmlosTop +syn region htmlosRegion keepend matchgroup=Delimiter start="\[\[" skip=+".\{-}?>.\{-}"\|'.\{-}?>.\{-}'\|/\*.\{-}?>.\{-}\*/+ end="\]\]" contains=@htmlosTop + + +" sync +if exists("htmlos_minlines") + exec "syn sync minlines=" . htmlos_minlines +else + syn sync minlines=100 +endif + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_htmlos_syn_inits") + if version < 508 + let did_htmlos_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + HiLink htmlosSpecialIdentifier Operator + HiLink htmlosIdentifier Identifier + HiLink htmlosStorageClass StorageClass + HiLink htmlosComment Comment + HiLink htmlosBoolean Boolean + HiLink htmlosStringSingle String + HiLink htmlosStringDouble String + HiLink htmlosNumber Number + HiLink htmlosFloat Float + HiLink htmlosFunctions Function + HiLink htmlosRepeat Repeat + HiLink htmlosConditional Conditional + HiLink htmlosLabel Label + HiLink htmlosStatement Statement + HiLink htmlosKeyword Statement + HiLink htmlosType Type + HiLink htmlosDefine Define + HiLink htmlosParent Delimiter + HiLink htmlosError Error + HiLink htmlosTodo Todo + HiLink htmlosOperator Operator + HiLink htmlosRelation Operator + + delcommand HiLink +endif +let b:current_syntax = "htmlos" + +if main_syntax == 'htmlos' + unlet main_syntax +endif + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/ia64.vim b/runtime/syntax/ia64.vim new file mode 100644 index 000000000..d6292ce63 --- /dev/null +++ b/runtime/syntax/ia64.vim @@ -0,0 +1,312 @@ +" Vim syntax file +" Language: IA-64 (Itanium) assembly language +" Maintainer: Parth Malwankar <pmalwankar@yahoo.com> +" URL: http://www.geocities.com/pmalwankar (Home Page with link to my Vim page) +" http://www.geocities.com/pmalwankar/vim.htm (for VIM) +" File Version: 0.7 +" Last Change: 2004 May 04 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + +"ignore case for assembly +syn case ignore + +" Identifier Keyword characters (defines \k) +if version >= 600 + setlocal iskeyword=@,48-57,#,$,.,:,?,@-@,_,~ +else + set iskeyword=@,48-57,#,$,.,:,?,@-@,_,~ +endif + +syn sync minlines=5 + +" Read the MASM syntax to start with +" This is needed as both IA-64 as well as IA-32 instructions are supported +source <sfile>:p:h/masm.vim + +syn region ia64Comment start="//" end="$" contains=ia64Todo +syn region ia64Comment start="/\*" end="\*/" contains=ia64Todo + +syn match ia64Identifier "[a-zA-Z_$][a-zA-Z0-9_$]*" +syn match ia64Directive "\.[a-zA-Z_$][a-zA-Z_$.]\+" +syn match ia64Label "[a-zA-Z_$.][a-zA-Z0-9_$.]*\s\=:\>"he=e-1 +syn match ia64Label "[a-zA-Z_$.][a-zA-Z0-9_$.]*\s\=::\>"he=e-2 +syn match ia64Label "[a-zA-Z_$.][a-zA-Z0-9_$.]*\s\=#\>"he=e-1 +syn region ia64string start=+L\="+ skip=+\\\\\|\\"+ end=+"+ +syn match ia64Octal "0[0-7_]*\>" +syn match ia64Binary "0[bB][01_]*\>" +syn match ia64Hex "0[xX][0-9a-fA-F_]*\>" +syn match ia64Decimal "[1-9_][0-9_]*\>" +syn match ia64Float "[0-9_]*\.[0-9_]*\([eE][+-]\=[0-9_]*\)\=\>" + +"simple instructions +syn keyword ia64opcode add adds addl addp4 alloc and andcm cover epc +syn keyword ia64opcode fabs fand fandcm fc flushrs fneg fnegabs for +syn keyword ia64opcode fpabs fpack fpneg fpnegabs fselect fand fabdcm +syn keyword ia64opcode fc fwb fxor loadrs movl mux1 mux2 or padd4 +syn keyword ia64opcode pavgsub1 pavgsub2 popcnt psad1 pshl2 pshl4 pshladd2 +syn keyword ia64opcode pshradd2 psub4 rfi rsm rum shl shladd shladdp4 +syn keyword ia64opcode shrp ssm sub sum sync.i tak thash +syn keyword ia64opcode tpa ttag xor + +"put to override these being recognized as floats. They are orignally from masm.vim +"put here to avoid confusion with float +syn match ia64Directive "\.186" +syn match ia64Directive "\.286" +syn match ia64Directive "\.286c" +syn match ia64Directive "\.286p" +syn match ia64Directive "\.287" +syn match ia64Directive "\.386" +syn match ia64Directive "\.386c" +syn match ia64Directive "\.386p" +syn match ia64Directive "\.387" +syn match ia64Directive "\.486" +syn match ia64Directive "\.486c" +syn match ia64Directive "\.486p" +syn match ia64Directive "\.8086" +syn match ia64Directive "\.8087" + + + +"delimiters +syn match ia64delimiter ";;" + +"operators +syn match ia64operators "[\[\]()#,]" +syn match ia64operators "\(+\|-\|=\)" + +"TODO +syn match ia64Todo "\(TODO\|XXX\|FIXME\|NOTE\)" + +"What follows is a long list of regular expressions for parsing the +"ia64 instructions that use many completers + +"br +syn match ia64opcode "br\(\(\.\(cond\|call\|ret\|ia\|cloop\|ctop\|cexit\|wtop\|wexit\)\)\=\(\.\(spnt\|dpnt\|sptk\|dptk\)\)\=\(\.few\|\.many\)\=\(\.clr\)\=\)\=\>" +"break +syn match ia64opcode "break\(\.[ibmfx]\)\=\>" +"brp +syn match ia64opcode "brp\(\.\(sptk\|dptk\|loop\|exit\)\)\(\.imp\)\=\>" +syn match ia64opcode "brp\.ret\(\.\(sptk\|dptk\)\)\{1}\(\.imp\)\=\>" +"bsw +syn match ia64opcode "bsw\.[01]\>" +"chk +syn match ia64opcode "chk\.\(s\(\.[im]\)\=\)\>" +syn match ia64opcode "chk\.a\.\(clr\|nc\)\>" +"clrrrb +syn match ia64opcode "clrrrb\(\.pr\)\=\>" +"cmp/cmp4 +syn match ia64opcode "cmp4\=\.\(eq\|ne\|l[te]\|g[te]\|[lg]tu\|[lg]eu\)\(\.unc\)\=\>" +syn match ia64opcode "cmp4\=\.\(eq\|[lgn]e\|[lg]t\)\.\(\(or\(\.andcm\|cm\)\=\)\|\(and\(\(\.or\)\=cm\)\=\)\)\>" +"cmpxchg +syn match ia64opcode "cmpxchg[1248]\.\(acq\|rel\)\(\.nt1\|\.nta\)\=\>" +"czx +syn match ia64opcode "czx[12]\.[lr]\>" +"dep +syn match ia64opcode "dep\(\.z\)\=\>" +"extr +syn match ia64opcode "extr\(\.u\)\=\>" +"fadd +syn match ia64opcode "fadd\(\.[sd]\)\=\(\.s[0-3]\)\=\>" +"famax/famin +syn match ia64opcode "fa\(max\|min\)\(\.s[0-3]\)\=\>" +"fchkf/fmax/fmin +syn match ia64opcode "f\(chkf\|max\|min\)\(\.s[0-3]\)\=\>" +"fclass +syn match ia64opcode "fclass\(\.n\=m\)\(\.unc\)\=\>" +"fclrf/fpamax +syn match ia64opcode "f\(clrf\|pamax\|pamin\)\(\.s[0-3]\)\=\>" +"fcmp +syn match ia64opcode "fcmp\.\(n\=[lg][te]\|n\=eq\|\(un\)\=ord\)\(\.unc\)\=\(\.s[0-3]\)\=\>" +"fcvt/fcvt.xf/fcvt.xuf.pc.sf +syn match ia64opcode "fcvt\.\(\(fxu\=\(\.trunc\)\=\(\.s[0-3]\)\=\)\|\(xf\|xuf\(\.[sd]\)\=\(\.s[0-3]\)\=\)\)\>" +"fetchadd +syn match ia64opcode "fetchadd[48]\.\(acq\|rel\)\(\.nt1\|\.nta\)\=\>" +"fma/fmpy/fms +syn match ia64opcode "fm\([as]\|py\)\(\.[sd]\)\=\(\.s[0-3]\)\=\>" +"fmerge/fpmerge +syn match ia64opcode "fp\=merge\.\(ns\|se\=\)\>" +"fmix +syn match ia64opcode "fmix\.\(lr\|[lr]\)\>" +"fnma/fnorm/fnmpy +syn match ia64opcode "fn\(ma\|mpy\|orm\)\(\.[sd]\)\=\(\.s[0-3]\)\=\>" +"fpcmp +syn match ia64opcode "fpcmp\.\(n\=[lg][te]\|n\=eq\|\(un\)\=ord\)\(\.s[0-3]\)\=\>" +"fpcvt +syn match ia64opcode "fpcvt\.fxu\=\(\(\.trunc\)\=\(\.s[0-3]\)\=\)\>" +"fpma/fpmax/fpmin/fpmpy/fpms/fpnma/fpnmpy/fprcpa/fpsqrta +syn match ia64opcode "fp\(max\=\|min\|n\=mpy\|ms\|nma\|rcpa\|sqrta\)\(\.s[0-3]\)\=\>" +"frcpa/frsqrta +syn match ia64opcode "fr\(cpa\|sqrta\)\(\.s[0-3]\)\=\>" +"fsetc/famin/fchkf +syn match ia64opcode "f\(setc\|amin\|chkf\)\(\.s[0-3]\)\=\>" +"fsub +syn match ia64opcode "fsub\(\.[sd]\)\=\(\.s[0-3]\)\=\>" +"fswap +syn match ia64opcode "fswap\(\.n[lr]\=\)\=\>" +"fsxt +syn match ia64opcode "fsxt\.[lr]\>" +"getf +syn match ia64opcode "getf\.\([sd]\|exp\|sig\)\>" +"invala +syn match ia64opcode "invala\(\.[ae]\)\=\>" +"itc/itr +syn match ia64opcode "it[cr]\.[id]\>" +"ld +syn match ia64opcode "ld[1248]\>\|ld[1248]\(\.\(sa\=\|a\|c\.\(nc\|clr\(\.acq\)\=\)\|acq\|bias\)\)\=\(\.nt[1a]\)\=\>" +syn match ia64opcode "ld8\.fill\(\.nt[1a]\)\=\>" +"ldf +syn match ia64opcode "ldf[sde8]\(\(\.\(sa\=\|a\|c\.\(nc\|clr\)\)\)\=\(\.nt[1a]\)\=\)\=\>" +syn match ia64opcode "ldf\.fill\(\.nt[1a]\)\=\>" +"ldfp +syn match ia64opcode "ldfp[sd8]\(\(\.\(sa\=\|a\|c\.\(nc\|clr\)\)\)\=\(\.nt[1a]\)\=\)\=\>" +"lfetch +syn match ia64opcode "lfetch\(\.fault\(\.excl\)\=\|\.excl\)\=\(\.nt[12a]\)\=\>" +"mf +syn match ia64opcode "mf\(\.a\)\=\>" +"mix +syn match ia64opcode "mix[124]\.[lr]\>" +"mov +syn match ia64opcode "mov\(\.[im]\)\=\>" +syn match ia64opcode "mov\(\.ret\)\=\(\(\.sptk\|\.dptk\)\=\(\.imp\)\=\)\=\>" +"nop +syn match ia64opcode "nop\(\.[ibmfx]\)\=\>" +"pack +syn match ia64opcode "pack\(2\.[su]ss\|4\.sss\)\>" +"padd //padd4 added to keywords +syn match ia64opcode "padd[12]\(\.\(sss\|uus\|uuu\)\)\=\>" +"pavg +syn match ia64opcode "pavg[12]\(\.raz\)\=\>" +"pcmp +syn match ia64opcode "pcmp[124]\.\(eq\|gt\)\>" +"pmax/pmin +syn match ia64opcode "pm\(ax\|in\)\(\(1\.u\)\|2\)\>" +"pmpy +syn match ia64opcode "pmpy2\.[rl]\>" +"pmpyshr +syn match ia64opcode "pmpyshr2\(\.u\)\=\>" +"probe +syn match ia64opcode "probe\.[rw]\>" +syn match ia64opcode "probe\.\(\(r\|w\|rw\)\.fault\)\>" +"pshr +syn match ia64opcode "pshr[24]\(\.u\)\=\>" +"psub +syn match ia64opcode "psub[12]\(\.\(sss\|uu[su]\)\)\=\>" +"ptc +syn match ia64opcode "ptc\.\(l\|e\|ga\=\)\>" +"ptr +syn match ia64opcode "ptr\.\(d\|i\)\>" +"setf +syn match ia64opcode "setf\.\(s\|d\|exp\|sig\)\>" +"shr +syn match ia64opcode "shr\(\.u\)\=\>" +"srlz +syn match ia64opcode "srlz\(\.[id]\)\>" +"st +syn match ia64opcode "st[1248]\(\.rel\)\=\(\.nta\)\=\>" +syn match ia64opcode "st8\.spill\(\.nta\)\=\>" +"stf +syn match ia64opcode "stf[1248]\(\.nta\)\=\>" +syn match ia64opcode "stf\.spill\(\.nta\)\=\>" +"sxt +syn match ia64opcode "sxt[124]\>" +"tbit/tnat +syn match ia64opcode "t\(bit\|nat\)\(\.nz\|\.z\)\=\(\.\(unc\|or\(\.andcm\|cm\)\=\|and\(\.orcm\|cm\)\=\)\)\=\>" +"unpack +syn match ia64opcode "unpack[124]\.[lh]\>" +"xchq +syn match ia64opcode "xchg[1248]\(\.nt[1a]\)\=\>" +"xma/xmpy +syn match ia64opcode "xm\(a\|py\)\.[lh]u\=\>" +"zxt +syn match ia64opcode "zxt[124]\>" + + +"The regex for different ia64 registers are given below + +"limits the rXXX and fXXX and cr suffix in the range 0-127 +syn match ia64registers "\([fr]\|cr\)\([0-9]\|[1-9][0-9]\|1[0-1][0-9]\|12[0-7]\)\{1}\>" +"branch ia64registers +syn match ia64registers "b[0-7]\>" +"predicate ia64registers +syn match ia64registers "p\([0-9]\|[1-5][0-9]\|6[0-3]\)\>" +"application ia64registers +syn match ia64registers "ar\.\(fpsr\|mat\|unat\|rnat\|pfs\|bsp\|bspstore\|rsc\|lc\|ec\|ccv\|itc\|k[0-7]\)\>" +"ia32 AR's +syn match ia64registers "ar\.\(eflag\|fcr\|csd\|ssd\|cflg\|fsr\|fir\|fdr\)\>" +"sp/gp/pr/pr.rot/rp +syn keyword ia64registers sp gp pr pr.rot rp ip tp +"in/out/local +syn match ia64registers "\(in\|out\|loc\)\([0-9]\|[1-8][0-9]\|9[0-5]\)\>" +"argument ia64registers +syn match ia64registers "farg[0-7]\>" +"return value ia64registers +syn match ia64registers "fret[0-7]\>" +"psr +syn match ia64registers "psr\(\.\(l\|um\)\)\=\>" +"cr +syn match ia64registers "cr\.\(dcr\|itm\|iva\|pta\|ipsr\|isr\|ifa\|iip\|itir\|iipa\|ifs\|iim\|iha\|lid\|ivr\|tpr\|eoi\|irr[0-3]\|itv\|pmv\|lrr[01]\|cmcv\)\>" +"Indirect registers +syn match ia64registers "\(cpuid\|dbr\|ibr\|pkr\|pmc\|pmd\|rr\|itr\|dtr\)\>" +"MUX permutations for 8-bit elements +syn match ia64registers "\(@rev\|@mix\|@shuf\|@alt\|@brcst\)\>" +"floating point classes +syn match ia64registers "\(@nat\|@qnan\|@snan\|@pos\|@neg\|@zero\|@unorm\|@norm\|@inf\)\>" +"link relocation operators +syn match ia64registers "\(@\(\(\(gp\|sec\|seg\|image\)rel\)\|ltoff\|fptr\|ptloff\|ltv\|section\)\)\>" + +"Data allocation syntax +syn match ia64data "data[1248]\(\(\(\.ua\)\=\(\.msb\|\.lsb\)\=\)\|\(\(\.msb\|\.lsb\)\=\(\.ua\)\=\)\)\=\>" +syn match ia64data "real\([48]\|1[06]\)\(\(\(\.ua\)\=\(\.msb\|\.lsb\)\=\)\|\(\(\.msb\|\.lsb\)\=\(\.ua\)\=\)\)\=\>" +syn match ia64data "stringz\=\(\(\(\.ua\)\=\(\.msb\|\.lsb\)\=\)\|\(\(\.msb\|\.lsb\)\=\(\.ua\)\=\)\)\=\>" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_ia64_syn_inits") + if version < 508 + let did_ia64_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + "put masm groups with our groups + HiLink masmOperator ia64operator + HiLink masmDirective ia64Directive + HiLink masmOpcode ia64Opcode + HiLink masmIdentifier ia64Identifier + HiLink masmFloat ia64Float + + "ia64 specific stuff + HiLink ia64Label Define + HiLink ia64Comment Comment + HiLink ia64Directive Type + HiLink ia64opcode Statement + HiLink ia64registers Operator + HiLink ia64string String + HiLink ia64Hex Number + HiLink ia64Binary Number + HiLink ia64Octal Number + HiLink ia64Float Float + HiLink ia64Decimal Number + HiLink ia64Identifier Identifier + HiLink ia64data Type + HiLink ia64delimiter Delimiter + HiLink ia64operator Operator + HiLink ia64Todo Todo + + delcommand HiLink +endif + +let b:current_syntax = "ia64" + +" vim: ts=8 sw=2 + diff --git a/runtime/syntax/icemenu.vim b/runtime/syntax/icemenu.vim new file mode 100644 index 000000000..99109388a --- /dev/null +++ b/runtime/syntax/icemenu.vim @@ -0,0 +1,36 @@ +" Vim syntax file +" Language: Icewm Menu +" Maintainer: James Mahler <jmahler@purdue.edu> +" Last Change: Tue Dec 9 21:08:22 EST 2003 +" Extensions: ~/.icewm/menu +" Comment: Icewm is a lightweight window manager. This adds syntax +" highlighting when editing your user's menu file (~/.icewm/menu). + +" clear existing syntax +if version < 600 + syntax clear +elseif exists("bLcurrent_syntax") + finish +endif + +" not case sensitive +syntax case ignore + +" icons .xpm .png and .gif +syntax match _icon /"\=\/.*\.xpm"\=/ +syntax match _icon /"\=\/.*\.png"\=/ +syntax match _icon /"\=\/.*\.gif"\=/ +syntax match _icon /"\-"/ + +" separator +syntax keyword _rules separator + +" prog and menu +syntax keyword _ids menu prog + +" highlights +highlight link _rules Underlined +highlight link _ids Type +highlight link _icon Special + +let b:current_syntax = "IceMenu" diff --git a/runtime/syntax/icon.vim b/runtime/syntax/icon.vim new file mode 100644 index 000000000..1a73c43d8 --- /dev/null +++ b/runtime/syntax/icon.vim @@ -0,0 +1,212 @@ +" Vim syntax file +" Language: Icon +" Maintainer: Wendell Turner <wendell@adsi-m4.com> +" URL: ftp://ftp.halcyon.com/pub/users/wturner/icon.vim +" Last Change: 2003 May 11 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn keyword iconFunction abs acos any args asin atan bal +syn keyword iconFunction callout center char chdir close collect copy +syn keyword iconFunction cos cset delay delete detab display dtor +syn keyword iconFunction entab errorclear exit exp find flush function +syn keyword iconFunction get getch getche getenv iand icom image +syn keyword iconFunction insert integer ior ishift ixor kbhit key +syn keyword iconFunction left list loadfunc log many map match +syn keyword iconFunction member move name numeric open ord pop +syn keyword iconFunction pos proc pull push put read reads +syn keyword iconFunction real remove rename repl reverse right rtod +syn keyword iconFunction runerr save seek seq set sin sort +syn keyword iconFunction sortf sqrt stop string system tab table +syn keyword iconFunction tan trim type upto variable where write writes + +" Keywords +syn match iconKeyword "&allocated" +syn match iconKeyword "&ascii" +syn match iconKeyword "&clock" +syn match iconKeyword "&collections" +syn match iconKeyword "&cset" +syn match iconKeyword "¤t" +syn match iconKeyword "&date" +syn match iconKeyword "&dateline" +syn match iconKeyword "&digits" +syn match iconKeyword "&dump" +syn match iconKeyword "&e" +syn match iconKeyword "&error" +syn match iconKeyword "&errornumber" +syn match iconKeyword "&errortext" +syn match iconKeyword "&errorvalue" +syn match iconKeyword "&errout" +syn match iconKeyword "&fail" +syn match iconKeyword "&features" +syn match iconKeyword "&file" +syn match iconKeyword "&host" +syn match iconKeyword "&input" +syn match iconKeyword "&lcase" +syn match iconKeyword "&letters" +syn match iconKeyword "&level" +syn match iconKeyword "&line" +syn match iconKeyword "&main" +syn match iconKeyword "&null" +syn match iconKeyword "&output" +syn match iconKeyword "&phi" +syn match iconKeyword "&pi" +syn match iconKeyword "&pos" +syn match iconKeyword "&progname" +syn match iconKeyword "&random" +syn match iconKeyword "®ions" +syn match iconKeyword "&source" +syn match iconKeyword "&storage" +syn match iconKeyword "&subject" +syn match iconKeyword "&time" +syn match iconKeyword "&trace" +syn match iconKeyword "&ucase" +syn match iconKeyword "&version" + +" Reserved words +syn keyword iconReserved break by case create default do +syn keyword iconReserved else end every fail if +syn keyword iconReserved initial link next not of +syn keyword iconReserved procedure repeat return suspend +syn keyword iconReserved then to until while + +" Storage class reserved words +syn keyword iconStorageClass global static local record + +syn keyword iconTodo contained TODO FIXME XXX BUG + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match iconSpecial contained "\\x\x\{2}\|\\\o\{3\}\|\\[bdeflnrtv\"\'\\]\|\\^c[a-zA-Z0-9]\|\\$" +syn region iconString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=iconSpecial +syn region iconCset start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=iconSpecial +syn match iconCharacter "'[^\\]'" + +" not sure about these +"syn match iconSpecialCharacter "'\\[bdeflnrtv]'" +"syn match iconSpecialCharacter "'\\\o\{3\}'" +"syn match iconSpecialCharacter "'\\x\x\{2}'" +"syn match iconSpecialCharacter "'\\^c\[a-zA-Z0-9]'" + +"when wanted, highlight trailing white space +if exists("icon_space_errors") + syn match iconSpaceError "\s*$" + syn match iconSpaceError " \+\t"me=e-1 +endif + +"catch errors caused by wrong parenthesis +syn cluster iconParenGroup contains=iconParenError,iconIncluded,iconSpecial,iconTodo,iconUserCont,iconUserLabel,iconBitField + +syn region iconParen transparent start='(' end=')' contains=ALLBUT,@iconParenGroup +syn match iconParenError ")" +syn match iconInParen contained "[{}]" + + +syn case ignore + +"integer number, or floating point number without a dot +syn match iconNumber "\<\d\+\>" + +"floating point number, with dot, optional exponent +syn match iconFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=\>" + +"floating point number, starting with a dot, optional exponent +syn match iconFloat "\.\d\+\(e[-+]\=\d\+\)\=\>" + +"floating point number, without dot, with exponent +syn match iconFloat "\<\d\+e[-+]\=\d\+\>" + +"radix number +syn match iconRadix "\<\d\{1,2}[rR][a-zA-Z0-9]\+\>" + + +" syn match iconIdentifier "\<[a-z_][a-z0-9_]*\>" + +syn case match + +" Comment +syn match iconComment "#.*" contains=iconTodo,iconSpaceError + +syn region iconPreCondit start="^\s*$\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=iconComment,iconString,iconCharacter,iconNumber,iconCommentError,iconSpaceError + +syn region iconIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match iconIncluded contained "<[^>]*>" +syn match iconInclude "^\s*$\s*include\>\s*["<]" contains=iconIncluded +"syn match iconLineSkip "\\$" + +syn cluster iconPreProcGroup contains=iconPreCondit,iconIncluded,iconInclude,iconDefine,iconInParen,iconUserLabel + +syn region iconDefine start="^\s*$\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,@iconPreProcGroup + +"wt:syn region iconPreProc "start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" "end="$" contains=ALLBUT,@iconPreProcGroup + +" Highlight User Labels + +" syn cluster iconMultiGroup contains=iconIncluded,iconSpecial,iconTodo,iconUserCont,iconUserLabel,iconBitField + +if !exists("icon_minlines") + let icon_minlines = 15 +endif +exec "syn sync ccomment iconComment minlines=" . icon_minlines + +" Define the default highlighting. + +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting +if version >= 508 || !exists("did_icon_syn_inits") + if version < 508 + let did_icon_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + + " HiLink iconSpecialCharacter iconSpecial + + HiLink iconOctalError iconError + HiLink iconParenError iconError + HiLink iconInParen iconError + HiLink iconCommentError iconError + HiLink iconSpaceError iconError + HiLink iconCommentError iconError + HiLink iconIncluded iconString + HiLink iconCommentString iconString + HiLink iconComment2String iconString + HiLink iconCommentSkip iconComment + + HiLink iconUserLabel Label + HiLink iconCharacter Character + HiLink iconNumber Number + HiLink iconRadix Number + HiLink iconFloat Float + HiLink iconInclude Include + HiLink iconPreProc PreProc + HiLink iconDefine Macro + HiLink iconError Error + HiLink iconStatement Statement + HiLink iconPreCondit PreCondit + HiLink iconString String + HiLink iconCset String + HiLink iconComment Comment + HiLink iconSpecial SpecialChar + HiLink iconTodo Todo + HiLink iconStorageClass StorageClass + HiLink iconFunction Statement + HiLink iconReserved Label + HiLink iconKeyword Operator + + "HiLink iconIdentifier Identifier + + delcommand HiLink +endif + +let b:current_syntax = "icon" + diff --git a/runtime/syntax/idl.vim b/runtime/syntax/idl.vim new file mode 100644 index 000000000..84cf08b59 --- /dev/null +++ b/runtime/syntax/idl.vim @@ -0,0 +1,203 @@ +" Vim syntax file +" Language: IDL (Interface Description Language) +" Maintainer: Jody Goldberg <jgoldberg@home.com> +" Last Change: 2001 May 09 + +" This is an experiment. IDL's structure is simple enough to permit a full +" grammar based approach to rather than using a few heuristics. The result +" is large and somewhat repetative but seems to work. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Misc basic +syn match idlId contained "[a-zA-Z][a-zA-Z0-9_]*" +syn match idlSemiColon contained ";" +syn match idlCommaArg contained "," skipempty skipwhite nextgroup=idlSimpDecl +syn region idlArraySize1 contained start=:\[: end=:\]: skipempty skipwhite nextgroup=idlArraySize1,idlSemiColon,idlCommaArg contains=idlArraySize1,idlLiteral +syn match idlSimpDecl contained "[a-zA-Z][a-zA-Z0-9_]*" skipempty skipwhite nextgroup=idlSemiColon,idlCommaArg,idlArraySize1 +syn region idlSting contained start=+"+ skip=+\\\(\\\\\)*"+ end=+"+ +syn match idlLiteral contained "[1-9]\d*\(\.\d*\)\=" +syn match idlLiteral contained "\.\d\+" +syn keyword idlLiteral contained TRUE FALSE + +" Comments +syn keyword idlTodo contained TODO FIXME XXX +syn region idlComment start="/\*" end="\*/" contains=idlTodo +syn match idlComment "//.*" contains=idlTodo +syn match idlCommentError "\*/" + +" C style Preprocessor +syn region idlIncluded contained start=+"+ skip=+\\\(\\\\\)*"+ end=+"+ +syn match idlIncluded contained "<[^>]*>" +syn match idlInclude "^[ \t]*#[ \t]*include\>[ \t]*["<]" contains=idlIncluded,idlString +syn region idlPreCondit start="^[ \t]*#[ \t]*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=idlComment,idlCommentError +syn region idlDefine start="^[ \t]*#[ \t]*\(define\>\|undef\>\)" skip="\\$" end="$" contains=idlLiteral, idlString + +" Constants +syn keyword idlConst const skipempty skipwhite nextgroup=idlBaseType,idlBaseTypeInt + +" Attribute +syn keyword idlROAttr readonly skipempty skipwhite nextgroup=idlAttr +syn keyword idlAttr attribute skipempty skipwhite nextgroup=idlBaseTypeInt,idlBaseType + +" Types +syn region idlD4 contained start="<" end=">" skipempty skipwhite nextgroup=idlSimpDecl contains=idlSeqType,idlBaseTypeInt,idlBaseType,idlLiteral +syn keyword idlSeqType contained sequence skipempty skipwhite nextgroup=idlD4 +syn keyword idlBaseType contained float double char boolean octet any skipempty skipwhite nextgroup=idlSimpDecl +syn keyword idlBaseTypeInt contained short long skipempty skipwhite nextgroup=idlSimpDecl +syn keyword idlBaseType contained unsigned skipempty skipwhite nextgroup=idlBaseTypeInt +syn region idlD1 contained start="<" end=">" skipempty skipwhite nextgroup=idlSimpDecl contains=idlString,idlLiteral +syn keyword idlBaseType contained string skipempty skipwhite nextgroup=idlD1,idlSimpDecl +syn match idlBaseType contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlSimpDecl + +" Modules +syn region idlModuleContent contained start="{" end="}" skipempty skipwhite nextgroup=idlSemiColon contains=idlUnion,idlStruct,idlEnum,idlInterface,idlComment,idlTypedef,idlConst,idlException,idlModule +syn match idlModuleName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlModuleContent,idlSemiColon +syn keyword idlModule module skipempty skipwhite nextgroup=idlModuleName + +" Interfaces +syn region idlInterfaceContent contained start="{" end="}" skipempty skipwhite nextgroup=idlSemiColon contains=idlUnion,idlStruct,idlEnum,idlComment,idlROAttr,idlAttr,idlOp,idlOneWayOp,idlException,idlConst,idlTypedef +syn match idlInheritFrom2 contained "," skipempty skipwhite nextgroup=idlInheritFrom +syn match idlInheritFrom contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlInheritFrom2,idlInterfaceContent +syn match idlInherit contained ":" skipempty skipwhite nextgroup=idlInheritFrom +syn match idlInterfaceName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlInterfaceContent,idlInherit,idlSemiColon +syn keyword idlInterface interface skipempty skipwhite nextgroup=idlInterfaceName + + +" Raises +syn keyword idlRaises contained raises skipempty skipwhite nextgroup=idlRaises,idlContext,idlSemiColon + +" Context +syn keyword idlContext contained context skipempty skipwhite nextgroup=idlRaises,idlContext,idlSemiColon + +" Operation +syn match idlParmList contained "," skipempty skipwhite nextgroup=idlOpParms +syn region idlArraySize contained start="\[" end="\]" skipempty skipwhite nextgroup=idlArraySize,idlParmList contains=idlArraySize,idlLiteral +syn match idlParmName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlParmList,idlArraySize +syn keyword idlParmInt contained short long skipempty skipwhite nextgroup=idlParmName +syn keyword idlParmType contained unsigned skipempty skipwhite nextgroup=idlParmInt +syn region idlD3 contained start="<" end=">" skipempty skipwhite nextgroup=idlParmName contains=idlString,idlLiteral +syn keyword idlParmType contained string skipempty skipwhite nextgroup=idlD3,idlParmName +syn keyword idlParmType contained void float double char boolean octet any skipempty skipwhite nextgroup=idlParmName +syn match idlParmType contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlParmName +syn keyword idlOpParms contained in out inout skipempty skipwhite nextgroup=idlParmType + +syn region idlOpContents contained start="(" end=")" skipempty skipwhite nextgroup=idlRaises,idlContext,idlSemiColon contains=idlOpParms +syn match idlOpName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlOpContents +syn keyword idlOpInt contained short long skipempty skipwhite nextgroup=idlOpName +syn region idlD2 contained start="<" end=">" skipempty skipwhite nextgroup=idlOpName contains=idlString,idlLiteral +syn keyword idlOp contained unsigned skipempty skipwhite nextgroup=idlOpInt +syn keyword idlOp contained string skipempty skipwhite nextgroup=idlD2,idlOpName +syn keyword idlOp contained void float double char boolean octet any skipempty skipwhite nextgroup=idlOpName +syn match idlOp contained "[a-zA-Z0-9_]\+[ \t]*\(::[ \t]*[a-zA-Z0-9_]\+\)*" skipempty skipwhite nextgroup=idlOpName +syn keyword idlOp contained void skipempty skipwhite nextgroup=idlOpName +syn keyword idlOneWayOp contained oneway skipempty skipwhite nextgroup=idOp + +" Enum +syn region idlEnumContents contained start="{" end="}" skipempty skipwhite nextgroup=idlSemiColon, idlSimpDecl contains=idlId,idlComment +syn match idlEnumName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlEnumContents +syn keyword idlEnum enum skipempty skipwhite nextgroup=idlEnumName + +" Typedef +syn keyword idlTypedef typedef skipempty skipwhite nextgroup=idlBaseType, idlBaseTypeInt, idlSeqType + +" Struct +syn region idlStructContent contained start="{" end="}" skipempty skipwhite nextgroup=idlSemiColon, idlSimpDecl contains=idlBaseType, idlBaseTypeInt, idlSeqType,idlComment, idlEnum, idlUnion +syn match idlStructName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlStructContent +syn keyword idlStruct struct skipempty skipwhite nextgroup=idlStructName + +" Exception +syn keyword idlException exception skipempty skipwhite nextgroup=idlStructName + +" Union +syn match idlColon contained ":" skipempty skipwhite nextgroup=idlCase,idlSeqType,idlBaseType,idlBaseTypeInt +syn region idlCaseLabel contained start="" skip="::" end=":"me=e-1 skipempty skipwhite nextgroup=idlColon contains=idlLiteral,idlString +syn keyword idlCase contained case skipempty skipwhite nextgroup=idlCaseLabel +syn keyword idlCase contained default skipempty skipwhite nextgroup=idlColon +syn region idlUnionContent contained start="{" end="}" skipempty skipwhite nextgroup=idlSemiColon,idlSimpDecl contains=idlCase +syn region idlSwitchType contained start="(" end=")" skipempty skipwhite nextgroup=idlUnionContent +syn keyword idlUnionSwitch contained switch skipempty skipwhite nextgroup=idlSwitchType +syn match idlUnionName contained "[a-zA-Z0-9_]\+" skipempty skipwhite nextgroup=idlUnionSwitch +syn keyword idlUnion union skipempty skipwhite nextgroup=idlUnionName + +syn sync lines=200 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_idl_syntax_inits") + if version < 508 + let did_idl_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink idlInclude Include + HiLink idlPreProc PreProc + HiLink idlPreCondit PreCondit + HiLink idlDefine Macro + HiLink idlIncluded String + HiLink idlString String + HiLink idlComment Comment + HiLink idlTodo Todo + HiLink idlLiteral Number + + HiLink idlModule Keyword + HiLink idlInterface Keyword + HiLink idlEnum Keyword + HiLink idlStruct Keyword + HiLink idlUnion Keyword + HiLink idlTypedef Keyword + HiLink idlException Keyword + + HiLink idlModuleName Typedef + HiLink idlInterfaceName Typedef + HiLink idlEnumName Typedef + HiLink idlStructName Typedef + HiLink idlUnionName Typedef + + HiLink idlBaseTypeInt idlType + HiLink idlBaseType idlType + HiLink idlSeqType idlType + HiLink idlD1 Paren + HiLink idlD2 Paren + HiLink idlD3 Paren + HiLink idlD4 Paren + "HiLink idlArraySize Paren + "HiLink idlArraySize1 Paren + HiLink idlModuleContent Paren + HiLink idlUnionContent Paren + HiLink idlStructContent Paren + HiLink idlEnumContents Paren + HiLink idlInterfaceContent Paren + + HiLink idlSimpDecl Identifier + HiLink idlROAttr StorageClass + HiLink idlAttr Keyword + HiLink idlConst StorageClass + + HiLink idlOneWayOp StorageClass + HiLink idlOp idlType + HiLink idlParmType idlType + HiLink idlOpName Function + HiLink idlOpParms StorageClass + HiLink idlParmName Identifier + HiLink idlInheritFrom Identifier + + HiLink idlId Constant + "HiLink idlCase Keyword + HiLink idlCaseLabel Constant + + delcommand HiLink +endif + +let b:current_syntax = "idl" + +" vim: ts=8 diff --git a/runtime/syntax/idlang.vim b/runtime/syntax/idlang.vim new file mode 100644 index 000000000..9d567e5f8 --- /dev/null +++ b/runtime/syntax/idlang.vim @@ -0,0 +1,253 @@ +" Interactive Data Language syntax file (IDL, too [:-)] +" Maintainer: Aleksandar Jelenak <ajelenak AT yahoo.com> +" Last change: 2003 Apr 25 +" Created by: Hermann Rochholz <Hermann.Rochholz AT gmx.de> + +" Remove any old syntax stuff hanging around +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syntax case ignore + +syn match idlangStatement "^\s*pro\s" +syn match idlangStatement "^\s*function\s" +syn keyword idlangStatement return continue mod do break +syn keyword idlangStatement compile_opt forward_function goto +syn keyword idlangStatement begin common end of +syn keyword idlangStatement inherits on_ioerror begin + +syn keyword idlangConditional if else then for while case switch +syn keyword idlangConditional endcase endelse endfor endswitch +syn keyword idlangConditional endif endrep endwhile repeat until + +syn match idlangOperator "\ and\ " +syn match idlangOperator "\ eq\ " +syn match idlangOperator "\ ge\ " +syn match idlangOperator "\ gt\ " +syn match idlangOperator "\ le\ " +syn match idlangOperator "\ lt\ " +syn match idlangOperator "\ ne\ " +syn match idlangOperator /\(\ \|(\)not\ /hs=e-3 +syn match idlangOperator "\ or\ " +syn match idlangOperator "\ xor\ " + +syn keyword idlangStop stop pause + +syn match idlangStrucvar "\h\w*\(\.\h\w*\)\+" +syn match idlangStrucvar "[),\]]\(\.\h\w*\)\+"hs=s+1 + +syn match idlangSystem "\!\a\w*\(\.\w*\)\=" + +syn match idlangKeyword "\([(,]\s*\(\$\_s*\)\=\)\@<=/\h\w*" +syn match idlangKeyword "\([(,]\s*\(\$\_s*\)\=\)\@<=\h\w*\s*=" + +syn keyword idlangTodo contained TODO + +syn region idlangString start=+"+ end=+"+ +syn region idlangString start=+'+ end=+'+ + +syn match idlangPreCondit "^\s*@\w*\(\.\a\{3}\)\=" + +syn match idlangRealNumber "\<\d\+\(\.\=\d*e[+-]\=\d\+\|\.\d*d\|\.\d*\|d\)" +syn match idlangRealNumber "\.\d\+\(d\|e[+-]\=\d\+\)\=" + +syn match idlangNumber "\<\.\@!\d\+\.\@!\(b\|u\|us\|s\|l\|ul\|ll\|ull\)\=\>" + +syn match idlangComment "[\;].*$" contains=idlangTodo + +syn match idlangContinueLine "\$\s*\($\|;\)"he=s+1 contains=idlangComment +syn match idlangContinueLine "&\s*\(\h\|;\)"he=s+1 contains=ALL + +syn match idlangDblCommaError "\,\s*\," + +" List of standard routines as of IDL version 5.4. +syn match idlangRoutine "EOS_\a*" +syn match idlangRoutine "HDF_\a*" +syn match idlangRoutine "CDF_\a*" +syn match idlangRoutine "NCDF_\a*" +syn match idlangRoutine "QUERY_\a*" +syn match idlangRoutine "\<MAX\s*("he=e-1 +syn match idlangRoutine "\<MIN\s*("he=e-1 + +syn keyword idlangRoutine A_CORRELATE ABS ACOS ADAPT_HIST_EQUAL ALOG ALOG10 +syn keyword idlangRoutine AMOEBA ANNOTATE ARG_PRESENT ARRAY_EQUAL ARROW +syn keyword idlangRoutine ASCII_TEMPLATE ASIN ASSOC ATAN AXIS BAR_PLOT +syn keyword idlangRoutine BESELI BESELJ BESELK BESELY BETA BILINEAR BIN_DATE +syn keyword idlangRoutine BINARY_TEMPLATE BINDGEN BINOMIAL BLAS_AXPY BLK_CON +syn keyword idlangRoutine BOX_CURSOR BREAK BREAKPOINT BROYDEN BYTARR BYTE +syn keyword idlangRoutine BYTEORDER BYTSCL C_CORRELATE CALDAT CALENDAR +syn keyword idlangRoutine CALL_EXTERNAL CALL_FUNCTION CALL_METHOD +syn keyword idlangRoutine CALL_PROCEDURE CATCH CD CEIL CHEBYSHEV CHECK_MATH +syn keyword idlangRoutine CHISQR_CVF CHISQR_PDF CHOLDC CHOLSOL CINDGEN +syn keyword idlangRoutine CIR_3PNT CLOSE CLUST_WTS CLUSTER COLOR_CONVERT +syn keyword idlangRoutine COLOR_QUAN COLORMAP_APPLICABLE COMFIT COMMON +syn keyword idlangRoutine COMPLEX COMPLEXARR COMPLEXROUND +syn keyword idlangRoutine COMPUTE_MESH_NORMALS COND CONGRID CONJ +syn keyword idlangRoutine CONSTRAINED_MIN CONTOUR CONVERT_COORD CONVOL +syn keyword idlangRoutine COORD2TO3 CORRELATE COS COSH CRAMER CREATE_STRUCT +syn keyword idlangRoutine CREATE_VIEW CROSSP CRVLENGTH CT_LUMINANCE CTI_TEST +syn keyword idlangRoutine CURSOR CURVEFIT CV_COORD CVTTOBM CW_ANIMATE +syn keyword idlangRoutine CW_ANIMATE_GETP CW_ANIMATE_LOAD CW_ANIMATE_RUN +syn keyword idlangRoutine CW_ARCBALL CW_BGROUP CW_CLR_INDEX CW_COLORSEL +syn keyword idlangRoutine CW_DEFROI CW_FIELD CW_FILESEL CW_FORM CW_FSLIDER +syn keyword idlangRoutine CW_LIGHT_EDITOR CW_LIGHT_EDITOR_GET +syn keyword idlangRoutine CW_LIGHT_EDITOR_SET CW_ORIENT CW_PALETTE_EDITOR +syn keyword idlangRoutine CW_PALETTE_EDITOR_GET CW_PALETTE_EDITOR_SET +syn keyword idlangRoutine CW_PDMENU CW_RGBSLIDER CW_TMPL CW_ZOOM DBLARR +syn keyword idlangRoutine DCINDGEN DCOMPLEX DCOMPLEXARR DEFINE_KEY DEFROI +syn keyword idlangRoutine DEFSYSV DELETE_SYMBOL DELLOG DELVAR DERIV DERIVSIG +syn keyword idlangRoutine DETERM DEVICE DFPMIN DIALOG_MESSAGE +syn keyword idlangRoutine DIALOG_PICKFILE DIALOG_PRINTERSETUP +syn keyword idlangRoutine DIALOG_PRINTJOB DIALOG_READ_IMAGE +syn keyword idlangRoutine DIALOG_WRITE_IMAGE DIGITAL_FILTER DILATE DINDGEN +syn keyword idlangRoutine DISSOLVE DIST DLM_LOAD DLM_REGISTER +syn keyword idlangRoutine DO_APPLE_SCRIPT DOC_LIBRARY DOUBLE DRAW_ROI EFONT +syn keyword idlangRoutine EIGENQL EIGENVEC ELMHES EMPTY ENABLE_SYSRTN EOF +syn keyword idlangRoutine ERASE ERODE ERRORF ERRPLOT EXECUTE EXIT EXP EXPAND +syn keyword idlangRoutine EXPAND_PATH EXPINT EXTRAC EXTRACT_SLICE F_CVF +syn keyword idlangRoutine F_PDF FACTORIAL FFT FILE_CHMOD FILE_DELETE +syn keyword idlangRoutine FILE_EXPAND_PATH FILE_MKDIR FILE_TEST FILE_WHICH +syn keyword idlangRoutine FILEPATH FINDFILE FINDGEN FINITE FIX FLICK FLOAT +syn keyword idlangRoutine FLOOR FLOW3 FLTARR FLUSH FOR FORMAT_AXIS_VALUES +syn keyword idlangRoutine FORWARD_FUNCTION FREE_LUN FSTAT FULSTR FUNCT +syn keyword idlangRoutine FV_TEST FX_ROOT FZ_ROOTS GAMMA GAMMA_CT +syn keyword idlangRoutine GAUSS_CVF GAUSS_PDF GAUSS2DFIT GAUSSFIT GAUSSINT +syn keyword idlangRoutine GET_DRIVE_LIST GET_KBRD GET_LUN GET_SCREEN_SIZE +syn keyword idlangRoutine GET_SYMBOL GETENV GOTO GRID_TPS GRID3 GS_ITER +syn keyword idlangRoutine H_EQ_CT H_EQ_INT HANNING HEAP_GC HELP HILBERT +syn keyword idlangRoutine HIST_2D HIST_EQUAL HISTOGRAM HLS HOUGH HQR HSV +syn keyword idlangRoutine IBETA IDENTITY IDL_Container IDLanROI +syn keyword idlangRoutine IDLanROIGroup IDLffDICOM IDLffDXF IDLffLanguageCat +syn keyword idlangRoutine IDLffShape IDLgrAxis IDLgrBuffer IDLgrClipboard +syn keyword idlangRoutine IDLgrColorbar IDLgrContour IDLgrFont IDLgrImage +syn keyword idlangRoutine IDLgrLegend IDLgrLight IDLgrModel IDLgrMPEG +syn keyword idlangRoutine IDLgrPalette IDLgrPattern IDLgrPlot IDLgrPolygon +syn keyword idlangRoutine IDLgrPolyline IDLgrPrinter IDLgrROI IDLgrROIGroup +syn keyword idlangRoutine IDLgrScene IDLgrSurface IDLgrSymbol +syn keyword idlangRoutine IDLgrTessellator IDLgrText IDLgrView +syn keyword idlangRoutine IDLgrViewgroup IDLgrVolume IDLgrVRML IDLgrWindow +syn keyword idlangRoutine IGAMMA IMAGE_CONT IMAGE_STATISTICS IMAGINARY +syn keyword idlangRoutine INDGEN INT_2D INT_3D INT_TABULATED INTARR INTERPOL +syn keyword idlangRoutine INTERPOLATE INVERT IOCTL ISHFT ISOCONTOUR +syn keyword idlangRoutine ISOSURFACE JOURNAL JULDAY KEYWORD_SET KRIG2D +syn keyword idlangRoutine KURTOSIS KW_TEST L64INDGEN LABEL_DATE LABEL_REGION +syn keyword idlangRoutine LADFIT LAGUERRE LEEFILT LEGENDRE LINBCG LINDGEN +syn keyword idlangRoutine LINFIT LINKIMAGE LIVE_CONTOUR LIVE_CONTROL +syn keyword idlangRoutine LIVE_DESTROY LIVE_EXPORT LIVE_IMAGE LIVE_INFO +syn keyword idlangRoutine LIVE_LINE LIVE_LOAD LIVE_OPLOT LIVE_PLOT +syn keyword idlangRoutine LIVE_PRINT LIVE_RECT LIVE_STYLE LIVE_SURFACE +syn keyword idlangRoutine LIVE_TEXT LJLCT LL_ARC_DISTANCE LMFIT LMGR LNGAMMA +syn keyword idlangRoutine LNP_TEST LOADCT LOCALE_GET LON64ARR LONARR LONG +syn keyword idlangRoutine LONG64 LSODE LU_COMPLEX LUDC LUMPROVE LUSOL +syn keyword idlangRoutine M_CORRELATE MACHAR MAKE_ARRAY MAKE_DLL MAP_2POINTS +syn keyword idlangRoutine MAP_CONTINENTS MAP_GRID MAP_IMAGE MAP_PATCH +syn keyword idlangRoutine MAP_PROJ_INFO MAP_SET MATRIX_MULTIPLY MD_TEST MEAN +syn keyword idlangRoutine MEANABSDEV MEDIAN MEMORY MESH_CLIP MESH_DECIMATE +syn keyword idlangRoutine MESH_ISSOLID MESH_MERGE MESH_NUMTRIANGLES MESH_OBJ +syn keyword idlangRoutine MESH_SMOOTH MESH_SURFACEAREA MESH_VALIDATE +syn keyword idlangRoutine MESH_VOLUME MESSAGE MIN_CURVE_SURF MK_HTML_HELP +syn keyword idlangRoutine MODIFYCT MOMENT MORPH_CLOSE MORPH_DISTANCE +syn keyword idlangRoutine MORPH_GRADIENT MORPH_HITORMISS MORPH_OPEN +syn keyword idlangRoutine MORPH_THIN MORPH_TOPHAT MPEG_CLOSE MPEG_OPEN +syn keyword idlangRoutine MPEG_PUT MPEG_SAVE MSG_CAT_CLOSE MSG_CAT_COMPILE +syn keyword idlangRoutine MSG_CAT_OPEN MULTI N_ELEMENTS N_PARAMS N_TAGS +syn keyword idlangRoutine NEWTON NORM OBJ_CLASS OBJ_DESTROY OBJ_ISA OBJ_NEW +syn keyword idlangRoutine OBJ_VALID OBJARR ON_ERROR ON_IOERROR ONLINE_HELP +syn keyword idlangRoutine OPEN OPENR OPENW OPLOT OPLOTERR P_CORRELATE +syn keyword idlangRoutine PARTICLE_TRACE PCOMP PLOT PLOT_3DBOX PLOT_FIELD +syn keyword idlangRoutine PLOTERR PLOTS PNT_LINE POINT_LUN POLAR_CONTOUR +syn keyword idlangRoutine POLAR_SURFACE POLY POLY_2D POLY_AREA POLY_FIT +syn keyword idlangRoutine POLYFILL POLYFILLV POLYSHADE POLYWARP POPD POWELL +syn keyword idlangRoutine PRIMES PRINT PRINTF PRINTD PROFILE PROFILER +syn keyword idlangRoutine PROFILES PROJECT_VOL PS_SHOW_FONTS PSAFM PSEUDO +syn keyword idlangRoutine PTR_FREE PTR_NEW PTR_VALID PTRARR PUSHD QROMB +syn keyword idlangRoutine QROMO QSIMP R_CORRELATE R_TEST RADON RANDOMN +syn keyword idlangRoutine RANDOMU RANKS RDPIX READ READF READ_ASCII +syn keyword idlangRoutine READ_BINARY READ_BMP READ_DICOM READ_IMAGE +syn keyword idlangRoutine READ_INTERFILE READ_JPEG READ_PICT READ_PNG +syn keyword idlangRoutine READ_PPM READ_SPR READ_SRF READ_SYLK READ_TIFF +syn keyword idlangRoutine READ_WAV READ_WAVE READ_X11_BITMAP READ_XWD READS +syn keyword idlangRoutine READU REBIN RECALL_COMMANDS RECON3 REDUCE_COLORS +syn keyword idlangRoutine REFORM REGRESS REPLICATE REPLICATE_INPLACE +syn keyword idlangRoutine RESOLVE_ALL RESOLVE_ROUTINE RESTORE RETALL RETURN +syn keyword idlangRoutine REVERSE REWIND RK4 ROBERTS ROT ROTATE ROUND +syn keyword idlangRoutine ROUTINE_INFO RS_TEST S_TEST SAVE SAVGOL SCALE3 +syn keyword idlangRoutine SCALE3D SEARCH2D SEARCH3D SET_PLOT SET_SHADING +syn keyword idlangRoutine SET_SYMBOL SETENV SETLOG SETUP_KEYS SFIT +syn keyword idlangRoutine SHADE_SURF SHADE_SURF_IRR SHADE_VOLUME SHIFT SHOW3 +syn keyword idlangRoutine SHOWFONT SIN SINDGEN SINH SIZE SKEWNESS SKIPF +syn keyword idlangRoutine SLICER3 SLIDE_IMAGE SMOOTH SOBEL SOCKET SORT SPAWN +syn keyword idlangRoutine SPH_4PNT SPH_SCAT SPHER_HARM SPL_INIT SPL_INTERP +syn keyword idlangRoutine SPLINE SPLINE_P SPRSAB SPRSAX SPRSIN SPRSTP SQRT +syn keyword idlangRoutine STANDARDIZE STDDEV STOP STRARR STRCMP STRCOMPRESS +syn keyword idlangRoutine STREAMLINE STREGEX STRETCH STRING STRJOIN STRLEN +syn keyword idlangRoutine STRLOWCASE STRMATCH STRMESSAGE STRMID STRPOS +syn keyword idlangRoutine STRPUT STRSPLIT STRTRIM STRUCT_ASSIGN STRUCT_HIDE +syn keyword idlangRoutine STRUPCASE SURFACE SURFR SVDC SVDFIT SVSOL +syn keyword idlangRoutine SWAP_ENDIAN SWITCH SYSTIME T_CVF T_PDF T3D +syn keyword idlangRoutine TAG_NAMES TAN TANH TAPRD TAPWRT TEK_COLOR +syn keyword idlangRoutine TEMPORARY TETRA_CLIP TETRA_SURFACE TETRA_VOLUME +syn keyword idlangRoutine THIN THREED TIME_TEST2 TIMEGEN TM_TEST TOTAL TRACE +syn keyword idlangRoutine TRANSPOSE TRI_SURF TRIANGULATE TRIGRID TRIQL +syn keyword idlangRoutine TRIRED TRISOL TRNLOG TS_COEF TS_DIFF TS_FCAST +syn keyword idlangRoutine TS_SMOOTH TV TVCRS TVLCT TVRD TVSCL UINDGEN UINT +syn keyword idlangRoutine UINTARR UL64INDGEN ULINDGEN ULON64ARR ULONARR +syn keyword idlangRoutine ULONG ULONG64 UNIQ USERSYM VALUE_LOCATE VARIANCE +syn keyword idlangRoutine VAX_FLOAT VECTOR_FIELD VEL VELOVECT VERT_T3D VOIGT +syn keyword idlangRoutine VORONOI VOXEL_PROJ WAIT WARP_TRI WATERSHED WDELETE +syn keyword idlangRoutine WEOF WF_DRAW WHERE WIDGET_BASE WIDGET_BUTTON +syn keyword idlangRoutine WIDGET_CONTROL WIDGET_DRAW WIDGET_DROPLIST +syn keyword idlangRoutine WIDGET_EVENT WIDGET_INFO WIDGET_LABEL WIDGET_LIST +syn keyword idlangRoutine WIDGET_SLIDER WIDGET_TABLE WIDGET_TEXT WINDOW +syn keyword idlangRoutine WRITE_BMP WRITE_IMAGE WRITE_JPEG WRITE_NRIF +syn keyword idlangRoutine WRITE_PICT WRITE_PNG WRITE_PPM WRITE_SPR WRITE_SRF +syn keyword idlangRoutine WRITE_SYLK WRITE_TIFF WRITE_WAV WRITE_WAVE WRITEU +syn keyword idlangRoutine WSET WSHOW WTN WV_APPLET WV_CW_WAVELET WV_CWT +syn keyword idlangRoutine WV_DENOISE WV_DWT WV_FN_COIFLET WV_FN_DAUBECHIES +syn keyword idlangRoutine WV_FN_GAUSSIAN WV_FN_HAAR WV_FN_MORLET WV_FN_PAUL +syn keyword idlangRoutine WV_FN_SYMLET WV_IMPORT_DATA WV_IMPORT_WAVELET +syn keyword idlangRoutine WV_PLOT3D_WPS WV_PLOT_MULTIRES WV_PWT +syn keyword idlangRoutine WV_TOOL_DENOISE XBM_EDIT XDISPLAYFILE XDXF XFONT +syn keyword idlangRoutine XINTERANIMATE XLOADCT XMANAGER XMNG_TMPL XMTOOL +syn keyword idlangRoutine XOBJVIEW XPALETTE XPCOLOR XPLOT3D XREGISTERED XROI +syn keyword idlangRoutine XSQ_TEST XSURFACE XVAREDIT XVOLUME XVOLUME_ROTATE +syn keyword idlangRoutine XVOLUME_WRITE_IMAGE XYOUTS ZOOM ZOOM_24 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_idlang_syn_inits") + if version < 508 + let did_idlang_syn_inits = 1 + command -nargs=+ HiLink hi link <args> +else + command -nargs=+ HiLink hi def link <args> +endif + + HiLink idlangConditional Conditional + HiLink idlangRoutine Type + HiLink idlangStatement Statement + HiLink idlangContinueLine Todo + HiLink idlangRealNumber Float + HiLink idlangNumber Number + HiLink idlangString String + HiLink idlangOperator Operator + HiLink idlangComment Comment + HiLink idlangTodo Todo + HiLink idlangPreCondit Identifier + HiLink idlangDblCommaError Error + HiLink idlangStop Error + HiLink idlangStrucvar PreProc + HiLink idlangSystem Identifier + HiLink idlangKeyword Special + + delcommand HiLink +endif + +let b:current_syntax = "idlang" +" vim: ts=18 diff --git a/runtime/syntax/indent.vim b/runtime/syntax/indent.vim new file mode 100644 index 000000000..b9f3c7e7c --- /dev/null +++ b/runtime/syntax/indent.vim @@ -0,0 +1,101 @@ +" Vim syntax file +" Language: indent RC File +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/indent/ +" Latest Revision: 2004-05-22 +" arch-tag: 23c11190-79fa-4493-9fc5-36435402a20d +" TODO: is the deny-all (a la lilo.vim nice or no?)... +" irritating to be wrong to the last char... +" would be sweet if right until one char fails + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Set iskeyword since we need `-' (and potentially others) in keywords. +" For version 5.x: Set it globally +" For version 6.x: Set it locally +if version >= 600 + command -nargs=1 SetIsk setlocal iskeyword=<args> +else + command -nargs=1 SetIsk set iskeyword=<args> +endif +SetIsk 48-57,65-90,97-122,-,_ +delcommand SetIsk + +" errors +syn match indentError "\S\+" + +" todo +syn keyword indentTodo contained TODO FIXME XXX NOTE + +" comments +syn region indentComment matchgroup=indentComment start="/\*" end="\*/" contains=indentTodo + +" keywords (command-line switches) +syn match indentOptions "\<--\(no-\)\=blank-\(before-sizeof\|Bill-Shannon\|lines-\(after-\(commas\|declarations\|procedures\)\|before-block-comments\)\)\>" +syn match indentOptions "\<--brace-indent\s*\d\+\>" +syn match indentOptions "\<--braces-\(after\|on\)-\(if\|struct-decl\)-line\>" +syn match indentOptions "\<--break-\(\(after\|before\)-boolean-operator\|function-decl-args\)\>" +syn match indentOptions "\<--\(case\(-brace\)\=\|comment\|continuation\|declaration\|line-comments\|parameter\|paren\|struct-brace\)-indentation\s*\d\+\>" +syn match indentOptions "\<--\(no-\)\=comment-delimiters-on-blank-lines\>" +syn match indentOptions "\<--\(dont-\)\=cuddle-\(do-while\|else\)\>" +syn match indentOptions "\<--\(declaration-comment\|else-endif\)-column\s*\d\+\>" +syn match indentOptions "\<--dont-break-\(function-decl-args\|procedure-type\)\>" +syn match indentOptions "\<--\(dont-\)\=\(format\(-first-column\)\=\|star\)-comments\>" +syn match indentOptions "\<--\(honour\|ignore\)-newlines\>" +syn match indentOptions "\<--\(indent-level\|\(comment-\)\=line-length\)\s*\d\+\>" +syn match indentOptions "\<--\(leave\|remove\)-preprocessor-space\>" +"not 100%, since casts\= should always be cast if no- isn't given +syn match indentOptions "\<--\(no-\)\=space-after-\(parentheses\|casts\=\|for\|if\|while\)\>" +syn match indentOptions "\<--\(dont-\)\=space-special-semicolon\>" +syn match indentOptions "\<--\(leave\|swallow\)-optional-blank-lines\>" +syn match indentOptions "\<--tab-size\s*\d\+\>" +syn match indentOptions "\<--\(no\|use\)-tabs\>" +syn keyword indentOptions --gnu-style --ignore-profile --k-and-r-style --original +syn keyword indentOptions --preserve-mtime --no-verbosity --verbose --output-file +syn keyword indentOptions --no-parameter-indentation --procnames-start-lines +syn keyword indentOptions --standard-output --start-left-side-of-comments +syn keyword indentOptions --space-after-procedure-calls +" this also here since the gnu indent fellas aren't consistent. (ever read +" the code to `indent'? you'll know what i mean if you have) +syn match indentOptions "\<-\(bli\|cbi\|cd\|ci\|cli\|c\|cp\|di\|d\|i\|ip\|l\|lc\|pi\|sbi\|ts\)\s*\d\+\>" +syn match indentOptions "\<-T\s\+\w\+\>" +syn keyword indentOptions --format-all-comments --continue-at-parentheses --dont-line-up-parentheses +syn keyword indentOptions --no-space-after-function-call-names +syn keyword indentOptions -bad -bap -bbb -bbo -bc -bfda -bl -br -bs -nbs -cdb -cdw -ce -cs -dce -fc1 -fca +syn keyword indentOptions -gnu -hnl -kr -lp -lps -nbad -nbap -nbbb -nbbo -nbc -nbfda -ncdb -ncdw -nprs +syn keyword indentOptions -nce -ncs -nfc1 -nfca -nhnl -nip -nlp -nlps -npcs -npmt -npro -npsl -nsaf -nsai +syn keyword indentOptions -nsaw -nsc -nsob -nss -nv -o -orig -pcs -pmt -prs -psl -saf -sai -saw -sc +syn keyword indentOptions -sob -ss -st -v -version -bls -brs -ut -nut + +if exists("indent_minlines") + let b:indent_minlines = indent_minlines +else + let b:indent_minlines = 50 +endif +exec "syn sync minlines=" . b:indent_minlines + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_indent_syn_inits") + if version < 508 + let did_indent_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink indentError Error + HiLink indentComment Comment + HiLink indentTodo Todo + HiLink indentOptions Keyword + delcommand HiLink +endif + +let b:current_syntax = "indent" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/inform.vim b/runtime/syntax/inform.vim new file mode 100644 index 000000000..11901639c --- /dev/null +++ b/runtime/syntax/inform.vim @@ -0,0 +1,408 @@ +" Vim syntax file +" Language: Inform +" Maintainer: Stephen Thomas (informvim@stephenthomas.uklinux.net) +" URL: http://www.stephenthomas.uklinux.net/informvim +" Last Change: 2004 May 16 + +" Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" A bunch of useful Inform keywords. First, case insensitive stuff + +syn case ignore + +syn keyword informDefine Constant + +syn keyword informType Array Attribute Class Nearby +syn keyword informType Object Property String Routine +syn match informType "\<Global\>" + +syn keyword informInclude Import Include Link Replace System_file + +syn keyword informPreCondit End Endif Ifdef Ifndef Iftrue Iffalse Ifv3 Ifv5 +syn keyword informPreCondit Ifnot + +syn keyword informPreProc Abbreviate Default Fake_action Lowstring +syn keyword informPreProc Message Release Serial Statusline Stub Switches +syn keyword informPreProc Trace Zcharacter + +syn region informGlobalRegion matchgroup=informType start="\<Global\>" matchgroup=NONE skip=+!.*$\|".*"\|'.*'+ end=";" contains=ALLBUT,informGramPreProc,informPredicate,informGrammar,informAsm,informAsmObsolete + +syn keyword informGramPreProc contained Verb Extend + +if !exists("inform_highlight_simple") + syn keyword informLibAttrib absent animate clothing concealed container + syn keyword informLibAttrib door edible enterable female general light + syn keyword informLibAttrib lockable locked male moved neuter on open + syn keyword informLibAttrib openable pluralname proper scenery scored + syn keyword informLibAttrib static supporter switchable talkable + syn keyword informLibAttrib visited workflag worn + syn match informLibAttrib "\<transparent\>" + + syn keyword informLibProp e_to se_to s_to sw_to w_to nw_to n_to ne_to + syn keyword informLibProp u_to d_to in_to out_to before after life + syn keyword informLibProp door_to with_key door_dir invent plural + syn keyword informLibProp add_to_scope list_together react_before + syn keyword informLibProp react_after grammar orders initial when_open + syn keyword informLibProp when_closed when_on when_off description + syn keyword informLibProp describe article cant_go found_in time_left + syn keyword informLibProp number time_out daemon each_turn capacity + syn keyword informLibProp name short_name short_name_indef parse_name + syn keyword informLibProp articles inside_description + if !exists("inform_highlight_old") + syn keyword informLibProp compass_look before_implicit + syn keyword informLibProp ext_initialise ext_messages + endif + + syn keyword informLibObj e_obj se_obj s_obj sw_obj w_obj nw_obj n_obj + syn keyword informLibObj ne_obj u_obj d_obj in_obj out_obj compass + syn keyword informLibObj thedark selfobj player location second actor + syn keyword informLibObj noun + if !exists("inform_highlight_old") + syn keyword informLibObj LibraryExtensions + endif + + syn keyword informLibRoutine Achieved AfterRoutines AddToScope + syn keyword informLibRoutine AllowPushDir Banner ChangeDefault + syn keyword informLibRoutine ChangePlayer CommonAncestor DictionaryLookup + syn keyword informLibRoutine DisplayStatus DoMenu DrawStatusLine + syn keyword informLibRoutine EnglishNumber HasLightSource GetGNAOfObject + syn keyword informLibRoutine IndirectlyContains IsSeeThrough Locale + syn keyword informLibRoutine LoopOverScope LTI_Insert MoveFloatingObjects + syn keyword informLibRoutine NextWord NextWordStopped NounDomain + syn keyword informLibRoutine ObjectIsUntouchable OffersLight ParseToken + syn keyword informLibRoutine PlaceInScope PlayerTo PrintShortName + syn keyword informLibRoutine PronounNotice ScopeWithin SetPronoun SetTime + syn keyword informLibRoutine StartDaemon StartTimer StopDaemon StopTimer + syn keyword informLibRoutine TestScope TryNumber UnsignedCompare + syn keyword informLibRoutine WordAddress WordInProperty WordLength + syn keyword informLibRoutine WriteListFrom YesOrNo ZRegion RunRoutines + syn keyword informLibRoutine AfterLife AfterPrompt Amusing BeforeParsing + syn keyword informLibRoutine ChooseObjects DarkToDark DeathMessage + syn keyword informLibRoutine GamePostRoutine GamePreRoutine Initialise + syn keyword informLibRoutine InScope LookRoutine NewRoom ParseNoun + syn keyword informLibRoutine ParseNumber ParserError PrintRank PrintVerb + syn keyword informLibRoutine PrintTaskName TimePasses UnknownVerb + if exists("inform_highlight_glulx") + syn keyword informLibRoutine IdentifyGlkObject HandleGlkEvent + syn keyword informLibRoutine InitGlkWindow + endif + if !exists("inform_highlight_old") + syn keyword informLibRoutine KeyCharPrimitive KeyDelay ClearScreen + syn keyword informLibRoutine MoveCursor MainWindow StatusLineHeight + syn keyword informLibRoutine ScreenWidth ScreenHeight SetColour + syn keyword informLibRoutine DecimalNumber PrintToBuffer Length + syn keyword informLibRoutine UpperCase LowerCase PrintCapitalised + syn keyword informLibRoutine Cap Centre + if exists("inform_highlight_glulx") + syn keyword informLibRoutine PrintAnything PrintAnyToArray + endif + endif + + syn keyword informLibAction Quit Restart Restore Verify Save + syn keyword informLibAction ScriptOn ScriptOff Pronouns Score + syn keyword informLibAction Fullscore LMode1 LMode2 LMode3 + syn keyword informLibAction NotifyOn NotifyOff Version Places + syn keyword informLibAction Objects TraceOn TraceOff TraceLevel + syn keyword informLibAction ActionsOn ActionsOff RoutinesOn + syn keyword informLibAction RoutinesOff TimersOn TimersOff + syn keyword informLibAction CommandsOn CommandsOff CommandsRead + syn keyword informLibAction Predictable XPurloin XAbstract XTree + syn keyword informLibAction Scope Goto Gonear Inv InvTall InvWide + syn keyword informLibAction Take Drop Remove PutOn Insert Transfer + syn keyword informLibAction Empty Enter Exit GetOff Go Goin Look + syn keyword informLibAction Examine Search Give Show Unlock Lock + syn keyword informLibAction SwitchOn SwitchOff Open Close Disrobe + syn keyword informLibAction Wear Eat Yes No Burn Pray Wake + syn keyword informLibAction WakeOther Consult Kiss Think Smell + syn keyword informLibAction Listen Taste Touch Dig Cut Jump + syn keyword informLibAction JumpOver Tie Drink Fill Sorry Strong + syn keyword informLibAction Mild Attack Swim Swing Blow Rub Set + syn keyword informLibAction SetTo WaveHands Wave Pull Push PushDir + syn keyword informLibAction Turn Squeeze LookUnder ThrowAt Tell + syn keyword informLibAction Answer Buy Ask AskFor Sing Climb Wait + syn keyword informLibAction Sleep LetGo Receive ThrownAt Order + syn keyword informLibAction TheSame PluralFound Miscellany Prompt + syn keyword informLibAction ChangesOn ChangesOff Showverb Showobj + syn keyword informLibAction EmptyT VagueGo + if exists("inform_highlight_glulx") + syn keyword informLibAction GlkList + endif + + syn keyword informLibVariable keep_silent deadflag action special_number + syn keyword informLibVariable consult_from consult_words etype verb_num + syn keyword informLibVariable verb_word the_time real_location c_style + syn keyword informLibVariable parser_one parser_two listing_together wn + syn keyword informLibVariable parser_action scope_stage scope_reason + syn keyword informLibVariable action_to_be menu_item item_name item_width + syn keyword informLibVariable lm_o lm_n inventory_style task_scores + syn keyword informLibVariable inventory_stage + + syn keyword informLibConst AMUSING_PROVIDED DEBUG Headline MAX_CARRIED + syn keyword informLibConst MAX_SCORE MAX_TIMERS NO_PLACES NUMBER_TASKS + syn keyword informLibConst OBJECT_SCORE ROOM_SCORE SACK_OBJECT Story + syn keyword informLibConst TASKS_PROVIDED WITHOUT_DIRECTIONS + syn keyword informLibConst NEWLINE_BIT INDENT_BIT FULLINV_BIT ENGLISH_BIT + syn keyword informLibConst RECURSE_BIT ALWAYS_BIT TERSE_BIT PARTINV_BIT + syn keyword informLibConst DEFART_BIT WORKFLAG_BIT ISARE_BIT CONCEAL_BIT + syn keyword informLibConst PARSING_REASON TALKING_REASON EACHTURN_REASON + syn keyword informLibConst REACT_BEFORE_REASON REACT_AFTER_REASON + syn keyword informLibConst TESTSCOPE_REASON LOOPOVERSCOPE_REASON + syn keyword informLibConst STUCK_PE UPTO_PE NUMBER_PE CANTSEE_PE TOOLIT_PE + syn keyword informLibConst NOTHELD_PE MULTI_PE MMULTI_PE VAGUE_PE EXCEPT_PE + syn keyword informLibConst ANIMA_PE VERB_PE SCENERY_PE ITGONE_PE + syn keyword informLibConst JUNKAFTER_PE TOOFEW_PE NOTHING_PE ASKSCOPE_PE + if !exists("inform_highlight_old") + syn keyword informLibConst WORDSIZE TARGET_ZCODE TARGET_GLULX + syn keyword informLibConst LIBRARY_PARSER LIBRARY_VERBLIB LIBRARY_GRAMMAR + syn keyword informLibConst LIBRARY_ENGLISH NO_SCORE START_MOVE + syn keyword informLibConst CLR_DEFAULT CLR_BLACK CLR_RED CLR_GREEN + syn keyword informLibConst CLR_YELLOW CLR_BLUE CLR_MAGENTA CLR_CYAN + syn keyword informLibConst CLR_WHITE CLR_PURPLE CLR_AZURE + syn keyword informLibConst WIN_ALL WIN_MAIN WIN_STATUS + endif +endif + +" Now the case sensitive stuff. + +syntax case match + +syn keyword informSysFunc child children elder indirect parent random +syn keyword informSysFunc sibling younger youngest metaclass +if exists("inform_highlight_glulx") + syn keyword informSysFunc glk +endif + +syn keyword informSysConst adjectives_table actions_table classes_table +syn keyword informSysConst identifiers_table preactions_table version_number +syn keyword informSysConst largest_object strings_offset code_offset +syn keyword informSysConst dict_par1 dict_par2 dict_par3 +syn keyword informSysConst actual_largest_object static_memory_offset +syn keyword informSysConst array_names_offset readable_memory_offset +syn keyword informSysConst cpv__start cpv__end ipv__start ipv__end +syn keyword informSysConst array__start array__end lowest_attribute_number +syn keyword informSysConst highest_attribute_number attribute_names_array +syn keyword informSysConst lowest_property_number highest_property_number +syn keyword informSysConst property_names_array lowest_action_number +syn keyword informSysConst highest_action_number action_names_array +syn keyword informSysConst lowest_fake_action_number highest_fake_action_number +syn keyword informSysConst fake_action_names_array lowest_routine_number +syn keyword informSysConst highest_routine_number routines_array +syn keyword informSysConst routine_names_array routine_flags_array +syn keyword informSysConst lowest_global_number highest_global_number globals_array +syn keyword informSysConst global_names_array global_flags_array +syn keyword informSysConst lowest_array_number highest_array_number arrays_array +syn keyword informSysConst array_names_array array_flags_array lowest_constant_number +syn keyword informSysConst highest_constant_number constants_array constant_names_array +syn keyword informSysConst lowest_class_number highest_class_number class_objects_array +syn keyword informSysConst lowest_object_number highest_object_number +if !exists("inform_highlight_old") + syn keyword informSysConst sys_statusline_flag +endif + +syn keyword informConditional default else if switch + +syn keyword informRepeat break continue do for objectloop until while + +syn keyword informStatement box font give inversion jump move new_line +syn keyword informStatement print print_ret quit read remove restore return +syn keyword informStatement rfalse rtrue save spaces string style + +syn keyword informOperator roman reverse bold underline fixed on off to +syn keyword informOperator near from + +syn keyword informKeyword dictionary symbols objects verbs assembly +syn keyword informKeyword expressions lines tokens linker on off alias long +syn keyword informKeyword additive score time string table +syn keyword informKeyword with private has class error fatalerror +syn keyword informKeyword warning self +if !exists("inform_highlight_old") + syn keyword informKeyword buffer +endif + +syn keyword informMetaAttrib remaining create destroy recreate copy call +syn keyword informMetaAttrib print_to_array + +syn keyword informPredicate has hasnt in notin ofclass or +syn keyword informPredicate provides + +syn keyword informGrammar contained noun held multi multiheld multiexcept +syn keyword informGrammar contained multiinside creature special number +syn keyword informGrammar contained scope topic reverse meta only replace +syn keyword informGrammar contained first last + +syn keyword informKeywordObsolete contained initial data initstr + +syn keyword informTodo contained TODO + +" Assembly language mnemonics must be preceded by a '@'. + +syn match informAsmContainer "@\s*\k*" contains=informAsm,informAsmObsolete + +if exists("inform_highlight_glulx") + syn keyword informAsm contained nop add sub mul div mod neg bitand bitor + syn keyword informAsm contained bitxor bitnot shiftl sshiftr ushiftr jump jz + syn keyword informAsm contained jnz jeq jne jlt jge jgt jle jltu jgeu jgtu + syn keyword informAsm contained jleu call return catch throw tailcall copy + syn keyword informAsm contained copys copyb sexs sexb aload aloads aloadb + syn keyword informAsm contained aloadbit astore astores astoreb astorebit + syn keyword informAsm contained stkcount stkpeek stkswap stkroll stkcopy + syn keyword informAsm contained streamchar streamnum streamstr gestalt + syn keyword informAsm contained debugtrap getmemsize setmemsize jumpabs + syn keyword informAsm contained random setrandom quit verify restart save + syn keyword informAsm contained restore saveundo restoreundo protect glk + syn keyword informAsm contained getstringtbl setstringtbl getiosys setiosys + syn keyword informAsm contained linearsearch binarysearch linkedsearch + syn keyword informAsm contained callf callfi callfii callfiii +else + syn keyword informAsm contained je jl jg dec_chk inc_chk jin test or and + syn keyword informAsm contained test_attr set_attr clear_attr store + syn keyword informAsm contained insert_obj loadw loadb get_prop + syn keyword informAsm contained get_prop_addr get_next_prop add sub mul div + syn keyword informAsm contained mod call storew storeb put_prop sread + syn keyword informAsm contained print_num random push pull + syn keyword informAsm contained split_window set_window output_stream + syn keyword informAsm contained input_stream sound_effect jz get_sibling + syn keyword informAsm contained get_child get_parent get_prop_len inc dec + syn keyword informAsm contained remove_obj print_obj ret jump + syn keyword informAsm contained load not rtrue rfalse print + syn keyword informAsm contained print_ret nop save restore restart + syn keyword informAsm contained ret_popped pop quit new_line show_status + syn keyword informAsm contained verify call_2s call_vs aread call_vs2 + syn keyword informAsm contained erase_window erase_line set_cursor get_cursor + syn keyword informAsm contained set_text_style buffer_mode read_char + syn keyword informAsm contained scan_table call_1s call_2n set_colour throw + syn keyword informAsm contained call_vn call_vn2 tokenise encode_text + syn keyword informAsm contained copy_table print_table check_arg_count + syn keyword informAsm contained call_1n catch piracy log_shift art_shift + syn keyword informAsm contained set_font save_undo restore_undo draw_picture + syn keyword informAsm contained picture_data erase_picture set_margins + syn keyword informAsm contained move_window window_size window_style + syn keyword informAsm contained get_wind_prop scroll_window pop_stack + syn keyword informAsm contained read_mouse mouse_window push_stack + syn keyword informAsm contained put_wind_prop print_form make_menu + syn keyword informAsm contained picture_table + if !exists("inform_highlight_old") + syn keyword informAsm contained check_unicode print_unicode + endif + syn keyword informAsmObsolete contained print_paddr print_addr print_char +endif + +" Handling for different versions of VIM. + +if version >= 600 + setlocal iskeyword+=$ + command -nargs=+ SynDisplay syntax <args> display +else + set iskeyword+=$ + command -nargs=+ SynDisplay syntax <args> +endif + +" Grammar sections. + +syn region informGrammarSection matchgroup=informGramPreProc start="\<Verb\|Extend\>" skip=+".*"+ end=";"he=e-1 contains=ALLBUT,informAsm + +" Special character forms. + +SynDisplay match informBadAccent contained "@[^{[:digit:]]\D" +SynDisplay match informBadAccent contained "@{[^}]*}" +SynDisplay match informAccent contained "@:[aouAOUeiyEI]" +SynDisplay match informAccent contained "@'[aeiouyAEIOUY]" +SynDisplay match informAccent contained "@`[aeiouAEIOU]" +SynDisplay match informAccent contained "@\^[aeiouAEIOU]" +SynDisplay match informAccent contained "@\~[anoANO]" +SynDisplay match informAccent contained "@/[oO]" +SynDisplay match informAccent contained "@ss\|@<<\|@>>\|@oa\|@oA\|@ae\|@AE\|@cc\|@cC" +SynDisplay match informAccent contained "@th\|@et\|@Th\|@Et\|@LL\|@oe\|@OE\|@!!\|@??" +SynDisplay match informAccent contained "@{\x\{1,4}}" +SynDisplay match informBadStrUnicode contained "@@\D" +SynDisplay match informStringUnicode contained "@@\d\+" +SynDisplay match informStringCode contained "@\d\d" + +" String and Character constants. Ordering is important here. +syn region informString start=+"+ skip=+\\\\+ end=+"+ contains=informAccent,informStringUnicode,informStringCode,informBadAccent,informBadStrUnicode +syn region informDictString start="'" end="'" contains=informAccent,informBadAccent +SynDisplay match informBadDictString "''" +SynDisplay match informDictString "'''" + +" Integer numbers: decimal, hexadecimal and binary. +SynDisplay match informNumber "\<\d\+\>" +SynDisplay match informNumber "\<\$\x\+\>" +SynDisplay match informNumber "\<\$\$[01]\+\>" + +" Comments +syn match informComment "!.*" contains=informTodo + +" Syncronization +syn sync match informSyncStringEnd grouphere NONE /"[;,]\s*$/ +syn sync match informSyncRoutineEnd grouphere NONE /][;,]\s*$/ +syn sync match informSyncCommentEnd grouphere NONE /^\s*!.*$/ +syn sync match informSyncRoutine groupthere informGrammarSection "\<Verb\|Extend\>" +syn sync maxlines=500 + +delcommand SynDisplay + +" The default highlighting. +if version >= 508 || !exists("did_inform_syn_inits") + if version < 508 + let did_inform_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink informDefine Define + HiLink informType Type + HiLink informInclude Include + HiLink informPreCondit PreCondit + HiLink informPreProc PreProc + HiLink informGramPreProc PreProc + HiLink informAsm Special + if !exists("inform_suppress_obsolete") + HiLink informAsmObsolete informError + HiLink informKeywordObsolete informError + else + HiLink informAsmObsolete Special + HiLink informKeywordObsolete Keyword + endif + HiLink informPredicate Operator + HiLink informSysFunc Identifier + HiLink informSysConst Identifier + HiLink informConditional Conditional + HiLink informRepeat Repeat + HiLink informStatement Statement + HiLink informOperator Operator + HiLink informKeyword Keyword + HiLink informGrammar Keyword + HiLink informDictString String + HiLink informNumber Number + HiLink informError Error + HiLink informString String + HiLink informComment Comment + HiLink informAccent Special + HiLink informStringUnicode Special + HiLink informStringCode Special + HiLink informTodo Todo + if !exists("inform_highlight_simple") + HiLink informLibAttrib Identifier + HiLink informLibProp Identifier + HiLink informLibObj Identifier + HiLink informLibRoutine Identifier + HiLink informLibVariable Identifier + HiLink informLibConst Identifier + HiLink informLibAction Identifier + endif + HiLink informBadDictString informError + HiLink informBadAccent informError + HiLink informBadStrUnicode informError + + delcommand HiLink +endif + +let b:current_syntax = "inform" + +" vim: ts=8 diff --git a/runtime/syntax/inittab.vim b/runtime/syntax/inittab.vim new file mode 100644 index 000000000..b7472f9e0 --- /dev/null +++ b/runtime/syntax/inittab.vim @@ -0,0 +1,75 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: SysV-compatible init process control file `inittab' +" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> +" Last Change: 2002-09-13 +" URL: http://physics.muni.cz/~yeti/download/syntax/inittab.vim + +" Setup +if version >= 600 + if exists("b:current_syntax") + finish + endif +else + syntax clear +endif + +syn case match + +" Base constructs +syn match inittabError "[^:]\+:"me=e-1 contained +syn match inittabError "[^:]\+$" contained +syn match inittabComment "^[#:].*$" contains=inittabFixme +syn match inittabComment "#.*$" contained contains=inittabFixme +syn keyword inittabFixme FIXME TODO XXX NOT + +" Shell +syn region inittabShString start=+"+ end=+"+ skip=+\\\\\|\\\"+ contained +syn region inittabShString start=+'+ end=+'+ contained +syn match inittabShOption "\s[-+][[:alnum:]]\+"ms=s+1 contained +syn match inittabShOption "\s--[:alnum:][-[:alnum:]]*"ms=s+1 contained +syn match inittabShCommand "/\S\+" contained +syn cluster inittabSh add=inittabShOption,inittabShString,inittabShCommand + +" Keywords +syn keyword inittabActionName respawn wait once boot bootwait off ondemand sysinit powerwait powerfail powerokwait powerfailnow ctrlaltdel kbrequest initdefault contained + +" Line parser +syn match inittabId "^[[:alnum:]~]\{1,4}" nextgroup=inittabColonRunLevels,inittabError +syn match inittabColonRunLevels ":" contained nextgroup=inittabRunLevels,inittabColonAction,inittabError +syn match inittabRunLevels "[0-6A-Ca-cSs]\+" contained nextgroup=inittabColonAction,inittabError +syn match inittabColonAction ":" contained nextgroup=inittabAction,inittabError +syn match inittabAction "\w\+" contained nextgroup=inittabColonProcess,inittabError contains=inittabActionName +syn match inittabColonProcess ":" contained nextgroup=inittabProcessPlus,inittabProcess,inittabError +syn match inittabProcessPlus "+" contained nextgroup=inittabProcess,inittabError +syn region inittabProcess start="/" end="$" transparent oneline contained contains=@inittabSh,inittabComment + +" Define the default highlighting +if version >= 508 || !exists("did_inittab_syntax_inits") + if version < 508 + let did_inittab_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink inittabComment Comment + HiLink inittabFixme Todo + HiLink inittabActionName Type + HiLink inittabError Error + HiLink inittabId Identifier + HiLink inittabRunLevels Special + + HiLink inittabColonProcess inittabColon + HiLink inittabColonAction inittabColon + HiLink inittabColonRunLevels inittabColon + HiLink inittabColon PreProc + + HiLink inittabShString String + HiLink inittabShOption Special + HiLink inittabShCommand Statement + + delcommand HiLink +endif + +let b:current_syntax = "inittab" diff --git a/runtime/syntax/ipfilter.vim b/runtime/syntax/ipfilter.vim new file mode 100644 index 000000000..e1e6fc412 --- /dev/null +++ b/runtime/syntax/ipfilter.vim @@ -0,0 +1,43 @@ +" ipfilter syntax file +" Language: ipfilter configuration file +" Maintainer: Hendrik Scholz <hendrik@scholz.net> +" Last Change: 2003 May 11 +" +" http://raisdorf.net/files/misc/ipfilter.vim +" +" This will also work for OpenBSD pf but there might be some tags that are +" not correctly identified. +" Please send comments to hendrik@scholz.net + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" comments +syn match ipfComment /#/ +"syn match ipfComment /#.*/ + +syn keyword ipfQuick quick log dup-to +syn keyword ipfAny all any +" rule Action type +syn region ipfActionBlock start=/^block/ end=/$/ contains=ipfQuick,ipfAny +syn region ipfActionPass start=/^pass/ end=/$/ contains=ipfQuick,ipfAny +syn region ipfActionMisc start=/^log/ end=/$/ contains=ipfQuick,ipfAny +syn region ipfActionMisc start=/^count/ end=/$/ contains=ipfQuick,ipfAny +syn region ipfActionMisc start=/^skip/ end=/$/ contains=ipfQuick,ipfAny +syn region ipfActionMisc start=/^auth/ end=/$/ contains=ipfQuick,ipfAny +syn region ipfActionMisc start=/^call/ end=/$/ contains=ipfQuick,ipfAny + +hi def link ipfComment Comment +hi def link ipfActionBlock String +hi def link ipfActionPass Type +hi def link ipfActionMisc Label +"hi def link ipfQuick Error +hi def link ipfQuick Special +hi def link ipfAny Todo + + diff --git a/runtime/syntax/ishd.vim b/runtime/syntax/ishd.vim new file mode 100644 index 000000000..1c011f1b9 --- /dev/null +++ b/runtime/syntax/ishd.vim @@ -0,0 +1,422 @@ +" Vim syntax file +" Language: InstallShield Script +" Maintainer: Robert M. Cortopassi <cortopar@mindspring.com> +" Last Change: 2001 May 09 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn keyword ishdStatement abort begin case default downto else end +syn keyword ishdStatement endif endfor endwhile endswitch endprogram exit elseif +syn keyword ishdStatement error for function goto if +syn keyword ishdStatement program prototype return repeat string step switch +syn keyword ishdStatement struct then to typedef until while + +syn keyword ishdType BOOL BYREF CHAR GDI HWND INT KERNEL LIST LONG +syn keyword ishdType NUMBER POINTER SHORT STRING USER + +syn keyword ishdConstant _MAX_LENGTH _MAX_STRING +syn keyword ishdConstant AFTER ALLCONTENTS ALLCONTROLS APPEND ASKDESTPATH +syn keyword ishdConstant ASKOPTIONS ASKPATH ASKTEXT BATCH_INSTALL BACK +syn keyword ishdConstant BACKBUTTON BACKGROUND BACKGROUNDCAPTION BADPATH +syn keyword ishdConstant BADTAGFILE BASEMEMORY BEFORE BILLBOARD BINARY +syn keyword ishdConstant BITMAP256COLORS BITMAPFADE BITMAPICON BK_BLUE BK_GREEN +syn keyword ishdConstant BK_MAGENTA BK_MAGENTA1 BK_ORANGE BK_PINK BK_RED +syn keyword ishdConstant BK_SMOOTH BK_SOLIDBLACK BK_SOLIDBLUE BK_SOLIDGREEN +syn keyword ishdConstant BK_SOLIDMAGENTA BK_SOLIDORANGE BK_SOLIDPINK BK_SOLIDRED +syn keyword ishdConstant BK_SOLIDWHITE BK_SOLIDYELLOW BK_YELLOW BLACK BLUE +syn keyword ishdConstant BOOTUPDRIVE BUTTON_CHECKED BUTTON_ENTER BUTTON_UNCHECKED +syn keyword ishdConstant BUTTON_UNKNOWN CMDLINE COMMONFILES CANCEL CANCELBUTTON +syn keyword ishdConstant CC_ERR_FILEFORMATERROR CC_ERR_FILEREADERROR +syn keyword ishdConstant CC_ERR_NOCOMPONENTLIST CC_ERR_OUTOFMEMORY CDROM +syn keyword ishdConstant CDROM_DRIVE CENTERED CHANGEDIR CHECKBOX CHECKBOX95 +syn keyword ishdConstant CHECKLINE CHECKMARK CMD_CLOSE CMD_MAXIMIZE CMD_MINIMIZE +syn keyword ishdConstant CMD_PUSHDOWN CMD_RESTORE COLORMODE256 COLORS +syn keyword ishdConstant COMBOBOX_ENTER COMBOBOX_SELECT COMMAND COMMANDEX +syn keyword ishdConstant COMMON COMP_DONE COMP_ERR_CREATEDIR +syn keyword ishdConstant COMP_ERR_DESTCONFLICT COMP_ERR_FILENOTINLIB +syn keyword ishdConstant COMP_ERR_FILESIZE COMP_ERR_FILETOOLARGE +syn keyword ishdConstant COMP_ERR_HEADER COMP_ERR_INCOMPATIBLE +syn keyword ishdConstant COMP_ERR_INTPUTNOTCOMPRESSED COMP_ERR_INVALIDLIST +syn keyword ishdConstant COMP_ERR_LAUNCHSERVER COMP_ERR_MEMORY +syn keyword ishdConstant COMP_ERR_NODISKSPACE COMP_ERR_OPENINPUT +syn keyword ishdConstant COMP_ERR_OPENOUTPUT COMP_ERR_OPTIONS +syn keyword ishdConstant COMP_ERR_OUTPUTNOTCOMPRESSED COMP_ERR_SPLIT +syn keyword ishdConstant COMP_ERR_TARGET COMP_ERR_TARGETREADONLY COMP_ERR_WRITE +syn keyword ishdConstant COMP_INFO_ATTRIBUTE COMP_INFO_COMPSIZE COMP_INFO_DATE +syn keyword ishdConstant COMP_INFO_INVALIDATEPASSWORD COMP_INFO_ORIGSIZE +syn keyword ishdConstant COMP_INFO_SETPASSWORD COMP_INFO_TIME +syn keyword ishdConstant COMP_INFO_VERSIONLS COMP_INFO_VERSIONMS COMP_NORMAL +syn keyword ishdConstant COMP_UPDATE_DATE COMP_UPDATE_DATE_NEWER +syn keyword ishdConstant COMP_UPDATE_SAME COMP_UPDATE_VERSION COMPACT +syn keyword ishdConstant COMPARE_DATE COMPARE_SIZE COMPARE_VERSION +syn keyword ishdConstant COMPONENT_FIELD_CDROM_FOLDER +syn keyword ishdConstant COMPONENT_FIELD_DESCRIPTION COMPONENT_FIELD_DESTINATION +syn keyword ishdConstant COMPONENT_FIELD_DISPLAYNAME COMPONENT_FIELD_FILENEED +syn keyword ishdConstant COMPONENT_FIELD_FTPLOCATION +syn keyword ishdConstant COMPONENT_FIELD_HTTPLOCATION COMPONENT_FIELD_MISC +syn keyword ishdConstant COMPONENT_FIELD_OVERWRITE COMPONENT_FIELD_PASSWORD +syn keyword ishdConstant COMPONENT_FIELD_SELECTED COMPONENT_FIELD_SIZE +syn keyword ishdConstant COMPONENT_FIELD_STATUS COMPONENT_FIELD_VISIBLE +syn keyword ishdConstant COMPONENT_FILEINFO_COMPRESSED +syn keyword ishdConstant COMPONENT_FILEINFO_COMPRESSENGINE +syn keyword ishdConstant COMPONENT_FILEINFO_LANGUAGECOMPONENT_FILEINFO_OS +syn keyword ishdConstant COMPONENT_FILEINFO_POTENTIALLYLOCKED +syn keyword ishdConstant COMPONENT_FILEINFO_SELFREGISTERING +syn keyword ishdConstant COMPONENT_FILEINFO_SHARED COMPONENT_INFO_ATTRIBUTE +syn keyword ishdConstant COMPONENT_INFO_COMPSIZE COMPONENT_INFO_DATE +syn keyword ishdConstant COMPONENT_INFO_DATE_EX_EX COMPONENT_INFO_LANGUAGE +syn keyword ishdConstant COMPONENT_INFO_ORIGSIZE COMPONENT_INFO_OS +syn keyword ishdConstant COMPONENT_INFO_TIME COMPONENT_INFO_VERSIONLS +syn keyword ishdConstant COMPONENT_INFO_VERSIONMS COMPONENT_INFO_VERSIONSTR +syn keyword ishdConstant COMPONENT_VALUE_ALWAYSOVERWRITE +syn keyword ishdConstant COMPONENT_VALUE_CRITICAL +syn keyword ishdConstant COMPONENT_VALUE_HIGHLYRECOMMENDED +syn keyword ishdConstant COMPONENT_FILEINFO_LANGUAGE COMPONENT_FILEINFO_OS +syn keyword ishdConstant COMPONENT_VALUE_NEVEROVERWRITE +syn keyword ishdConstant COMPONENT_VALUE_NEWERDATE COMPONENT_VALUE_NEWERVERSION +syn keyword ishdConstant COMPONENT_VALUE_OLDERDATE COMPONENT_VALUE_OLDERVERSION +syn keyword ishdConstant COMPONENT_VALUE_SAMEORNEWDATE +syn keyword ishdConstant COMPONENT_VALUE_SAMEORNEWERVERSION +syn keyword ishdConstant COMPONENT_VALUE_STANDARD COMPONENT_VIEW_CHANGE +syn keyword ishdConstant COMPONENT_INFO_DATE_EX COMPONENT_VIEW_CHILDVIEW +syn keyword ishdConstant COMPONENT_VIEW_COMPONENT COMPONENT_VIEW_DESCRIPTION +syn keyword ishdConstant COMPONENT_VIEW_MEDIA COMPONENT_VIEW_PARENTVIEW +syn keyword ishdConstant COMPONENT_VIEW_SIZEAVAIL COMPONENT_VIEW_SIZETOTAL +syn keyword ishdConstant COMPONENT_VIEW_TARGETLOCATION COMPRESSHIGH COMPRESSLOW +syn keyword ishdConstant COMPRESSMED COMPRESSNONE CONTIGUOUS CONTINUE +syn keyword ishdConstant COPY_ERR_CREATEDIR COPY_ERR_NODISKSPACE +syn keyword ishdConstant COPY_ERR_OPENINPUT COPY_ERR_OPENOUTPUT +syn keyword ishdConstant COPY_ERR_TARGETREADONLY COPY_ERR_MEMORY +syn keyword ishdConstant CORECOMPONENTHANDLING CPU CUSTOM DATA_COMPONENT +syn keyword ishdConstant DATA_LIST DATA_NUMBER DATA_STRING DATE DEFAULT +syn keyword ishdConstant DEFWINDOWMODE DELETE_EOF DIALOG DIALOGCACHE +syn keyword ishdConstant DIALOGTHINFONT DIR_WRITEABLE DIRECTORY DISABLE DISK +syn keyword ishdConstant DISK_FREESPACE DISK_TOTALSPACE DISKID DLG_ASK_OPTIONS +syn keyword ishdConstant DLG_ASK_PATH DLG_ASK_TEXT DLG_ASK_YESNO DLG_CANCEL +syn keyword ishdConstant DLG_CDIR DLG_CDIR_MSG DLG_CENTERED DLG_CLOSE +syn keyword ishdConstant DLG_DIR_DIRECTORY DLG_DIR_FILE DLG_ENTER_DISK DLG_ERR +syn keyword ishdConstant DLG_ERR_ALREADY_EXISTS DLG_ERR_ENDDLG DLG_INFO_ALTIMAGE +syn keyword ishdConstant DLG_INFO_CHECKMETHOD DLG_INFO_CHECKSELECTION +syn keyword ishdConstant DLG_INFO_ENABLEIMAGE DLG_INFO_KUNITS +syn keyword ishdConstant DLG_INFO_USEDECIMAL DLG_INIT DLG_MSG_ALL +syn keyword ishdConstant DLG_MSG_INFORMATION DLG_MSG_NOT_HAND DLG_MSG_SEVERE +syn keyword ishdConstant DLG_MSG_STANDARD DLG_MSG_WARNING DLG_OK DLG_STATUS +syn keyword ishdConstant DLG_USER_CAPTION DRIVE DRIVEOPEN DLG_DIR_DRIVE +syn keyword ishdConstant EDITBOX_CHANGE EFF_BOXSTRIPE EFF_FADE EFF_HORZREVEAL +syn keyword ishdConstant EFF_HORZSTRIPE EFF_NONE EFF_REVEAL EFF_VERTSTRIPE +syn keyword ishdConstant ENABLE END_OF_FILE END_OF_LIST ENHANCED ENTERDISK +syn keyword ishdConstant ENTERDISK_ERRMSG ENTERDISKBEEP ENVSPACE EQUALS +syn keyword ishdConstant ERR_BADPATH ERR_BADTAGFILE ERR_BOX_BADPATH +syn keyword ishdConstant ERR_BOX_BADTAGFILE ERR_BOX_DISKID ERR_BOX_DRIVEOPEN +syn keyword ishdConstant ERR_BOX_EXIT ERR_BOX_HELP ERR_BOX_NOSPACE ERR_BOX_PAUSE +syn keyword ishdConstant ERR_BOX_READONLY ERR_DISKID ERR_DRIVEOPEN +syn keyword ishdConstant EXCLUDE_SUBDIR EXCLUSIVE EXISTS EXIT EXTENDEDMEMORY +syn keyword ishdConstant EXTENSION_ONLY ERRORFILENAME FADE_IN FADE_OUT +syn keyword ishdConstant FAILIFEXISTS FALSE FDRIVE_NUM FEEDBACK FEEDBACK_FULL +syn keyword ishdConstant FEEDBACK_OPERATION FEEDBACK_SPACE FILE_ATTR_ARCHIVED +syn keyword ishdConstant FILE_ATTR_DIRECTORY FILE_ATTR_HIDDEN FILE_ATTR_NORMAL +syn keyword ishdConstant FILE_ATTR_READONLY FILE_ATTR_SYSTEM FILE_ATTRIBUTE +syn keyword ishdConstant FILE_BIN_CUR FILE_BIN_END FILE_BIN_START FILE_DATE +syn keyword ishdConstant FILE_EXISTS FILE_INSTALLED FILE_INVALID FILE_IS_LOCKED +syn keyword ishdConstant FILE_LINE_LENGTH FILE_LOCKED FILE_MODE_APPEND +syn keyword ishdConstant FILE_MODE_BINARY FILE_MODE_BINARYREADONLY +syn keyword ishdConstant FILE_MODE_NORMAL FILE_NO_VERSION FILE_NOT_FOUND +syn keyword ishdConstant FILE_RD_ONLY FILE_SIZE FILE_SRC_EQUAL FILE_SRC_OLD +syn keyword ishdConstant FILE_TIME FILE_WRITEABLE FILENAME FILENAME_ONLY +syn keyword ishdConstant FINISHBUTTON FIXED_DRIVE FONT_TITLE FREEENVSPACE +syn keyword ishdConstant FS_CREATEDIR FS_DISKONEREQUIRED FS_DONE FS_FILENOTINLIB +syn keyword ishdConstant FS_GENERROR FS_INCORRECTDISK FS_LAUNCHPROCESS +syn keyword ishdConstant FS_OPERROR FS_OUTOFSPACE FS_PACKAGING FS_RESETREQUIRED +syn keyword ishdConstant FS_TARGETREADONLY FS_TONEXTDISK FULL FULLSCREEN +syn keyword ishdConstant FULLSCREENSIZE FULLWINDOWMODE FOLDER_DESKTOP +syn keyword ishdConstant FOLDER_PROGRAMS FOLDER_STARTMENU FOLDER_STARTUP +syn keyword ishdConstant GREATER_THAN GREEN HELP HKEY_CLASSES_ROOT +syn keyword ishdConstant HKEY_CURRENT_CONFIG HKEY_CURRENT_USER HKEY_DYN_DATA +syn keyword ishdConstant HKEY_LOCAL_MACHINE HKEY_PERFORMANCE_DATA HKEY_USERS +syn keyword ishdConstant HOURGLASS HWND_DESKTOP HWND_INSTALL IGNORE_READONLY +syn keyword ishdConstant INCLUDE_SUBDIR INDVFILESTATUS INFO INFO_DESCRIPTION +syn keyword ishdConstant INFO_IMAGE INFO_MISC INFO_SIZE INFO_SUBCOMPONENT +syn keyword ishdConstant INFO_VISIBLE INFORMATION INVALID_LIST IS_186 IS_286 +syn keyword ishdConstant IS_386 IS_486 IS_8514A IS_86 IS_ALPHA IS_CDROM IS_CGA +syn keyword ishdConstant IS_DOS IS_EGA IS_FIXED IS_FOLDER IS_ITEM ISLANG_ALL +syn keyword ishdConstant ISLANG_ARABIC ISLANG_ARABIC_SAUDIARABIA +syn keyword ishdConstant ISLANG_ARABIC_IRAQ ISLANG_ARABIC_EGYPT +syn keyword ishdConstant ISLANG_ARABIC_LIBYA ISLANG_ARABIC_ALGERIA +syn keyword ishdConstant ISLANG_ARABIC_MOROCCO ISLANG_ARABIC_TUNISIA +syn keyword ishdConstant ISLANG_ARABIC_OMAN ISLANG_ARABIC_YEMEN +syn keyword ishdConstant ISLANG_ARABIC_SYRIA ISLANG_ARABIC_JORDAN +syn keyword ishdConstant ISLANG_ARABIC_LEBANON ISLANG_ARABIC_KUWAIT +syn keyword ishdConstant ISLANG_ARABIC_UAE ISLANG_ARABIC_BAHRAIN +syn keyword ishdConstant ISLANG_ARABIC_QATAR ISLANG_AFRIKAANS +syn keyword ishdConstant ISLANG_AFRIKAANS_STANDARD ISLANG_ALBANIAN +syn keyword ishdConstant ISLANG_ENGLISH_TRINIDAD ISLANG_ALBANIAN_STANDARD +syn keyword ishdConstant ISLANG_BASQUE ISLANG_BASQUE_STANDARD ISLANG_BULGARIAN +syn keyword ishdConstant ISLANG_BULGARIAN_STANDARD ISLANG_BELARUSIAN +syn keyword ishdConstant ISLANG_BELARUSIAN_STANDARD ISLANG_CATALAN +syn keyword ishdConstant ISLANG_CATALAN_STANDARD ISLANG_CHINESE +syn keyword ishdConstant ISLANG_CHINESE_TAIWAN ISLANG_CHINESE_PRC +syn keyword ishdConstant ISLANG_SPANISH_PUERTORICO ISLANG_CHINESE_HONGKONG +syn keyword ishdConstant ISLANG_CHINESE_SINGAPORE ISLANG_CROATIAN +syn keyword ishdConstant ISLANG_CROATIAN_STANDARD ISLANG_CZECH +syn keyword ishdConstant ISLANG_CZECH_STANDARD ISLANG_DANISH +syn keyword ishdConstant ISLANG_DANISH_STANDARD ISLANG_DUTCH +syn keyword ishdConstant ISLANG_DUTCH_STANDARD ISLANG_DUTCH_BELGIAN +syn keyword ishdConstant ISLANG_ENGLISH ISLANG_ENGLISH_BELIZE +syn keyword ishdConstant ISLANG_ENGLISH_UNITEDSTATES +syn keyword ishdConstant ISLANG_ENGLISH_UNITEDKINGDOM ISLANG_ENGLISH_AUSTRALIAN +syn keyword ishdConstant ISLANG_ENGLISH_CANADIAN ISLANG_ENGLISH_NEWZEALAND +syn keyword ishdConstant ISLANG_ENGLISH_IRELAND ISLANG_ENGLISH_SOUTHAFRICA +syn keyword ishdConstant ISLANG_ENGLISH_JAMAICA ISLANG_ENGLISH_CARIBBEAN +syn keyword ishdConstant ISLANG_ESTONIAN ISLANG_ESTONIAN_STANDARD +syn keyword ishdConstant ISLANG_FAEROESE ISLANG_FAEROESE_STANDARD ISLANG_FARSI +syn keyword ishdConstant ISLANG_FINNISH ISLANG_FINNISH_STANDARD ISLANG_FRENCH +syn keyword ishdConstant ISLANG_FRENCH_STANDARD ISLANG_FRENCH_BELGIAN +syn keyword ishdConstant ISLANG_FRENCH_CANADIAN ISLANG_FRENCH_SWISS +syn keyword ishdConstant ISLANG_FRENCH_LUXEMBOURG ISLANG_FARSI_STANDARD +syn keyword ishdConstant ISLANG_GERMAN ISLANG_GERMAN_STANDARD +syn keyword ishdConstant ISLANG_GERMAN_SWISS ISLANG_GERMAN_AUSTRIAN +syn keyword ishdConstant ISLANG_GERMAN_LUXEMBOURG ISLANG_GERMAN_LIECHTENSTEIN +syn keyword ishdConstant ISLANG_GREEK ISLANG_GREEK_STANDARD ISLANG_HEBREW +syn keyword ishdConstant ISLANG_HEBREW_STANDARD ISLANG_HUNGARIAN +syn keyword ishdConstant ISLANG_HUNGARIAN_STANDARD ISLANG_ICELANDIC +syn keyword ishdConstant ISLANG_ICELANDIC_STANDARD ISLANG_INDONESIAN +syn keyword ishdConstant ISLANG_INDONESIAN_STANDARD ISLANG_ITALIAN +syn keyword ishdConstant ISLANG_ITALIAN_STANDARD ISLANG_ITALIAN_SWISS +syn keyword ishdConstant ISLANG_JAPANESE ISLANG_JAPANESE_STANDARD ISLANG_KOREAN +syn keyword ishdConstant ISLANG_KOREAN_STANDARD ISLANG_KOREAN_JOHAB +syn keyword ishdConstant ISLANG_LATVIAN ISLANG_LATVIAN_STANDARD +syn keyword ishdConstant ISLANG_LITHUANIAN ISLANG_LITHUANIAN_STANDARD +syn keyword ishdConstant ISLANG_NORWEGIAN ISLANG_NORWEGIAN_BOKMAL +syn keyword ishdConstant ISLANG_NORWEGIAN_NYNORSK ISLANG_POLISH +syn keyword ishdConstant ISLANG_POLISH_STANDARD ISLANG_PORTUGUESE +syn keyword ishdConstant ISLANG_PORTUGUESE_BRAZILIAN ISLANG_PORTUGUESE_STANDARD +syn keyword ishdConstant ISLANG_ROMANIAN ISLANG_ROMANIAN_STANDARD ISLANG_RUSSIAN +syn keyword ishdConstant ISLANG_RUSSIAN_STANDARD ISLANG_SLOVAK +syn keyword ishdConstant ISLANG_SLOVAK_STANDARD ISLANG_SLOVENIAN +syn keyword ishdConstant ISLANG_SLOVENIAN_STANDARD ISLANG_SERBIAN +syn keyword ishdConstant ISLANG_SERBIAN_LATIN ISLANG_SERBIAN_CYRILLIC +syn keyword ishdConstant ISLANG_SPANISH ISLANG_SPANISH_ARGENTINA +syn keyword ishdConstant ISLANG_SPANISH_BOLIVIA ISLANG_SPANISH_CHILE +syn keyword ishdConstant ISLANG_SPANISH_COLOMBIA ISLANG_SPANISH_COSTARICA +syn keyword ishdConstant ISLANG_SPANISH_DOMINICANREPUBLIC ISLANG_SPANISH_ECUADOR +syn keyword ishdConstant ISLANG_SPANISH_ELSALVADOR ISLANG_SPANISH_GUATEMALA +syn keyword ishdConstant ISLANG_SPANISH_HONDURAS ISLANG_SPANISH_MEXICAN +syn keyword ishdConstant ISLANG_THAI_STANDARD ISLANG_SPANISH_MODERNSORT +syn keyword ishdConstant ISLANG_SPANISH_NICARAGUA ISLANG_SPANISH_PANAMA +syn keyword ishdConstant ISLANG_SPANISH_PARAGUAY ISLANG_SPANISH_PERU +syn keyword ishdConstant IISLANG_SPANISH_PUERTORICO +syn keyword ishdConstant ISLANG_SPANISH_TRADITIONALSORT ISLANG_SPANISH_VENEZUELA +syn keyword ishdConstant ISLANG_SPANISH_URUGUAY ISLANG_SWEDISH +syn keyword ishdConstant ISLANG_SWEDISH_FINLAND ISLANG_SWEDISH_STANDARD +syn keyword ishdConstant ISLANG_THAI ISLANG_THA_STANDARDI ISLANG_TURKISH +syn keyword ishdConstant ISLANG_TURKISH_STANDARD ISLANG_UKRAINIAN +syn keyword ishdConstant ISLANG_UKRAINIAN_STANDARD ISLANG_VIETNAMESE +syn keyword ishdConstant ISLANG_VIETNAMESE_STANDARD IS_MIPS IS_MONO IS_OS2 +syn keyword ishdConstant ISOSL_ALL ISOSL_WIN31 ISOSL_WIN95 ISOSL_NT351 +syn keyword ishdConstant ISOSL_NT351_ALPHA ISOSL_NT351_MIPS ISOSL_NT351_PPC +syn keyword ishdConstant ISOSL_NT40 ISOSL_NT40_ALPHA ISOSL_NT40_MIPS +syn keyword ishdConstant ISOSL_NT40_PPC IS_PENTIUM IS_POWERPC IS_RAMDRIVE +syn keyword ishdConstant IS_REMOTE IS_REMOVABLE IS_SVGA IS_UNKNOWN IS_UVGA +syn keyword ishdConstant IS_VALID_PATH IS_VGA IS_WIN32S IS_WINDOWS IS_WINDOWS95 +syn keyword ishdConstant IS_WINDOWSNT IS_WINOS2 IS_XVGA ISTYPE INFOFILENAME +syn keyword ishdConstant ISRES ISUSER ISVERSION LANGUAGE LANGUAGE_DRV LESS_THAN +syn keyword ishdConstant LINE_NUMBER LISTBOX_ENTER LISTBOX_SELECT LISTFIRST +syn keyword ishdConstant LISTLAST LISTNEXT LISTPREV LOCKEDFILE LOGGING +syn keyword ishdConstant LOWER_LEFT LOWER_RIGHT LIST_NULL MAGENTA MAINCAPTION +syn keyword ishdConstant MATH_COPROCESSOR MAX_STRING MENU METAFILE MMEDIA_AVI +syn keyword ishdConstant MMEDIA_MIDI MMEDIA_PLAYASYNCH MMEDIA_PLAYCONTINUOUS +syn keyword ishdConstant MMEDIA_PLAYSYNCH MMEDIA_STOP MMEDIA_WAVE MOUSE +syn keyword ishdConstant MOUSE_DRV MEDIA MODE NETWORK NETWORK_DRV NEXT +syn keyword ishdConstant NEXTBUTTON NO NO_SUBDIR NO_WRITE_ACCESS NONCONTIGUOUS +syn keyword ishdConstant NONEXCLUSIVE NORMAL NORMALMODE NOSET NOTEXISTS NOTRESET +syn keyword ishdConstant NOWAIT NULL NUMBERLIST OFF OK ON ONLYDIR OS OSMAJOR +syn keyword ishdConstant OSMINOR OTHER_FAILURE OUT_OF_DISK_SPACE PARALLEL +syn keyword ishdConstant PARTIAL PATH PATH_EXISTS PAUSE PERSONAL PROFSTRING +syn keyword ishdConstant PROGMAN PROGRAMFILES RAM_DRIVE REAL RECORDMODE RED +syn keyword ishdConstant REGDB_APPPATH REGDB_APPPATH_DEFAULT REGDB_BINARY +syn keyword ishdConstant REGDB_ERR_CONNECTIONEXISTS REGDB_ERR_CORRUPTEDREGISTRY +syn keyword ishdConstant REGDB_ERR_FILECLOSE REGDB_ERR_FILENOTFOUND +syn keyword ishdConstant REGDB_ERR_FILEOPEN REGDB_ERR_FILEREAD +syn keyword ishdConstant REGDB_ERR_INITIALIZATION REGDB_ERR_INVALIDFORMAT +syn keyword ishdConstant REGDB_ERR_INVALIDHANDLE REGDB_ERR_INVALIDNAME +syn keyword ishdConstant REGDB_ERR_INVALIDPLATFORM REGDB_ERR_OUTOFMEMORY +syn keyword ishdConstant REGDB_ERR_REGISTRY REGDB_KEYS REGDB_NAMES REGDB_NUMBER +syn keyword ishdConstant REGDB_STRING REGDB_STRING_EXPAND REGDB_STRING_MULTI +syn keyword ishdConstant REGDB_UNINSTALL_NAME REGKEY_CLASSES_ROOT +syn keyword ishdConstant REGKEY_CURRENT_USER REGKEY_LOCAL_MACHINE REGKEY_USERS +syn keyword ishdConstant REMOTE_DRIVE REMOVE REMOVEABLE_DRIVE REPLACE +syn keyword ishdConstant REPLACE_ITEM RESET RESTART ROOT ROTATE RUN_MAXIMIZED +syn keyword ishdConstant RUN_MINIMIZED RUN_SEPARATEMEMORY SELECTFOLDER +syn keyword ishdConstant SELFREGISTER SELFREGISTERBATCH SELFREGISTRATIONPROCESS +syn keyword ishdConstant SERIAL SET SETUPTYPE SETUPTYPE_INFO_DESCRIPTION +syn keyword ishdConstant SETUPTYPE_INFO_DISPLAYNAME SEVERE SHARE SHAREDFILE +syn keyword ishdConstant SHELL_OBJECT_FOLDER SILENTMODE SPLITCOMPRESS SPLITCOPY +syn keyword ishdConstant SRCTARGETDIR STANDARD STATUS STATUS95 STATUSBAR +syn keyword ishdConstant STATUSDLG STATUSEX STATUSOLD STRINGLIST STYLE_BOLD +syn keyword ishdConstant STYLE_ITALIC STYLE_NORMAL STYLE_SHADOW STYLE_UNDERLINE +syn keyword ishdConstant SW_HIDE SW_MAXIMIZE SW_MINIMIZE SW_NORMAL SW_RESTORE +syn keyword ishdConstant SW_SHOW SW_SHOWMAXIMIZED SW_SHOWMINIMIZED +syn keyword ishdConstant SW_SHOWMINNOACTIVE SW_SHOWNA SW_SHOWNOACTIVATE +syn keyword ishdConstant SW_SHOWNORMAL SYS_BOOTMACHINE SYS_BOOTWIN +syn keyword ishdConstant SYS_BOOTWIN_INSTALL SYS_RESTART SYS_SHUTDOWN SYS_TODOS +syn keyword ishdConstant SELECTED_LANGUAGE SHELL_OBJECT_LANGUAGE SRCDIR SRCDISK +syn keyword ishdConstant SUPPORTDIR TEXT TILED TIME TRUE TYPICAL TARGETDIR +syn keyword ishdConstant TARGETDISK UPPER_LEFT UPPER_RIGHT USER_ADMINISTRATOR +syn keyword ishdConstant UNINST VALID_PATH VARIABLE_LEFT VARIABLE_UNDEFINED +syn keyword ishdConstant VER_DLL_NOT_FOUND VER_UPDATE_ALWAYS VER_UPDATE_COND +syn keyword ishdConstant VERSION VIDEO VOLUMELABEL WAIT WARNING WELCOME WHITE +syn keyword ishdConstant WIN32SINSTALLED WIN32SMAJOR WIN32SMINOR WINDOWS_SHARED +syn keyword ishdConstant WINMAJOR WINMINOR WINDIR WINDISK WINSYSDIR WINSYSDISK +syn keyword ishdConstant XCOPY_DATETIME YELLOW YES + +syn keyword ishdFunction AskDestPath AskOptions AskPath AskText AskYesNo +syn keyword ishdFunction AppCommand AddProfString AddFolderIcon BatchAdd +syn keyword ishdFunction BatchDeleteEx BatchFileLoad BatchFileSave BatchFind +syn keyword ishdFunction BatchGetFileName BatchMoveEx BatchSetFileName +syn keyword ishdFunction ComponentDialog ComponentAddItem +syn keyword ishdFunction ComponentCompareSizeRequired ComponentDialog +syn keyword ishdFunction ComponentError ComponentFileEnum ComponentFileInfo +syn keyword ishdFunction ComponentFilterLanguage ComponentFilterOS +syn keyword ishdFunction ComponentGetData ComponentGetItemSize +syn keyword ishdFunction ComponentInitialize ComponentIsItemSelected +syn keyword ishdFunction ComponentListItems ComponentMoveData +syn keyword ishdFunction ComponentSelectItem ComponentSetData ComponentSetTarget +syn keyword ishdFunction ComponentSetupTypeEnum ComponentSetupTypeGetData +syn keyword ishdFunction ComponentSetupTypeSet ComponentTotalSize +syn keyword ishdFunction ComponentValidate ConfigAdd ConfigDelete ConfigFileLoad +syn keyword ishdFunction ConfigFileSave ConfigFind ConfigGetFileName +syn keyword ishdFunction ConfigGetInt ConfigMove ConfigSetFileName ConfigSetInt +syn keyword ishdFunction CmdGetHwndDlg CtrlClear CtrlDir CtrlGetCurSel +syn keyword ishdFunction CtrlGetMLEText CtrlGetMultCurSel CtrlGetState +syn keyword ishdFunction CtrlGetSubCommand CtrlGetText CtrlPGroups +syn keyword ishdFunction CtrlSelectText CtrlSetCurSel CtrlSetFont CtrlSetList +syn keyword ishdFunction CtrlSetMLEText CtrlSetMultCurSel CtrlSetState +syn keyword ishdFunction CtrlSetText CallDLLFx ChangeDirectory CloseFile +syn keyword ishdFunction CopyFile CreateDir CreateFile CreateRegistrySet +syn keyword ishdFunction CommitSharedFiles CreateProgramFolder +syn keyword ishdFunction CreateShellObjects CopyBytes DefineDialog Delay +syn keyword ishdFunction DeleteDir DeleteFile Do DoInstall DeinstallSetReference +syn keyword ishdFunction DeinstallStart DialogSetInfo DeleteFolderIcon +syn keyword ishdFunction DeleteProgramFolder Disable EzBatchAddPath +syn keyword ishdFunction EzBatchAddString ExBatchReplace EnterDisk +syn keyword ishdFunction EzConfigAddDriver EzConfigAddString EzConfigGetValue +syn keyword ishdFunction EzConfigSetValue EndDialog EzDefineDialog ExistsDir +syn keyword ishdFunction ExistsDisk ExitProgMan Enable EzBatchReplace +syn keyword ishdFunction FileCompare FileDeleteLine FileGrep FileInsertLine +syn keyword ishdFunction FindAllDirs FindAllFiles FindFile FindWindow +syn keyword ishdFunction GetFileInfo GetLine GetFont GetDiskSpace GetEnvVar +syn keyword ishdFunction GetExtents GetMemFree GetMode GetSystemInfo +syn keyword ishdFunction GetValidDrivesList GetWindowHandle GetProfInt +syn keyword ishdFunction GetProfString GetFolderNameList GetGroupNameList +syn keyword ishdFunction GetItemNameList GetDir GetDisk HIWORD Handler Is +syn keyword ishdFunction ISCompareServicePack InstallationInfo LOWORD LaunchApp +syn keyword ishdFunction LaunchAppAndWait ListAddItem ListAddString ListCount +syn keyword ishdFunction ListCreate ListCurrentItem ListCurrentString +syn keyword ishdFunction ListDeleteItem ListDeleteString ListDestroy +syn keyword ishdFunction ListFindItem ListFindString ListGetFirstItem +syn keyword ishdFunction ListGetFirstString ListGetNextItem ListGetNextString +syn keyword ishdFunction ListReadFromFile ListSetCurrentItem +syn keyword ishdFunction ListSetCurrentString ListSetIndex ListWriteToFile +syn keyword ishdFunction LongPathFromShortPath LongPathToQuote +syn keyword ishdFunction LongPathToShortPath MessageBox MessageBeep NumToStr +syn keyword ishdFunction OpenFile OpenFileMode PathAdd PathDelete PathFind +syn keyword ishdFunction PathGet PathMove PathSet ProgDefGroupType ParsePath +syn keyword ishdFunction PlaceBitmap PlaceWindow PlayMMedia QueryProgGroup +syn keyword ishdFunction QueryProgItem QueryShellMgr RebootDialog ReleaseDialog +syn keyword ishdFunction ReadBytes RenameFile ReplaceProfString ReloadProgGroup +syn keyword ishdFunction ReplaceFolderIcon RGB RegDBConnectRegistry +syn keyword ishdFunction RegDBCreateKeyEx RegDBDeleteKey RegDBDeleteValue +syn keyword ishdFunction RegDBDisConnectRegistry RegDBGetAppInfo RegDBGetItem +syn keyword ishdFunction RegDBGetKeyValueEx RegDBKeyExist RegDBQueryKey +syn keyword ishdFunction RegDBSetAppInfo RegDBSetDefaultRoot RegDBSetItem +syn keyword ishdFunction RegDBSetKeyValueEx SeekBytes SelectDir SetFileInfo +syn keyword ishdFunction SelectDir SelectFolder SetupType SprintfBox SdSetupType +syn keyword ishdFunction SdSetupTypeEx SdMakeName SilentReadData SilentWriteData +syn keyword ishdFunction SendMessage Sprintf System SdAskDestPath SdAskOptions +syn keyword ishdFunction SdAskOptionsList SdBitmap SdComponentDialog +syn keyword ishdFunction SdComponentDialog2 SdComponentDialogAdv SdComponentMult +syn keyword ishdFunction SdConfirmNewDir SdConfirmRegistration SdDisplayTopics +syn keyword ishdFunction SdFinish SdFinishReboot SdInit SdLicense SdMakeName +syn keyword ishdFunction SdOptionsButtons SdProductName SdRegisterUser +syn keyword ishdFunction SdRegisterUserEx SdSelectFolder SdSetupType +syn keyword ishdFunction SdSetupTypeEx SdShowAnyDialog SdShowDlgEdit1 +syn keyword ishdFunction SdShowDlgEdit2 SdShowDlgEdit3 SdShowFileMods +syn keyword ishdFunction SdShowInfoList SdShowMsg SdStartCopy SdWelcome +syn keyword ishdFunction SelectFolder ShowGroup ShowProgamFolder SetColor +syn keyword ishdFunction SetDialogTitle SetDisplayEffect SetErrorMsg +syn keyword ishdFunction SetErrorTitle SetFont SetStatusWindow SetTitle +syn keyword ishdFunction SizeWindow StatusUpdate StrCompare StrFind StrGetTokens +syn keyword ishdFunction StrLength StrRemoveLastSlash StrSub StrToLower StrToNum +syn keyword ishdFunction StrToUpper ShowProgramFolder UnUseDLL UseDLL VarRestore +syn keyword ishdFunction VarSave VerUpdateFile VerCompare VerFindFileVersion +syn keyword ishdFunction VerGetFileVersion VerSearchAndUpdateFile VerUpdateFile +syn keyword ishdFunction Welcome WaitOnDialog WriteBytes WriteLine +syn keyword ishdFunction WriteProfString XCopyFile + +syn keyword ishdTodo contained TODO + +"integer number, or floating point number without a dot. +syn match ishdNumber "\<\d\+\>" +"floating point number, with dot +syn match ishdNumber "\<\d\+\.\d*\>" +"floating point number, starting with a dot +syn match ishdNumber "\.\d\+\>" + +" String constants +syn region ishdString start=+"+ skip=+\\\\\|\\"+ end=+"+ + +syn region ishdComment start="//" end="$" contains=ishdTodo +syn region ishdComment start="/\*" end="\*/" contains=ishdTodo + +" Pre-processor commands +syn region ishdPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=ishdComment,ishdString +if !exists("ishd_no_if0") + syn region ishdHashIf0 start="^\s*#\s*if\s\+0\>" end=".\|$" contains=ishdHashIf0End + syn region ishdHashIf0End contained start="0" end="^\s*#\s*\(endif\>\|else\>\|elif\>\)" contains=ishdHashIf0Skip + syn region ishdHashIf0Skip contained start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*#\s*endif\>" contains=ishdHashIf0Skip +endif +syn region ishdIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match ishdInclude +^\s*#\s*include\>\s*"+ contains=ishdIncluded +syn cluster ishdPreProcGroup contains=ishdPreCondit,ishdIncluded,ishdInclude,ishdDefine,ishdHashIf0,ishdHashIf0End,ishdHashIf0Skip,ishdNumber +syn region ishdDefine start="^\s*#\s*\(define\|undef\)\>" end="$" contains=ALLBUT,@ishdPreProcGroup + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_is_syntax_inits") + if version < 508 + let did_is_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink ishdNumber Number + HiLink ishdError Error + HiLink ishdStatement Statement + HiLink ishdString String + HiLink ishdComment Comment + HiLink ishdTodo Todo + HiLink ishdFunction Identifier + HiLink ishdConstant PreProc + HiLink ishdType Type + HiLink ishdInclude Include + HiLink ishdDefine Macro + HiLink ishdIncluded String + HiLink ishdPreCondit PreCondit + HiLink ishdHashIf0Skip ishdHashIf0 + HiLink ishdHashIf0End ishdHashIf0 + HiLink ishdHashIf0 Comment + + delcommand HiLink +endif + +let b:current_syntax = "ishd" + +" vim: ts=8 diff --git a/runtime/syntax/iss.vim b/runtime/syntax/iss.vim new file mode 100644 index 000000000..be8901cc2 --- /dev/null +++ b/runtime/syntax/iss.vim @@ -0,0 +1,125 @@ +" Vim syntax file +" Language: Inno Setup File (iss file) and My InnoSetup extension +" Maintainer: Dominique Stéphan (dominique@mggen.com) +" Last change: 2003 May 11 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" shut case off +syn case ignore + +" Section +syn region issHeader start="\[" end="\]" + +" Label in the [Setup] Section +syn match issLabel "^[^=]\+=" + +" URL +syn match issURL "http[s]\=:\/\/.*$" + +" syn match issName "[^: ]\+:" +syn match issName "Name:" +syn match issName "MinVersion:\|OnlyBelowVersion:" +syn match issName "Source:\|DestDir:\|DestName:\|CopyMode:" +syn match issName "Attribs:\|FontInstall:\|Flags:" +syn match issName "FileName:\|Parameters:\|WorkingDir:\|Comment:" +syn match issName "IconFilename:\|IconIndex:" +syn match issName "Section:\|Key:\|String:" +syn match issName "Root:\|SubKey:\|ValueType:\|ValueName:\|ValueData:" +syn match issName "RunOnceId:" +syn match issName "Type:" +syn match issName "Components:\|Description:\|GroupDescription\|Types:" + +syn match issComment "^;.*$" + +" folder constant +syn match issFolder "{[^{]*}" + +" string +syn region issString start=+"+ end=+"+ contains=issFolder + +" [Dirs] +syn keyword issDirsFlags deleteafterinstall uninsalwaysuninstall uninsneveruninstall + +" [Files] +syn keyword issFilesCopyMode normal onlyifdoesntexist alwaysoverwrite alwaysskipifsameorolder +syn keyword issFilesAttribs readonly hidden system +syn keyword issFilesFlags comparetimestampalso confirmoverwrite deleteafterinstall +syn keyword issFilesFlags external fontisnttruetype isreadme overwritereadonly +syn keyword issFilesFlags regserver regtypelib restartreplace +syn keyword issFilesFlags sharedfile skipifsourcedoesntexist uninsneveruninstall + +" [Icons] +syn keyword issIconsFlags createonlyiffileexists runminimized uninsneveruninstall useapppaths + +" [INI] +syn keyword issINIFlags createkeyifdoesntexist uninsdeleteentry uninsdeletesection uninsdeletesectionifempty + +" [Registry] +syn keyword issRegRootKey HKCR HKCU HKLM HKU HKCC +syn keyword issRegValueType none string expandsz multisz dword binary +syn keyword issRegFlags createvalueifdoesntexist deletekey deletevalue preservestringtype +syn keyword issRegFlags uninsclearvalue uninsdeletekey uninsdeletekeyifempty uninsdeletevalue + +" [Run] and [UninstallRun] +syn keyword issRunFlags nowait shellexec skipifdoesntexist runminimized waituntilidle +syn keyword issRunFlags postinstall unchecked showcheckbox + +" [Types] +syn keyword issTypesFlags iscustom + +" [Components] +syn keyword issComponentsFlags fixed restart disablenouninstallwarning + +" [UninstallDelete] and [InstallDelete] +syn keyword issInstallDeleteType files filesandordirs dirifempty + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_iss_syntax_inits") + if version < 508 + let did_iss_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + HiLink issHeader Special + HiLink issComment Comment + HiLink issLabel Type + HiLink issName Type + HiLink issFolder Special + HiLink issString String + HiLink issValue String + HiLink issURL Include + + HiLink issDirsFlags Keyword + HiLink issFilesCopyMode Keyword + HiLink issFilesAttribs Keyword + HiLink issFilesFlags Keyword + HiLink issIconsFlags Keyword + HiLink issINIFlags Keyword + HiLink issRegRootKey Keyword + HiLink issRegValueType Keyword + HiLink issRegFlags Keyword + HiLink issRunFlags Keyword + HiLink issTypesFlags Keyword + HiLink issComponentsFlags Keyword + HiLink issInstallDeleteType Keyword + + + delcommand HiLink +endif + +let b:current_syntax = "iss" + +" vim:ts=8 diff --git a/runtime/syntax/ist.vim b/runtime/syntax/ist.vim new file mode 100644 index 000000000..fd0005e55 --- /dev/null +++ b/runtime/syntax/ist.vim @@ -0,0 +1,70 @@ +" Vim syntax file +" Language: Makeindex style file, *.ist +" Maintainer: Peter Meszaros <pmeszaros@effice.hu> +" Last Change: May 4, 2001 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if version >= 600 + setlocal iskeyword=$,@,48-57,_ +else + set iskeyword=$,@,48-57,_ +endif + +syn case ignore +syn keyword IstInpSpec actual arg_close arg_open encap escape +syn keyword IstInpSpec keyword level quote range_close range_open +syn keyword IstInpSpec page_compositor + +syn keyword IstOutSpec preamble postamble setpage_prefix setpage_suffix group_skip +syn keyword IstOutSpec headings_flag heading_prefix heading_suffix +syn keyword IstOutSpec lethead_flag lethead_prefix lethead_suffix +syn keyword IstOutSpec symhead_positive symhead_negative numhead_positive numhead_negative +syn keyword IstOutSpec item_0 item_1 item_2 item_01 +syn keyword IstOutSpec item_x1 item_12 item_x2 +syn keyword IstOutSpec delim_0 delim_1 delim_2 +syn keyword IstOutSpec delim_n delim_r delim_t +syn keyword IstOutSpec encap_prefix encap_infix encap_suffix +syn keyword IstOutSpec line_max indent_space indent_length +syn keyword IstOutSpec suffix_2p suffix_3p suffix_mp + +syn region IstString matchgroup=IstDoubleQuote start=+"+ skip=+\\"+ end=+"+ contains=IstSpecial +syn match IstCharacter "'.'" +syn match IstNumber "\d\+" +syn match IstComment "^[\t ]*%.*$" contains=IstTodo +syn match IstSpecial "\\\\\|{\|}\|#\|\\n" contained +syn match IstTodo "DEBUG\|TODO" contained + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_dummy_syn_inits") + if version < 508 + let did_dummy_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink IstInpSpec Type + HiLink IstOutSpec Identifier + HiLink IstString String + HiLink IstNumber Number + HiLink IstComment Comment + HiLink IstTodo Todo + HiLink IstSpecial Special + HiLink IstDoubleQuote Label + HiLink IstCharacter Label + + delcommand HiLink +endif + +let b:current_syntax = "ist" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/jal.vim b/runtime/syntax/jal.vim new file mode 100644 index 000000000..d0ba67285 --- /dev/null +++ b/runtime/syntax/jal.vim @@ -0,0 +1,249 @@ +" Vim syntax file +" Language: JAL +" Version: 0.1 +" Last Change: 2003 May 11 +" Maintainer: Mark Gross <mark@thegnar.org> +" This is a syntax definition for the JAL language. +" It is based on the Source Forge compiler source code. +" https://sourceforge.net/projects/jal/ +" +" TODO test. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore +syn sync lines=250 + +syn keyword picTodo NOTE TODO XXX contained + +syn match picIdentifier "[a-z_$][a-z0-9_$]*" +syn match picLabel "^[A-Z_$][A-Z0-9_$]*" +syn match picLabel "^[A-Z_$][A-Z0-9_$]*:"me=e-1 + +syn match picASCII "A\='.'" +syn match picBinary "B'[0-1]\+'" +syn match picDecimal "D'\d\+'" +syn match picDecimal "\d\+" +syn match picHexadecimal "0x\x\+" +syn match picHexadecimal "H'\x\+'" +syn match picHexadecimal "[0-9]\x*h" +syn match picOctal "O'[0-7]\o*'" + +syn match picComment ";.*" contains=picTodo + +syn region picString start=+"+ end=+"+ + +syn keyword picRegister indf tmr0 pcl status fsr port_a port_b port_c port_d port_e x84_eedata x84_eeadr pclath intcon +syn keyword picRegister f877_tmr1l f877_tmr1h f877_t1con f877_t2con f877_ccpr1l f877_ccpr1h f877_ccp1con +syn keyword picRegister f877_pir1 f877_pir2 f877_pie1 f877_adcon1 f877_adcon0 f877_pr2 f877_adresl f877_adresh +syn keyword picRegister f877_eeadr f877_eedath f877_eeadrh f877_eedata f877_eecon1 f877_eecon2 f628_EECON2 +syn keyword picRegister f877_rcsta f877_txsta f877_spbrg f877_txreg f877_rcreg f628_EEDATA f628_EEADR f628_EECON1 + +" Register --- bits +" STATUS +syn keyword picRegisterPart status_c status_dc status_z status_pd +syn keyword picRegisterPart status_to status_rp0 status_rp1 status_irp + +" pins +syn keyword picRegisterPart pin_a0 pin_a1 pin_a2 pin_a3 pin_a4 pin_a5 +syn keyword picRegisterPart pin_b0 pin_b1 pin_b2 pin_b3 pin_b4 pin_b5 pin_b6 pin_b7 +syn keyword picRegisterPart pin_c0 pin_c1 pin_c2 pin_c3 pin_c4 pin_c5 pin_c6 pin_c7 +syn keyword picRegisterPart pin_d0 pin_d1 pin_d2 pin_d3 pin_d4 pin_d5 pin_d6 pin_d7 +syn keyword picRegisterPart pin_e0 pin_e1 pin_e2 + +syn keyword picPortDir port_a_direction port_b_direction port_c_direction port_d_direction port_e_direction + +syn match picPinDir "pin_a[012345]_direction" +syn match picPinDir "pin_b[01234567]_direction" +syn match picPinDir "pin_c[01234567]_direction" +syn match picPinDir "pin_d[01234567]_direction" +syn match picPinDir "pin_e[012]_direction" + + +" INTCON +syn keyword picRegisterPart intcon_gie intcon_eeie intcon_peie intcon_t0ie intcon_inte +syn keyword picRegisterPart intcon_rbie intcon_t0if intcon_intf intcon_rbif + +" TIMER +syn keyword picRegisterPart t1ckps1 t1ckps0 t1oscen t1sync tmr1cs tmr1on tmr1ie tmr1if + +"cpp bits +syn keyword picRegisterPart ccp1x ccp1y + +" adcon bits +syn keyword picRegisterPart adcon0_go adcon0_ch0 adcon0_ch1 adcon0_ch2 + +" EECON +syn keyword picRegisterPart eecon1_rd eecon1_wr eecon1_wren eecon1_wrerr eecon1_eepgd +syn keyword picRegisterPart f628_eecon1_rd f628_eecon1_wr f628_eecon1_wren f628_eecon1_wrerr + +" usart +syn keyword picRegisterPart tx9 txen sync brgh tx9d +syn keyword picRegisterPart spen rx9 cren ferr oerr rx9d +syn keyword picRegisterPart TXIF RCIF + +" OpCodes... +syn keyword picOpcode addlw andlw call clrwdt goto iorlw movlw option retfie retlw return sleep sublw tris +syn keyword picOpcode xorlw addwf andwf clrf clrw comf decf decfsz incf incfsz retiw iorwf movf movwf nop +syn keyword picOpcode rlf rrf subwf swapf xorwf bcf bsf btfsc btfss skpz skpnz setz clrz skpc skpnc setc clrc +syn keyword picOpcode skpdc skpndc setdc clrdc movfw tstf bank page HPAGE mullw mulwf cpfseq cpfsgt cpfslt banka bankb + + +syn keyword jalBoolean true false +syn keyword jalBoolean off on +syn keyword jalBit high low +syn keyword jalConstant Input Output all_input all_output +syn keyword jalConditional if else then elsif end if +syn keyword jalLabel goto +syn keyword jalRepeat for while forever loop +syn keyword jalStatement procedure function +syn keyword jalStatement return end volatile const var +syn keyword jalType bit byte + +syn keyword jalModifier interrupt assembler asm put get +syn keyword jalStatement out in is begin at +syn keyword jalDirective pragma jump_table target target_clock target_chip name error test assert +syn keyword jalPredefined hs xt rc lp internal 16c84 16f84 16f877 sx18 sx28 12c509a 12c508 +syn keyword jalPredefined 12ce674 16f628 18f252 18f242 18f442 18f452 12f629 12f675 16f88 +syn keyword jalPredefined 16f876 16f873 sx_12 sx18 sx28 pic_12 pic_14 pic_16 + +syn keyword jalDirective chip osc clock fuses cpu watchdog powerup protection + +syn keyword jalFunction bank_0 bank_1 bank_2 bank_3 bank_4 bank_5 bank_6 bank_7 trisa trisb trisc trisd trise +syn keyword jalFunction _trisa_flush _trisb_flush _trisc_flush _trisd_flush _trise_flush + +syn keyword jalPIC local idle_loop + +syn region jalAsm matchgroup=jalAsmKey start="\<assembler\>" end="\<end assembler\>" contains=jalComment,jalPreProc,jalLabel,picIdentifier, picLabel,picASCII,picDecimal,picHexadecimal,picOctal,picComment,picString,picRegister,picRigisterPart,picOpcode,picDirective,jalPIC +syn region jalAsm matchgroup=jalAsmKey start="\<asm\>" end=/$/ contains=jalComment,jalPreProc,jalLabel,picIdentifier, picLabel,picASCII,picDecimal,picHexadecimal,picOctal,picComment,picString,picRegister,picRigisterPart,picOpcode,picDirective,jalPIC + +syn region jalPsudoVars matchgroup=jalPsudoVarsKey start="\<'put\>" end="/<is/>" contains=jalComment + +syn match jalStringEscape contained "#[12][0-9]\=[0-9]\=" +syn match jalIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" +syn match jalSymbolOperator "[+\-/*=]" +syn match jalSymbolOperator "!" +syn match jalSymbolOperator "<" +syn match jalSymbolOperator ">" +syn match jalSymbolOperator "<=" +syn match jalSymbolOperator ">=" +syn match jalSymbolOperator "!=" +syn match jalSymbolOperator "==" +syn match jalSymbolOperator "<<" +syn match jalSymbolOperator ">>" +syn match jalSymbolOperator "|" +syn match jalSymbolOperator "&" +syn match jalSymbolOperator "%" +syn match jalSymbolOperator "?" +syn match jalSymbolOperator "[()]" +syn match jalSymbolOperator "[\^.]" +syn match jalLabel "[\^]*:" + +syn match jalNumber "-\=\<\d[0-9_]\+\>" +syn match jalHexNumber "0x[0-9A-Fa-f_]\+\>" +syn match jalBinNumber "0b[01_]\+\>" + +" String +"wrong strings +syn region jalStringError matchgroup=jalStringError start=+"+ end=+"+ end=+$+ contains=jalStringEscape + +"right strings +syn region jalString matchgroup=jalString start=+'+ end=+'+ oneline contains=jalStringEscape +" To see the start and end of strings: +syn region jalString matchgroup=jalString start=+"+ end=+"+ oneline contains=jalStringEscapeGPC + +syn keyword jalTodo contained TODO +syn region jalComment start=/-- / end=/$/ oneline contains=jalTodo +syn region jalComment start=/--\t/ end=/$/ oneline contains=jalTodo +syn match jalComment /--\_$/ +syn region jalPreProc start="include" end=/$/ contains=JalComment,jalToDo + + +if exists("jal_no_tabs") + syn match jalShowTab "\t" +endif + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_jal_syn_inits") +if version < 508 + let did_jal_syn_inits = 1 + command -nargs=+ HiLink hi link <args> +else + command -nargs=+ HiLink hi def link <args> +endif + + HiLink jalAcces jalStatement + HiLink jalBoolean Boolean + HiLink jalBit Boolean + HiLink jalComment Comment + HiLink jalConditional Conditional + HiLink jalConstant Constant + HiLink jalDelimiter Identifier + HiLink jalDirective PreProc + HiLink jalException Exception + HiLink jalFloat Float + HiLink jalFunction Function + HiLink jalPsudoVarsKey Function + HiLink jalLabel Label + HiLink jalMatrixDelimiter Identifier + HiLink jalModifier Type + HiLink jalNumber Number + HiLink jalBinNumber Number + HiLink jalHexNumber Number + HiLink jalOperator Operator + HiLink jalPredefined Constant + HiLink jalPreProc PreProc + HiLink jalRepeat Repeat + HiLink jalStatement Statement + HiLink jalString String + HiLink jalStringEscape Special + HiLink jalStringEscapeGPC Special + HiLink jalStringError Error + HiLink jalStruct jalStatement + HiLink jalSymbolOperator jalOperator + HiLink jalTodo Todo + HiLink jalType Type + HiLink jalUnclassified Statement + HiLink jalAsm Assembler + HiLink jalError Error + HiLink jalAsmKey Statement + HiLink jalPIC Statement + + HiLink jalShowTab Error + + HiLink picTodo Todo + HiLink picComment Comment + HiLink picDirective Statement + HiLink picLabel Label + HiLink picString String + + HiLink picOpcode Keyword + HiLink picRegister Structure + HiLink picRegisterPart Special + HiLink picPinDir SPecial + HiLink picPortDir SPecial + + HiLink picASCII String + HiLink picBinary Number + HiLink picDecimal Number + HiLink picHexadecimal Number + HiLink picOctal Number + + HiLink picIdentifier Identifier + + delcommand HiLink +endif + + +let b:current_syntax = "jal" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/jam.vim b/runtime/syntax/jam.vim new file mode 100644 index 000000000..9fe667886 --- /dev/null +++ b/runtime/syntax/jam.vim @@ -0,0 +1,252 @@ +" Vim syntax file +" Language: JAM +" Maintainer: Ralf Lemke (ralflemk@t-online.de) +" Last change: 09-10-2000 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if version >= 600 + setlocal iskeyword=@,48-57,_,- +else + set iskeyword=@,48-57,_,- +endif + +" A bunch of useful jam keywords +syn keyword jamStatement break call dbms flush global include msg parms proc public receive return send unload vars +syn keyword jamConditional if else +syn keyword jamRepeat for while next step + +syn keyword jamTodo contained TODO FIXME XXX +syn keyword jamDBState1 alias binary catquery close close_all_connections column_names connection continue continue_bottom continue_down continue_top continue_up +syn keyword jamDBState2 cursor declare engine execute format occur onentry onerror onexit sql start store unique with +syn keyword jamSQLState1 all alter and any avg between by count create current data database delete distinct drop exists fetch from grant group +syn keyword jamSQLState2 having index insert into like load max min of open order revoke rollback runstats select set show stop sum synonym table to union update values view where bundle + +syn keyword jamLibFunc1 dm_bin_create_occur dm_bin_delete_occur dm_bin_get_dlength dm_bin_get_occur dm_bin_length dm_bin_max_occur dm_bin_set_dlength dm_convert_empty dm_cursor_connection dm_cursor_consistent dm_cursor_engine dm_dbi_init dm_dbms dm_dbms_noexp dm_disable_styles dm_enable_styles dm_exec_sql dm_expand dm_free_sql_info dm_gen_change_execute_using dm_gen_change_select_from dm_gen_change_select_group_by dm_gen_change_select_having dm_gen_change_select_list dm_gen_change_select_order_by dm_gen_change_select_suffix dm_gen_change_select_where dm_gen_get_tv_alias dm_gen_sql_info + +syn keyword jamLibFunc2 dm_get_db_conn_handle dm_get_db_cursor_handle dm_get_driver_option dm_getdbitext dm_init dm_is_connection dm_is_cursor dm_is_engine dm_odb_preserves_cursor dm_reset dm_set_driver_option dm_set_max_fetches dm_set_max_rows_per_fetch dm_set_tm_clear_fast dm_val_relative sm_adjust_area sm_allget sm_amt_format sm_e_amt_format sm_i_amt_format sm_n_amt_format sm_o_amt_format sm_append_bundle_data sm_append_bundle_done sm_append_bundle_item sm_d_at_cur sm_l_at_cur sm_r_at_cur sm_mw_attach_drawing_func sm_mwn_attach_drawing_func sm_mwe_attach_drawing_func sm_xm_attach_drawing_func sm_xmn_attach_drawing_func sm_xme_attach_drawing_func sm_backtab sm_bel sm_bi_comparesm_bi_copy sm_bi_initialize sm_bkrect sm_c_off sm_c_on sm_c_vis sm_calc sm_cancel sm_ckdigit sm_cl_all_mdts sm_cl_unprot sm_clear_array sm_n_clear_array sm_1clear_array sm_n_1clear_array sm_close_window sm_com_load_picture sm_com_QueryInterface sm_com_result sm_com_result_msg sm_com_set_handler sm_copyarray sm_n_copyarray sm_create_bundle + +syn keyword jamLibFunc3 sm_d_msg_line sm_dblval sm_e_dblval sm_i_dblval sm_n_dblval sm_o_dblval sm_dd_able sm_dde_client_connect_cold sm_dde_client_connect_hot sm_dde_client_connect_warm sm_dde_client_disconnect sm_dde_client_off sm_dde_client_on sm_dde_client_paste_link_cold sm_dde_client_paste_link_hot sm_dde_client_paste_link_warm sm_dde_client_request sm_dde_execute sm_dde_install_notify sm_dde_poke sm_dde_server_off sm_dde_server_on sm_delay_cursor sm_deselect sm_dicname sm_disp_off sm_dlength sm_e_dlength sm_i_dlength sm_n_dlength sm_o_dlength sm_do_uinstalls sm_i_doccur sm_o_doccur sm_drawingarea sm_xm_drawingarea sm_dtofield sm_e_dtofield sm_i_dtofield sm_n_dtofield sm_o_dtofield sm_femsg sm_ferr_reset sm_fi_path sm_file_copy sm_file_exists sm_file_move sm_file_remove sm_fi_open sm_fi_path sm_filebox sm_filetypes sm_fio_a2f sm_fio_close sm_fio_editor sm_fio_error sm_fio_error_set sm_fio_f2a sm_fio_getc sm_fio_gets sm_fio_handle sm_fio_open sm_fio_putc sm_fio_puts sm_fio_rewind sm_flush sm_d_form sm_l_form + +syn keyword jamLibFunc4 sm_r_form sm_formlist sm_fptr sm_e_fptr sm_i_fptr sm_n_fptr sm_o_fptr sm_fqui_msg sm_fquiet_err sm_free_bundle sm_ftog sm_e_ftog sm_i_ftog sm_n_ftog sm_o_ftog sm_fval sm_e_fval sm_i_fval sm_n_fval sm_o_fval sm_i_get_bi_data sm_o_get_bi_data sm_get_bundle_data sm_get_bundle_item_count sm_get_bundle_occur_count sm_get_next_bundle_name sm_i_get_tv_bi_data sm_o_get_tv_bi_data sm_getfield sm_e_getfield sm_i_getfield sm_n_getfield sm_o_getfield sm_getkey sm_gofield sm_e_gofield sm_i_gofield sm_n_gofield sm_o_gofield sm_gtof sm_gval sm_i_gtof sm_n_gval sm_hlp_by_name sm_home sm_inimsg sm_initcrt sm_jinitcrt sm_jxinitcrt sm_input sm_inquire sm_install sm_intval sm_e_intval sm_i_intval sm_n_intval sm_o_intval sm_i_ioccur sm_o_ioccur sm_is_bundle sm_is_no sm_e_is_no sm_i_is_no sm_n_is_no sm_o_is_no sm_is_yes sm_e_is_yes sm_i_is_yes sm_n_is_yes sm_o_is_yes sm_isabort sm_iset sm_issv sm_itofield sm_e_itofield sm_i_itofield sm_n_itofield sm_o_itofield sm_jclose sm_jfilebox sm_jform sm_djplcall sm_jplcall + +syn keyword jamLibFunc5 sm_sjplcall sm_jplpublic sm_jplunload sm_jtop sm_jwindow sm_key_integer sm_keyfilter sm_keyhit sm_keyinit sm_n_keyinit sm_keylabel sm_keyoption sm_l_close sm_l_open sm_l_open_syslib sm_last sm_launch sm_h_ldb_fld_get sm_n_ldb_fld_get sm_h_ldb_n_fld_get sm_n_ldb_n_fld_get sm_h_ldb_fld_store sm_n_ldb_fld_store sm_h_ldb_n_fld_store sm_n_ldb_n_fld_store sm_ldb_get_active sm_ldb_get_inactive sm_ldb_get_next_active sm_ldb_get_next_inactive sm_ldb_getfield sm_i_ldb_getfield sm_n_ldb_getfield sm_o_ldb_getfield sm_ldb_h_getfield sm_i_ldb_h_getfield sm_n_ldb_h_getfield sm_o_ldb_h_getfield sm_ldb_handle sm_ldb_init sm_ldb_is_loaded sm_ldb_load sm_ldb_name sm_ldb_next_handle sm_ldb_pop sm_ldb_push sm_ldb_putfield sm_i_ldb_putfield sm_n_ldb_putfield sm_o_ldb_putfield sm_ldb_h_putfield sm_i_ldb_h_putfield sm_n_ldb_h_putfield sm_o_ldb_h_putfield sm_ldb_state_get sm_ldb_h_state_get sm_ldb_state_set sm_ldb_h_state_set sm_ldb_unload sm_ldb_h_unload sm_leave sm_list_objects_count sm_list_objects_end sm_list_objects_next + +syn keyword jamLibFunc6 sm_list_objects_start sm_lngval sm_e_lngval sm_i_lngval sm_n_lngval sm_o_lngval sm_load_screen sm_log sm_lstore sm_ltofield sm_e_ltofield sm_i_ltofield sm_n_ltofield sm_o_ltofield sm_m_flush sm_menu_bar_error sm_menu_change sm_menu_create sm_menu_delete sm_menu_get_int sm_menu_get_str sm_menu_install sm_menu_remove sm_message_box sm_mncrinit6 sm_mnitem_change sm_n_mnitem_change sm_mnitem_create sm_n_mnitem_create sm_mnitem_delete sm_n_mnitem_delete sm_mnitem_get_int sm_n_mnitem_get_int sm_mnitem_get_str sm_n_mnitem_get_str sm_mnscript_load sm_mnscript_unload sm_ms_inquire sm_msg sm_msg_del sm_msg_get sm_msg_read sm_d_msg_read sm_n_msg_read sm_msgfind sm_mts_CreateInstance sm_mts_CreateProperty sm_mts_CreatePropertyGroup sm_mts_DisableCommit sm_mts_EnableCommit sm_mts_GetPropertyValue sm_mts_IsCallerInRole sm_mts_IsInTransaction sm_mts_IsSecurityEnabled sm_mts_PutPropertyValue sm_mts_SetAbort sm_mts_SetComplete sm_mus_time sm_mw_get_client_wnd sm_mw_get_cmd_show sm_mw_get_frame_wnd sm_mw_get_instance + +syn keyword jamLibFunc7 sm_mw_get_prev_instance sm_mw_PrintScreen sm_next_sync sm_nl sm_null sm_e_null sm_i_null sm_n_null sm_o_null sm_obj_call sm_obj_copy sm_obj_copy_id sm_obj_create sm_obj_delete sm_obj_delete_id sm_obj_get_property sm_obj_onerror sm_obj_set_property sm_obj_sort sm_obj_sort_auto sm_occur_no sm_off_gofield sm_e_off_gofield sm_i_off_gofield sm_n_off_gofield sm_o_off_gofield sm_option sm_optmnu_id sm_pinquire sm_popup_at_cur sm_prop_error sm_prop_get_int sm_prop_get_str sm_prop_get_dbl sm_prop_get_x_int sm_prop_get_x_str sm_prop_get_x_dbl sm_prop_get_m_int sm_prop_get_m_str sm_prop_get_m_dbl sm_prop_id sm_prop_name_to_id sm_prop_set_int sm_prop_set_str sm_prop_set_dbl sm_prop_set_x_int sm_prop_set_x_str sm_prop_set_x_dbl sm_prop_set_m_int sm_prop_set_m_str sm_prop_set_m_dbl sm_pset sm_putfield sm_e_putfield sm_i_putfield sm_n_putfield sm_o_putfield sm_raise_exception sm_receive sm_receive_args sm_rescreen sm_resetcrt sm_jresetcrt sm_jxresetcrt sm_resize sm_restore_data sm_return sm_return_args sm_rmformlist sm_rs_data + +syn keyword jamLibFunc8 sm_rw_error_message sm_rw_play_metafile sm_rw_runreport sm_s_val sm_save_data sm_sdtime sm_select sm_send sm_set_help sm_setbkstat sm_setsibling sm_setstatus sm_sh_off sm_shell sm_shrink_to_fit sm_slib_error sm_slib_install sm_slib_load sm_soption sm_strip_amt_ptr sm_e_strip_amt_ptr sm_i_strip_amt_ptr sm_n_strip_amt_ptr sm_o_strip_amt_ptr sm_sv_data sm_sv_free sm_svscreen sm_tab sm_tm_clear sm_tm_clear_model_events sm_tm_command sm_tm_command_emsgset sm_tm_command_errset sm_tm_continuation_validity sm_tm_dbi_checker sm_tm_error sm_tm_errorlog sm_tm_event sm_tm_event_name sm_tm_failure_message sm_tm_handling sm_tm_inquire sm_tm_iset sm_tm_msg_count_error sm_tm_msg_emsg sm_tm_msg_error sm_tm_old_bi_context sm_tm_pcopy sm_tm_pinquire sm_tm_pop_model_event sm_tm_pset sm_tm_push_model_event sm_tmpnam sm_tp_exec sm_tp_free_arg_buf sm_tp_gen_insert sm_tp_gen_sel_return sm_tp_gen_sel_where sm_tp_gen_val_link sm_tp_gen_val_return sm_tp_get_svc_alias sm_tp_get_tux_callid sm_translatecoords sm_tst_all_mdts + +syn keyword jamLibFunc9 sm_udtime sm_ungetkey sm_unload_screen sm_unsvscreen sm_upd_select sm_validate sm_n_validate sm_vinit sm_n_vinit sm_wcount sm_wdeselect sm_web_get_cookie sm_web_invoke_url sm_web_log_error sm_web_save_global sm_web_set_cookie sm_web_unsave_all_globals sm_web_unsave_global sm_mw_widget sm_mwe_widget sm_mwn_widget sm_xm_widget sm_xme_widget sm_xmn_widget sm_win_shrink sm_d_window sm_d_at_cur sm_l_window sm_l_at_cur sm_r_window sm_r_at_cur sm_winsize sm_wrotate sm_wselect sm_n_wselect sm_ww_length sm_n_ww_length sm_ww_read sm_n_ww_read sm_ww_write sm_n_ww_write sm_xlate_table sm_xm_get_base_window sm_xm_get_display + +syn keyword jamVariable1 SM_SCCS_ID SM_ENTERTERM SM_MALLOC SM_CANCEL SM_BADTERM SM_FNUM SM_DZERO SM_EXPONENT SM_INVDATE SM_MATHERR SM_FRMDATA SM_NOFORM SM_FRMERR SM_BADKEY SM_DUPKEY SM_ERROR SM_SP1 SM_SP2 SM_RENTRY SM_MUSTFILL SM_AFOVRFLW SM_TOO_FEW_DIGITS SM_CKDIGIT SM_HITANY SM_NOHELP SM_MAXHELP SM_OUTRANGE SM_ENTERTERM1 SM_SYSDATE SM_DATFRM SM_DATCLR SM_DATINV SM_KSDATA SM_KSERR SM_KSNONE SM_KSMORE SM_DAYA1 SM_DAYA2 SM_DAYA3 SM_DAYA4 SM_DAYA5 SM_DAYA6 SM_DAYA7 SM_DAYL1 SM_DAYL2 SM_DAYL3 SM_DAYL4 SM_DAYL5 SM_DAYL6 SM_DAYL7 SM_MNSCR_LOAD SM_MENU_INSTALL SM_INSTDEFSCRL SM_INSTSCROLL SM_MOREDATA SM_READY SM_WAIT SM_YES SM_NO SM_NOTEMP SM_FRMHELP SM_FILVER SM_ONLYONE SM_WMSMOVE SM_WMSSIZE SM_WMSOFF SM_LPRINT SM_FMODE SM_NOFILE SM_NOSECTN SM_FFORMAT SM_FREAD SM_RX1 SM_RX2 SM_RX3 SM_TABLOOK SM_MISKET SM_ILLKET SM_ILLBRA SM_MISDBLKET SM_ILLDBLKET SM_ILLDBLBRA SM_ILL_RIGHT SM_ILLELSE SM_NUMBER SM_EOT SM_BREAK SM_NOARGS SM_BIGVAR SM_EXCESS SM_EOL SM_FILEIO SM_FOR SM_RCURLY SM_NONAME SM_1JPL_ERR SM_2JPL_ERR SM_3JPL_ERR + +syn keyword jamVariable2 SM_JPLATCH SM_FORMAT SM_DESTINATION SM_ORAND SM_ORATOR SM_ILL_LEFT SM_MISSPARENS SM_ILLCLOSE_COMM SM_FUNCTION SM_EQUALS SM_MISMATCH SM_QUOTE SM_SYNTAX SM_NEXT SM_VERB_UNKNOWN SM_JPLFORM SM_NOT_LOADED SM_GA_FLG SM_GA_CHAR SM_GA_ARG SM_GA_DIG SM_NOFUNC SM_BADPROTO SM_JPLPUBLIC SM_NOCOMPILE SM_NULLEDIT SM_RP_NULL SM_DBI_NOT_INST SM_NOTJY SM_MAXLIB SM_FL_FLLIB SM_TPI_NOT_INST SM_RW_NOT_INST SM_MONA1 SM_MONA2 SM_MONA3 SM_MONA4 SM_MONA5 SM_MONA6 SM_MONA7 SM_MONA8 SM_MONA9 SM_MONA10 SM_MONA11 SM_MONA12 SM_MONL1 SM_MONL2 SM_MONL3 SM_MONL4 SM_MONL5 SM_MONL6 SM_MONL7 SM_MONL8 SM_MONL9 SM_MONL10 SM_MONL11 SM_MONL12 SM_AM SM_PM SM_0DEF_DTIME SM_1DEF_DTIME SM_2DEF_DTIME SM_3DEF_DTIME SM_4DEF_DTIME SM_5DEF_DTIME SM_6DEF_DTIME SM_7DEF_DTIME SM_8DEF_DTIME SM_9DEF_DTIME SM_CALC_DATE SM_BAD_DIGIT SM_BAD_YN SM_BAD_ALPHA SM_BAD_NUM SM_BAD_ALPHNUM SM_DECIMAL SM_1STATS SM_VERNO SM_DIG_ERR SM_YN_ERR SM_LET_ERR SM_NUM_ERR SM_ANUM_ERR SM_REXP_ERR SM_POSN_ERR SM_FBX_OPEN SM_FBX_WINDOW SM_FBX_SIBLING SM_OPENDIR + +syn keyword jamVariable3 SM_GETFILES SM_CHDIR SM_GETCWD SM_UNCLOSED_COMM SM_MB_OKLABEL SM_MB_CANCELLABEL SM_MB_YESLABEL SM_MB_NOLABEL SM_MB_RETRYLABEL SM_MB_IGNORELABEL SM_MB_ABORTLABEL SM_MB_HELPLABEL SM_MB_STOP SM_MB_QUESTION SM_MB_WARNING SM_MB_INFORMATION SM_MB_YESALLLABEL SM_0MN_CURRDEF SM_1MN_CURRDEF SM_2MN_CURRDEF SM_0DEF_CURR SM_1DEF_CURR SM_2DEF_CURR SM_3DEF_CURR SM_4DEF_CURR SM_5DEF_CURR SM_6DEF_CURR SM_7DEF_CURR SM_8DEF_CURR SM_9DEF_CURR SM_SEND_SYNTAX SM_SEND_ITEM SM_SEND_INVALID_BUNDLE SM_RECEIVE_SYNTAX SM_RECEIVE_ITEM_NUMBER SM_RECEIVE_OVERFLOW SM_RECEIVE_ITEM SM_SYNCH_RECEIVE SM_EXEC_FAIL SM_DYNA_HELP_NOT_AVAIL SM_DLL_LOAD_ERR SM_DLL_UNRESOLVED SM_DLL_VERSION_ERR SM_DLL_OPTION_ERR SM_DEMOERR SM_MB_OKALLLABEL SM_MB_NOALLLABEL SM_BADPROP SM_BETWEEN SM_ATLEAST SM_ATMOST SM_PR_ERROR SM_PR_OBJID SM_PR_OBJECT SM_PR_ITEM SM_PR_PROP SM_PR_PROP_ITEM SM_PR_PROP_VAL SM_PR_CONVERT SM_PR_OBJ_TYPE SM_PR_RANGE SM_PR_NO_SET SM_PR_BYND_SCRN SM_PR_WW_SCROLL SM_PR_NO_SYNC SM_PR_TOO_BIG SM_PR_BAD_MASK SM_EXEC_MEM_ERR + +syn keyword jamVariable4 SM_EXEC_NO_PROG SM_PR_NO_KEYSTRUCT SM_REOPEN_AS_SLIB SM_REOPEN_THE_SLIB SM_ERRLIB SM_WARNLIB SM_LIB_DOWNGRADE SM_OLDER SM_NEWER SM_UPGRADE SM_LIB_READONLY SM_LOPEN_ERR SM_LOPEN_WARN SM_MLOPEN_CREAT SM_MLOPEN_INIT SM_LIB_ERR SM_LIB_ISOLATE SM_LIB_NO_ERR SM_LIB_REC_ERR SM_LIB_FATAL_ERR SM_LIB_LERR_FILE SM_LIB_LERR_NOTLIB SM_LIB_LERR_BADVERS SM_LIB_LERR_FORMAT SM_LIB_LERR_BADCM SM_LIB_LERR_LOCK SM_LIB_LERR_RESERVED SM_LIB_LERR_READONLY SM_LIB_LERR_NOENTRY SM_LIB_LERR_BUSY SM_LIB_LERR_ROVERS SM_LIB_LERR_DEFAULT SM_LIB_BADCM SM_LIB_LERR_NEW SM_STANDALONE_MODE SM_FEATURE_RESTRICT FM_CH_LOST FM_JPL_PROMPT FM_YR4 FM_YR2 FM_MON FM_MON2 FM_DATE FM_DATE2 FM_HOUR FM_HOUR2 FM_MIN FM_MIN2 FM_SEC FM_SEC2 FM_YRDAY FM_AMPM FM_DAYA FM_DAYL FM_MONA FM_MONL FM_0MN_DEF_DT FM_1MN_DEF_DT FM_2MN_DEF_DT FM_DAY JM_QTERMINATE JM_HITSPACE JM_HITACK JM_NOJWIN UT_MEMERR UT_P_OPT UT_V_OPT UT_E_BINOPT UT_NO_INPUT UT_SECLONG UT_1FNAME UT_SLINE UT_FILE UT_ERROR UT_WARNING UT_MISSEQ UT_VOPT UT_M2_DESCR + +syn keyword jamVariable5 UT_M2_PROGNAME UT_M2_USAGE UT_M2_O_OPT UT_M2_COM UT_M2_BADTAG UT_M2_MSSQUOT UT_M2_AFTRQUOT UT_M2_DUPSECT UT_M2_BADUCLSS UT_M2_USECPRFX UT_M2_MPTYUSCT UT_M2_DUPMSGTG UT_M2_TOOLONG UT_M2_LONG UT_K2_DESCR UT_K2_PROGNAME UT_K2_USAGE UT_K2_MNEM UT_K2_NKEYDEF UT_K2_DUPKEY UT_K2_NOTFOUND UT_K2_1FNAME UT_K2_VOPT UT_K2_EXCHAR UT_V2_DESCR UT_V2_PROGNAME UT_V2_USAGE UT_V2_SLINE UT_V2_SEQUAL UT_V2_SVARNAME UT_V2_SNAME UT_V2_VOPT UT_V2_1REQ UT_CB_DESCR UT_CB_PROGNAME UT_CB_USAGE UT_CB_VOPT UT_CB_MIEXT UT_CB_AEXT UT_CB_UNKNOWN UT_CB_ISCHEME UT_CB_BKFGS UT_CB_ABGS UT_CB_REC UT_CB_GUI UT_CB_CONT UT_CB_CONTFG UT_CB_AFILE UT_CB_LEFT_QUOTE UT_CB_NO_EQUAL UT_CB_EXTRA_EQ UT_CB_BAD_LHS UT_CB_BAD_RHS UT_CB_BAD_QUOTED UT_CB_FILE UT_CB_FILE_LINE UT_CB_DUP_ALIAS UT_CB_LINE_LOOP UT_CB_BAD_STYLE UT_CB_DUP_STYLE UT_CB_NO_SECT UT_CB_DUP_SCHEME DM_ERROR DM_NODATABASE DM_NOTLOGGEDON DM_ALREADY_ON DM_ARGS_NEEDED DM_LOGON_DENIED DM_BAD_ARGS DM_BAD_CMD DM_NO_MORE_ROWS DM_ABORTED DM_NO_CURSOR DM_MANY_CURSORS DM_KEYWORD + +syn keyword jamVariable6 DM_INVALID_DATE DM_COMMIT DM_ROLLBACK DM_PARSE_ERROR DM_BIND_COUNT DM_BIND_VAR DM_DESC_COL DM_FETCH DM_NO_NAME DM_END_OF_PROC DM_NOCONNECTION DM_NOTSUPPORTED DM_TRAN_PEND DM_NO_TRANSACTION DM_ALREADY_INIT DM_INIT_ERROR DM_MAX_DEPTH DM_NO_PARENT DM_NO_CHILD DM_MODALITY_NOT_FOUND DM_NATIVE_NO_SUPPORT DM_NATIVE_CANCEL DM_TM_ALREADY DM_TM_IN_PROGRESS DM_TM_CLOSE_ERROR DM_TM_BAD_MODE DM_TM_BAD_CLOSE_ACTION DM_TM_INTERNAL DM_TM_MODEL_INTERNAL DM_TM_NO_ROOT DM_TM_NO_TRANSACTION DM_TM_INITIAL_MODE DM_TM_PARENT_NAME DM_TM_BAD_MEMBER DM_TM_FLD_NAM_LEN DM_TM_NO_PARENT DM_TM_BAD_REQUEST DM_TM_CANNOT_GEN_SQL DM_TM_CANNOT_EXEC_SQL DM_TM_DBI_ERROR DM_TM_DISCARD_ALL DM_TM_DISCARD_LATEST DM_TM_CALL_ERROR DM_TM_CALL_TYPE DM_TM_HOOK_MODEL DM_TM_ROOT_NAME DM_TM_TV_INVALID DM_TM_COL_NOT_FOUND DM_TM_BAD_LINK DM_TM_HOOK_MODEL_ERROR DM_TM_ONE_ROW DM_TM_SOME_ROWS DM_TM_GENERAL DM_TM_NO_HOOK DM_TM_NOSET DM_TM_TBLNAME DM_TM_PRIMARY_KEY DM_TM_INCOMPLETE_KEY DM_TM_CMD_MODE DM_TM_NO_SUCH_CMD DM_TM_NO_SUCH_SCOPE + +syn keyword jamVariable7 DM_TM_NO_SUCH_TV DM_TM_EVENT_LOOP DM_TM_UNSUPPORTED DM_TM_NO_MODEL DM_TM_SYNCH_SV DM_TM_WRONG_FORM DM_TM_VC_FIELD DM_TM_VC_DATE DM_TM_VC_TYPE DM_TM_BAD_CONTINUE DM_JDB_OUT_OF_MEMORY DM_JDB_DUPTABLEALIAS DM_JDB_DUPCURSORNAME DM_JDB_NODB DM_JDB_BINDCOUNT DM_JDB_NO_MORE_ROWS DM_JDB_AMBIGUOUS_COLUMN_REF DM_JDB_UNRESOLVED_COLUMN_REF DM_JDB_TABLE_READ_WRITE_CONFLICT DM_JDB_SYNTAX_ERROR DM_JDB_DUP_COLUMN_ASSIGNMENT DM_JDB_NO_MSG_FILE DM_JDB_NO_MSG DM_JDB_NOT_IMPLEMENTED DM_JDB_AGGREGATE_NOT_ALLOWED DM_JDB_TYPE_MISMATCH DM_JDB_NO_CURRENT_ROW DM_JDB_DB_CORRUPT DM_JDB_BUF_OVERFLOW DM_JDB_FILE_IO_ERR DM_JDB_BAD_HANDLE DM_JDB_DUP_TNAME DM_JDB_INVALID_TABLE_OP DM_JDB_TABLE_NOT_FOUND DM_JDB_CONVERSION_FAILED DM_JDB_INVALID_COLUMN_LIST DM_JDB_TABLE_OPEN DM_JDB_BAD_INPUT DM_JDB_DATATYPE_OVERFLOW DM_JDB_DATABASE_EXISTS DM_JDB_DATABASE_OPEN DM_JDB_DUP_CNAME DM_JDB_TMPDATABASE_ERR DM_JDB_INVALID_VALUES_COUNT DM_JDB_INVALID_COLUMN_COUNT DM_JDB_MAX_RECLEN_EXCEEDED DM_JDB_END_OF_GROUP + +syn keyword jamVariable8 TP_EXC_INVALID_CLIENT_COMMAND TP_EXC_INVALID_CLIENT_OPTION TP_EXC_INVALID_COMMAND TP_EXC_INVALID_COMMAND_SYNTAX TP_EXC_INVALID_CONNECTION TP_EXC_INVALID_CONTEXT TP_EXC_INVALID_FORWARD TP_EXC_INVALID_JAM_VARIABLE_REF TP_EXC_INVALID_MONITOR_COMMAND TP_EXC_INVALID_MONITOR_OPTION TP_EXC_INVALID_OPTION TP_EXC_INVALID_OPTION_VALUE TP_EXC_INVALID_SERVER_COMMAND TP_EXC_INVALID_SERVER_OPTION TP_EXC_INVALID_SERVICE TP_EXC_INVALID_TRANSACTION TP_EXC_JIF_ACCESS_FAILED TP_EXC_JIF_LOWER_VERSION TP_EXC_LOGFILE_ERROR TP_EXC_MONITOR_ERROR TP_EXC_NO_OUTSIDE_TRANSACTION TP_EXC_NO_OUTSTANDING_CALLS TP_EXC_NO_OUTSTANDING_MESSAGE TP_EXC_NO_SERVICES_ADVERTISED TP_EXC_NO_SIGNALS TP_EXC_NONTRANSACTIONAL_SERVICE TP_EXC_NONTRANSACTIONAL_ACTION TP_EXC_OUT_OF_MEMORY TP_EXC_POSTING_FAILED TP_EXC_PERMISSION_DENIED TP_EXC_REQUEST_LIMIT TP_EXC_ROLLBACK_COMMITTED TP_EXC_ROLLBACK_FAILED TP_EXC_SERVICE_FAILED TP_EXC_SERVICE_NOT_IN_JIF TP_EXC_SERVICE_PROTOCOL_ERROR TP_EXC_SUBSCRIPTION_LIMIT + +syn keyword jamVariable9 TP_EXC_SUBSCRIPTION_MATCH TP_EXC_SVC_ADVERTISE_LIMIT TP_EXC_SVC_WORK_OUTSTANDING TP_EXC_SVCROUTINE_MISSING TP_EXC_SVRINIT_WORK_OUTSTANDING TP_EXC_TIMEOUT TP_EXC_TRANSACTION_LIMIT TP_EXC_UNLOAD_FAILED TP_EXC_UNSUPPORTED_BUFFER TP_EXC_UNSUPPORTED_BUF_W_SUBT TP_EXC_USER_ABORT TP_EXC_WORK_OUTSTANDING TP_EXC_XA_CLOSE_FAILED TP_EXC_XA_OPEN_FAILED TP_EXC_QUEUE_BAD_MSGID TP_EXC_QUEUE_BAD_NAMESPACE TP_EXC_QUEUE_BAD_QUEUE TP_EXC_QUEUE_CANT_START_TRAN TP_EXC_QUEUE_FULL TP_EXC_QUEUE_MSG_IN_USE TP_EXC_QUEUE_NO_MSG TP_EXC_QUEUE_NOT_IN_QSPACE TP_EXC_QUEUE_RSRC_NOT_OPEN TP_EXC_QUEUE_SPACE_NOT_IN_JIF TP_EXC_QUEUE_TRAN_ABORTED TP_EXC_QUEUE_TRAN_ABSENT TP_EXC_QUEUE_UNEXPECTED TP_EXC_DCE_LOGIN_REQUIRED TP_EXC_ENC_CELL_NAME_REQUIRED TP_EXC_ENC_CONN_INFO_DIFFS TP_EXC_ENC_SVC_REGISTRY_ERROR TP_INVALID_START_ROUTINE TP_JIF_NOT_FOUND TP_JIF_OPEN_ERROR TP_NO_JIF TP_NO_MONITORS_ERROR TP_NO_SESSIONS_ERROR TP_NO_START_ROUTINE TP_ADV_SERVICE TP_ADV_SERVICE_IN_GROUP TP_PRE_SVCHDL_WINOPEN_FAILED + +syn keyword jamVariable10 PV_YES PV_NO TRUE FALSE TM_TRAN_NAME + +" jamCommentGroup allows adding matches for special things in comments +syn cluster jamCommentGroup contains=jamTodo + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match jamSpecial contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" +if !exists("c_no_utf") + syn match jamSpecial contained "\\\(u\x\{4}\|U\x\{8}\)" +endif +if exists("c_no_cformat") + syn region jamString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial +else + syn match jamFormat "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([diuoxXfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained + syn match jamFormat "%%" contained + syn region jamString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat + hi link jamFormat jamSpecial +endif +syn match jamCharacter "L\='[^\\]'" +syn match jamCharacter "L'[^']*'" contains=jamSpecial +syn match jamSpecialError "L\='\\[^'\"?\\abfnrtv]'" +syn match jamSpecialCharacter "L\='\\['\"?\\abfnrtv]'" +syn match jamSpecialCharacter "L\='\\\o\{1,3}'" +syn match jamSpecialCharacter "'\\x\x\{1,2}'" +syn match jamSpecialCharacter "L'\\x\x\+'" + +"catch errors caused by wrong parenthesis and brackets +syn cluster jamParenGroup contains=jamParenError,jamIncluded,jamSpecial,@jamCommentGroup,jamUserCont,jamUserLabel,jamBitField,jamCommentSkip,jamOctalZero,jamCppOut,jamCppOut2,jamCppSkip,jamFormat,jamNumber,jamFloat,jamOctal,jamOctalError,jamNumbersCom + +syn region jamParen transparent start='(' end=')' contains=ALLBUT,@jamParenGroup,jamErrInBracket +syn match jamParenError "[\])]" +syn match jamErrInParen contained "[\]{}]" +syn region jamBracket transparent start='\[' end=']' contains=ALLBUT,@jamParenGroup,jamErrInParen +syn match jamErrInBracket contained "[);{}]" + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match jamNumbers transparent "\<\d\|\,\d" contains=jamNumber,jamFloat,jamOctalError,jamOctal +" Same, but without octal error (for comments) +syn match jamNumbersCom contained transparent "\<\d\|\,\d" contains=jamNumber,jamFloat,jamOctal +syn match jamNumber contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" +"hex number +syn match jamNumber contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" +" Flag the first zero of an octal number as something special +syn match jamOctal contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero +syn match jamOctalZero contained "\<0" +syn match jamFloat contained "\d\+f" +"floating point number, with dot, optional exponent +syn match jamFloat contained "\d\+\,\d*\(e[-+]\=\d\+\)\=[fl]\=" +"floating point number, starting with a dot, optional exponent +syn match jamFloat contained "\,\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match jamFloat contained "\d\+e[-+]\=\d\+[fl]\=\>" +" flag an octal number with wrong digits +syn match jamOctalError contained "0\o*[89]\d*" +syn case match + +syntax match jamOperator1 "\#\#" +syntax match jamOperator6 "/" +syntax match jamOperator2 "+" +syntax match jamOperator3 "*" +syntax match jamOperator4 "-" +syntax match jamOperator5 "|" +syntax match jamOperator6 "/" +syntax match jamOperator7 "&" +syntax match jamOperator8 ":" +syntax match jamOperator9 "<" +syntax match jamOperator10 ">" +syntax match jamOperator11 "!" +syntax match jamOperator12 "%" +syntax match jamOperator13 "^" +syntax match jamOperator14 "@" + +syntax match jamCommentL "//" + +if exists("jam_comment_strings") + " A comment can contain jamString, jamCharacter and jamNumber. + " But a "*/" inside a jamString in a jamComment DOES end the comment! So we + " need to use a special type of jamString: jamCommentString, which also ends on + " "*/", and sees a "*" at the start of the line as comment again. + " Unfortunately this doesn't very well work for // type of comments :-( + syntax match jamCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region jamCommentString contained start=+L\="+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=jamSpecial,jamCommentSkip + syntax region jamComment2String contained start=+L\="+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=jamSpecial + syntax region jamCommentL start="//" skip="\\$" end="$" keepend contains=@jamCommentGroup,jamComment2String,jamCharacter,jamNumbersCom,jamSpaceError + syntax region jamCommentL2 start="^#\|^\s\+\#" skip="\\$" end="$" keepend contains=@jamCommentGroup,jamComment2String,jamCharacter,jamNumbersCom,jamSpaceError + syntax region jamComment start="/\*" end="\*/" contains=@jamCommentGroup,jamCommentString,jamCharacter,jamNumbersCom,jamSpaceError +else + syn region jamCommentL start="//" skip="\\$" end="$" keepend contains=@jamCommentGroup,jamSpaceError + syn region jamCommentL2 start="^\#\|^\s\+\#" skip="\\$" end="$" keepend contains=@jamCommentGroup,jamSpaceError + syn region jamComment start="/\*" end="\*/" contains=@jamCommentGroup,jamSpaceError +endif + +" keep a // comment separately, it terminates a preproc. conditional +syntax match jamCommentError "\*/" + +syntax match jamOperator3Error "*/" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_jam_syn_inits") + if version < 508 + let did_jam_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink jamCommentL jamComment + HiLink jamCommentL2 jamComment + HiLink jamOperator3Error jamError + HiLink jamConditional Conditional + HiLink jamRepeat Repeat + HiLink jamCharacter Character + HiLink jamSpecialCharacter jamSpecial + HiLink jamNumber Number + HiLink jamParenError jamError + HiLink jamErrInParen jamError + HiLink jamErrInBracket jamError + HiLink jamCommentError jamError + HiLink jamSpaceError jamError + HiLink jamSpecialError jamError + HiLink jamOperator1 jamOperator + HiLink jamOperator2 jamOperator + HiLink jamOperator3 jamOperator + HiLink jamOperator4 jamOperator + HiLink jamOperator5 jamOperator + HiLink jamOperator6 jamOperator + HiLink jamOperator7 jamOperator + HiLink jamOperator8 jamOperator + HiLink jamOperator9 jamOperator + HiLink jamOperator10 jamOperator + HiLink jamOperator11 jamOperator + HiLink jamOperator12 jamOperator + HiLink jamOperator13 jamOperator + HiLink jamOperator14 jamOperator + HiLink jamError Error + HiLink jamStatement Statement + HiLink jamPreCondit PreCondit + HiLink jamCommentError jamError + HiLink jamCommentString jamString + HiLink jamComment2String jamString + HiLink jamCommentSkip jamComment + HiLink jamString String + HiLink jamComment Comment + HiLink jamSpecial SpecialChar + HiLink jamTodo Todo + HiLink jamCppSkip jamCppOut + HiLink jamCppOut2 jamCppOut + HiLink jamCppOut Comment + HiLink jamDBState1 Identifier + HiLink jamDBState2 Identifier + HiLink jamSQLState1 jamSQL + HiLink jamSQLState2 jamSQL + HiLink jamLibFunc1 jamLibFunc + HiLink jamLibFunc2 jamLibFunc + HiLink jamLibFunc3 jamLibFunc + HiLink jamLibFunc4 jamLibFunc + HiLink jamLibFunc5 jamLibFunc + HiLink jamLibFunc6 jamLibFunc + HiLink jamLibFunc7 jamLibFunc + HiLink jamLibFunc8 jamLibFunc + HiLink jamLibFunc9 jamLibFunc + HiLink jamVariable1 jamVariablen + HiLink jamVariable2 jamVariablen + HiLink jamVariable3 jamVariablen + HiLink jamVariable4 jamVariablen + HiLink jamVariable5 jamVariablen + HiLink jamVariable6 jamVariablen + HiLink jamVariable7 jamVariablen + HiLink jamVariable8 jamVariablen + HiLink jamVariable9 jamVariablen + HiLink jamVariable10 jamVariablen + HiLink jamVariablen Constant + HiLink jamSQL Type + HiLink jamLibFunc PreProc + HiLink jamOperator Special + + delcommand HiLink +endif + +let b:current_syntax = "jam" + +" vim: ts=8 diff --git a/runtime/syntax/jargon.vim b/runtime/syntax/jargon.vim new file mode 100644 index 000000000..25a88bc98 --- /dev/null +++ b/runtime/syntax/jargon.vim @@ -0,0 +1,36 @@ +" Vim syntax file +" Language: Jargon File +" Maintainer: <rms@poczta.onet.pl> +" Last Change: 2001 May 26 +" +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match jargonChaptTitle /:[^:]*:/ +syn match jargonEmailAddr /[^<@ ^I]*@[^ ^I>]*/ +syn match jargonUrl +\(http\|ftp\)://[^\t )"]*+ +syn match jargonMark /{[^}]*}/ + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_jargon_syntax_inits") + if version < 508 + let did_jargon_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + HiLink jargonChaptTitle Title + HiLink jargonEmailAddr Comment + HiLink jargonUrl Comment + HiLink jargonMark Label + delcommand HiLink +endif + +let b:current_syntax = "jargon" diff --git a/runtime/syntax/java.vim b/runtime/syntax/java.vim new file mode 100644 index 000000000..b47c17e69 --- /dev/null +++ b/runtime/syntax/java.vim @@ -0,0 +1,334 @@ +" Vim syntax file +" Language: Java +" Maintainer: Claudio Fleiner <claudio@fleiner.com> +" URL: http://www.fleiner.com/vim/syntax/java.vim +" Last Change: 2004 Apr 23 + +" Please check :help java.vim for comments on some of the options available. + +" Quit when a syntax file was already loaded +if !exists("main_syntax") + if version < 600 + syntax clear + elseif exists("b:current_syntax") + finish + endif + " we define it here so that included files can test for it + let main_syntax='java' +endif + +" don't use standard HiLink, it will not work with included syntax files +if version < 508 + command! -nargs=+ JavaHiLink hi link <args> +else + command! -nargs=+ JavaHiLink hi def link <args> +endif + +" some characters that cannot be in a java program (outside a string) +syn match javaError "[\\@`]" +syn match javaError "<<<\|\.\.\|=>\|<>\|||=\|&&=\|[^-]->\|\*\/" +syn match javaOK "\.\.\." + +" use separate name so that it can be deleted in javacc.vim +syn match javaError2 "#\|=<" +JavaHiLink javaError2 javaError + + + +" keyword definitions +syn keyword javaExternal native package +syn match javaExternal "\<import\(\s\+static\>\)\?" +syn keyword javaError goto const +syn keyword javaConditional if else switch +syn keyword javaRepeat while for do +syn keyword javaBoolean true false +syn keyword javaConstant null +syn keyword javaTypedef this super +syn keyword javaOperator new instanceof +syn keyword javaType boolean char byte short int long float double +syn keyword javaType void +syn keyword javaStatement return +syn keyword javaStorageClass static synchronized transient volatile final strictfp serializable +syn keyword javaExceptions throw try catch finally +syn keyword javaAssert assert +syn keyword javaMethodDecl synchronized throws +syn keyword javaClassDecl extends implements interface +" to differentiate the keyword class from MyClass.class we use a match here +syn match javaTypedef "\.\s*\<class\>"ms=s+1 +syn keyword javaClassDecl enum +syn match javaClassDecl "^class\>" +syn match javaClassDecl "[^.]\s*\<class\>"ms=s+1 +syn keyword javaBranch break continue nextgroup=javaUserLabelRef skipwhite +syn match javaUserLabelRef "\k\+" contained +syn keyword javaScopeDecl public protected private abstract + +if exists("java_highlight_java_lang_ids") || exists("java_highlight_java_lang") || exists("java_highlight_all") + " java.lang.* + syn match javaLangClass "\<System\>" + syn keyword javaLangClass Cloneable Comparable Runnable Boolean Byte Class + syn keyword javaLangClass Character CharSequence ClassLoader Compiler Double Float + syn keyword javaLangClass Integer InheritableThreadLocal Long Math Number Object Package Process + syn keyword javaLangClass Runtime RuntimePermission InheritableThreadLocal + syn keyword javaLangClass SecurityManager Short String StrictMath StackTraceElement + syn keyword javaLangClass StringBuffer Thread ThreadGroup + syn keyword javaLangClass ThreadLocal Throwable Void ArithmeticException + syn keyword javaLangClass ArrayIndexOutOfBoundsException AssertionError + syn keyword javaLangClass ArrayStoreException ClassCastException + syn keyword javaLangClass ClassNotFoundException + syn keyword javaLangClass CloneNotSupportedException Exception + syn keyword javaLangClass IllegalAccessException + syn keyword javaLangClass IllegalArgumentException + syn keyword javaLangClass IllegalMonitorStateException + syn keyword javaLangClass IllegalStateException + syn keyword javaLangClass IllegalThreadStateException + syn keyword javaLangClass IndexOutOfBoundsException + syn keyword javaLangClass InstantiationException InterruptedException + syn keyword javaLangClass NegativeArraySizeException NoSuchFieldException + syn keyword javaLangClass NoSuchMethodException NullPointerException + syn keyword javaLangClass NumberFormatException RuntimeException + syn keyword javaLangClass SecurityException StringIndexOutOfBoundsException + syn keyword javaLangClass UnsupportedOperationException + syn keyword javaLangClass AbstractMethodError ClassCircularityError + syn keyword javaLangClass ClassFormatError Error ExceptionInInitializerError + syn keyword javaLangClass IllegalAccessError InstantiationError + syn keyword javaLangClass IncompatibleClassChangeError InternalError + syn keyword javaLangClass LinkageError NoClassDefFoundError + syn keyword javaLangClass NoSuchFieldError NoSuchMethodError + syn keyword javaLangClass OutOfMemoryError StackOverflowError + syn keyword javaLangClass ThreadDeath UnknownError UnsatisfiedLinkError + syn keyword javaLangClass UnsupportedClassVersionError VerifyError + syn keyword javaLangClass VirtualMachineError + syn keyword javaLangObject clone equals finalize getClass hashCode + syn keyword javaLangObject notify notifyAll toString wait + JavaHiLink javaLangClass javaConstant + JavaHiLink javaLangObject javaConstant + syn cluster javaTop add=javaLangObject,javaLangClass + syn cluster javaClasses add=javaLangClass +endif + +if filereadable(expand("<sfile>:p:h")."/javaid.vim") + source <sfile>:p:h/javaid.vim +endif + +if exists("java_space_errors") + if !exists("java_no_trail_space_error") + syn match javaSpaceError "\s\+$" + endif + if !exists("java_no_tab_space_error") + syn match javaSpaceError " \+\t"me=e-1 + endif +endif + +syn region javaLabelRegion transparent matchgroup=javaLabel start="\<case\>" matchgroup=NONE end=":" contains=javaNumber,javaCharacter +syn match javaUserLabel "^\s*[_$a-zA-Z][_$a-zA-Z0-9_]*\s*:"he=e-1 contains=javaLabel +syn keyword javaLabel default + +if !exists("java_allow_cpp_keywords") + syn keyword javaError auto delete extern friend inline redeclared + syn keyword javaError register signed sizeof struct template typedef union + syn keyword javaError unsigned operator +endif + +" The following cluster contains all java groups except the contained ones +syn cluster javaTop add=javaExternal,javaError,javaError,javaBranch,javaLabelRegion,javaLabel,javaConditional,javaRepeat,javaBoolean,javaConstant,javaTypedef,javaOperator,javaType,javaType,javaStatement,javaStorageClass,javaAssert,javaExceptions,javaMethodDecl,javaClassDecl,javaClassDecl,javaClassDecl,javaScopeDecl,javaError,javaError2,javaUserLabel,javaLangObject + + +" Comments +syn keyword javaTodo contained TODO FIXME XXX +if exists("java_comment_strings") + syn region javaCommentString contained start=+"+ end=+"+ end=+$+ end=+\*/+me=s-1,he=s-1 contains=javaSpecial,javaCommentStar,javaSpecialChar,@Spell + syn region javaComment2String contained start=+"+ end=+$\|"+ contains=javaSpecial,javaSpecialChar,@Spell + syn match javaCommentCharacter contained "'\\[^']\{1,6\}'" contains=javaSpecialChar + syn match javaCommentCharacter contained "'\\''" contains=javaSpecialChar + syn match javaCommentCharacter contained "'[^\\]'" + syn cluster javaCommentSpecial add=javaCommentString,javaCommentCharacter,javaNumber + syn cluster javaCommentSpecial2 add=javaComment2String,javaCommentCharacter,javaNumber +endif +syn region javaComment start="/\*" end="\*/" contains=@javaCommentSpecial,javaTodo,@Spell +syn match javaCommentStar contained "^\s*\*[^/]"me=e-1 +syn match javaCommentStar contained "^\s*\*$" +syn match javaLineComment "//.*" contains=@javaCommentSpecial2,javaTodo,@Spell +JavaHiLink javaCommentString javaString +JavaHiLink javaComment2String javaString +JavaHiLink javaCommentCharacter javaCharacter + +syn cluster javaTop add=javaComment,javaLineComment + +if !exists("java_ignore_javadoc") && main_syntax != 'jsp' + syntax case ignore + " syntax coloring for javadoc comments (HTML) + syntax include @javaHtml <sfile>:p:h/html.vim + unlet b:current_syntax + syn region javaDocComment start="/\*\*" end="\*/" keepend contains=javaCommentTitle,@javaHtml,javaDocTags,javaTodo,@Spell + syn region javaCommentTitle contained matchgroup=javaDocComment start="/\*\*" matchgroup=javaCommentTitle keepend end="\.$" end="\.[ \t\r<&]"me=e-1 end="[^{]@"me=s-2,he=s-1 end="\*/"me=s-1,he=s-1 contains=@javaHtml,javaCommentStar,javaTodo,@Spell,javaDocTags + + syn region javaDocTags contained start="{@\(link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}" + syn match javaDocTags contained "@\(see\|param\|exception\|throws\|since\)\s\+\S\+" contains=javaDocParam + syn match javaDocParam contained "\s\S\+" + syn match javaDocTags contained "@\(version\|author\|return\|deprecated\|serial\|serialField\|serialData\)\>" + syntax case match +endif + +" match the special comment /**/ +syn match javaComment "/\*\*/" + +" Strings and constants +syn match javaSpecialError contained "\\." +syn match javaSpecialCharError contained "[^']" +syn match javaSpecialChar contained "\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\)" +syn region javaString start=+"+ end=+"+ end=+$+ contains=javaSpecialChar,javaSpecialError,@Spell +" next line disabled, it can cause a crash for a long line +"syn match javaStringError +"\([^"\\]\|\\.\)*$+ +syn match javaCharacter "'[^']*'" contains=javaSpecialChar,javaSpecialCharError +syn match javaCharacter "'\\''" contains=javaSpecialChar +syn match javaCharacter "'[^\\]'" +syn match javaNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" +syn match javaNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" +syn match javaNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" +syn match javaNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" + +" unicode characters +syn match javaSpecial "\\u\d\{4\}" + +syn cluster javaTop add=javaString,javaCharacter,javaNumber,javaSpecial,javaStringError + +if exists("java_highlight_functions") + if java_highlight_functions == "indent" + syn match javaFuncDef "^\(\t\| \{8\}\)[_$a-zA-Z][_$a-zA-Z0-9_. \[\]]*([^-+*/()]*)" contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses + syn region javaFuncDef start=+^\(\t\| \{8\}\)[$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*,\s*+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses + syn match javaFuncDef "^ [$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*)" contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses + syn region javaFuncDef start=+^ [$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*,\s*+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,@javaClasses + else + " This line catches method declarations at any indentation>0, but it assumes + " two things: + " 1. class names are always capitalized (ie: Button) + " 2. method names are never capitalized (except constructors, of course) + syn region javaFuncDef start=+^\s\+\(\(public\|protected\|private\|static\|abstract\|final\|native\|synchronized\)\s\+\)*\(\(void\|boolean\|char\|byte\|short\|int\|long\|float\|double\|\([A-Za-z_][A-Za-z0-9_$]*\.\)*[A-Z][A-Za-z0-9_$]*\)\(<[^>]*>\)\=\(\[\]\)*\s\+[a-z][A-Za-z0-9_$]*\|[A-Z][A-Za-z0-9_$]*\)\s*([^0-9]+ end=+)+ contains=javaScopeDecl,javaType,javaStorageClass,javaComment,javaLineComment,@javaClasses + endif + syn match javaBraces "[{}]" + syn cluster javaTop add=javaFuncDef,javaBraces +endif + +if exists("java_highlight_debug") + + " Strings and constants + syn match javaDebugSpecial contained "\\\d\d\d\|\\." + syn region javaDebugString contained start=+"+ end=+"+ contains=javaDebugSpecial + syn match javaDebugStringError +"\([^"\\]\|\\.\)*$+ + syn match javaDebugCharacter contained "'[^\\]'" + syn match javaDebugSpecialCharacter contained "'\\.'" + syn match javaDebugSpecialCharacter contained "'\\''" + syn match javaDebugNumber contained "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" + syn match javaDebugNumber contained "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" + syn match javaDebugNumber contained "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" + syn match javaDebugNumber contained "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" + syn keyword javaDebugBoolean contained true false + syn keyword javaDebugType contained null this super + syn region javaDebugParen start=+(+ end=+)+ contained contains=javaDebug.*,javaDebugParen + + " to make this work you must define the highlighting for these groups + syn match javaDebug "\<System\.\(out\|err\)\.print\(ln\)*\s*("me=e-1 contains=javaDebug.* nextgroup=javaDebugParen + syn match javaDebug "[A-Za-z][a-zA-Z0-9_]*\.printStackTrace\s*("me=e-1 contains=javaDebug.* nextgroup=javaDebugParen + syn match javaDebug "\<trace[SL]\=\s*("me=e-1 contains=javaDebug.* nextgroup=javaDebugParen + + syn cluster javaTop add=javaDebug + + if version >= 508 || !exists("did_c_syn_inits") + JavaHiLink javaDebug Debug + JavaHiLink javaDebugString DebugString + JavaHiLink javaDebugStringError javaError + JavaHiLink javaDebugType DebugType + JavaHiLink javaDebugBoolean DebugBoolean + JavaHiLink javaDebugNumber Debug + JavaHiLink javaDebugSpecial DebugSpecial + JavaHiLink javaDebugSpecialCharacter DebugSpecial + JavaHiLink javaDebugCharacter DebugString + JavaHiLink javaDebugParen Debug + + JavaHiLink DebugString String + JavaHiLink DebugSpecial Special + JavaHiLink DebugBoolean Boolean + JavaHiLink DebugType Type + endif +endif + +if exists("java_mark_braces_in_parens_as_errors") + syn match javaInParen contained "[{}]" + JavaHiLink javaInParen javaError + syn cluster javaTop add=javaInParen +endif + +" catch errors caused by wrong parenthesis +syn region javaParenT transparent matchgroup=javaParen start="(" end=")" contains=@javaTop,javaParenT1 +syn region javaParenT1 transparent matchgroup=javaParen1 start="(" end=")" contains=@javaTop,javaParenT2 contained +syn region javaParenT2 transparent matchgroup=javaParen2 start="(" end=")" contains=@javaTop,javaParenT contained +syn match javaParenError ")" +JavaHiLink javaParenError javaError + +if !exists("java_minlines") + let java_minlines = 10 +endif +exec "syn sync ccomment javaComment minlines=" . java_minlines + +" The default highlighting. +if version >= 508 || !exists("did_java_syn_inits") + if version < 508 + let did_java_syn_inits = 1 + endif + JavaHiLink javaFuncDef Function + JavaHiLink javaBraces Function + JavaHiLink javaBranch Conditional + JavaHiLink javaUserLabelRef javaUserLabel + JavaHiLink javaLabel Label + JavaHiLink javaUserLabel Label + JavaHiLink javaConditional Conditional + JavaHiLink javaRepeat Repeat + JavaHiLink javaExceptions Exception + JavaHiLink javaAssert Statement + JavaHiLink javaStorageClass StorageClass + JavaHiLink javaMethodDecl javaStorageClass + JavaHiLink javaClassDecl javaStorageClass + JavaHiLink javaScopeDecl javaStorageClass + JavaHiLink javaBoolean Boolean + JavaHiLink javaSpecial Special + JavaHiLink javaSpecialError Error + JavaHiLink javaSpecialCharError Error + JavaHiLink javaString String + JavaHiLink javaCharacter Character + JavaHiLink javaSpecialChar SpecialChar + JavaHiLink javaNumber Number + JavaHiLink javaError Error + JavaHiLink javaStringError Error + JavaHiLink javaStatement Statement + JavaHiLink javaOperator Operator + JavaHiLink javaComment Comment + JavaHiLink javaDocComment Comment + JavaHiLink javaLineComment Comment + JavaHiLink javaConstant Constant + JavaHiLink javaTypedef Typedef + JavaHiLink javaTodo Todo + + JavaHiLink javaCommentTitle SpecialComment + JavaHiLink javaDocTags Special + JavaHiLink javaDocParam Function + JavaHiLink javaCommentStar javaComment + + JavaHiLink javaType Type + JavaHiLink javaExternal Include + + JavaHiLink htmlComment Special + JavaHiLink htmlCommentPart Special + JavaHiLink javaSpaceError Error +endif + +delcommand JavaHiLink + +let b:current_syntax = "java" + +if main_syntax == 'java' + unlet main_syntax +endif + +let b:spell_options="contained" + +" vim: ts=8 diff --git a/runtime/syntax/javacc.vim b/runtime/syntax/javacc.vim new file mode 100644 index 000000000..57c57b568 --- /dev/null +++ b/runtime/syntax/javacc.vim @@ -0,0 +1,77 @@ +" Vim syntax file +" Language: JavaCC, a Java Compiler Compiler written by JavaSoft +" Maintainer: Claudio Fleiner <claudio@fleiner.com> +" URL: http://www.fleiner.com/vim/syntax/javacc.vim +" Last Change: 2001 Jun 20 + +" Uses java.vim, and adds a few special things for JavaCC Parser files. +" Those files usually have the extension *.jj + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" source the java.vim file +if version < 600 + source <sfile>:p:h/java.vim +else + runtime! syntax/java.vim +endif +unlet b:current_syntax + +"remove catching errors caused by wrong parenthesis (does not work in javacc +"files) (first define them in case they have not been defined in java) +syn match javaParen "--" +syn match javaParenError "--" +syn match javaInParen "--" +syn match javaError2 "--" +syn clear javaParen +syn clear javaParenError +syn clear javaInParen +syn clear javaError2 + +" remove function definitions (they look different) (first define in +" in case it was not defined in java.vim) +"syn match javaFuncDef "--" +syn clear javaFuncDef +syn match javaFuncDef "[$_a-zA-Z][$_a-zA-Z0-9_. \[\]]*([^-+*/()]*)[ \t]*:" contains=javaType + +syn keyword javaccPackages options DEBUG_PARSER DEBUG_LOOKAHEAD DEBUG_TOKEN_MANAGER +syn keyword javaccPackages COMMON_TOKEN_ACTION IGNORE_CASE CHOICE_AMBIGUITY_CHECK +syn keyword javaccPackages OTHER_AMBIGUITY_CHECK STATIC LOOKAHEAD ERROR_REPORTING +syn keyword javaccPackages USER_TOKEN_MANAGER USER_CHAR_STREAM JAVA_UNICODE_ESCAPE +syn keyword javaccPackages UNICODE_INPUT +syn match javaccPackages "PARSER_END([^)]*)" +syn match javaccPackages "PARSER_BEGIN([^)]*)" +syn match javaccSpecToken "<EOF>" +" the dot is necessary as otherwise it will be matched as a keyword. +syn match javaccSpecToken ".LOOKAHEAD("ms=s+1,me=e-1 +syn match javaccToken "<[^> \t]*>" +syn keyword javaccActionToken TOKEN SKIP MORE SPECIAL_TOKEN +syn keyword javaccError DEBUG IGNORE_IN_BNF + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_css_syn_inits") + if version < 508 + let did_css_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + HiLink javaccSpecToken Statement + HiLink javaccActionToken Type + HiLink javaccPackages javaScopeDecl + HiLink javaccToken String + HiLink javaccError Error + delcommand HiLink +endif + +let b:current_syntax = "javacc" + +" vim: ts=8 diff --git a/runtime/syntax/javascript.vim b/runtime/syntax/javascript.vim new file mode 100644 index 000000000..a037496bb --- /dev/null +++ b/runtime/syntax/javascript.vim @@ -0,0 +1,111 @@ +" Vim syntax file +" Language: JavaScript +" Maintainer: Claudio Fleiner <claudio@fleiner.com> +" URL: http://www.fleiner.com/vim/syntax/javascript.vim +" Last Change: 2004 May 16 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +" tuning parameters: +" unlet javaScript_fold + +if !exists("main_syntax") + if version < 600 + syntax clear + elseif exists("b:current_syntax") + finish + endif + let main_syntax = 'javascript' +endif + +" Drop fold if it set but vim doesn't support it. +if version < 600 && exists("javaScript_fold") + unlet javaScript_fold +endif + +syn case ignore + + +syn keyword javaScriptCommentTodo TODO FIXME XXX TBD contained +syn match javaScriptLineComment "\/\/.*$" contains=javaScriptCommentTodo +syn match javaScriptCommentSkip "^[ \t]*\*\($\|[ \t]\+\)" +syn region javaScriptComment start="/\*" end="\*/" contains=javaScriptCommentTodo +syn match javaScriptSpecial "\\\d\d\d\|\\." +syn region javaScriptStringD start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=javaScriptSpecial,@htmlPreproc +syn region javaScriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=javaScriptSpecial,@htmlPreproc +syn match javaScriptSpecialCharacter "'\\.'" +syn match javaScriptNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" +syn region javaScriptRegexpString start=+/+ skip=+\\\\\|\\/+ end=+/[gi]\?\s*$+ end=+/[gi]\?\s*[;,)]+me=e-1 contains=@htmlPreproc oneline +syn keyword javaScriptConditional if else +syn keyword javaScriptRepeat while for +syn keyword javaScriptBranch break continue switch case default +syn keyword javaScriptOperator new in +syn keyword javaScriptType this var const +syn keyword javaScriptStatement return with +syn keyword javaScriptBoolean true false + +if exists("javaScript_fold") + syn match javaScriptFunction "\<function\>" + syn region javaScriptFunctionFold start="\<function\>.*[^};]$" end="^\z1}.*$" transparent fold keepend + + syn sync match javaScriptSync grouphere javaScriptFunctionFold "\<function\>" + syn sync match javaScriptSync grouphere NONE "^}" + + setlocal foldmethod=syntax + setlocal foldtext=getline(v:foldstart) +else + syn keyword javaScriptFunction function + syn match javaScriptBraces "[{}]" +endif + +syn sync fromstart +syn sync maxlines=100 + +" catch errors caused by wrong parenthesis +syn region javaScriptParen transparent start="(" end=")" contains=javaScriptParen,javaScriptComment,javaScriptSpecial,javaScriptStringD,javaScriptStringS,javaScriptSpecialCharacter,javaScriptNumber,javaScriptRegexpString,javaScriptBoolean,javaScriptBraces +syn match javaScrParenError ")" + +if main_syntax == "javascript" + syn sync ccomment javaScriptComment +endif + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_javascript_syn_inits") + if version < 508 + let did_javascript_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + HiLink javaScriptComment Comment + HiLink javaScriptLineComment Comment + HiLink javaScriptCommentTodo Todo + HiLink javaScriptSpecial Special + HiLink javaScriptStringS String + HiLink javaScriptStringD String + HiLink javaScriptCharacter Character + HiLink javaScriptSpecialCharacter javaScriptSpecial + HiLink javaScriptNumber javaScriptValue + HiLink javaScriptConditional Conditional + HiLink javaScriptRepeat Repeat + HiLink javaScriptBranch Conditional + HiLink javaScriptOperator Operator + HiLink javaScriptType Type + HiLink javaScriptStatement Statement + HiLink javaScriptFunction Function + HiLink javaScriptBraces Function + HiLink javaScriptError Error + HiLink javaScrParenError javaScriptError + HiLink javaScriptBoolean Boolean + HiLink javaScriptRegexpString String + delcommand HiLink +endif + +let b:current_syntax = "javascript" +if main_syntax == 'javascript' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/runtime/syntax/jess.vim b/runtime/syntax/jess.vim new file mode 100644 index 000000000..243bab351 --- /dev/null +++ b/runtime/syntax/jess.vim @@ -0,0 +1,161 @@ +" Vim syntax file +" Language: Jess +" Maintainer: Paul Baleme <pbaleme@mail.com> +" Last change: September 14, 2000 +" Based on lisp.vim by : Dr. Charles E. Campbell, Jr. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if version < 600 + set iskeyword=42,43,45,47-58,60-62,64-90,97-122,_ +else + setlocal iskeyword=42,43,45,47-58,60-62,64-90,97-122,_ +endif + +" Lists +syn match jessSymbol ![^()'`,"; \t]\+! contained +syn match jessBarSymbol !|..\{-}|! contained +syn region jessList matchgroup=Delimiter start="(" skip="|.\{-}|" matchgroup=Delimiter end=")" contains=jessAtom,jessBQList,jessConcat,jessDeclaration,jessList,jessNumber,jessSymbol,jessSpecial,jessFunc,jessKey,jessAtomMark,jessString,jessComment,jessBarSymbol,jessAtomBarSymbol,jessVar +syn region jessBQList matchgroup=PreProc start="`(" skip="|.\{-}|" matchgroup=PreProc end=")" contains=jessAtom,jessBQList,jessConcat,jessDeclaration,jessList,jessNumber,jessSpecial,jessSymbol,jessFunc,jessKey,jessVar,jessAtomMark,jessString,jessComment,jessBarSymbol,jessAtomBarSymbol + +" Atoms +syn match jessAtomMark "'" +syn match jessAtom "'("me=e-1 contains=jessAtomMark nextgroup=jessAtomList +syn match jessAtom "'[^ \t()]\+" contains=jessAtomMark +syn match jessAtomBarSymbol !'|..\{-}|! contains=jessAtomMark +syn region jessAtom start=+'"+ skip=+\\"+ end=+"+ +syn region jessAtomList matchgroup=Special start="(" skip="|.\{-}|" matchgroup=Special end=")" contained contains=jessAtomList,jessAtomNmbr0,jessString,jessComment,jessAtomBarSymbol +syn match jessAtomNmbr "\<[0-9]\+" contained + +" Standard jess Functions and Macros +syn keyword jessFunc * + ** - / < > <= >= <> = +syn keyword jessFunc long longp +syn keyword jessFunc abs agenda and +syn keyword jessFunc assert assert-string bag +syn keyword jessFunc batch bind bit-and +syn keyword jessFunc bit-not bit-or bload +syn keyword jessFunc bsave build call +syn keyword jessFunc clear clear-storage close +syn keyword jessFunc complement$ context count-query-results +syn keyword jessFunc create$ +syn keyword jessFunc delete$ div +syn keyword jessFunc do-backward-chaining e +syn keyword jessFunc engine eq eq* +syn keyword jessFunc eval evenp exit +syn keyword jessFunc exp explode$ external-addressp +syn keyword jessFunc fact-slot-value facts fetch +syn keyword jessFunc first$ float floatp +syn keyword jessFunc foreach format gensym* +syn keyword jessFunc get get-fact-duplication +syn keyword jessFunc get-member get-multithreaded-io +syn keyword jessFunc get-reset-globals get-salience-evaluation +syn keyword jessFunc halt if implode$ +syn keyword jessFunc import insert$ integer +syn keyword jessFunc integerp intersection$ jess-version-number +syn keyword jessFunc jess-version-string length$ +syn keyword jessFunc lexemep list-function$ load-facts +syn keyword jessFunc load-function load-package log +syn keyword jessFunc log10 lowcase matches +syn keyword jessFunc max member$ min +syn keyword jessFunc mod modify multifieldp +syn keyword jessFunc neq new not +syn keyword jessFunc nth$ numberp oddp +syn keyword jessFunc open or pi +syn keyword jessFunc ppdeffunction ppdefglobal ddpefrule +syn keyword jessFunc printout random read +syn keyword jessFunc readline replace$ reset +syn keyword jessFunc rest$ retract retract-string +syn keyword jessFunc return round rules +syn keyword jessFunc run run-query run-until-halt +syn keyword jessFunc save-facts set set-fact-duplication +syn keyword jessFunc set-factory set-member set-multithreaded-io +syn keyword jessFunc set-node-index-hash set-reset-globals +syn keyword jessFunc set-salience-evaluation set-strategy +syn keyword jessFunc setgen show-deffacts show-deftemplates +syn keyword jessFunc show-jess-listeners socket +syn keyword jessFunc sqrt store str-cat +syn keyword jessFunc str-compare str-index str-length +syn keyword jessFunc stringp sub-string subseq$ +syn keyword jessFunc subsetp sym-cat symbolp +syn keyword jessFunc system throw time +syn keyword jessFunc try undefadvice undefinstance +syn keyword jessFunc undefrule union$ unwatch +syn keyword jessFunc upcase view watch +syn keyword jessFunc while +syn match jessFunc "\<c[ad]\+r\>" + +" jess Keywords (modifiers) +syn keyword jessKey defglobal deffunction defrule +syn keyword jessKey deffacts +syn keyword jessKey defadvice defclass definstance + +" Standard jess Variables +syn region jessVar start="?" end="[^a-zA-Z0-9]"me=e-1 + +" Strings +syn region jessString start=+"+ skip=+\\"+ end=+"+ + +" Shared with Declarations, Macros, Functions +"syn keyword jessDeclaration + +syn match jessNumber "[0-9]\+" + +syn match jessSpecial "\*[a-zA-Z_][a-zA-Z_0-9-]*\*" +syn match jessSpecial !#|[^()'`,"; \t]\+|#! +syn match jessSpecial !#x[0-9a-fA-F]\+! +syn match jessSpecial !#o[0-7]\+! +syn match jessSpecial !#b[01]\+! +syn match jessSpecial !#\\[ -\~]! +syn match jessSpecial !#[':][^()'`,"; \t]\+! +syn match jessSpecial !#([^()'`,"; \t]\+)! + +syn match jessConcat "\s\.\s" +syntax match jessParenError ")" + +" Comments +syn match jessComment ";.*$" + +" synchronization +syn sync lines=100 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_jess_syntax_inits") + if version < 508 + let did_jess_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink jessAtomNmbr jessNumber + HiLink jessAtomMark jessMark + + HiLink jessAtom Identifier + HiLink jessAtomBarSymbol Special + HiLink jessBarSymbol Special + HiLink jessComment Comment + HiLink jessConcat Statement + HiLink jessDeclaration Statement + HiLink jessFunc Statement + HiLink jessKey Type + HiLink jessMark Delimiter + HiLink jessNumber Number + HiLink jessParenError Error + HiLink jessSpecial Type + HiLink jessString String + HiLink jessVar Identifier + + delcommand HiLink +endif + +let b:current_syntax = "jess" + +" vim: ts=18 diff --git a/runtime/syntax/jgraph.vim b/runtime/syntax/jgraph.vim new file mode 100644 index 000000000..7ecd5afae --- /dev/null +++ b/runtime/syntax/jgraph.vim @@ -0,0 +1,58 @@ +" Vim syntax file +" Language: jgraph (graph plotting utility) +" Maintainer: Jonas Munsin jmunsin@iki.fi +" Last Change: 2003 May 04 +" this syntax file is not yet complete + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case match + +" comments +syn region jgraphComment start="(\* " end=" \*)" + +syn keyword jgraphCmd newcurve newgraph marktype +syn keyword jgraphType xaxis yaxis + +syn keyword jgraphType circle box diamond triangle x cross ellipse +syn keyword jgraphType xbar ybar text postscript eps none general + +syn keyword jgraphType solid dotted dashed longdash dotdash dodotdash +syn keyword jgraphType dotdotdashdash pts + +"integer number, or floating point number without a dot. - or no - +syn match jgraphNumber "\<-\=\d\+\>" +"floating point number, with dot - or no - +syn match jgraphNumber "\<-\=\d\+\.\d*\>" +"floating point number, starting with a dot - or no - +syn match jgraphNumber "\-\=\.\d\+\>" + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_jgraph_syn_inits") + if version < 508 + let did_jgraph_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink jgraphComment Comment + HiLink jgraphCmd Identifier + HiLink jgraphType Type + HiLink jgraphNumber Number + + delcommand HiLink +endif + + +let b:current_syntax = "jgraph" diff --git a/runtime/syntax/jproperties.vim b/runtime/syntax/jproperties.vim new file mode 100644 index 000000000..9343bd292 --- /dev/null +++ b/runtime/syntax/jproperties.vim @@ -0,0 +1,148 @@ +" Vim syntax file +" Language: Java Properties resource file (*.properties[_*]) +" Maintainer: Simon Baldwin <simonb@sco.com> +" Last change: 26th Mar 2000 + +" ============================================================================= + +" Optional and tuning variables: + +" jproperties_lines +" ----------------- +" Set a value for the sync block that we use to find long continuation lines +" in properties; the value is already large - if you have larger continuation +" sets you may need to increase it further - if not, and you find editing is +" slow, reduce the value of jproperties_lines. +if !exists("jproperties_lines") + let jproperties_lines = 256 +endif + +" jproperties_strict_syntax +" ------------------------- +" Most properties files assign values with "id=value" or "id:value". But, +" strictly, the Java properties parser also allows "id value", "id", and +" even more bizarrely "=value", ":value", " value", and so on. These latter +" ones, however, are rarely used, if ever, and handling them in the high- +" lighting can obscure errors in the more normal forms. So, in practice +" we take special efforts to pick out only "id=value" and "id:value" forms +" by default. If you want strict compliance, set jproperties_strict_syntax +" to non-zero (and good luck). +if !exists("jproperties_strict_syntax") + let jproperties_strict_syntax = 0 +endif + +" jproperties_show_messages +" ------------------------- +" If this properties file contains messages for use with MessageFormat, +" setting a non-zero value will highlight them. Messages are of the form +" "{...}". Highlighting doesn't go to the pains of picking apart what is +" in the format itself - just the basics for now. +if !exists("jproperties_show_messages") + let jproperties_show_messages = 0 +endif + +" ============================================================================= + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" switch case sensitivity off +syn case ignore + +" set the block +exec "syn sync lines=" . jproperties_lines + +" switch between 'normal' and 'strict' syntax +if jproperties_strict_syntax != 0 + + " an assignment is pretty much any non-empty line at this point, + " trying to not think about continuation lines + syn match jpropertiesAssignment "^\s*[^[:space:]]\+.*$" contains=jpropertiesIdentifier + + " an identifier is anything not a space character, pretty much; it's + " followed by = or :, or space or tab. Or end-of-line. + syn match jpropertiesIdentifier "[^=:[:space:]]*" contained nextgroup=jpropertiesDelimiter + + " treat the delimiter specially to get colours right + syn match jpropertiesDelimiter "\s*[=:[:space:]]\s*" contained nextgroup=jpropertiesString + + " catch the bizarre case of no identifier; a special case of delimiter + syn match jpropertiesEmptyIdentifier "^\s*[=:]\s*" nextgroup=jpropertiesString +else + + " here an assignment is id=value or id:value, and we conveniently + " ignore continuation lines for the present + syn match jpropertiesAssignment "^\s*[^=:[:space:]]\+\s*[=:].*$" contains=jpropertiesIdentifier + + " an identifier is anything not a space character, pretty much; it's + " always followed by = or :, and we find it in an assignment + syn match jpropertiesIdentifier "[^=:[:space:]]\+" contained nextgroup=jpropertiesDelimiter + + " treat the delimiter specially to get colours right; this time the + " delimiter must contain = or : + syn match jpropertiesDelimiter "\s*[=:]\s*" contained nextgroup=jpropertiesString +endif + +" a definition is all up to the last non-\-terminated line; strictly, Java +" properties tend to ignore leading whitespace on all lines of a multi-line +" definition, but we don't look for that here (because it's a major hassle) +syn region jpropertiesString start="" skip="\\$" end="$" contained contains=jpropertiesSpecialChar,jpropertiesError,jpropertiesSpecial + +" {...} is a Java Message formatter - add a minimal recognition of these +" if required +if jproperties_show_messages != 0 + syn match jpropertiesSpecial "{[^}]*}\{-1,\}" contained + syn match jpropertiesSpecial "'{" contained + syn match jpropertiesSpecial "''" contained +endif + +" \uABCD are unicode special characters +syn match jpropertiesSpecialChar "\\u\x\{1,4}" contained + +" ...and \u not followed by a hex digit is an error, though the properties +" file parser won't issue an error on it, just set something wacky like zero +syn match jpropertiesError "\\u\X\{1,4}" contained +syn match jpropertiesError "\\u$"me=e-1 contained + +" other things of note are the \t,r,n,\, and the \ preceding line end +syn match jpropertiesSpecial "\\[trn\\]" contained +syn match jpropertiesSpecial "\\\s" contained +syn match jpropertiesSpecial "\\$" contained + +" comments begin with # or !, and persist to end of line; put here since +" they may have been caught by patterns above us +syn match jpropertiesComment "^\s*[#!].*$" contains=jpropertiesTODO +syn keyword jpropertiesTodo TODO FIXME XXX contained + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_jproperties_syntax_inits") + if version < 508 + let did_jproperties_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink jpropertiesComment Comment + HiLink jpropertiesTodo Todo + HiLink jpropertiesIdentifier Identifier + HiLink jpropertiesString String + HiLink jpropertiesExtendString String + HiLink jpropertiesCharacter Character + HiLink jpropertiesSpecial Special + HiLink jpropertiesSpecialChar SpecialChar + HiLink jpropertiesError Error + + delcommand HiLink +endif + +let b:current_syntax = "jproperties" + +" vim:ts=8 diff --git a/runtime/syntax/jsp.vim b/runtime/syntax/jsp.vim new file mode 100644 index 000000000..523c8e31e --- /dev/null +++ b/runtime/syntax/jsp.vim @@ -0,0 +1,84 @@ +" Vim syntax file +" Language: JSP (Java Server Pages) +" Maintainer: Rafael Garcia-Suarez <rgarciasuarez@free.fr> +" URL: http://rgarciasuarez.free.fr/vim/syntax/jsp.vim +" Last change: 2004 Feb 02 +" Credits : Patch by Darren Greaves (recognizes <jsp:...> tags) +" Patch by Thomas Kimpton (recognizes jspExpr inside HTML tags) + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'jsp' +endif + +" Source HTML syntax +if version < 600 + source <sfile>:p:h/html.vim +else + runtime! syntax/html.vim +endif +unlet b:current_syntax + +" Next syntax items are case-sensitive +syn case match + +" Include Java syntax +syn include @jspJava <sfile>:p:h/java.vim + +syn region jspScriptlet matchgroup=jspTag start=/<%/ keepend end=/%>/ contains=@jspJava +syn region jspComment start=/<%--/ end=/--%>/ +syn region jspDecl matchgroup=jspTag start=/<%!/ keepend end=/%>/ contains=@jspJava +syn region jspExpr matchgroup=jspTag start=/<%=/ keepend end=/%>/ contains=@jspJava +syn region jspDirective start=/<%@/ end=/%>/ contains=htmlString,jspDirName,jspDirArg + +syn keyword jspDirName contained include page taglib +syn keyword jspDirArg contained file uri prefix language extends import session buffer autoFlush +syn keyword jspDirArg contained isThreadSafe info errorPage contentType isErrorPage +syn region jspCommand start=/<jsp:/ start=/<\/jsp:/ keepend end=/>/ end=/\/>/ contains=htmlString,jspCommandName,jspCommandArg +syn keyword jspCommandName contained include forward getProperty plugin setProperty useBean param params fallback +syn keyword jspCommandArg contained id scope class type beanName page flush name value property +syn keyword jspCommandArg contained code codebase name archive align height +syn keyword jspCommandArg contained width hspace vspace jreversion nspluginurl iepluginurl + +" Redefine htmlTag so that it can contain jspExpr +syn region htmlTag start=+<[^/%]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster,jspExpr + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_jsp_syn_inits") + if version < 508 + let did_jsp_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + " java.vim has redefined htmlComment highlighting + HiLink htmlComment Comment + HiLink htmlCommentPart Comment + " Be consistent with html highlight settings + HiLink jspComment htmlComment + HiLink jspTag htmlTag + HiLink jspDirective jspTag + HiLink jspDirName htmlTagName + HiLink jspDirArg htmlArg + HiLink jspCommand jspTag + HiLink jspCommandName htmlTagName + HiLink jspCommandArg htmlArg + delcommand HiLink +endif + +if main_syntax == 'jsp' + unlet main_syntax +endif + +let b:current_syntax = "jsp" + +" vim: ts=8 diff --git a/runtime/syntax/kix.vim b/runtime/syntax/kix.vim new file mode 100644 index 000000000..62dc3253e --- /dev/null +++ b/runtime/syntax/kix.vim @@ -0,0 +1,182 @@ +" Vim syntax file +" Language: KixTart 95, Kix2001 Windows script language http://kixtart.org/ +" Maintainer: Richard Howarth <rhowarth@sgb.co.uk> +" Last Change: 2003 May 11 +" URL: http://www.howsoft.demon.co.uk/ + +" KixTart files identified by *.kix extension. + +" Amendment History: +" 26 April 2001: RMH +" Removed development comments from distro version +" Renamed "Kix*" to "kix*" for consistancy +" Changes made in preperation for VIM version 5.8/6.00 + +" TODO: +" Handle arrays highlighting +" Handle object highlighting +" The next two may not be possible: +" Work out how to error too many "(", i.e. (() should be an error. +" Similarly, "if" without "endif" and similar constructs should error. + +" Clear legacy syntax rules for version 5.x, exit if already processed for version 6+ +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +syn case match +syn keyword kixTODO TODO FIX XXX contained + +" Case insensitive language. +syn case ignore + +" Kix statements +syn match kixStatement "?" +syn keyword kixStatement beep big break +syn keyword kixStatement call cd cls color cookie1 copy +syn keyword kixStatement del dim display +syn keyword kixStatement exit +syn keyword kixStatement flushkb +syn keyword kixStatement get gets global go gosub goto +syn keyword kixStatement md +syn keyword kixStatement password play +syn keyword kixStatement quit +syn keyword kixStatement rd return run +syn keyword kixStatement set setl setm settime shell sleep small +syn keyword kixStatement use + +" Kix2001 +syn keyword kixStatement debug function endfunction redim + +" Simple variables +syn match kixNotVar "\$\$\|@@\|%%" transparent contains=NONE +syn match kixLocalVar "\$\w\+" +syn match kixMacro "@\w\+" +syn match kixEnvVar "%\w\+" + +" Destination labels +syn match kixLabel ":\w\+\>" + +" Identify strings, trap unterminated strings +syn match kixStringError +".*\|'.*+ +syn region kixDoubleString oneline start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=kixLocalVar,kixMacro,kixEnvVar,kixNotVar +syn region kixSingleString oneline start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=kixLocalVar,kixMacro,kixEnvVar,kixNotVar + +" Operators +syn match kixOperator "+\|-\|\*\|/\|=\|&\||" +syn keyword kixOperator and or +" Kix2001 +syn match kixOperator "==" +syn keyword kixOperator not + +" Numeric constants +syn match kixInteger "-\=\<\d\+\>" contains=NONE +syn match kixFloat "-\=\.\d\+\>\|-\=\<\d\+\.\d\+\>" contains=NONE + +" Hex numeric constants +syn match kixHex "\&\x\+\>" contains=NONE + +" Other contants +" Kix2001 +syn keyword kixConstant on off + +" Comments +syn match kixComment ";.*$" contains=kixTODO + +" Trap unmatched parenthesis +syn match kixParenCloseError ")" +syn region kixParen oneline transparent start="(" end=")" contains=ALLBUT,kixParenCloseError + +" Functions (Builtin + UDF) +syn match kixFunction "\w\+("he=e-1,me=e-1 contains=ALL + +" Trap unmatched brackets +syn match kixBrackCloseError "\]" +syn region kixBrack transparent start="\[" end="\]" contains=ALLBUT,kixBrackCloseError + +" Clusters for ALLBUT shorthand +syn cluster kixIfBut contains=kixIfError,kixSelectOK,kixDoOK,kixWhileOK,kixForEachOK,kixForNextOK +syn cluster kixSelectBut contains=kixSelectError,kixIfOK,kixDoOK,kixWhileOK,kixForEachOK,kixForNextOK +syn cluster kixDoBut contains=kixDoError,kixSelectOK,kixIfOK,kixWhileOK,kixForEachOK,kixForNextOK +syn cluster kixWhileBut contains=kixWhileError,kixSelectOK,kixIfOK,kixDoOK,kixForEachOK,kixForNextOK +syn cluster kixForEachBut contains=kixForEachError,kixSelectOK,kixIfOK,kixDoOK,kixForNextOK,kixWhileOK +syn cluster kixForNextBut contains=kixForNextError,kixSelectOK,kixIfOK,kixDoOK,kixForEachOK,kixWhileOK +" Condtional construct errors. +syn match kixIfError "\<if\>\|\<else\>\|\<endif\>" +syn match kixIfOK contained "\<if\>\|\<else\>\|\<endif\>" +syn region kixIf transparent matchgroup=kixIfOK start="\<if\>" end="\<endif\>" contains=ALLBUT,@kixIfBut +syn match kixSelectError "\<select\>\|\<case\>\|\<endselect\>" +syn match kixSelectOK contained "\<select\>\|\<case\>\|\<endselect\>" +syn region kixSelect transparent matchgroup=kixSelectOK start="\<select\>" end="\<endselect\>" contains=ALLBUT,@kixSelectBut + +" Program control constructs. +syn match kixDoError "\<do\>\|\<until\>" +syn match kixDoOK contained "\<do\>\|\<until\>" +syn region kixDo transparent matchgroup=kixDoOK start="\<do\>" end="\<until\>" contains=ALLBUT,@kixDoBut +syn match kixWhileError "\<while\>\|\<loop\>" +syn match kixWhileOK contained "\<while\>\|\<loop\>" +syn region kixWhile transparent matchgroup=kixWhileOK start="\<while\>" end="\<loop\>" contains=ALLBUT,@kixWhileBut +syn match kixForNextError "\<for\>\|\<to\>\|\<step\>\|\<next\>" +syn match kixForNextOK contained "\<for\>\|\<to\>\|\<step\>\|\<next\>" +syn region kixForNext transparent matchgroup=kixForNextOK start="\<for\>" end="\<next\>" contains=ALLBUT,@kixForBut +syn match kixForEachError "\<for each\>\|\<in\>\|\<next\>" +syn match kixForEachOK contained "\<for each\>\|\<in\>\|\<next\>" +syn region kixForEach transparent matchgroup=kixForEachOK start="\<for each\>" end="\<next\>" contains=ALLBUT,@kixForEachBut + +" Expressions +syn match kixExpression "<\|>\|<=\|>=\|<>" + + +" Default highlighting. +" Version < 5.8 set default highlight if file not already processed. +" Version >= 5.8 set default highlight only if it doesn't already have a value. +if version > 508 || !exists("did_kix_syn_inits") + if version < 508 + let did_kix_syn_inits=1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink kixDoubleString String + HiLink kixSingleString String + HiLink kixStatement Statement + HiLink kixRepeat Repeat + HiLink kixComment Comment + HiLink kixBuiltin Function + HiLink kixLocalVar Special + HiLink kixMacro Special + HiLink kixEnvVar Special + HiLink kixLabel Type + HiLink kixFunction Function + HiLink kixInteger Number + HiLink kixHex Number + HiLink kixFloat Number + HiLink kixOperator Operator + HiLink kixExpression Operator + + HiLink kixParenCloseError Error + HiLink kixBrackCloseError Error + HiLink kixStringError Error + + HiLink kixWhileError Error + HiLink kixWhileOK Conditional + HiLink kixDoError Error + HiLink kixDoOK Conditional + HiLink kixIfError Error + HiLink kixIfOK Conditional + HiLink kixSelectError Error + HiLink kixSelectOK Conditional + HiLink kixForNextError Error + HiLink kixForNextOK Conditional + HiLink kixForEachError Error + HiLink kixForEachOK Conditional + + delcommand HiLink +endif + +let b:current_syntax = "kix" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/kscript.vim b/runtime/syntax/kscript.vim new file mode 100644 index 000000000..903f8474b --- /dev/null +++ b/runtime/syntax/kscript.vim @@ -0,0 +1,70 @@ +" Vim syntax file +" Language: kscript +" Maintainer: Thomas Capricelli <orzel@yalbi.com> +" URL: http://aquila.rezel.enst.fr/thomas/vim/kscript.vim +" CVS: $Id$ + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn keyword kscriptPreCondit import from + +syn keyword kscriptHardCoded print println connect length arg mid upper lower isEmpty toInt toFloat findApplication +syn keyword kscriptConditional if else switch +syn keyword kscriptRepeat while for do foreach +syn keyword kscriptExceptions emit catch raise try signal +syn keyword kscriptFunction class struct enum +syn keyword kscriptConst FALSE TRUE false true +syn keyword kscriptStatement return delete +syn keyword kscriptLabel case default +syn keyword kscriptStorageClass const +syn keyword kscriptType in out inout var + +syn keyword kscriptTodo contained TODO FIXME XXX + +syn region kscriptComment start="/\*" end="\*/" contains=kscriptTodo +syn match kscriptComment "//.*" contains=kscriptTodo +syn match kscriptComment "#.*$" contains=kscriptTodo + +syn region kscriptString start=+'+ end=+'+ skip=+\\\\\|\\'+ +syn region kscriptString start=+"+ end=+"+ skip=+\\\\\|\\"+ +syn region kscriptString start=+"""+ end=+"""+ +syn region kscriptString start=+'''+ end=+'''+ + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_kscript_syntax_inits") + if version < 508 + let did_kscript_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink kscriptConditional Conditional + HiLink kscriptRepeat Repeat + HiLink kscriptExceptions Statement + HiLink kscriptFunction Function + HiLink kscriptConst Constant + HiLink kscriptStatement Statement + HiLink kscriptLabel Label + HiLink kscriptStorageClass StorageClass + HiLink kscriptType Type + HiLink kscriptTodo Todo + HiLink kscriptComment Comment + HiLink kscriptString String + HiLink kscriptPreCondit PreCondit + HiLink kscriptHardCoded Statement + + delcommand HiLink +endif + +let b:current_syntax = "kscript" + +" vim: ts=8 diff --git a/runtime/syntax/kwt.vim b/runtime/syntax/kwt.vim new file mode 100644 index 000000000..47be7a804 --- /dev/null +++ b/runtime/syntax/kwt.vim @@ -0,0 +1,87 @@ +" Vim syntax file +" Language: kimwitu++ +" Maintainer: Michael Piefel <piefel@informatik.hu-berlin.de> +" Last Change: 2 May 2001 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the C++ syntax to start with +if version < 600 + source <sfile>:p:h/cpp.vim +else + runtime! syntax/cpp.vim + unlet b:current_syntax +endif + +" kimwitu++ extentions + +" Don't stop at eol, messes around with CPP mode, but gives line spanning +" strings in unparse rules +syn region cCppString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat +syn keyword cType integer real casestring nocasestring voidptr list +syn keyword cType uview rview uview_enum rview_enum + +" avoid unparsing rule sth:view being scanned as label +syn clear cUserCont +syn match cUserCont "^\s*\I\i*\s*:$" contains=cUserLabel contained +syn match cUserCont ";\s*\I\i*\s*:$" contains=cUserLabel contained +syn match cUserCont "^\s*\I\i*\s*:[^:]"me=e-1 contains=cUserLabel contained +syn match cUserCont ";\s*\I\i*\s*:[^:]"me=e-1 contains=cUserLabel contained + +" highlight phylum decls +syn match kwtPhylum "^\I\i*:$" +syn match kwtPhylum "^\I\i*\s*{\s*\(!\|\I\)\i*\s*}\s*:$" + +syn keyword kwtStatement with foreach afterforeach provided +syn match kwtDecl "%\(uviewvar\|rviewvar\)" +syn match kwtDecl "^%\(uview\|rview\|ctor\|dtor\|base\|storageclass\|list\|attr\|member\|option\)" +syn match kwtOption "no-csgio\|no-unparse\|no-rewrite\|no-printdot\|no-hashtables\|smart-pointer\|weak-pointer" +syn match kwtSep "^%}$" +syn match kwtSep "^%{\(\s\+\I\i*\)*$" +syn match kwtCast "\<phylum_cast\s*<"me=e-1 +syn match kwtCast "\<phylum_cast\s*$" + + +" match views, remove paren error in brackets +syn clear cErrInBracket +syn match cErrInBracket contained ")" +syn match kwtViews "\(\[\|<\)\@<=[ [:alnum:]_]\{-}:" + +" match rule bodies +syn region kwtUnpBody transparent keepend extend fold start="->\s*\[" start="^\s*\[" skip="\$\@<!{\_.\{-}\$\@<!}" end="\s]\s\=;\=$" end="^]\s\=;\=$" end="}]\s\=;\=$" +syn region kwtRewBody transparent keepend extend fold start="->\s*<" start="^\s*<" end="\s>\s\=;\=$" end="^>\s\=;\=$" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_kwt_syn_inits") + if version < 508 + let did_kwt_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink kwtStatement cppStatement + HiLink kwtDecl cppStatement + HiLink kwtCast cppStatement + HiLink kwtSep Delimiter + HiLink kwtViews Label + HiLink kwtPhylum Type + HiLink kwtOption PreProc + "HiLink cText Comment + + delcommand HiLink +endif + +syn sync lines=300 + +let b:current_syntax = "kwt" + +" vim: ts=8 diff --git a/runtime/syntax/lace.vim b/runtime/syntax/lace.vim new file mode 100644 index 000000000..9e64eea7d --- /dev/null +++ b/runtime/syntax/lace.vim @@ -0,0 +1,135 @@ +" Vim syntax file +" Language: lace +" Maintainer: Jocelyn Fiat <utilities@eiffel.com> +" Last Change: 2001 May 09 + +" Copyright Interactive Software Engineering, 1998 +" You are free to use this file as you please, but +" if you make a change or improvement you must send +" it to the maintainer at <utilities@eiffel.com> + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" LACE is case insensitive, but the style guide lines are not. + +if !exists("lace_case_insensitive") + syn case match +else + syn case ignore +endif + +" A bunch of useful LACE keywords +syn keyword laceTopStruct system root default option visible cluster +syn keyword laceTopStruct external generate end +syn keyword laceOptionClause collect assertion debug optimize trace +syn keyword laceOptionClause profile inline precompiled multithreaded +syn keyword laceOptionClause exception_trace dead_code_removal +syn keyword laceOptionClause array_optimization +syn keyword laceOptionClause inlining_size inlining +syn keyword laceOptionClause console_application dynamic_runtime +syn keyword laceOptionClause line_generation +syn keyword laceOptionMark yes no all +syn keyword laceOptionMark require ensure invariant loop check +syn keyword laceClusterProp use include exclude +syn keyword laceAdaptClassName adapt ignore rename as +syn keyword laceAdaptClassName creation export visible +syn keyword laceExternal include_path object makefile + +" Operators +syn match laceOperator "\$" +syn match laceBrackets "[[\]]" +syn match laceExport "[{}]" + +" Constants +syn keyword laceBool true false +syn keyword laceBool True False +syn region laceString start=+"+ skip=+%"+ end=+"+ contains=laceEscape,laceStringError +syn match laceEscape contained "%[^/]" +syn match laceEscape contained "%/\d\+/" +syn match laceEscape contained "^[ \t]*%" +syn match laceEscape contained "%[ \t]*$" +syn match laceStringError contained "%/[^0-9]" +syn match laceStringError contained "%/\d\+[^0-9/]" +syn match laceStringError "'\(%[^/]\|%/\d\+/\|[^'%]\)\+'" +syn match laceCharacter "'\(%[^/]\|%/\d\+/\|[^'%]\)'" contains=laceEscape +syn match laceNumber "-\=\<\d\+\(_\d\+\)*\>" +syn match laceNumber "\<[01]\+[bB]\>" +syn match laceNumber "-\=\<\d\+\(_\d\+\)*\.\(\d\+\(_\d\+\)*\)\=\([eE][-+]\=\d\+\(_\d\+\)*\)\=" +syn match laceNumber "-\=\.\d\+\(_\d\+\)*\([eE][-+]\=\d\+\(_\d\+\)*\)\=" +syn match laceComment "--.*" contains=laceTodo + + +syn case match + +" Case sensitive stuff + +syn keyword laceTodo TODO XXX FIXME +syn match laceClassName "\<[A-Z][A-Z0-9_]*\>" +syn match laceCluster "[a-zA-Z][a-zA-Z0-9_]*\s*:" +syn match laceCluster "[a-zA-Z][a-zA-Z0-9_]*\s*(\s*[a-zA-Z][a-zA-Z0-9_]*\s*)\s*:" + +" Catch mismatched parentheses +syn match laceParenError ")" +syn match laceBracketError "\]" +syn region laceGeneric transparent matchgroup=laceBrackets start="\[" end="\]" contains=ALLBUT,laceBracketError +syn region laceParen transparent start="(" end=")" contains=ALLBUT,laceParenError + +" Should suffice for even very long strings and expressions +syn sync lines=40 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_lace_syntax_inits") + if version < 508 + let did_lace_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink laceTopStruct PreProc + + HiLink laceOptionClause Statement + HiLink laceOptionMark Constant + HiLink laceClusterProp Label + HiLink laceAdaptClassName Label + HiLink laceExternal Statement + HiLink laceCluster ModeMsg + + HiLink laceEscape Special + + HiLink laceBool Boolean + HiLink laceString String + HiLink laceCharacter Character + HiLink laceClassName Type + HiLink laceNumber Number + + HiLink laceOperator Special + HiLink laceArray Special + HiLink laceExport Special + HiLink laceCreation Special + HiLink laceBrackets Special + HiLink laceConstraint Special + + HiLink laceComment Comment + + HiLink laceError Error + HiLink laceStringError Error + HiLink laceParenError Error + HiLink laceBracketError Error + HiLink laceTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "lace" + +" vim: ts=4 diff --git a/runtime/syntax/latte.vim b/runtime/syntax/latte.vim new file mode 100644 index 000000000..e2a8729f3 --- /dev/null +++ b/runtime/syntax/latte.vim @@ -0,0 +1,98 @@ +" Vim syntax file +" Language: Latte +" Maintainer: Nick Moffitt, <nick@zork.net> +" Last Change: 14 June, 2000 +" +" Notes: +" I based this on the TeX and Scheme syntax files (but mostly scheme). +" See http://www.latte.org for info on the language. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match latteError "[{}\\]" +syn match latteOther "\\{" +syn match latteOther "\\}" +syn match latteOther "\\\\" + +if version < 600 + set iskeyword=33,43,45,48-57,63,65-90,95,97-122,_ +else + setlocal iskeyword=33,43,45,48-57,63,65-90,95,97-122,_ +endif + +syn region latteVar matchgroup=SpecialChar start=!\\[A-Za-z_]!rs=s+1 end=![^A-Za-z0-9?!+_-]!me=e-1 contains=ALLBUT,latteNumber,latteOther +syn region latteVar matchgroup=SpecialChar start=!\\[=\&][A-Za-z_]!rs=s+2 end=![^A-Za-z0-9?!+_-]!me=e-1 contains=ALLBUT,latteNumber,latteOther +syn region latteString start=+\\"+ skip=+\\\\"+ end=+\\"+ + +syn region latteGroup matchgroup=Delimiter start="{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=ALLBUT,latteSyntax + +syn region latteUnquote matchgroup=Delimiter start="\\,{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=ALLBUT,latteSyntax +syn region latteSplice matchgroup=Delimiter start="\\,@{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=ALLBUT,latteSyntax +syn region latteQuote matchgroup=Delimiter start="\\'{" skip="\\[{}]" matchgroup=Delimiter end="}" +syn region latteQuote matchgroup=Delimiter start="\\`{" skip="\\[{}]" matchgroup=Delimiter end="}" contains=latteUnquote,latteSplice + +syn match latteOperator '\\/' +syn match latteOperator '=' + +syn match latteComment "\\;.*$" + +" This was gathered by slurping in the index. + +syn keyword latteSyntax __FILE__ __latte-version__ contained +syn keyword latteSyntax _bal-tag _pre _tag add and append apply back contained +syn keyword latteSyntax caar cadr car cdar cddr cdr ceil compose contained +syn keyword latteSyntax concat cons def defmacro divide downcase contained +syn keyword latteSyntax empty? equal? error explode file-contents contained +syn keyword latteSyntax floor foreach front funcall ge? getenv contained +syn keyword latteSyntax greater-equal? greater? group group? gt? html contained +syn keyword latteSyntax if include lambda le? length less-equal? contained +syn keyword latteSyntax less? let lmap load-file load-library lt? macro contained +syn keyword latteSyntax member? modulo multiply not nth operator? contained +syn keyword latteSyntax or ordinary quote process-output push-back contained +syn keyword latteSyntax push-front quasiquote quote random rdc reverse contained +syn keyword latteSyntax set! snoc splicing unquote strict-html4 contained +syn keyword latteSyntax string-append string-ge? string-greater-equal? contained +syn keyword latteSyntax string-greater? string-gt? string-le? contained +syn keyword latteSyntax string-less-equal? string-less? string-lt? contained +syn keyword latteSyntax string? subseq substr subtract contained +syn keyword latteSyntax upcase useless warn while zero? contained + + +" If it's good enough for scheme... + +syn sync match matchPlace grouphere NONE "^[^ \t]" +" ... i.e. synchronize on a line that starts at the left margin + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_latte_syntax_inits") + if version < 508 + let did_latte_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink latteSyntax Statement + HiLink latteVar Function + + HiLink latteString String + HiLink latteQuote String + + HiLink latteDelimiter Delimiter + HiLink latteOperator Operator + + HiLink latteComment Comment + HiLink latteError Error + + delcommand HiLink +endif + +let b:current_syntax = "latte" diff --git a/runtime/syntax/ldif.vim b/runtime/syntax/ldif.vim new file mode 100644 index 000000000..9f67b57f5 --- /dev/null +++ b/runtime/syntax/ldif.vim @@ -0,0 +1,43 @@ +" Vim syntax file +" Language: LDAP LDIF +" Maintainer: Zak Johnson <zakj@nox.cx> +" Last Change: 2003-12-30 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn sync minlines=10 linebreaks=1 + +syn match ldifAttribute /^[^ #][^:]*/ contains=ldifOption display +syn match ldifOption /;[^:]\+/ contained contains=ldifPunctuation display +syn match ldifPunctuation /;/ contained display + +syn region ldifStringValue matchgroup=ldifPunctuation start=/: / end=/\_$/ skip=/\n / +syn region ldifBase64Value matchgroup=ldifPunctuation start=/:: / end=/\_$/ skip=/\n / +syn region ldifFileValue matchgroup=ldifPunctuation start=/:< / end=/\_$/ skip=/\n / + +syn region ldifComment start=/^#/ end=/\_$/ skip=/\n / + +if version >= 508 || !exists("did_ldif_syn_inits") + if version < 508 + let did_ldif_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink ldifAttribute Type + HiLink ldifOption Identifier + HiLink ldifPunctuation Normal + HiLink ldifStringValue String + HiLink ldifBase64Value Special + HiLink ldifFileValue Special + HiLink ldifComment Comment + + delcommand HiLink +endif + +let b:current_syntax = "ldif" diff --git a/runtime/syntax/lex.vim b/runtime/syntax/lex.vim new file mode 100644 index 000000000..25c423ef5 --- /dev/null +++ b/runtime/syntax/lex.vim @@ -0,0 +1,96 @@ +" Vim syntax file +" Language: Lex +" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> +" Last Change: Sep 02, 2003 +" Version: 4 +" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax +" +" Option: +" lex_uses_cpp : if this variable exists, then C++ is loaded rather than C + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the C syntax to start with +if version >= 600 + if exists("lex_uses_cpp") + runtime! syntax/cpp.vim + else + runtime! syntax/c.vim + endif + unlet b:current_syntax +else + if exists("lex_uses_cpp") + so <sfile>:p:h/cpp.vim + else + so <sfile>:p:h/c.vim + endif +endif + +" --- Lex stuff --- + +"I'd prefer to use lex.* , but it doesn't handle forward definitions yet +syn cluster lexListGroup contains=lexAbbrvBlock,lexAbbrv,lexAbbrv,lexAbbrvRegExp,lexInclude,lexPatBlock,lexPat,lexBrace,lexPatString,lexPatTag,lexPatTag,lexPatComment,lexPatCodeLine,lexMorePat,lexPatSep,lexSlashQuote,lexPatCode,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2,cCommentStartError,cParenError +syn cluster lexListPatCodeGroup contains=lexAbbrvBlock,lexAbbrv,lexAbbrv,lexAbbrvRegExp,lexInclude,lexPatBlock,lexPat,lexBrace,lexPatTag,lexPatTag,lexPatComment,lexPatCodeLine,lexMorePat,lexPatSep,lexSlashQuote,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2,cCommentStartError,cParenError + +" Abbreviations Section +syn region lexAbbrvBlock start="^\([a-zA-Z_]\+\t\|%{\)" end="^%%$"me=e-2 skipnl nextgroup=lexPatBlock contains=lexAbbrv,lexInclude,lexAbbrvComment +syn match lexAbbrv "^\I\i*\s"me=e-1 skipwhite contained nextgroup=lexAbbrvRegExp +syn match lexAbbrv "^%[sx]" contained +syn match lexAbbrvRegExp "\s\S.*$"lc=1 contained nextgroup=lexAbbrv,lexInclude +syn region lexInclude matchgroup=lexSep start="^%{" end="%}" contained contains=ALLBUT,@lexListGroup +syn region lexAbbrvComment start="^\s\+/\*" end="\*/" contains=@Spell + +"%% : Patterns {Actions} +syn region lexPatBlock matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPat,lexPatTag,lexPatComment +syn region lexPat start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 contained nextgroup=lexMorePat,lexPatSep contains=lexPatString,lexSlashQuote,lexBrace +syn region lexBrace start="\[" skip=+\\\\\|\\+ end="]" contained +syn region lexPatString matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ contained +syn match lexPatTag "^<\I\i*\(,\I\i*\)*>*" contained nextgroup=lexPat,lexPatTag,lexMorePat,lexPatSep +syn match lexPatTag +^<\I\i*\(,\I\i*\)*>*\(\\\\\)*\\"+ contained nextgroup=lexPat,lexPatTag,lexMorePat,lexPatSep +syn region lexPatComment start="^\s*/\*" end="\*/" skipnl contained contains=cTodo nextgroup=lexPatComment,lexPat,lexPatString,lexPatTag,@Spell +syn match lexPatCodeLine ".*$" contained contains=ALLBUT,@lexListGroup +syn match lexMorePat "\s*|\s*$" skipnl contained nextgroup=lexPat,lexPatTag,lexPatComment +syn match lexPatSep "\s\+" contained nextgroup=lexMorePat,lexPatCode,lexPatCodeLine +syn match lexSlashQuote +\(\\\\\)*\\"+ contained +syn region lexPatCode matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" skipnl contained contains=ALLBUT,@lexListPatCodeGroup + +syn keyword lexCFunctions BEGIN input unput woutput yyleng yylook yytext +syn keyword lexCFunctions ECHO output winput wunput yyless yymore yywrap + +" <c.vim> includes several ALLBUTs; these have to be treated so as to exclude lex* groups +syn cluster cParenGroup add=lex.* +syn cluster cDefineGroup add=lex.* +syn cluster cPreProcGroup add=lex.* +syn cluster cMultiGroup add=lex.* + +" Synchronization +syn sync clear +syn sync minlines=300 +syn sync match lexSyncPat grouphere lexPatBlock "^%[a-zA-Z]" +syn sync match lexSyncPat groupthere lexPatBlock "^<$" +syn sync match lexSyncPat groupthere lexPatBlock "^%%$" + +" The default highlighting. +hi def link lexSlashQuote lexPat +hi def link lexBrace lexPat +hi def link lexAbbrvComment lexPatComment + +hi def link lexAbbrv SpecialChar +hi def link lexAbbrvRegExp Macro +hi def link lexCFunctions Function +hi def link lexMorePat SpecialChar +hi def link lexPat Function +hi def link lexPatComment Comment +hi def link lexPatString Function +hi def link lexPatTag Special +hi def link lexSep Delimiter + +let b:current_syntax = "lex" + +" vim:ts=10 diff --git a/runtime/syntax/lftp.vim b/runtime/syntax/lftp.vim new file mode 100644 index 000000000..fc1958ed3 --- /dev/null +++ b/runtime/syntax/lftp.vim @@ -0,0 +1,184 @@ +" Vim syntax file +" Language: lftp(1) configuration file +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/lftp/ +" Latest Revision: 2004-05-22 +" arch-tag: f2537c49-5d64-42b8-beb4-13a09dd723d2 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Set iskeyword since we need `-' (and potentially others) in keywords. +" For version 5.x: Set it globally +" For version 6.x: Set it locally +if version >= 600 + command -nargs=1 SetIsk setlocal iskeyword=<args> +else + command -nargs=1 SetIsk set iskeyword=<args> +endif +SetIsk 48-57,97-122,- +delcommand SetIsk + +" comments +syn region lftpComment display oneline matchgroup=lftpComment start="#" end="$" contains=lftpTodo + +" todo +syn keyword lftpTodo contained TODO FIXME XXX NOTE + +" strings +syn region lftpString contained display start=+"+ skip=+\\$\|\\"+ end=+"+ end=+$+ + +" numbers +syn match lftpNumber contained display "\<\d\+\(\.\d\+\)\=\>" + +" booleans and other things +syn keyword lftpBoolean contained yes no on off true false + +" intervals +syn keyword lftpInterval contained infinity inf never forever +syn match lftpInterval contained "\<\(\d\+\(\.\d\+\)\=[dhms]\)\+\>" + +" commands +syn keyword lftpKeywords alias anon at bookmark cache cat cd chmod close +syn keyword lftpKeywords cls command debug du echo exit fg find get get1 +syn keyword lftpKeywords glob help history jobs kill lcd lftp lpwd ls +syn keyword lftpKeywords mget mirror mkdir module +syn keyword lftpKeywords more mput mrm mv nlist open pget put pwd queue +syn keyword lftpKeywords quote reget recls rels renlist repeat +syn keyword lftpKeywords reput rm rmdir scache site source suspend user +syn keyword lftpKeywords version wait zcat zmore + +" settings +syn region lftpSet matchgroup=lftpKeywords start="set" end=";" end="$" contains=lftpString,lftpNumber,lftpBoolean,lftpInterval,lftpSettingsPrefix,lftpSettings +syn match lftpSettingsPrefix contained '\<\%(bmk\|cache\|cmd\|color\|dns\):' +syn match lftpSettingsPrefix contained '\<\%(file\|fish\|ftp\|hftp\):' +syn match lftpSettingsPrefix contained '\<\%(http\|https\|mirror\|module\):' +syn match lftpSettingsPrefix contained '\<\%(net\|sftp\|ssl\|xfer\):' +" bmk: +syn keyword lftpSettings contained save-p[asswords] +" cache: +syn keyword lftpSettings contained cache-em[pty-listings] en[able] +syn keyword lftpSettings contained exp[ire] siz[e] +" cmd: +syn keyword lftpSettings contained at[-exit] cls-c[ompletion-default] +syn keyword lftpSettings contained cls-d[efault] cs[h-history] +syn keyword lftpSettings contained default-p[rotocol] default-t[itle] +syn keyword lftpSettings contained fai[l-exit] in[teractive] +syn keyword lftpSettings contained lo[ng-running] ls[-default] +syn keyword lftpSettings contained mo[ve-background] prom[pt] +syn keyword lftpSettings contained rem[ote-completion] +syn keyword lftpSettings contained save-c[wd-history] save-r[l-history] +syn keyword lftpSettings contained set-t[erm-status] statu[s-interval] +syn keyword lftpSettings contained te[rm-status] verb[ose] verify-h[ost] +syn keyword lftpSettings contained verify-path verify-path[-cached] +" color: +syn keyword lftpSettings contained dir[-colors] use-c[olor] +" dns: +syn keyword lftpSettings contained S[RV-query] cache-en[able] +syn keyword lftpSettings contained cache-ex[pire] cache-s[ize] +syn keyword lftpSettings contained fat[al-timeout] o[rder] use-fo[rk] +" file: +syn keyword lftpSettings contained ch[arset] +" fish: +syn keyword lftpSettings contained connect[-program] sh[ell] +" ftp: +syn keyword lftpSettings contained acct anon-p[ass] anon-u[ser] +syn keyword lftpSettings contained au[to-sync-mode] b[ind-data-socket] +syn keyword lftpSettings contained ch[arset] cli[ent] dev[ice-prefix] +syn keyword lftpSettings contained fi[x-pasv-address] fxp-f[orce] +syn keyword lftpSettings contained fxp-p[assive-source] h[ome] la[ng] +syn keyword lftpSettings contained list-e[mpty-ok] list-o[ptions] +syn keyword lftpSettings contained nop[-interval] pas[sive-mode] +syn keyword lftpSettings contained port-i[pv4] port-r[ange] prox[y] +syn keyword lftpSettings contained rest-l[ist] rest-s[tor] +syn keyword lftpSettings contained retry-530 retry-530[-anonymous] +syn keyword lftpSettings contained sit[e-group] skey-a[llow] +syn keyword lftpSettings contained skey-f[orce] ssl-allow +syn keyword lftpSettings contained ssl-allow[-anonymous] ssl-au[th] +syn keyword lftpSettings contained ssl-f[orce] ssl-protect-d[ata] +syn keyword lftpSettings contained ssl-protect-l[ist] stat-[interval] +syn keyword lftpSettings contained sy[nc-mode] timez[one] use-a[bor] +syn keyword lftpSettings contained use-fe[at] use-fx[p] use-hf[tp] +syn keyword lftpSettings contained use-mdtm use-mdtm[-overloaded] +syn keyword lftpSettings contained use-ml[sd] use-p[ret] use-q[uit] +syn keyword lftpSettings contained use-site-c[hmod] use-site-i[dle] +syn keyword lftpSettings contained use-site-u[time] use-siz[e] +syn keyword lftpSettings contained use-st[at] use-te[lnet-iac] +syn keyword lftpSettings contained verify-a[ddress] verify-p[ort] +syn keyword lftpSettings contained w[eb-mode] +" hftp: +syn keyword lftpSettings contained w[eb-mode] cache prox[y] +syn keyword lftpSettings contained use-au[thorization] use-he[ad] +syn keyword lftpSettings contained use-ty[pe] +" http: +syn keyword lftpSettings contained accept accept-c[harset] +syn keyword lftpSettings contained accept-l[anguage] cache coo[kie] +syn keyword lftpSettings contained pos[t-content-type] prox[y] +syn keyword lftpSettings contained put-c[ontent-type] put-m[ethod] +syn keyword lftpSettings contained ref[erer] set-c[ookies] user[-agent] +" https: +syn keyword lftpSettings contained prox[y] +" mirror: +syn keyword lftpSettings contained exc[lude-regex] o[rder] +syn keyword lftpSettings contained parallel-d[irectories] +syn keyword lftpSettings contained parallel-t[ransfer-count] +syn keyword lftpSettings contained use-p[get-n] +" module: +syn keyword lftpSettings contained pat[h] +" net: +syn keyword lftpSettings contained connection-l[imit] +syn keyword lftpSettings contained connection-t[akeover] +syn keyword lftpSettings contained id[le] limit-m[ax] limit-r[ate] +syn keyword lftpSettings contained limit-total-m[ax] limit-total-r[ate] +syn keyword lftpSettings contained max-ret[ries] no-[proxy] +syn keyword lftpSettings contained pe[rsist-retries] +syn keyword lftpSettings contained reconnect-interval-b[ase] +syn keyword lftpSettings contained reconnect-interval-ma[x] +syn keyword lftpSettings contained reconnect-interval-mu[ltiplier] +syn keyword lftpSettings contained socket-bind-ipv4 socket-bind-ipv6 +syn keyword lftpSettings contained socket-bu[ffer] socket-m[axseg] +syn keyword lftpSettings contained timeo[ut] +" sftp: +syn keyword lftpSettings contained connect[-program] +syn keyword lftpSettings contained max-p[ackets-in-flight] +syn keyword lftpSettings contained prot[ocol-version] ser[ver-program] +syn keyword lftpSettings contained size-r[ead] size-w[rite] +" ssl: +syn keyword lftpSettings contained ca-f[ile] ca-p[ath] ce[rt-file] +syn keyword lftpSettings contained crl-f[ile] crl-p[ath] k[ey-file] +syn keyword lftpSettings contained verify-c[ertificate] +" xfer: +syn keyword lftpSettings contained clo[bber] dis[k-full-fatal] +syn keyword lftpSettings contained eta-p[eriod] eta-t[erse] +syn keyword lftpSettings contained mak[e-backup] max-red[irections] +syn keyword lftpSettings contained ra[te-period] + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_lftp_syn_inits") + if version < 508 + let did_lftp_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink lftpComment Comment + HiLink lftpTodo Todo + HiLink lftpString String + HiLink lftpNumber Number + HiLink lftpBoolean Boolean + HiLink lftpInterval Number + HiLink lftpKeywords Keyword + HiLink lftpSettingsPrefix PreProc + HiLink lftpSettings Type + delcommand HiLink +endif + +let b:current_syntax = "lftp" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/lhaskell.vim b/runtime/syntax/lhaskell.vim new file mode 100644 index 000000000..250ccfaf2 --- /dev/null +++ b/runtime/syntax/lhaskell.vim @@ -0,0 +1,136 @@ +" Vim syntax file +" Language: Haskell with literate comments, Bird style, +" TeX style and plain text surrounding +" \begin{code} \end{code} blocks +" Maintainer: Haskell Cafe mailinglist <haskell-cafe@haskell.org> +" Original Author: Arthur van Leeuwen <arthurvl@cs.uu.nl> +" Last Change: 2004 May 16 +" Version: 1.01 +" +" Thanks to Ian Lynagh for thoughtful comments on initial versions and +" for the inspiration for writing this in the first place. +" +" This style guesses as to the type of markup used in a literate haskell +" file and will highlight (La)TeX markup if it finds any +" This behaviour can be overridden, both glabally and locally using +" the lhs_markup variable or b:lhs_markup variable respectively. +" +" lhs_markup must be set to either tex or none to indicate that +" you always want (La)TeX highlighting or no highlighting +" must not be set to let the highlighting be guessed +" b:lhs_markup must be set to eiterh tex or none to indicate that +" you want (La)TeX highlighting or no highlighting for +" this particular buffer +" must not be set to let the highlighting be guessed +" +" +" 2004 February 18: New version, based on Ian Lynagh's TeX guessing +" lhaskell.vim, cweb.vim, tex.vim, sh.vim and fortran.vim +" 2004 February 20: Cleaned up the guessing and overriding a bit +" 2004 February 23: Cleaned up syntax highlighting for \begin{code} and +" \end{code}, added some clarification to the attributions +" + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" First off, see if we can inherit a user preference for lhs_markup +if !exists("b:lhs_markup") + if exists("lhs_markup") + if lhs_markup =~ '\<\%(tex\|none\)\>' + let b:lhs_markup = matchstr(lhs_markup,'\<\%(tex\|none\)\>') + else + echohl WarningMsg | echo "Unknown value of lhs_markup" | echohl None + let b:lhs_markup = "unknown" + endif + else + let b:lhs_markup = "unknown" + endif +else + if b:lhs_markup !~ '\<\%(tex\|none\)\>' + let b:lhs_markup = "unknown" + endif +endif + +" Remember where the cursor is, and go to upperleft +let s:oldline=line(".") +let s:oldcolumn=col(".") +call cursor(1,1) + +" If no user preference, scan buffer for our guess of the markup to +" highlight. We only differentiate between TeX and plain markup, where +" plain is not highlighted. The heuristic for finding TeX markup is if +" one of the following occurs anywhere in the file: +" - \documentclass +" - \begin{env} (for env != code) +" - \part, \chapter, \section, \subsection, \subsubsection, etc +if b:lhs_markup == "unknown" + if search('%\|\\documentclass\|\\begin{\(code}\)\@!\|\\\(sub\)*section\|\\chapter|\\part','W') != 0 + let b:lhs_markup = "tex" + else + let b:lhs_markup = "plain" + endif +endif + +" If user wants us to highlight TeX syntax, read it. +if b:lhs_markup == "tex" + if version < 600 + source <sfile>:p:h/tex.vim + else + runtime! syntax/tex.vim + unlet b:current_syntax + endif +endif + +" Literate Haskell is Haskell in between text, so at least read Haskell +" highlighting +if version < 600 + syntax include @haskellTop <sfile>:p:h/haskell.vim +else + syntax include @haskellTop syntax/haskell.vim +endif + +syntax region lhsHaskellBirdTrack start="^>" end="\%(^[^>]\)\@=" contains=@haskellTop,lhsBirdTrack +syntax region lhsHaskellBeginEndBlock start="^\\begin{code}\s*$" matchgroup=NONE end="\%(^\\end{code}.*$\)\@=" contains=@haskellTop,@beginCode + +syntax match lhsBirdTrack "^>" contained + +syntax match beginCodeBegin "^\\begin" nextgroup=beginCodeCode contained +syntax region beginCodeCode matchgroup=texDelimiter start="{" end="}" +syntax cluster beginCode contains=beginCodeBegin,beginCodeCode + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_tex_syntax_inits") + if version < 508 + let did_tex_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink lhsBirdTrack Comment + + HiLink beginCodeBegin texCmdName + HiLink beginCodeCode texSection + + delcommand HiLink +endif + +" Restore cursor to original position, as it may have been disturbed +" by the searches in our guessing code +call cursor (s:oldline, s:oldcolumn) + +unlet s:oldline +unlet s:oldcolumn + +let b:current_syntax = "lhaskell" + +" vim: ts=8 diff --git a/runtime/syntax/libao.vim b/runtime/syntax/libao.vim new file mode 100644 index 000000000..f675150e0 --- /dev/null +++ b/runtime/syntax/libao.vim @@ -0,0 +1,46 @@ +" Vim syntax file +" Language: libao configuration file +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/libao/ +" Latest Revision: 2004-05-22 +" arch-tag: 4ddef0a8-6817-4555-a5a1-0be82094053d + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Todo +syn keyword libaoTodo contained TODO FIXME XXX NOTE + +" Comments +syn region libaoComment matchgroup=libaoComment start='^\s*#' end='$' contains=libaoTodo + +" Keywords +syn keyword libaoKeyword default_driver + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_libao_syn_inits") + if version < 508 + let did_libao_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + command -nargs=+ HiDef hi <args> + else + command -nargs=+ HiLink hi def link <args> + command -nargs=+ HiDef hi def <args> + endif + + HiLink libaoTodo Todo + HiLink libaoComment Comment + HiLink libaoKeyword Keyword + + delcommand HiLink + delcommand HiDef +endif + +let b:current_syntax = "libao" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/lifelines.vim b/runtime/syntax/lifelines.vim new file mode 100644 index 000000000..a6a2c8d14 --- /dev/null +++ b/runtime/syntax/lifelines.vim @@ -0,0 +1,118 @@ +" Vim syntax file +" Language: Lifelines (v 3.0.7) http://lifelines.sourceforge.net +" Maintainer: Patrick Texier <p.texier@orsennes.com> +" Location: ftp://216.71.72.236/lifelines.vim +" Last Change: 2002 Mar 03 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" A bunch of useful lifelines keywords 3.0.7 + +syn keyword lifelinesStatement set +syn keyword lifelinesUser getindi geindiset getfam getint getstr choosechild +syn keyword lifelinesUser chooseindi choosespouse choosesubset menuchoose +syn keyword lifelinesUser choosefam getintmsg getindimsg getstrmsg +syn keyword lifelinesProc proc func return call +syn keyword lifelinesInclude include +syn keyword lifelinesDef global +syn keyword lifelinesConditional if else elsif switch +syn keyword lifelinesRepeat continue break while +syn keyword lifelinesLogical and or not eq ne lt gt le ge strcmp eqstr nestr +syn keyword lifelinesArithm add sub mul div mod exp neg incr decr +syn keyword lifelinesIndi name fullname surname givens trimname birth +syn keyword lifelinesIndi death baptism burial +syn keyword lifelinesIndi father mother nextsib prevsib sex male female +syn keyword lifelinesIndi pn nspouses nfamilies parents title key +syn keyword lifelinesIndi soundex inode root indi firstindi nextindi +syn keyword lifelinesIndi previndi spouses families forindi indiset +syn keyword lifelinesIndi addtoset deletefromset lengthset union intersect +syn keyword lifelinesIndi difference parentset childset spouseset siblingset +syn keyword lifelinesIndi ancestorset descendentset descendantset uniqueset +syn keyword lifelinesIndi namesort keysort valuesort genindiset getindiset +syn keyword lifelinesIndi forindiset lastindi writeindi +syn keyword lifelinesIndi inset +syn keyword lifelinesFam marriage husband wife nchildren firstchild +syn keyword lifelinesFam lastchild fnode fam firstfam nextfam lastfam +syn keyword lifelinesFam prevfam children forfam writefam +syn keyword lifelinesList list empty length enqueue dequeue requeue +syn keyword lifelinesList push pop setel getel forlist inlist +syn keyword lifelinesTable table insert lookup +syn keyword lifelinesGedcom xref tag value parent child sibling savenode +syn keyword lifelinesGedcom fornodes traverse createnode addnode deletenode +syn keyword lifelinesGedcom reference dereference getrecord +syn keyword lifelinesGedcom gengedcom gengedcomstrong gengedcomweak +syn keyword lifelinesFunct date place year long short gettoday dayformat +syn keyword lifelinesFunct monthformat dateformat extractdate +syn keyword lifelinesFunct complexdate +syn keyword lifelinesFunct extractnames extractplaces extracttokens lower +syn keyword lifelinesFunct upper capitalize trim rjustify save strsave +syn keyword lifelinesFunct concat strconcat strlen substring index +syn keyword lifelinesFunct d card ord alpha roman strsoundex strtoint +syn keyword lifelinesFunct atoi linemode pagemod col row pos pageout nl +syn keyword lifelinesFunct sp qt newfile outfile copyfile print lock unlock +syn keyword lifelinesFunct database version system stddate program +syn keyword lifelinesFunct pvalue pagemode level extractdatestr debug +syn keyword lifelinesFunct f free getcol getproperty heapused + +syn region lifelinesString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=lifelinesSpecial + +syn region lifelinesComment start="/\*" end="\*/" contains=lifelinesComment + +" Only integers with lifelines + +syn match lifelinesNumber "\<\d\+\>" + +"catch errors caused by wrong parenthesis +"adapted from original c.vim written by Bram Moolenaar + +syn cluster lifelinesParenGroup contains=lifelinesParenError +syn region lifelinesParen transparent start='(' end=')' contains=ALLBUT,@lifelinesParenGroup +syn match lifelinesParenError ")" +syn match lifelinesErrInParen contained "[{}]" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet + +if version >= 508 || !exists("did_lifelines_syn_inits") + if version < 508 + let did_lifelines_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink lifelinesConditional Conditional + HiLink lifelinesArithm Operator + HiLink lifelinesLogical Conditional + HiLink lifelinesInclude Include + HiLink lifelinesComment Comment + HiLink lifelinesStatement Statement + HiLink lifelinesUser Statement + HiLink lifelinesFunct Statement + HiLink lifelinesTable Statement + HiLink lifelinesGedcom Statement + HiLink lifelinesList Statement + HiLink lifelinesRepeat Repeat + HiLink lifelinesFam Statement + HiLink lifelinesIndi Statement + HiLink lifelinesProc Statement + HiLink lifelinesDef Statement + HiLink lifelinesString String + HiLink lifelinesNumber Number + HiLink lifelinesParenError Error + HiLink lifelinesErrInParen Error + + delcommand HiLink +endif + +let b:current_syntax = "lifelines" + +" vim: ts=8 diff --git a/runtime/syntax/lilo.vim b/runtime/syntax/lilo.vim new file mode 100644 index 000000000..a97bb9ca8 --- /dev/null +++ b/runtime/syntax/lilo.vim @@ -0,0 +1,194 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: lilo configuration (lilo.conf) +" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> +" Last Change: 2003 May 04 +" URL: http://trific.ath.cx/Ftp/vim/syntax/lilo.vim + +" Setup +if version >= 600 + if exists("b:current_syntax") + finish + endif +else + syntax clear +endif + +if version >= 600 + command -nargs=1 SetIsk setlocal iskeyword=<args> +else + command -nargs=1 SetIsk set iskeyword=<args> +endif +SetIsk @,48-57,.,-,_ +delcommand SetIsk + +syn case ignore + +" Base constructs +syn match liloError "\S\+" +syn match liloComment "#.*$" +syn match liloEnviron "\$\w\+" contained +syn match liloEnviron "\${[^}]\+}" contained +syn match liloDecNumber "\d\+" contained +syn match liloHexNumber "0[xX]\x\+" contained +syn match liloDecNumberP "\d\+p\=" contained +syn match liloSpecial contained "\\\(\"\|\\\|$\)" +syn region liloString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=liloSpecial,liloEnviron +syn match liloLabel "\S\+" contained contains=liloSpecial,liloEnviron +syn region liloPath start=+[$/]+ skip=+\\\\\|\\ \|\\$"+ end=+ \|$+ contained contains=liloSpecial,liloEnviron +syn match liloDecNumberList "\(\d\|,\)\+" contained contains=liloDecNumber +syn match liloDecNumberPList "\(\d\|[,p]\)\+" contained contains=liloDecNumberP,liloDecNumber +syn region liloAnything start=+[^[:space:]#]+ skip=+\\\\\|\\ \|\\$+ end=+ \|$+ contained contains=liloSpecial,liloEnviron,liloString + +" Path +syn keyword liloOption backup bitmap boot disktab force-backup install keytable map message nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty +syn keyword liloKernelOpt initrd root nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty +syn keyword liloImageOpt path loader table nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty +syn keyword liloDiskOpt partition nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty + +" Other +syn keyword liloOption menu-scheme raid-extra-boot serial nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty +syn keyword liloOption default nextgroup=liloEqLabel,liloEqLabelComment,liloError skipwhite skipempty +syn keyword liloKernelOpt ramdisk nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty +syn keyword liloImageOpt alias label nextgroup=liloEqLabel,liloEqLabelComment,liloError skipwhite skipempty +syn keyword liloImageOpt password range nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty +syn keyword liloDiskOpt set type nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty + +" Symbolic +syn keyword liloKernelOpt vga nextgroup=liloEqVga,liloEqVgaComment,liloError skipwhite skipempty + +" Number +syn keyword liloOption delay timeout verbose nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty +syn keyword liloDiskOpt sectors heads cylinders start nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty + +" String +syn keyword liloOption menu-title nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty +syn keyword liloKernelOpt append nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty +syn keyword liloImageOpt fallback literal nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty + +" Hex number +syn keyword liloImageOpt map-drive to nextgroup=liloEqHexNumber,liloEqHexNumberComment,liloError skipwhite skipempty +syn keyword liloDiskOpt bios normal hidden nextgroup=liloEqNumber,liloEqNumberComment,liloError skipwhite skipempty + +" Number list +syn keyword liloOption bmp-colors bmp-timer nextgroup=liloEqNumberList,liloEqNumberListComment,liloError skipwhite skipempty + +" Number list, some of the numbers followed by p +syn keyword liloOption bmp-table nextgroup=liloEqDecNumberPList,liloEqDecNumberPListComment,liloError skipwhite skipempty + +" Flag +syn keyword liloOption compact fix-table geometric ignore-table lba32 linear mandatory nowarn prompt +syn keyword liloKernelOpt read-only read-write +syn keyword liloImageOpt bypass lock mandatory optional restricted single-key unsafe +syn keyword liloDiskOpt change activate deactivate inaccessible reset + +" Image +syn keyword liloImage image other nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty +syn keyword liloDisk disk nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty +syn keyword liloChRules change-rules + +" Vga keywords +syn keyword liloVgaKeyword ask ext extended normal contained + +" Comment followed by equal sign and ... +syn match liloEqPathComment "#.*$" contained nextgroup=liloEqPath,liloEqPathComment,liloError skipwhite skipempty +syn match liloEqVgaComment "#.*$" contained nextgroup=liloEqVga,liloEqVgaComment,liloError skipwhite skipempty +syn match liloEqNumberComment "#.*$" contained nextgroup=liloEqNumber,liloEqNumberComment,liloError skipwhite skipempty +syn match liloEqDecNumberComment "#.*$" contained nextgroup=liloEqDecNumber,liloEqDecNumberComment,liloError skipwhite skipempty +syn match liloEqHexNumberComment "#.*$" contained nextgroup=liloEqHexNumber,liloEqHexNumberComment,liloError skipwhite skipempty +syn match liloEqStringComment "#.*$" contained nextgroup=liloEqString,liloEqStringComment,liloError skipwhite skipempty +syn match liloEqLabelComment "#.*$" contained nextgroup=liloEqLabel,liloEqLabelComment,liloError skipwhite skipempty +syn match liloEqNumberListComment "#.*$" contained nextgroup=liloEqNumberList,liloEqNumberListComment,liloError skipwhite skipempty +syn match liloEqDecNumberPListComment "#.*$" contained nextgroup=liloEqDecNumberPList,liloEqDecNumberPListComment,liloError skipwhite skipempty +syn match liloEqAnythingComment "#.*$" contained nextgroup=liloEqAnything,liloEqAnythingComment,liloError skipwhite skipempty + +" Equal sign followed by ... +syn match liloEqPath "=" contained nextgroup=liloPath,liloPathComment,liloError skipwhite skipempty +syn match liloEqVga "=" contained nextgroup=liloVgaKeyword,liloHexNumber,liloDecNumber,liloVgaComment,liloError skipwhite skipempty +syn match liloEqNumber "=" contained nextgroup=liloDecNumber,liloHexNumber,liloNumberComment,liloError skipwhite skipempty +syn match liloEqDecNumber "=" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty +syn match liloEqHexNumber "=" contained nextgroup=liloHexNumber,liloHexNumberComment,liloError skipwhite skipempty +syn match liloEqString "=" contained nextgroup=liloString,liloStringComment,liloError skipwhite skipempty +syn match liloEqLabel "=" contained nextgroup=liloLabel,liloLabelComment,liloError skipwhite skipempty +syn match liloEqNumberList "=" contained nextgroup=liloDecNumberList,liloDecNumberListComment,liloError skipwhite skipempty +syn match liloEqDecNumberPList "=" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty +syn match liloEqAnything "=" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty + +" Comment followed by ... +syn match liloPathComment "#.*$" contained nextgroup=liloPath,liloPathComment,liloError skipwhite skipempty +syn match liloVgaComment "#.*$" contained nextgroup=liloVgaKeyword,liloHexNumber,liloVgaComment,liloError skipwhite skipempty +syn match liloNumberComment "#.*$" contained nextgroup=liloDecNumber,liloHexNumber,liloNumberComment,liloError skipwhite skipempty +syn match liloDecNumberComment "#.*$" contained nextgroup=liloDecNumber,liloDecNumberComment,liloError skipwhite skipempty +syn match liloHexNumberComment "#.*$" contained nextgroup=liloHexNumber,liloHexNumberComment,liloError skipwhite skipempty +syn match liloStringComment "#.*$" contained nextgroup=liloString,liloStringComment,liloError skipwhite skipempty +syn match liloLabelComment "#.*$" contained nextgroup=liloLabel,liloLabelComment,liloError skipwhite skipempty +syn match liloDecNumberListComment "#.*$" contained nextgroup=liloDecNumberList,liloDecNumberListComment,liloError skipwhite skipempty +syn match liloDecNumberPListComment "#.*$" contained nextgroup=liloDecNumberPList,liloDecNumberPListComment,liloError skipwhite skipempty +syn match liloAnythingComment "#.*$" contained nextgroup=liloAnything,liloAnythingComment,liloError skipwhite skipempty + +" Define the default highlighting +if version >= 508 || !exists("did_lilo_syntax_inits") + if version < 508 + let did_lilo_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink liloEqPath liloEquals + HiLink liloEqWord liloEquals + HiLink liloEqVga liloEquals + HiLink liloEqDecNumber liloEquals + HiLink liloEqHexNumber liloEquals + HiLink liloEqNumber liloEquals + HiLink liloEqString liloEquals + HiLink liloEqLabel liloEquals + HiLink liloEqAnything liloEquals + HiLink liloEquals Special + + HiLink liloError Error + + HiLink liloEqPathComment liloComment + HiLink liloEqVgaComment liloComment + HiLink liloEqDecNumberComment liloComment + HiLink liloEqHexNumberComment liloComment + HiLink liloEqStringComment liloComment + HiLink liloEqLabelComment liloComment + HiLink liloEqAnythingComment liloComment + HiLink liloPathComment liloComment + HiLink liloVgaComment liloComment + HiLink liloDecNumberComment liloComment + HiLink liloHexNumberComment liloComment + HiLink liloNumberComment liloComment + HiLink liloStringComment liloComment + HiLink liloLabelComment liloComment + HiLink liloAnythingComment liloComment + HiLink liloComment Comment + + HiLink liloDiskOpt liloOption + HiLink liloKernelOpt liloOption + HiLink liloImageOpt liloOption + HiLink liloOption Keyword + + HiLink liloDecNumber liloNumber + HiLink liloHexNumber liloNumber + HiLink liloDecNumberP liloNumber + HiLink liloNumber Number + HiLink liloString String + HiLink liloPath Constant + + HiLink liloSpecial Special + HiLink liloLabel Title + HiLink liloDecNumberList Special + HiLink liloDecNumberPList Special + HiLink liloAnything Normal + HiLink liloEnviron Identifier + HiLink liloVgaKeyword Identifier + HiLink liloImage Type + HiLink liloChRules Preproc + HiLink liloDisk Preproc + + delcommand HiLink +endif + +let b:current_syntax = "lilo" diff --git a/runtime/syntax/lisp.vim b/runtime/syntax/lisp.vim new file mode 100644 index 000000000..30914ef9d --- /dev/null +++ b/runtime/syntax/lisp.vim @@ -0,0 +1,499 @@ +" Vim syntax file +" Language: Lisp +" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> +" Last Change: Sep 02, 2003 +" Version: 14 +" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax +" +" Thanks to F Xavier Noria for a list of 978 Common Lisp symbols +" taken from the HyperSpec +" +" Options: +" lisp_instring : if it exists, then "(...") strings are highlighted +" as if the contents were lisp. Useful for AutoLisp. +" Put let lisp_instring=1 into your <.vimrc> if +" you want this option. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if version >= 600 + setlocal iskeyword=42,43,45,47-58,60-62,64-90,97-122,_ +else + set iskeyword=42,43,45,47-58,60-62,64-90,97-122,_ +endif + +" Clusters +syn cluster lispAtomCluster contains=lispAtomBarSymbol,lispAtomList,lispAtomNmbr0,lispComment,lispDecl,lispFunc,lispLeadWhite +syn cluster lispListCluster contains=lispAtom,lispAtomBarSymbol,lispAtomMark,lispBQList,lispBarSymbol,lispComment,lispConcat,lispDecl,lispFunc,lispKey,lispList,lispNumber,lispSpecial,lispSymbol,lispVar,lispLeadWhite + +" Lists +syn match lispSymbol contained ![^()'`,"; \t]\+! +syn match lispBarSymbol contained !|..\{-}|! +if exists("lisp_instring") + syn region lispList matchgroup=Delimiter start="(" skip="|.\{-}|" matchgroup=Delimiter end=")" contains=@lispListCluster,lispString,lispInString,lispInStringString + syn region lispBQList matchgroup=PreProc start="`(" skip="|.\{-}|" matchgroup=PreProc end=")" contains=@lispListCluster,lispString,lispInString,lispInStringString +else + syn region lispList matchgroup=Delimiter start="(" skip="|.\{-}|" matchgroup=Delimiter end=")" contains=@lispListCluster,lispString + syn region lispBQList matchgroup=PreProc start="`(" skip="|.\{-}|" matchgroup=PreProc end=")" contains=@lispListCluster,lispString +endif +" Atoms +syn match lispAtomMark "'" +syn match lispAtom "'("me=e-1 contains=lispAtomMark nextgroup=lispAtomList +syn match lispAtom "'[^ \t()]\+" contains=lispAtomMark +syn match lispAtomBarSymbol !'|..\{-}|! contains=lispAtomMark +syn region lispAtom start=+'"+ skip=+\\"+ end=+"+ +syn region lispAtomList contained matchgroup=Special start="(" skip="|.\{-}|" matchgroup=Special end=")" contains=@lispAtomCluster,lispString +syn match lispAtomNmbr contained "\<\d\+" +syn match lispLeadWhite contained "^\s\+" + +" Standard Lisp Functions and Macros +syn keyword lispFunc * find-method pprint-indent +syn keyword lispFunc ** find-package pprint-linear +syn keyword lispFunc *** find-restart pprint-logical-block +syn keyword lispFunc + find-symbol pprint-newline +syn keyword lispFunc ++ finish-output pprint-pop +syn keyword lispFunc +++ first pprint-tab +syn keyword lispFunc - fixnum pprint-tabular +syn keyword lispFunc / flet prin1 +syn keyword lispFunc // float prin1-to-string +syn keyword lispFunc /// float-digits princ +syn keyword lispFunc /= float-precision princ-to-string +syn keyword lispFunc 1+ float-radix print +syn keyword lispFunc 1- float-sign print-not-readable +syn keyword lispFunc < floating-point-inexact print-not-readable-object +syn keyword lispFunc <= floating-point-invalid-operation print-object +syn keyword lispFunc = floating-point-overflow print-unreadable-object +syn keyword lispFunc > floating-point-underflow probe-file +syn keyword lispFunc >= floatp proclaim +syn keyword lispFunc abort floor prog +syn keyword lispFunc abs fmakunbound prog* +syn keyword lispFunc access force-output prog1 +syn keyword lispFunc acons format prog2 +syn keyword lispFunc acos formatter progn +syn keyword lispFunc acosh fourth program-error +syn keyword lispFunc add-method fresh-line progv +syn keyword lispFunc adjoin fround provide +syn keyword lispFunc adjust-array ftruncate psetf +syn keyword lispFunc adjustable-array-p ftype psetq +syn keyword lispFunc allocate-instance funcall push +syn keyword lispFunc alpha-char-p function pushnew +syn keyword lispFunc alphanumericp function-keywords putprop +syn keyword lispFunc and function-lambda-expression quote +syn keyword lispFunc append functionp random +syn keyword lispFunc apply gbitp random-state +syn keyword lispFunc applyhook gcd random-state-p +syn keyword lispFunc apropos generic-function rassoc +syn keyword lispFunc apropos-list gensym rassoc-if +syn keyword lispFunc aref gentemp rassoc-if-not +syn keyword lispFunc arithmetic-error get ratio +syn keyword lispFunc arithmetic-error-operands get-decoded-time rational +syn keyword lispFunc arithmetic-error-operation get-dispatch-macro-character rationalize +syn keyword lispFunc array get-internal-real-time rationalp +syn keyword lispFunc array-dimension get-internal-run-time read +syn keyword lispFunc array-dimension-limit get-macro-character read-byte +syn keyword lispFunc array-dimensions get-output-stream-string read-char +syn keyword lispFunc array-displacement get-properties read-char-no-hang +syn keyword lispFunc array-element-type get-setf-expansion read-delimited-list +syn keyword lispFunc array-has-fill-pointer-p get-setf-method read-eval-print +syn keyword lispFunc array-in-bounds-p get-universal-time read-from-string +syn keyword lispFunc array-rank getf read-line +syn keyword lispFunc array-rank-limit gethash read-preserving-whitespace +syn keyword lispFunc array-row-major-index go read-sequence +syn keyword lispFunc array-total-size graphic-char-p reader-error +syn keyword lispFunc array-total-size-limit handler-bind readtable +syn keyword lispFunc arrayp handler-case readtable-case +syn keyword lispFunc ash hash-table readtablep +syn keyword lispFunc asin hash-table-count real +syn keyword lispFunc asinh hash-table-p realp +syn keyword lispFunc assert hash-table-rehash-size realpart +syn keyword lispFunc assoc hash-table-rehash-threshold reduce +syn keyword lispFunc assoc-if hash-table-size reinitialize-instance +syn keyword lispFunc assoc-if-not hash-table-test rem +syn keyword lispFunc atan host-namestring remf +syn keyword lispFunc atanh identity remhash +syn keyword lispFunc atom if remove +syn keyword lispFunc base-char if-exists remove-duplicates +syn keyword lispFunc base-string ignorable remove-if +syn keyword lispFunc bignum ignore remove-if-not +syn keyword lispFunc bit ignore-errors remove-method +syn keyword lispFunc bit-and imagpart remprop +syn keyword lispFunc bit-andc1 import rename-file +syn keyword lispFunc bit-andc2 in-package rename-package +syn keyword lispFunc bit-eqv in-package replace +syn keyword lispFunc bit-ior incf require +syn keyword lispFunc bit-nand initialize-instance rest +syn keyword lispFunc bit-nor inline restart +syn keyword lispFunc bit-not input-stream-p restart-bind +syn keyword lispFunc bit-orc1 inspect restart-case +syn keyword lispFunc bit-orc2 int-char restart-name +syn keyword lispFunc bit-vector integer return +syn keyword lispFunc bit-vector-p integer-decode-float return-from +syn keyword lispFunc bit-xor integer-length revappend +syn keyword lispFunc block integerp reverse +syn keyword lispFunc boole interactive-stream-p room +syn keyword lispFunc boole-1 intern rotatef +syn keyword lispFunc boole-2 internal-time-units-per-second round +syn keyword lispFunc boole-and intersection row-major-aref +syn keyword lispFunc boole-andc1 invalid-method-error rplaca +syn keyword lispFunc boole-andc2 invoke-debugger rplacd +syn keyword lispFunc boole-c1 invoke-restart safety +syn keyword lispFunc boole-c2 invoke-restart-interactively satisfies +syn keyword lispFunc boole-clr isqrt sbit +syn keyword lispFunc boole-eqv keyword scale-float +syn keyword lispFunc boole-ior keywordp schar +syn keyword lispFunc boole-nand labels search +syn keyword lispFunc boole-nor lambda second +syn keyword lispFunc boole-orc1 lambda-list-keywords sequence +syn keyword lispFunc boole-orc2 lambda-parameters-limit serious-condition +syn keyword lispFunc boole-set last set +syn keyword lispFunc boole-xor lcm set-char-bit +syn keyword lispFunc boolean ldb set-difference +syn keyword lispFunc both-case-p ldb-test set-dispatch-macro-character +syn keyword lispFunc boundp ldiff set-exclusive-or +syn keyword lispFunc break least-negative-double-float set-macro-character +syn keyword lispFunc broadcast-stream least-negative-long-float set-pprint-dispatch +syn keyword lispFunc broadcast-stream-streams least-negative-normalized-double-float set-syntax-from-char +syn keyword lispFunc built-in-class least-negative-normalized-long-float setf +syn keyword lispFunc butlast least-negative-normalized-short-float setq +syn keyword lispFunc byte least-negative-normalized-single-float seventh +syn keyword lispFunc byte-position least-negative-short-float shadow +syn keyword lispFunc byte-size least-negative-single-float shadowing-import +syn keyword lispFunc call-arguments-limit least-positive-double-float shared-initialize +syn keyword lispFunc call-method least-positive-long-float shiftf +syn keyword lispFunc call-next-method least-positive-normalized-double-float short-float +syn keyword lispFunc capitalize least-positive-normalized-long-float short-float-epsilon +syn keyword lispFunc car least-positive-normalized-short-float short-float-negative-epsilon +syn keyword lispFunc case least-positive-normalized-single-float short-site-name +syn keyword lispFunc catch least-positive-short-float signal +syn keyword lispFunc ccase least-positive-single-float signed-byte +syn keyword lispFunc cdr length signum +syn keyword lispFunc ceiling let simle-condition +syn keyword lispFunc cell-error let* simple-array +syn keyword lispFunc cell-error-name lisp simple-base-string +syn keyword lispFunc cerror lisp-implementation-type simple-bit-vector +syn keyword lispFunc change-class lisp-implementation-version simple-bit-vector-p +syn keyword lispFunc char list simple-condition-format-arguments +syn keyword lispFunc char-bit list* simple-condition-format-control +syn keyword lispFunc char-bits list-all-packages simple-error +syn keyword lispFunc char-bits-limit list-length simple-string +syn keyword lispFunc char-code listen simple-string-p +syn keyword lispFunc char-code-limit listp simple-type-error +syn keyword lispFunc char-control-bit load simple-vector +syn keyword lispFunc char-downcase load-logical-pathname-translations simple-vector-p +syn keyword lispFunc char-equal load-time-value simple-warning +syn keyword lispFunc char-font locally sin +syn keyword lispFunc char-font-limit log single-flaot-epsilon +syn keyword lispFunc char-greaterp logand single-float +syn keyword lispFunc char-hyper-bit logandc1 single-float-epsilon +syn keyword lispFunc char-int logandc2 single-float-negative-epsilon +syn keyword lispFunc char-lessp logbitp sinh +syn keyword lispFunc char-meta-bit logcount sixth +syn keyword lispFunc char-name logeqv sleep +syn keyword lispFunc char-not-equal logical-pathname slot-boundp +syn keyword lispFunc char-not-greaterp logical-pathname-translations slot-exists-p +syn keyword lispFunc char-not-lessp logior slot-makunbound +syn keyword lispFunc char-super-bit lognand slot-missing +syn keyword lispFunc char-upcase lognor slot-unbound +syn keyword lispFunc char/= lognot slot-value +syn keyword lispFunc char< logorc1 software-type +syn keyword lispFunc char<= logorc2 software-version +syn keyword lispFunc char= logtest some +syn keyword lispFunc char> logxor sort +syn keyword lispFunc char>= long-float space +syn keyword lispFunc character long-float-epsilon special +syn keyword lispFunc characterp long-float-negative-epsilon special-form-p +syn keyword lispFunc check-type long-site-name special-operator-p +syn keyword lispFunc cis loop speed +syn keyword lispFunc class loop-finish sqrt +syn keyword lispFunc class-name lower-case-p stable-sort +syn keyword lispFunc class-of machine-instance standard +syn keyword lispFunc clear-input machine-type standard-char +syn keyword lispFunc clear-output machine-version standard-char-p +syn keyword lispFunc close macro-function standard-class +syn keyword lispFunc clrhash macroexpand standard-generic-function +syn keyword lispFunc code-char macroexpand-1 standard-method +syn keyword lispFunc coerce macroexpand-l standard-object +syn keyword lispFunc commonp macrolet step +syn keyword lispFunc compilation-speed make-array storage-condition +syn keyword lispFunc compile make-array store-value +syn keyword lispFunc compile-file make-broadcast-stream stream +syn keyword lispFunc compile-file-pathname make-char stream-element-type +syn keyword lispFunc compiled-function make-concatenated-stream stream-error +syn keyword lispFunc compiled-function-p make-condition stream-error-stream +syn keyword lispFunc compiler-let make-dispatch-macro-character stream-external-format +syn keyword lispFunc compiler-macro make-echo-stream streamp +syn keyword lispFunc compiler-macro-function make-hash-table streamup +syn keyword lispFunc complement make-instance string +syn keyword lispFunc complex make-instances-obsolete string-capitalize +syn keyword lispFunc complexp make-list string-char +syn keyword lispFunc compute-applicable-methods make-load-form string-char-p +syn keyword lispFunc compute-restarts make-load-form-saving-slots string-downcase +syn keyword lispFunc concatenate make-method string-equal +syn keyword lispFunc concatenated-stream make-package string-greaterp +syn keyword lispFunc concatenated-stream-streams make-pathname string-left-trim +syn keyword lispFunc cond make-random-state string-lessp +syn keyword lispFunc condition make-sequence string-not-equal +syn keyword lispFunc conjugate make-string string-not-greaterp +syn keyword lispFunc cons make-string-input-stream string-not-lessp +syn keyword lispFunc consp make-string-output-stream string-right-strim +syn keyword lispFunc constantly make-symbol string-right-trim +syn keyword lispFunc constantp make-synonym-stream string-stream +syn keyword lispFunc continue make-two-way-stream string-trim +syn keyword lispFunc control-error makunbound string-upcase +syn keyword lispFunc copy-alist map string/= +syn keyword lispFunc copy-list map-into string< +syn keyword lispFunc copy-pprint-dispatch mapc string<= +syn keyword lispFunc copy-readtable mapcan string= +syn keyword lispFunc copy-seq mapcar string> +syn keyword lispFunc copy-structure mapcon string>= +syn keyword lispFunc copy-symbol maphash stringp +syn keyword lispFunc copy-tree mapl structure +syn keyword lispFunc cos maplist structure-class +syn keyword lispFunc cosh mask-field structure-object +syn keyword lispFunc count max style-warning +syn keyword lispFunc count-if member sublim +syn keyword lispFunc count-if-not member-if sublis +syn keyword lispFunc ctypecase member-if-not subseq +syn keyword lispFunc debug merge subsetp +syn keyword lispFunc decf merge-pathname subst +syn keyword lispFunc declaim merge-pathnames subst-if +syn keyword lispFunc declaration method subst-if-not +syn keyword lispFunc declare method-combination substitute +syn keyword lispFunc decode-float method-combination-error substitute-if +syn keyword lispFunc decode-universal-time method-qualifiers substitute-if-not +syn keyword lispFunc defclass min subtypep +syn keyword lispFunc defconstant minusp svref +syn keyword lispFunc defgeneric mismatch sxhash +syn keyword lispFunc define-compiler-macro mod symbol +syn keyword lispFunc define-condition most-negative-double-float symbol-function +syn keyword lispFunc define-method-combination most-negative-fixnum symbol-macrolet +syn keyword lispFunc define-modify-macro most-negative-long-float symbol-name +syn keyword lispFunc define-setf-expander most-negative-short-float symbol-package +syn keyword lispFunc define-setf-method most-negative-single-float symbol-plist +syn keyword lispFunc define-symbol-macro most-positive-double-float symbol-value +syn keyword lispFunc defmacro most-positive-fixnum symbolp +syn keyword lispFunc defmethod most-positive-long-float synonym-stream +syn keyword lispFunc defpackage most-positive-short-float synonym-stream-symbol +syn keyword lispFunc defparameter most-positive-single-float sys +syn keyword lispFunc defsetf muffle-warning system +syn keyword lispFunc defstruct multiple-value-bind t +syn keyword lispFunc deftype multiple-value-call tagbody +syn keyword lispFunc defun multiple-value-list tailp +syn keyword lispFunc defvar multiple-value-prog1 tan +syn keyword lispFunc delete multiple-value-seteq tanh +syn keyword lispFunc delete-duplicates multiple-value-setq tenth +syn keyword lispFunc delete-file multiple-values-limit terpri +syn keyword lispFunc delete-if name-char the +syn keyword lispFunc delete-if-not namestring third +syn keyword lispFunc delete-package nbutlast throw +syn keyword lispFunc denominator nconc time +syn keyword lispFunc deposit-field next-method-p trace +syn keyword lispFunc describe nil translate-logical-pathname +syn keyword lispFunc describe-object nintersection translate-pathname +syn keyword lispFunc destructuring-bind ninth tree-equal +syn keyword lispFunc digit-char no-applicable-method truename +syn keyword lispFunc digit-char-p no-next-method truncase +syn keyword lispFunc directory not truncate +syn keyword lispFunc directory-namestring notany two-way-stream +syn keyword lispFunc disassemble notevery two-way-stream-input-stream +syn keyword lispFunc division-by-zero notinline two-way-stream-output-stream +syn keyword lispFunc do nreconc type +syn keyword lispFunc do* nreverse type-error +syn keyword lispFunc do-all-symbols nset-difference type-error-datum +syn keyword lispFunc do-exeternal-symbols nset-exclusive-or type-error-expected-type +syn keyword lispFunc do-external-symbols nstring type-of +syn keyword lispFunc do-symbols nstring-capitalize typecase +syn keyword lispFunc documentation nstring-downcase typep +syn keyword lispFunc dolist nstring-upcase unbound-slot +syn keyword lispFunc dotimes nsublis unbound-slot-instance +syn keyword lispFunc double-float nsubst unbound-variable +syn keyword lispFunc double-float-epsilon nsubst-if undefined-function +syn keyword lispFunc double-float-negative-epsilon nsubst-if-not unexport +syn keyword lispFunc dpb nsubstitute unintern +syn keyword lispFunc dribble nsubstitute-if union +syn keyword lispFunc dynamic-extent nsubstitute-if-not unless +syn keyword lispFunc ecase nth unread +syn keyword lispFunc echo-stream nth-value unread-char +syn keyword lispFunc echo-stream-input-stream nthcdr unsigned-byte +syn keyword lispFunc echo-stream-output-stream null untrace +syn keyword lispFunc ed number unuse-package +syn keyword lispFunc eighth numberp unwind-protect +syn keyword lispFunc elt numerator update-instance-for-different-class +syn keyword lispFunc encode-universal-time nunion update-instance-for-redefined-class +syn keyword lispFunc end-of-file oddp upgraded-array-element-type +syn keyword lispFunc endp open upgraded-complex-part-type +syn keyword lispFunc enough-namestring open-stream-p upper-case-p +syn keyword lispFunc ensure-directories-exist optimize use-package +syn keyword lispFunc ensure-generic-function or use-value +syn keyword lispFunc eq otherwise user +syn keyword lispFunc eql output-stream-p user-homedir-pathname +syn keyword lispFunc equal package values +syn keyword lispFunc equalp package-error values-list +syn keyword lispFunc error package-error-package vector +syn keyword lispFunc etypecase package-name vector-pop +syn keyword lispFunc eval package-nicknames vector-push +syn keyword lispFunc eval-when package-shadowing-symbols vector-push-extend +syn keyword lispFunc evalhook package-use-list vectorp +syn keyword lispFunc evenp package-used-by-list warn +syn keyword lispFunc every packagep warning +syn keyword lispFunc exp pairlis when +syn keyword lispFunc export parse-error wild-pathname-p +syn keyword lispFunc expt parse-integer with-accessors +syn keyword lispFunc extended-char parse-namestring with-compilation-unit +syn keyword lispFunc fboundp pathname with-condition-restarts +syn keyword lispFunc fceiling pathname-device with-hash-table-iterator +syn keyword lispFunc fdefinition pathname-directory with-input-from-string +syn keyword lispFunc ffloor pathname-host with-open-file +syn keyword lispFunc fifth pathname-match-p with-open-stream +syn keyword lispFunc file-author pathname-name with-output-to-string +syn keyword lispFunc file-error pathname-type with-package-iterator +syn keyword lispFunc file-error-pathname pathname-version with-simple-restart +syn keyword lispFunc file-length pathnamep with-slots +syn keyword lispFunc file-namestring peek-char with-standard-io-syntax +syn keyword lispFunc file-position phase write +syn keyword lispFunc file-stream pi write-byte +syn keyword lispFunc file-string-length plusp write-char +syn keyword lispFunc file-write-date pop write-line +syn keyword lispFunc fill position write-sequence +syn keyword lispFunc fill-pointer position-if write-string +syn keyword lispFunc find position-if-not write-to-string +syn keyword lispFunc find-all-symbols pprint y-or-n-p +syn keyword lispFunc find-class pprint-dispatch yes-or-no-p +syn keyword lispFunc find-if pprint-exit-if-list-exhausted zerop +syn keyword lispFunc find-if-not pprint-fill + +syn match lispFunc "\<c[ad]\+r\>" + + +" Lisp Keywords (modifiers) +syn keyword lispKey :abort :from-end :overwrite +syn keyword lispKey :adjustable :gensym :predicate +syn keyword lispKey :append :host :preserve-whitespace +syn keyword lispKey :array :if-does-not-exist :pretty +syn keyword lispKey :base :if-exists :print +syn keyword lispKey :case :include :print-function +syn keyword lispKey :circle :index :probe +syn keyword lispKey :conc-name :inherited :radix +syn keyword lispKey :constructor :initial-contents :read-only +syn keyword lispKey :copier :initial-element :rehash-size +syn keyword lispKey :count :initial-offset :rehash-threshold +syn keyword lispKey :create :initial-value :rename +syn keyword lispKey :default :input :rename-and-delete +syn keyword lispKey :defaults :internal :size +syn keyword lispKey :device :io :start +syn keyword lispKey :direction :junk-allowed :start1 +syn keyword lispKey :directory :key :start2 +syn keyword lispKey :displaced-index-offset :length :stream +syn keyword lispKey :displaced-to :level :supersede +syn keyword lispKey :element-type :name :test +syn keyword lispKey :end :named :test-not +syn keyword lispKey :end1 :new-version :type +syn keyword lispKey :end2 :nicknames :use +syn keyword lispKey :error :output :verbose +syn keyword lispKey :escape :output-file :version +syn keyword lispKey :external + +" Standard Lisp Variables +syn keyword lispVar *applyhook* *load-pathname* *print-pprint-dispatch* +syn keyword lispVar *break-on-signals* *load-print* *print-pprint-dispatch* +syn keyword lispVar *break-on-signals* *load-truename* *print-pretty* +syn keyword lispVar *break-on-warnings* *load-verbose* *print-radix* +syn keyword lispVar *compile-file-pathname* *macroexpand-hook* *print-readably* +syn keyword lispVar *compile-file-pathname* *modules* *print-right-margin* +syn keyword lispVar *compile-file-truename* *package* *print-right-margin* +syn keyword lispVar *compile-file-truename* *print-array* *query-io* +syn keyword lispVar *compile-print* *print-base* *random-state* +syn keyword lispVar *compile-verbose* *print-case* *read-base* +syn keyword lispVar *compile-verbose* *print-circle* *read-default-float-format* +syn keyword lispVar *debug-io* *print-escape* *read-eval* +syn keyword lispVar *debugger-hook* *print-gensym* *read-suppress* +syn keyword lispVar *default-pathname-defaults* *print-length* *readtable* +syn keyword lispVar *error-output* *print-level* *standard-input* +syn keyword lispVar *evalhook* *print-lines* *standard-output* +syn keyword lispVar *features* *print-miser-width* *terminal-io* +syn keyword lispVar *gensym-counter* *print-miser-width* *trace-output* + +" Strings +syn region lispString start=+"+ skip=+\\\\\|\\"+ end=+"+ +if exists("lisp_instring") + syn region lispInString keepend matchgroup=Delimiter start=+"(+rs=s+1 skip=+|.\{-}|+ matchgroup=Delimiter end=+)"+ contains=@lispListCluster,lispInStringString + syn region lispInStringString start=+\\"+ skip=+\\\\+ end=+\\"+ contained +endif + +" Shared with Xlisp, Declarations, Macros, Functions +syn keyword lispDecl defmacro do-all-symbols labels +syn keyword lispDecl defsetf do-external-symbols let +syn keyword lispDecl deftype do-symbols locally +syn keyword lispDecl defun dotimes macrolet +syn keyword lispDecl do* flet multiple-value-bind + +" Numbers: supporting integers and floating point numbers +syn match lispNumber "-\=\(\.\d\+\|\d\+\(\.\d*\)\=\)\(e[-+]\=\d\+\)\=" + +syn match lispSpecial "\*[a-zA-Z_][a-zA-Z_0-9-]*\*" +syn match lispSpecial !#|[^()'`,"; \t]\+|#! +syn match lispSpecial !#x[0-9a-fA-F]\+! +syn match lispSpecial !#o[0-7]\+! +syn match lispSpecial !#b[01]\+! +syn match lispSpecial !#\\[ -\~]! +syn match lispSpecial !#[':][^()'`,"; \t]\+! +syn match lispSpecial !#([^()'`,"; \t]\+)! + +syn match lispConcat "\s\.\s" +syn match lispParenError ")" + +" Comments +syn cluster lispCommentGroup contains=lispTodo,@Spell +syn match lispComment ";.*$" contains=@lispCommentGroup +syn region lispCommentRegion start="#|" end="|#" contains=lispCommentRegion,@lispCommentGroup +syn case ignore +syn keyword lispTodo contained combak combak: todo todo: +syn case match + +" synchronization +syn sync lines=100 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_lisp_syntax_inits") + if version < 508 + let did_lisp_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink lispCommentRegion lispComment + HiLink lispAtomNmbr lispNumber + HiLink lispAtomMark lispMark + HiLink lispInStringString lispString + + HiLink lispAtom Identifier + HiLink lispAtomBarSymbol Special + HiLink lispBarSymbol Special + HiLink lispComment Comment + HiLink lispConcat Statement + HiLink lispDecl Statement + HiLink lispFunc Statement + HiLink lispKey Type + HiLink lispMark Delimiter + HiLink lispNumber Number + HiLink lispParenError Error + HiLink lispSpecial Type + HiLink lispString String + HiLink lispTodo Todo + HiLink lispVar Statement + + delcommand HiLink +endif + +let b:current_syntax = "lisp" + +" vim: ts=8 nowrap diff --git a/runtime/syntax/lite.vim b/runtime/syntax/lite.vim new file mode 100644 index 000000000..8abc51dea --- /dev/null +++ b/runtime/syntax/lite.vim @@ -0,0 +1,181 @@ +" Vim syntax file +" Language: lite +" Maintainer: Lutz Eymers <ixtab@polzin.com> +" URL: http://www.isp.de/data/lite.vim +" Email: Subject: send syntax_vim.tgz +" Last Change: 2001 Mai 01 +" +" Options lite_sql_query = 1 for SQL syntax highligthing inside strings +" lite_minlines = x to sync at least x lines backwards + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'lite' +endif + +if main_syntax == 'lite' + if exists("lite_sql_query") + if lite_sql_query == 1 + syn include @liteSql <sfile>:p:h/sql.vim + unlet b:current_syntax + endif + endif +endif + +if main_syntax == 'msql' + if exists("msql_sql_query") + if msql_sql_query == 1 + syn include @liteSql <sfile>:p:h/sql.vim + unlet b:current_syntax + endif + endif +endif + +syn cluster liteSql remove=sqlString,sqlComment + +syn case match + +" Internal Variables +syn keyword liteIntVar ERRMSG contained + +" Comment +syn region liteComment start="/\*" end="\*/" contains=liteTodo + +" Function names +syn keyword liteFunctions echo printf fprintf open close read +syn keyword liteFunctions readln readtok +syn keyword liteFunctions split strseg chop tr sub substr +syn keyword liteFunctions test unlink umask chmod mkdir chdir rmdir +syn keyword liteFunctions rename truncate link symlink stat +syn keyword liteFunctions sleep system getpid getppid kill +syn keyword liteFunctions time ctime time2unixtime unixtime2year +syn keyword liteFunctions unixtime2year unixtime2month unixtime2day +syn keyword liteFunctions unixtime2hour unixtime2min unixtime2sec +syn keyword liteFunctions strftime +syn keyword liteFunctions getpwnam getpwuid +syn keyword liteFunctions gethostbyname gethostbyaddress +syn keyword liteFunctions urlEncode setContentType includeFile +syn keyword liteFunctions msqlConnect msqlClose msqlSelectDB +syn keyword liteFunctions msqlQuery msqlStoreResult msqlFreeResult +syn keyword liteFunctions msqlFetchRow msqlDataSeek msqlListDBs +syn keyword liteFunctions msqlListTables msqlInitFieldList msqlListField +syn keyword liteFunctions msqlFieldSeek msqlNumRows msqlEncode +syn keyword liteFunctions exit fatal typeof +syn keyword liteFunctions crypt addHttpHeader + +" Conditional +syn keyword liteConditional if else + +" Repeat +syn keyword liteRepeat while + +" Operator +syn keyword liteStatement break return continue + +" Operator +syn match liteOperator "[-+=#*]" +syn match liteOperator "/[^*]"me=e-1 +syn match liteOperator "\$" +syn match liteRelation "&&" +syn match liteRelation "||" +syn match liteRelation "[!=<>]=" +syn match liteRelation "[<>]" + +" Identifier +syn match liteIdentifier "$\h\w*" contains=liteIntVar,liteOperator +syn match liteGlobalIdentifier "@\h\w*" contains=liteIntVar + +" Include +syn keyword liteInclude load + +" Define +syn keyword liteDefine funct + +" Type +syn keyword liteType int uint char real + +" String +syn region liteString keepend matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=liteIdentifier,liteSpecialChar,@liteSql + +" Number +syn match liteNumber "-\=\<\d\+\>" + +" Float +syn match liteFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" + +" SpecialChar +syn match liteSpecialChar "\\[abcfnrtv\\]" contained + +syn match liteParentError "[)}\]]" + +" Todo +syn keyword liteTodo TODO Todo todo contained + +" dont syn #!... +syn match liteExec "^#!.*$" + +" Parents +syn cluster liteInside contains=liteComment,liteFunctions,liteIdentifier,liteGlobalIdentifier,liteConditional,liteRepeat,liteStatement,liteOperator,liteRelation,liteType,liteString,liteNumber,liteFloat,liteParent + +syn region liteParent matchgroup=Delimiter start="(" end=")" contains=@liteInside +syn region liteParent matchgroup=Delimiter start="{" end="}" contains=@liteInside +syn region liteParent matchgroup=Delimiter start="\[" end="\]" contains=@liteInside + +" sync +if main_syntax == 'lite' + if exists("lite_minlines") + exec "syn sync minlines=" . lite_minlines + else + syn sync minlines=100 + endif +endif + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_lite_syn_inits") + if version < 508 + let did_lite_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink liteComment Comment + HiLink liteString String + HiLink liteNumber Number + HiLink liteFloat Float + HiLink liteIdentifier Identifier + HiLink liteGlobalIdentifier Identifier + HiLink liteIntVar Identifier + HiLink liteFunctions Function + HiLink liteRepeat Repeat + HiLink liteConditional Conditional + HiLink liteStatement Statement + HiLink liteType Type + HiLink liteInclude Include + HiLink liteDefine Define + HiLink liteSpecialChar SpecialChar + HiLink liteParentError liteError + HiLink liteError Error + HiLink liteTodo Todo + HiLink liteOperator Operator + HiLink liteRelation Operator + + delcommand HiLink +endif + +let b:current_syntax = "lite" + +if main_syntax == 'lite' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/runtime/syntax/logtalk.vim b/runtime/syntax/logtalk.vim new file mode 100644 index 000000000..b8218da3e --- /dev/null +++ b/runtime/syntax/logtalk.vim @@ -0,0 +1,428 @@ +" Vim syntax file +" +" Language: Logtalk +" Maintainer: Paulo Moura <pmoura@logtalk.org> +" Last Change: 2004 May 16 + + +" Quit when a syntax file was already loaded: + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + +" Logtalk is case sensitive: + +syn case match + + +" Logtalk variables + +syn match logtalkVariable "\<\(\u\|_\)\(\w\)*\>" + + +" Logtalk clause functor + +syn match logtalkOperator ":-" + + +" Logtalk quoted atoms and strings + +syn region logtalkString start=+"+ skip=+\\"+ end=+"+ +syn region logtalkAtom start=+'+ skip=+\\'+ end=+'+ + + +" Logtalk message sending operators + +syn match logtalkOperator "::" +syn match logtalkOperator "\^\^" + + +" Logtalk external call + +syn region logtalkExtCall matchgroup=logtalkExtCallTag start="{" matchgroup=logtalkExtCallTag end="}" contains=ALL + + +" Logtalk opening entity directives + +syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- object(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=ALL +syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- protocol(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=ALL +syn region logtalkOpenEntityDir matchgroup=logtalkOpenEntityDirTag start=":- category(" matchgroup=logtalkOpenEntityDirTag end=")\." contains=ALL + + +" Logtalk closing entity directives + +syn match logtalkCloseEntityDir ":- end_object\." +syn match logtalkCloseEntityDir ":- end_protocol\." +syn match logtalkCloseEntityDir ":- end_category\." + + +" Logtalk entity relations + +syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="instantiates(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity contained +syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="specializes(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity contained +syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="extends(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity contained +syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="imports(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity contained +syn region logtalkEntityRel matchgroup=logtalkEntityRelTag start="implements(" matchgroup=logtalkEntityRelTag end=")" contains=logtalkEntity contained + + +" Logtalk directives + +syn region logtalkDir matchgroup=logtalkDirTag start=":- initialization(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- info(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- mode(" matchgroup=logtalkDirTag end=")\." contains=logtalkOperator,logtalkAtom +syn region logtalkDir matchgroup=logtalkDirTag start=":- dynamic(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn match logtalkDirTag ":- dynamic\." +syn region logtalkDir matchgroup=logtalkDirTag start=":- discontiguous(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- public(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- protected(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- private(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- metapredicate(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- op(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- calls(" matchgroup=logtalkDirTag end=")\." contains=ALL +syn region logtalkDir matchgroup=logtalkDirTag start=":- uses(" matchgroup=logtalkDirTag end=")\." contains=ALL + + +" Logtalk built-in predicates + +syn match logtalkBuiltIn "\<current_object\ze(" +syn match logtalkBuiltIn "\<current_protocol\ze(" +syn match logtalkBuiltIn "\<current_category\ze(" + +syn match logtalkBuiltIn "\<create_object\ze(" +syn match logtalkBuiltIn "\<create_protocol\ze(" +syn match logtalkBuiltIn "\<create_category\ze(" + +syn match logtalkBuiltIn "\<object_property\ze(" +syn match logtalkBuiltIn "\<protocol_property\ze(" +syn match logtalkBuiltIn "\<category_property\ze(" + +syn match logtalkBuiltIn "\<abolish_object\ze(" +syn match logtalkBuiltIn "\<abolish_protocol\ze(" +syn match logtalkBuiltIn "\<abolish_category\ze(" + +syn match logtalkBuiltIn "\<extends_object\ze(" +syn match logtalkBuiltIn "\<extends_protocol\ze(" +syn match logtalkBuiltIn "\<implements_protocol\ze(" +syn match logtalkBuiltIn "\<instantiates_class\ze(" +syn match logtalkBuiltIn "\<specializes_class\ze(" +syn match logtalkBuiltIn "\<imports_category\ze(" + +syn match logtalkBuiltIn "\<abolish_events\ze(" +syn match logtalkBuiltIn "\<current_event\ze(" +syn match logtalkBuiltIn "\<define_events\ze(" + +syn match logtalkBuiltIn "\<current_logtalk_flag\ze(" +syn match logtalkBuiltIn "\<set_logtalk_flag\ze(" + +syn match logtalkBuiltIn "\<logtalk_compile\ze(" +syn match logtalkBuiltIn "\<logtalk_load\ze(" + +syn match logtalkBuiltIn "\<forall\ze(" +syn match logtalkBuiltIn "\<retractall\ze(" + + +" Logtalk built-in methods + +syn match logtalkBuiltInMethod "\<parameter\ze(" +syn match logtalkBuiltInMethod "\<self\ze(" +syn match logtalkBuiltInMethod "\<sender\ze(" +syn match logtalkBuiltInMethod "\<this\ze(" + +syn match logtalkBuiltInMethod "\<current_predicate\ze(" +syn match logtalkBuiltInMethod "\<predicate_property\ze(" + +syn match logtalkBuiltInMethod "\<abolish\ze(" +syn match logtalkBuiltInMethod "\<asserta\ze(" +syn match logtalkBuiltInMethod "\<assertz\ze(" +syn match logtalkBuiltInMethod "\<clause\ze(" +syn match logtalkBuiltInMethod "\<retract\ze(" +syn match logtalkBuiltInMethod "\<retractall\ze(" + +syn match logtalkBuiltInMethod "\<bagof\ze(" +syn match logtalkBuiltInMethod "\<findall\ze(" +syn match logtalkBuiltInMethod "\<forall\ze(" +syn match logtalkBuiltInMethod "\<setof\ze(" + +syn match logtalkBuiltInMethod "\<before\ze(" +syn match logtalkBuiltInMethod "\<after\ze(" + +syn match logtalkBuiltInMethod "\<phrase\ze(" + + +" Mode operators + +syn match logtalkOperator "?" +syn match logtalkOperator "@" + + +" Control constructs + +syn match logtalkKeyword "\<true\>" +syn match logtalkKeyword "\<fail\>" +syn match logtalkKeyword "\<call\ze(" +syn match logtalkOperator "!" +syn match logtalkOperator "," +syn match logtalkOperator ";" +syn match logtalkOperator "-->" +syn match logtalkOperator "->" +syn match logtalkKeyword "\<catch\ze(" +syn match logtalkKeyword "\<throw\ze(" + + +" Term unification + +syn match logtalkOperator "=" +syn match logtalkKeyword "\<unify_with_occurs_check\ze(" +syn match logtalkOperator "\\=" + + +" Term testing + +syn match logtalkKeyword "\<var\ze(" +syn match logtalkKeyword "\<atom\ze(" +syn match logtalkKeyword "\<integer\ze(" +syn match logtalkKeyword "\<float\ze(" +syn match logtalkKeyword "\<atomic\ze(" +syn match logtalkKeyword "\<compound\ze(" +syn match logtalkKeyword "\<nonvar\ze(" +syn match logtalkKeyword "\<number\ze(" + + +" Term comparison + +syn match logtalkOperator "@=<" +syn match logtalkOperator "==" +syn match logtalkOperator "\\==" +syn match logtalkOperator "@<" +syn match logtalkOperator "@>" +syn match logtalkOperator "@>=" + + +" Term creation and decomposition + +syn match logtalkKeyword "\<functor\ze(" +syn match logtalkKeyword "\<arg\ze(" +syn match logtalkOperator "=\.\." +syn match logtalkKeyword "\<copy_term\ze(" + + +" Arithemtic evaluation + +syn keyword logtalkOperator is + + +" Arithemtic comparison + +syn match logtalkOperator "=:=" +syn match logtalkOperator "=\\=" +syn match logtalkOperator "<" +syn match logtalkOperator "=<" +syn match logtalkOperator ">" +syn match logtalkOperator ">=" + + +" Stream selection and control + +syn match logtalkKeyword "\<current_input\ze(" +syn match logtalkKeyword "\<current_output\ze(" +syn match logtalkKeyword "\<set_input\ze(" +syn match logtalkKeyword "\<set_output\ze(" +syn match logtalkKeyword "\<open\ze(" +syn match logtalkKeyword "\<close\ze(" +syn match logtalkKeyword "\<flush_output\ze(" +syn match logtalkKeyword "\<flush_output\>" +syn match logtalkKeyword "\<stream_property\ze(" +syn match logtalkKeyword "\<at_end_of_stream\ze(" +syn match logtalkKeyword "\<at_end_of_stream\>" +syn match logtalkKeyword "\<set_stream_position\ze(" + + +" Character input/output + +syn match logtalkKeyword "\<get_char\ze(" +syn match logtalkKeyword "\<get_code\ze(" +syn match logtalkKeyword "\<peek_char\ze(" +syn match logtalkKeyword "\<peek_code\ze(" +syn match logtalkKeyword "\<put_char\ze(" +syn match logtalkKeyword "\<put_code\ze(" +syn match logtalkKeyword "\<nl\ze(" +syn match logtalkKeyword "\<nl\>" + + +" Byte input/output + +syn match logtalkKeyword "\<get_byte\ze(" +syn match logtalkKeyword "\<peek_byte\ze(" +syn match logtalkKeyword "\<put_byte\ze(" + + +" Term input/output + +syn match logtalkKeyword "\<read_term\ze(" +syn match logtalkKeyword "\<read\ze(" +syn match logtalkKeyword "\<write_term\ze(" +syn match logtalkKeyword "\<write\ze(" +syn match logtalkKeyword "\<writeq\ze(" +syn match logtalkKeyword "\<write_canonical\ze(" +syn match logtalkKeyword "\<op\ze(" +syn match logtalkKeyword "\<current_op\ze(" +syn match logtalkKeyword "\<char_conversion\ze(" +syn match logtalkKeyword "\<current_char_conversion\ze(" + + +" Logic and control + +syn match logtalkOperator "\\+" +syn match logtalkKeyword "\<once\ze(" +syn match logtalkKeyword "\<repeat\>" + + +" Atomic term processing + +syn match logtalkKeyword "\<atom_length\ze(" +syn match logtalkKeyword "\<atom_concat\ze(" +syn match logtalkKeyword "\<sub_atom\ze(" +syn match logtalkKeyword "\<atom_chars\ze(" +syn match logtalkKeyword "\<atom_codes\ze(" +syn match logtalkKeyword "\<char_code\ze(" +syn match logtalkKeyword "\<number_chars\ze(" +syn match logtalkKeyword "\<number_codes\ze(" + + +" Implementation defined hooks functions + +syn match logtalkKeyword "\<set_prolog_flag\ze(" +syn match logtalkKeyword "\<current_prolog_flag\ze(" +syn match logtalkKeyword "\<halt\ze(" +syn match logtalkKeyword "\<halt\>" + + +" Evaluable functors + +syn match logtalkOperator "+" +syn match logtalkOperator "-" +syn match logtalkOperator "\*" +syn match logtalkOperator "//" +syn match logtalkOperator "/" +syn match logtalkKeyword "\<rem(?=[(])" +syn match logtalkKeyword "\<rem\>" +syn match logtalkKeyword "\<mod\ze(" +syn match logtalkKeyword "\<mod\>" +syn match logtalkKeyword "\<abs\ze(" +syn match logtalkKeyword "\<sign\ze(" +syn match logtalkKeyword "\<float_integer_part\ze(" +syn match logtalkKeyword "\<float_fractional_part\ze(" +syn match logtalkKeyword "\<float\ze(" +syn match logtalkKeyword "\<floor\ze(" +syn match logtalkKeyword "\<truncate\ze(" +syn match logtalkKeyword "\<round\ze(" +syn match logtalkKeyword "\<ceiling\ze(" + + +" Other arithemtic functors + +syn match logtalkOperator "\*\*" +syn match logtalkKeyword "\<sin\ze(" +syn match logtalkKeyword "\<cos\ze(" +syn match logtalkKeyword "\<atan\ze(" +syn match logtalkKeyword "\<exp\ze(" +syn match logtalkKeyword "\<log\ze(" +syn match logtalkKeyword "\<sqrt\ze(" + + +" Bitwise functors + +syn match logtalkOperator ">>" +syn match logtalkOperator "<<" +syn match logtalkOperator "/\\" +syn match logtalkOperator "\\/" +syn match logtalkOperator "\\" + + +" Logtalk end-of-clause + +syn match logtalkOperator "\." + + +" Logtalk list operator + +syn match logtalkOperator "|" + + +" Logtalk comments + +syn region logtalkBlockComment start="/\*" end="\*/" +syn match logtalkLineComment "%.*" + + +" Logtalk numbers + +syn match logtalkNumber "\<[0-9]\+\>" +syn match logtalkNumber "\<[0-9]\+\.[0-9]\+\>" +syn match logtalkNumber "\<[0-9]\+\.[0-9]\+[eE][-+][0-9]+\>" +syn match logtalkNumber "\<0'[0-9a-zA-Z]\>" +syn match logtalkNumber "\<0b[0-1]\+\>" +syn match logtalkNumber "\<0o[0-7]\+\>" +syn match logtalkNumber "\<0x[0-9a-fA-F]\+\>" + + +syn sync ccomment maxlines=50 + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet + +if version >= 508 || !exists("did_logtalk_syn_inits") + if version < 508 + let did_logtalk_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink logtalkBlockComment Comment + HiLink logtalkLineComment Comment + + HiLink logtalkOpenEntityDir Normal + HiLink logtalkOpenEntityDirTag PreProc + + HiLink logtalkEntity Normal + + HiLink logtalkEntityRel Normal + HiLink logtalkEntityRelTag PreProc + + HiLink logtalkCloseEntityDir PreProc + + HiLink logtalkDir Normal + HiLink logtalkDirTag PreProc + + HiLink logtalkAtom String + HiLink logtalkString String + + HiLink logtalkNumber Number + + HiLink logtalkKeyword Keyword + + HiLink logtalkBuiltIn Keyword + HiLink logtalkBuiltInMethod Keyword + + HiLink logtalkOperator Operator + + HiLink logtalkExtCall Normal + HiLink logtalkExtCallTag Operator + + HiLink logtalkVariable Identifier + + delcommand HiLink + +endif + + +let b:current_syntax = "logtalk" + +setlocal ts=4 diff --git a/runtime/syntax/lotos.vim b/runtime/syntax/lotos.vim new file mode 100644 index 000000000..3cd83c4d8 --- /dev/null +++ b/runtime/syntax/lotos.vim @@ -0,0 +1,82 @@ +" Vim syntax file +" Language: LOTOS (Language Of Temporal Ordering Specifications, IS8807) +" Maintainer: Daniel Amyot <damyot@csi.uottawa.ca> +" Last Change: Wed Aug 19 1998 +" URL: http://lotos.csi.uottawa.ca/~damyot/vim/lotos.vim +" This file is an adaptation of pascal.vim by Mario Eusebio +" I'm not sure I understand all of the syntax highlight language, +" but this file seems to do the job for standard LOTOS. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +"Comments in LOTOS are between (* and *) +syn region lotosComment start="(\*" end="\*)" contains=lotosTodo + +"Operators [], [...], >>, ->, |||, |[...]|, ||, ;, !, ?, :, =, ,, := +syn match lotosDelimiter "[][]" +syn match lotosDelimiter ">>" +syn match lotosDelimiter "->" +syn match lotosDelimiter "\[>" +syn match lotosDelimiter "[|;!?:=,]" + +"Regular keywords +syn keyword lotosStatement specification endspec process endproc +syn keyword lotosStatement where behaviour behavior +syn keyword lotosStatement any let par accept choice hide of in +syn keyword lotosStatement i stop exit noexit + +"Operators from the Abstract Data Types in IS8807 +syn keyword lotosOperator eq ne succ and or xor implies iff +syn keyword lotosOperator not true false +syn keyword lotosOperator Insert Remove IsIn NotIn Union Ints +syn keyword lotosOperator Minus Includes IsSubsetOf +syn keyword lotosOperator lt le ge gt 0 + +"Sorts in IS8807 +syn keyword lotosSort Boolean Bool FBoolean FBool Element +syn keyword lotosSort Set String NaturalNumber Nat HexString +syn keyword lotosSort HexDigit DecString DecDigit +syn keyword lotosSort OctString OctDigit BitString Bit +syn keyword lotosSort Octet OctetString + +"Keywords for ADTs +syn keyword lotosType type endtype library endlib sorts formalsorts +syn keyword lotosType eqns formaleqns opns formalopns forall ofsort is +syn keyword lotosType for renamedby actualizedby sortnames opnnames +syn keyword lotosType using + +syn sync lines=250 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_lotos_syntax_inits") + if version < 508 + let did_lotos_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink lotosStatement Statement + HiLink lotosProcess Label + HiLink lotosOperator Operator + HiLink lotosSort Function + HiLink lotosType Type + HiLink lotosComment Comment + HiLink lotosDelimiter String + + delcommand HiLink +endif + +let b:current_syntax = "lotos" + +" vim: ts=8 diff --git a/runtime/syntax/lout.vim b/runtime/syntax/lout.vim new file mode 100644 index 000000000..ea4cb0038 --- /dev/null +++ b/runtime/syntax/lout.vim @@ -0,0 +1,139 @@ +" Vim syntax file +" Language: Lout +" Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de> +" Last Change: Son 22 Jun 2003 20:43:26 CEST +" Filenames: *.lout,*.lt +" URL: http://www.cvjb.de/comp/vim/lout.vim +" $Id$ +" +" Lout: Basser Lout document formatting system. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Lout is case sensitive +syn case match + +" Synchronization, I know it is a huge number, but normal texts can be +" _very_ long ;-) +syn sync lines=1000 + +" Characters allowed in keywords +" I don't know if 128-255 are allowed in ANS-FORHT +if version >= 600 + setlocal iskeyword=@,48-57,.,@-@,_,192-255 +else + set iskeyword=@,48-57,.,@-@,_,192-255 +endif + +" Some special keywords +syn keyword loutTodo contained TODO lout Lout LOUT +syn keyword loutDefine def macro + +" Some big structures +syn keyword loutKeyword @Begin @End @Figure @Tab +syn keyword loutKeyword @Book @Doc @Document @Report +syn keyword loutKeyword @Introduction @Abstract @Appendix +syn keyword loutKeyword @Chapter @Section @BeginSections @EndSections + +" All kind of Lout keywords +syn match loutFunction '\<@[^ \t{}]\+\>' + +" Braces -- Don`t edit these lines! +syn match loutMBraces '[{}]' +syn match loutIBraces '[{}]' +syn match loutBBrace '[{}]' +syn match loutBIBraces '[{}]' +syn match loutHeads '[{}]' + +" Unmatched braces. +syn match loutBraceError '}' + +" End of multi-line definitions, like @Document, @Report and @Book. +syn match loutEOmlDef '^//$' + +" Grouping of parameters and objects. +syn region loutObject transparent matchgroup=Delimiter start='{' matchgroup=Delimiter end='}' contains=ALLBUT,loutBraceError + +" The NULL object has a special meaning +syn keyword loutNULL {} + +" Comments +syn region loutComment start='\#' end='$' contains=loutTodo + +" Double quotes +syn region loutSpecial start=+"+ skip=+\\\\\|\\"+ end=+"+ + +" ISO-LATIN-1 characters created with @Char, or Adobe symbols +" created with @Sym +syn match loutSymbols '@\(\(Char\)\|\(Sym\)\)\s\+[A-Za-z]\+' + +" Include files +syn match loutInclude '@IncludeGraphic\s\+\k\+' +syn region loutInclude start='@\(\(SysInclude\)\|\(IncludeGraphic\)\|\(Include\)\)\s*{' end='}' + +" Tags +syn match loutTag '@\(\(Tag\)\|\(PageMark\)\|\(PageOf\)\|\(NumberOf\)\)\s\+\k\+' +syn region loutTag start='@Tag\s*{' end='}' + +" Equations +syn match loutMath '@Eq\s\+\k\+' +syn region loutMath matchgroup=loutMBraces start='@Eq\s*{' matchgroup=loutMBraces end='}' contains=ALLBUT,loutBraceError +" +" Fonts +syn match loutItalic '@I\s\+\k\+' +syn region loutItalic matchgroup=loutIBraces start='@I\s*{' matchgroup=loutIBraces end='}' contains=ALLBUT,loutBraceError +syn match loutBold '@B\s\+\k\+' +syn region loutBold matchgroup=loutBBraces start='@B\s*{' matchgroup=loutBBraces end='}' contains=ALLBUT,loutBraceError +syn match loutBoldItalic '@BI\s\+\k\+' +syn region loutBoldItalic matchgroup=loutBIBraces start='@BI\s*{' matchgroup=loutBIBraces end='}' contains=ALLBUT,loutBraceError +syn region loutHeadings matchgroup=loutHeads start='@\(\(Title\)\|\(Caption\)\)\s*{' matchgroup=loutHeads end='}' contains=ALLBUT,loutBraceError + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_lout_syn_inits") + if version < 508 + let did_lout_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overrriden later. + HiLink loutTodo Todo + HiLink loutDefine Define + HiLink loutEOmlDef Define + HiLink loutFunction Function + HiLink loutBraceError Error + HiLink loutNULL Special + HiLink loutComment Comment + HiLink loutSpecial Special + HiLink loutSymbols Character + HiLink loutInclude Include + HiLink loutKeyword Keyword + HiLink loutTag Tag + HiLink loutMath Number + + " HiLink Not really needed here, but I think it is more consistent. + HiLink loutMBraces loutMath + hi loutItalic term=italic cterm=italic gui=italic + HiLink loutIBraces loutItalic + hi loutBold term=bold cterm=bold gui=bold + HiLink loutBBraces loutBold + hi loutBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic + HiLink loutBIBraces loutBoldItalic + hi loutHeadings term=bold cterm=bold guifg=indianred + HiLink loutHeads loutHeadings + + delcommand HiLink +endif + +let b:current_syntax = "lout" + +" vim:ts=8:sw=4:nocindent:smartindent: diff --git a/runtime/syntax/lpc.vim b/runtime/syntax/lpc.vim new file mode 100644 index 000000000..7665c1a6d --- /dev/null +++ b/runtime/syntax/lpc.vim @@ -0,0 +1,455 @@ +" Vim syntax file +" Language: LPC +" Maintainer: Shizhu Pan <poet@mudbuilder.net> +" URL: http://poet.tomud.com/pub/lpc.vim.bz2 +" Last Change: 2003 May 11 +" Comments: If you are using Vim 6.2 or later, see :h lpc.vim for +" file type recognizing, if not, you had to use modeline. + + +" Nodule: This is the start nodule. {{{1 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Nodule: Keywords {{{1 + +" LPC keywords +" keywords should always be highlighted so "contained" is not used. +syn cluster lpcKeywdGrp contains=lpcConditional,lpcLabel,lpcOperator,lpcRepeat,lpcStatement,lpcModifier,lpcReserved + +syn keyword lpcConditional if else switch +syn keyword lpcLabel case default +syn keyword lpcOperator catch efun in inherit +syn keyword lpcRepeat do for foreach while +syn keyword lpcStatement break continue return + +syn match lpcEfunError /efun[^:]/ display + +" Illegal to use keyword as function +" It's not working, maybe in the next version. +syn keyword lpcKeywdError contained if for foreach return switch while + +" These are keywords only because they take lvalue or type as parameter, +" so these keywords should only be used as function but cannot be names of +" user-defined functions. +syn keyword lpcKeywdFunc new parse_command sscanf time_expression + +" Nodule: Type and modifiers {{{1 + +" Type names list. + +" Special types +syn keyword lpcType void mixed unknown +" Scalar/Value types. +syn keyword lpcType int float string +" Pointer types. +syn keyword lpcType array buffer class function mapping object +" Other types. +if exists("lpc_compat_32") + syn keyword lpcType closure status funcall +else + syn keyword lpcError closure status + syn keyword lpcType multiset +endif + +" Type modifier. +syn keyword lpcModifier nomask private public +syn keyword lpcModifier varargs virtual + +" sensible modifiers +if exists("lpc_pre_v22") + syn keyword lpcReserved nosave protected ref + syn keyword lpcModifier static +else + syn keyword lpcError static + syn keyword lpcModifier nosave protected ref +endif + +" Nodule: Applies {{{1 + +" Match a function declaration or function pointer +syn match lpcApplyDecl excludenl /->\h\w*(/me=e-1 contains=lpcApplies transparent display + +" We should note that in func_spec.c the efun definition syntax is so +" complicated that I use such a long regular expression to describe. +syn match lpcLongDecl excludenl /\(\s\|\*\)\h\+\s\h\+(/me=e-1 contains=@lpcEfunGroup,lpcType,@lpcKeywdGrp transparent display + +" this is form for all functions +" ->foo() form had been excluded +syn match lpcFuncDecl excludenl /\h\w*(/me=e-1 contains=lpcApplies,@lpcEfunGroup,lpcKeywdError transparent display + +" The (: :) parenthesis or $() forms a function pointer +syn match lpcFuncName /(:\s*\h\+\s*:)/me=e-1 contains=lpcApplies,@lpcEfunGroup transparent display contained +syn match lpcFuncName /(:\s*\h\+,/ contains=lpcApplies,@lpcEfunGroup transparent display contained +syn match lpcFuncName /\$(\h\+)/ contains=lpcApplies,@lpcEfunGroup transparent display contained + +" Applies list. +" system applies +syn keyword lpcApplies contained __INIT clean_up create destructor heart_beat id init move_or_destruct reset +" interactive +syn keyword lpcApplies contained catch_tell logon net_dead process_input receive_message receive_snoop telnet_suboption terminal_type window_size write_prompt +" master applies +syn keyword lpcApplies contained author_file compile_object connect crash creator_file domain_file epilog error_handler flag get_bb_uid get_root_uid get_save_file_name log_error make_path_absolute object_name preload privs_file retrieve_ed_setup save_ed_setup slow_shutdown +syn keyword lpcApplies contained valid_asm valid_bind valid_compile_to_c valid_database valid_hide valid_link valid_object valid_override valid_read valid_save_binary valid_seteuid valid_shadow valid_socket valid_write +" parsing +syn keyword lpcApplies contained inventory_accessible inventory_visible is_living parse_command_adjectiv_id_list parse_command_adjective_id_list parse_command_all_word parse_command_id_list parse_command_plural_id_list parse_command_prepos_list parse_command_users parse_get_environment parse_get_first_inventory parse_get_next_inventory parser_error_message + + +" Nodule: Efuns {{{1 + +syn cluster lpcEfunGroup contains=lpc_efuns,lpcOldEfuns,lpcNewEfuns,lpcKeywdFunc + +" Compat32 efuns +if exists("lpc_compat_32") + syn keyword lpc_efuns contained closurep heart_beat_info m_delete m_values m_indices query_once_interactive strstr +else + syn match lpcErrFunc /#`\h\w*/ + " Shell compatible first line comment. + syn region lpcCommentFunc start=/^#!/ end=/$/ +endif + +" pre-v22 efuns which are removed in newer versions. +syn keyword lpcOldEfuns contained tail dump_socket_status + +" new efuns after v22 should be added here! +syn keyword lpcNewEfuns contained socket_status + +" LPC efuns list. +" DEBUG efuns Not included. +" New efuns should NOT be added to this list, see v22 efuns above. +" Efuns list {{{2 +syn keyword lpc_efuns contained acos add_action all_inventory all_previous_objects allocate allocate_buffer allocate_mapping apply arrayp asin atan author_stats +syn keyword lpc_efuns contained bind break_string bufferp +syn keyword lpc_efuns contained cache_stats call_other call_out call_out_info call_stack capitalize catch ceil check_memory children classp clear_bit clone_object clonep command commands copy cos cp crc32 crypt ctime +syn keyword lpc_efuns contained db_close db_commit db_connect db_exec db_fetch db_rollback db_status debug_info debugmalloc debug_message deep_inherit_list deep_inventory destruct disable_commands disable_wizard domain_stats dumpallobj dump_file_descriptors dump_prog +syn keyword lpc_efuns contained each ed ed_cmd ed_start enable_commands enable_wizard environment error errorp eval_cost evaluate exec exp explode export_uid external_start +syn keyword lpc_efuns contained fetch_variable file_length file_name file_size filter filter_array filter_mapping find_call_out find_living find_object find_player first_inventory floatp floor flush_messages function_exists function_owner function_profile functionp functions +syn keyword lpc_efuns contained generate_source get_char get_config get_dir geteuid getuid +syn keyword lpc_efuns contained heart_beats +syn keyword lpc_efuns contained id_matrix implode in_edit in_input inherit_list inherits input_to interactive intp +syn keyword lpc_efuns contained keys +syn keyword lpc_efuns contained link living livings load_object localtime log log10 lookat_rotate lower_case lpc_info +syn keyword lpc_efuns contained malloc_check malloc_debug malloc_status map map_array map_delete map_mapping mapp master match_path max_eval_cost member_array memory_info memory_summary message mkdir moncontrol move_object mud_status +syn keyword lpc_efuns contained named_livings network_stats next_bit next_inventory notify_fail nullp +syn keyword lpc_efuns contained objectp objects oldcrypt opcprof origin +syn keyword lpc_efuns contained parse_add_rule parse_add_synonym parse_command parse_dump parse_init parse_my_rules parse_refresh parse_remove parse_sentence pluralize pointerp pow present previous_object printf process_string process_value program_info +syn keyword lpc_efuns contained query_ed_mode query_heart_beat query_host_name query_idle query_ip_name query_ip_number query_ip_port query_load_average query_notify_fail query_privs query_replaced_program query_shadowing query_snoop query_snooping query_verb +syn keyword lpc_efuns contained random read_buffer read_bytes read_file receive reclaim_objects refs regexp reg_assoc reload_object remove_action remove_call_out remove_interactive remove_shadow rename repeat_string replace_program replace_string replaceable reset_eval_cost resolve restore_object restore_variable rm rmdir rotate_x rotate_y rotate_z rusage +syn keyword lpc_efuns contained save_object save_variable say scale set_author set_bit set_eval_limit set_heart_beat set_hide set_light set_living_name set_malloc_mask set_privs set_reset set_this_player set_this_user seteuid shadow shallow_inherit_list shout shutdown sin sizeof snoop socket_accept socket_acquire socket_address socket_bind socket_close socket_connect socket_create socket_error socket_listen socket_release socket_write sort_array sprintf sqrt stat store_variable strcmp stringp strlen strsrch +syn keyword lpc_efuns contained tan tell_object tell_room terminal_colour test_bit this_interactive this_object this_player this_user throw time to_float to_int trace traceprefix translate typeof +syn keyword lpc_efuns contained undefinedp unique_array unique_mapping upper_case uptime userp users +syn keyword lpc_efuns contained values variables virtualp +syn keyword lpc_efuns contained wizardp write write_buffer write_bytes write_file + +" Nodule: Constants {{{1 + +" LPC Constants. +" like keywords, constants are always highlighted, be careful to choose only +" the constants we used to add to this list. +syn keyword lpcConstant __ARCH__ __COMPILER__ __DIR__ __FILE__ __OPTIMIZATION__ __PORT__ __VERSION__ +" Defines in options.h are all predefined in LPC sources surrounding by +" two underscores. Do we need to include all of that? +syn keyword lpcConstant __SAVE_EXTENSION__ __HEARTBEAT_INTERVAL__ +" from the documentation we know that these constants remains only for +" backward compatibility and should not be used any more. +syn keyword lpcConstant HAS_ED HAS_PRINTF HAS_RUSAGE HAS_DEBUG_LEVEL +syn keyword lpcConstant MUD_NAME F__THIS_OBJECT + +" Nodule: Todo for this file. {{{1 + +" TODO : need to check for LPC4 syntax and other series of LPC besides +" v22, b21 and l32, if you had a good idea, contact me at poet@mudbuilder.net +" and I will be appreciated about that. + +" Notes about some FAQ: +" +" About variables : We adopts the same behavior for C because almost all the +" LPC programmers are also C programmers, so we don't need separate settings +" for C and LPC. That is the reason why I don't change variables like +" "c_no_utf"s to "lpc_no_utf"s. +" +" Copy : Some of the following seems to be copied from c.vim but not quite +" the same in details because the syntax for C and LPC is different. +" +" Color scheme : this syntax file had been thouroughly tested to work well +" for all of the dark-backgrounded color schemes Vim has provided officially, +" and it should be quite Ok for all of the bright-backgrounded color schemes, +" of course it works best for the color scheme that I am using, download it +" from http://poet.tomud.com/pub/ps_color.vim.bz2 if you want to try it. +" + +" Nodule: String and Character {{{1 + + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match lpcSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" +if !exists("c_no_utf") + syn match lpcSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)" +endif + +" LPC version of sprintf() format, +syn match lpcFormat display "%\(\d\+\)\=[-+ |=#@:.]*\(\d\+\)\=\('\I\+'\|'\I*\\'\I*'\)\=[OsdicoxXf]" contained +syn match lpcFormat display "%%" contained +syn region lpcString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=lpcSpecial,lpcFormat +" lpcCppString: same as lpcString, but ends at end of line +syn region lpcCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=lpcSpecial,lpcFormat + +" LPC preprocessor for the text formatting short cuts +" Thanks to Dr. Charles E. Campbell <cec@gryphon.gsfc.nasa.gov> +" he suggests the best way to do this. +syn region lpcTextString start=/@\z(\h\w*\)$/ end=/^\z1/ contains=lpcSpecial +syn region lpcArrayString start=/@@\z(\h\w*\)$/ end=/^\z1/ contains=lpcSpecial + +" Character +syn match lpcCharacter "L\='[^\\]'" +syn match lpcCharacter "L'[^']*'" contains=lpcSpecial +syn match lpcSpecialError "L\='\\[^'\"?\\abefnrtv]'" +syn match lpcSpecialCharacter "L\='\\['\"?\\abefnrtv]'" +syn match lpcSpecialCharacter display "L\='\\\o\{1,3}'" +syn match lpcSpecialCharacter display "'\\x\x\{1,2}'" +syn match lpcSpecialCharacter display "L'\\x\x\+'" + +" Nodule: White space {{{1 + +" when wanted, highlight trailing white space +if exists("c_space_errors") + if !exists("c_no_trail_space_error") + syn match lpcSpaceError display excludenl "\s\+$" + endif + if !exists("c_no_tab_space_error") + syn match lpcSpaceError display " \+\t"me=e-1 + endif +endif + +" Nodule: Parenthesis and brackets {{{1 + +" catch errors caused by wrong parenthesis and brackets +syn cluster lpcParenGroup contains=lpcParenError,lpcIncluded,lpcSpecial,lpcCommentSkip,lpcCommentString,lpcComment2String,@lpcCommentGroup,lpcCommentStartError,lpcUserCont,lpcUserLabel,lpcBitField,lpcCommentSkip,lpcOctalZero,lpcCppOut,lpcCppOut2,lpcCppSkip,lpcFormat,lpcNumber,lpcFloat,lpcOctal,lpcOctalError,lpcNumbersCom +syn region lpcParen transparent start='(' end=')' contains=ALLBUT,@lpcParenGroup,lpcCppParen,lpcErrInBracket,lpcCppBracket,lpcCppString,@lpcEfunGroup,lpcApplies,lpcKeywdError +" lpcCppParen: same as lpcParen but ends at end-of-line; used in lpcDefine +syn region lpcCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@lpcParenGroup,lpcErrInBracket,lpcParen,lpcBracket,lpcString,@lpcEfunGroup,lpcApplies,lpcKeywdError +syn match lpcParenError display ")" +syn match lpcParenError display "\]" +" for LPC: +" Here we should consider the array ({ }) parenthesis and mapping ([ ]) +" parenthesis and multiset (< >) parenthesis. +syn match lpcErrInParen display contained "[^^]{"ms=s+1 +syn match lpcErrInParen display contained "\(}\|\]\)[^)]"me=e-1 +syn region lpcBracket transparent start='\[' end=']' contains=ALLBUT,@lpcParenGroup,lpcErrInParen,lpcCppParen,lpcCppBracket,lpcCppString,@lpcEfunGroup,lpcApplies,lpcFuncName,lpcKeywdError +" lpcCppBracket: same as lpcParen but ends at end-of-line; used in lpcDefine +syn region lpcCppBracket transparent start='\[' skip='\\$' excludenl end=']' end='$' contained contains=ALLBUT,@lpcParenGroup,lpcErrInParen,lpcParen,lpcBracket,lpcString,@lpcEfunGroup,lpcApplies,lpcFuncName,lpcKeywdError +syn match lpcErrInBracket display contained "[);{}]" + +" Nodule: Numbers {{{1 + +" integer number, or floating point number without a dot and with "f". +syn case ignore +syn match lpcNumbers display transparent "\<\d\|\.\d" contains=lpcNumber,lpcFloat,lpcOctalError,lpcOctal +" Same, but without octal error (for comments) +syn match lpcNumbersCom display contained transparent "\<\d\|\.\d" contains=lpcNumber,lpcFloat,lpcOctal +syn match lpcNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" +" hex number +syn match lpcNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" +" Flag the first zero of an octal number as something special +syn match lpcOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=lpcOctalZero +syn match lpcOctalZero display contained "\<0" +syn match lpcFloat display contained "\d\+f" +" floating point number, with dot, optional exponent +syn match lpcFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" +" floating point number, starting with a dot, optional exponent +syn match lpcFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +" floating point number, without dot, with exponent +syn match lpcFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" +" flag an octal number with wrong digits +syn match lpcOctalError display contained "0\o*[89]\d*" +syn case match + +" Nodule: Comment string {{{1 + +" lpcCommentGroup allows adding matches for special things in comments +syn keyword lpcTodo contained TODO FIXME XXX +syn cluster lpcCommentGroup contains=lpcTodo + +if exists("c_comment_strings") + " A comment can contain lpcString, lpcCharacter and lpcNumber. + syntax match lpcCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region lpcCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=lpcSpecial,lpcCommentSkip + syntax region lpcComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=lpcSpecial + syntax region lpcCommentL start="//" skip="\\$" end="$" keepend contains=@lpcCommentGroup,lpcComment2String,lpcCharacter,lpcNumbersCom,lpcSpaceError + syntax region lpcComment matchgroup=lpcCommentStart start="/\*" matchgroup=NONE end="\*/" contains=@lpcCommentGroup,lpcCommentStartError,lpcCommentString,lpcCharacter,lpcNumbersCom,lpcSpaceError +else + syn region lpcCommentL start="//" skip="\\$" end="$" keepend contains=@lpcCommentGroup,lpcSpaceError + syn region lpcComment matchgroup=lpcCommentStart start="/\*" matchgroup=NONE end="\*/" contains=@lpcCommentGroup,lpcCommentStartError,lpcSpaceError +endif +" keep a // comment separately, it terminates a preproc. conditional +syntax match lpcCommentError display "\*/" +syntax match lpcCommentStartError display "/\*"me=e-1 contained + +" Nodule: Pre-processor {{{1 + +syn region lpcPreCondit start="^\s*#\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=lpcComment,lpcCppString,lpcCharacter,lpcCppParen,lpcParenError,lpcNumbers,lpcCommentError,lpcSpaceError +syn match lpcPreCondit display "^\s*#\s*\(else\|endif\)\>" +if !exists("c_no_if0") + syn region lpcCppOut start="^\s*#\s*if\s\+0\+\>" end=".\|$" contains=lpcCppOut2 + syn region lpcCppOut2 contained start="0" end="^\s*#\s*\(endif\>\|else\>\|elif\>\)" contains=lpcSpaceError,lpcCppSkip + syn region lpcCppSkip contained start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*#\s*endif\>" contains=lpcSpaceError,lpcCppSkip +endif +syn region lpcIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match lpcIncluded display contained "<[^>]*>" +syn match lpcInclude display "^\s*#\s*include\>\s*["<]" contains=lpcIncluded +syn match lpcLineSkip "\\$" +syn cluster lpcPreProcGroup contains=lpcPreCondit,lpcIncluded,lpcInclude,lpcDefine,lpcErrInParen,lpcErrInBracket,lpcUserLabel,lpcSpecial,lpcOctalZero,lpcCppOut,lpcCppOut2,lpcCppSkip,lpcFormat,lpcNumber,lpcFloat,lpcOctal,lpcOctalError,lpcNumbersCom,lpcString,lpcCommentSkip,lpcCommentString,lpcComment2String,@lpcCommentGroup,lpcCommentStartError,lpcParen,lpcBracket,lpcMulti,lpcKeywdError +syn region lpcDefine start="^\s*#\s*\(define\|undef\)\>" skip="\\$" end="$" end="//"me=s-1 contains=ALLBUT,@lpcPreProcGroup + +if exists("lpc_pre_v22") + syn region lpcPreProc start="^\s*#\s*\(pragma\>\|echo\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@lpcPreProcGroup +else + syn region lpcPreProc start="^\s*#\s*\(pragma\>\|echo\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@lpcPreProcGroup +endif + +" Nodule: User labels {{{1 + +" Highlight Labels +" User labels in LPC is not allowed, only "case x" and "default" is supported +syn cluster lpcMultiGroup contains=lpcIncluded,lpcSpecial,lpcCommentSkip,lpcCommentString,lpcComment2String,@lpcCommentGroup,lpcCommentStartError,lpcUserCont,lpcUserLabel,lpcBitField,lpcOctalZero,lpcCppOut,lpcCppOut2,lpcCppSkip,lpcFormat,lpcNumber,lpcFloat,lpcOctal,lpcOctalError,lpcNumbersCom,lpcCppParen,lpcCppBracket,lpcCppString,lpcKeywdError +syn region lpcMulti transparent start='\(case\|default\|public\|protected\|private\)' skip='::' end=':' contains=ALLBUT,@lpcMultiGroup + +syn cluster lpcLabelGroup contains=lpcUserLabel +syn match lpcUserCont display "^\s*lpc:$" contains=@lpcLabelGroup + +" Don't want to match anything +syn match lpcUserLabel display "lpc" contained + +" Nodule: Initializations {{{1 + +if exists("c_minlines") + let b:c_minlines = c_minlines +else + if !exists("c_no_if0") + let b:c_minlines = 50 " #if 0 constructs can be long + else + let b:c_minlines = 15 " mostly for () constructs + endif +endif +exec "syn sync ccomment lpcComment minlines=" . b:c_minlines + +" Make sure these options take place since we no longer depend on file type +" plugin for C +setlocal cindent +setlocal fo-=t fo+=croql +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// +set cpo-=C + +" Win32 can filter files in the browse dialog +if has("gui_win32") && !exists("b:browsefilter") + let b:browsefilter = "LPC Source Files (*.c *.d *.h)\t*.c;*.d;*.h\n" . + \ "LPC Data Files (*.scr *.o *.dat)\t*.scr;*.o;*.dat\n" . + \ "Text Documentation (*.txt)\t*.txt\n" . + \ "All Files (*.*)\t*.*\n" +endif + +" Nodule: Highlight links {{{1 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_lpc_syn_inits") + if version < 508 + let did_lpc_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink lpcModifier lpcStorageClass + + HiLink lpcQuotedFmt lpcFormat + HiLink lpcFormat lpcSpecial + HiLink lpcCppString lpcString " Cpp means + " C Pre-Processor + HiLink lpcCommentL lpcComment + HiLink lpcCommentStart lpcComment + HiLink lpcUserLabel lpcLabel + HiLink lpcSpecialCharacter lpcSpecial + HiLink lpcOctal lpcPreProc + HiLink lpcOctalZero lpcSpecial " LPC will treat octal numbers + " as decimals, programmers should + " be aware of that. + HiLink lpcEfunError lpcError + HiLink lpcKeywdError lpcError + HiLink lpcOctalError lpcError + HiLink lpcParenError lpcError + HiLink lpcErrInParen lpcError + HiLink lpcErrInBracket lpcError + HiLink lpcCommentError lpcError + HiLink lpcCommentStartError lpcError + HiLink lpcSpaceError lpcError + HiLink lpcSpecialError lpcError + HiLink lpcErrFunc lpcError + + if exists("lpc_pre_v22") + HiLink lpcOldEfuns lpc_efuns + HiLink lpcNewEfuns lpcError + else + HiLink lpcOldEfuns lpcReserved + HiLink lpcNewEfuns lpc_efuns + endif + HiLink lpc_efuns lpcFunction + + HiLink lpcReserved lpcPreProc + HiLink lpcTextString lpcString " This should be preprocessors, but + HiLink lpcArrayString lpcPreProc " let's make some difference + " between text and array + + HiLink lpcIncluded lpcString + HiLink lpcCommentString lpcString + HiLink lpcComment2String lpcString + HiLink lpcCommentSkip lpcComment + HiLink lpcCommentFunc lpcComment + + HiLink lpcCppSkip lpcCppOut + HiLink lpcCppOut2 lpcCppOut + HiLink lpcCppOut lpcComment + + " Standard type below + HiLink lpcApplies Special + HiLink lpcCharacter Character + HiLink lpcComment Comment + HiLink lpcConditional Conditional + HiLink lpcConstant Constant + HiLink lpcDefine Macro + HiLink lpcError Error + HiLink lpcFloat Float + HiLink lpcFunction Function + HiLink lpcIdentifier Identifier + HiLink lpcInclude Include + HiLink lpcLabel Label + HiLink lpcNumber Number + HiLink lpcOperator Operator + HiLink lpcPreCondit PreCondit + HiLink lpcPreProc PreProc + HiLink lpcRepeat Repeat + HiLink lpcStatement Statement + HiLink lpcStorageClass StorageClass + HiLink lpcString String + HiLink lpcStructure Structure + HiLink lpcSpecial LineNr + HiLink lpcTodo Todo + HiLink lpcType Type + + delcommand HiLink +endif + +" Nodule: This is the end nodule. {{{1 + +let b:current_syntax = "lpc" + +" vim:ts=8:nosta:sw=2:ai:si: +" vim600:set fdm=marker: }}}1 diff --git a/runtime/syntax/lprolog.vim b/runtime/syntax/lprolog.vim new file mode 100644 index 000000000..2cc42f9ed --- /dev/null +++ b/runtime/syntax/lprolog.vim @@ -0,0 +1,137 @@ +" Vim syntax file +" Language: LambdaProlog (Teyjus) +" Filenames: *.mod *.sig +" Maintainer: Markus Mottl <markus@oefai.at> +" URL: http://www.ai.univie.ac.at/~markus/vim/syntax/lprolog.vim +" Last Change: 2003 May 11 +" 2001 Apr 26 - Upgraded for new Vim version +" 2000 Jun 5 - Initial release + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Lambda Prolog is case sensitive. +syn case match + +syn match lprologBrackErr "\]" +syn match lprologParenErr ")" + +syn cluster lprologContained contains=lprologTodo,lprologModuleName,lprologTypeNames,lprologTypeName + +" Enclosing delimiters +syn region lprologEncl transparent matchgroup=lprologKeyword start="(" matchgroup=lprologKeyword end=")" contains=ALLBUT,@lprologContained,lprologParenErr +syn region lprologEncl transparent matchgroup=lprologKeyword start="\[" matchgroup=lprologKeyword end="\]" contains=ALLBUT,@lprologContained,lprologBrackErr + +" General identifiers +syn match lprologIdentifier "\<\(\w\|[-+*/\\^<>=`'~?@#$&!_]\)*\>" +syn match lprologVariable "\<\(\u\|_\)\(\w\|[-+*/\\^<>=`'~?@#$&!]\)*\>" + +syn match lprologOperator "/" + +" Comments +syn region lprologComment start="/\*" end="\*/" contains=lprologComment,lprologTodo +syn region lprologComment start="%" end="$" contains=lprologTodo +syn keyword lprologTodo contained TODO FIXME XXX + +syn match lprologInteger "\<\d\+\>" +syn match lprologReal "\<\(\d\+\)\=\.\d+\>" +syn region lprologString start=+"+ skip=+\\\\\|\\"+ end=+"+ + +" Clause definitions +syn region lprologClause start="^\w\+" end=":-\|\." + +" Modules +syn region lprologModule matchgroup=lprologKeyword start="^\<module\>" matchgroup=lprologKeyword end="\." + +" Types +syn match lprologKeyword "^\<type\>" skipwhite nextgroup=lprologTypeNames +syn region lprologTypeNames matchgroup=lprologBraceErr start="\<\w\+\>" matchgroup=lprologKeyword end="\." contained contains=lprologTypeName,lprologOperator +syn match lprologTypeName "\<\w\+\>" contained + +" Keywords +syn keyword lprologKeyword end import accumulate accum_sig +syn keyword lprologKeyword local localkind closed sig +syn keyword lprologKeyword kind exportdef useonly +syn keyword lprologKeyword infixl infixr infix prefix +syn keyword lprologKeyword prefixr postfix postfixl + +syn keyword lprologSpecial pi sigma is true fail halt stop not + +" Operators +syn match lprologSpecial ":-" +syn match lprologSpecial "->" +syn match lprologSpecial "=>" +syn match lprologSpecial "\\" +syn match lprologSpecial "!" + +syn match lprologSpecial "," +syn match lprologSpecial ";" +syn match lprologSpecial "&" + +syn match lprologOperator "+" +syn match lprologOperator "-" +syn match lprologOperator "*" +syn match lprologOperator "\~" +syn match lprologOperator "\^" +syn match lprologOperator "<" +syn match lprologOperator ">" +syn match lprologOperator "=<" +syn match lprologOperator ">=" +syn match lprologOperator "::" +syn match lprologOperator "=" + +syn match lprologOperator "\." +syn match lprologOperator ":" +syn match lprologOperator "|" + +syn match lprologCommentErr "\*/" + +syn sync minlines=50 +syn sync maxlines=500 + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_lprolog_syntax_inits") + if version < 508 + let did_lprolog_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink lprologComment Comment + HiLink lprologTodo Todo + + HiLink lprologKeyword Keyword + HiLink lprologSpecial Special + HiLink lprologOperator Operator + HiLink lprologIdentifier Normal + + HiLink lprologInteger Number + HiLink lprologReal Number + HiLink lprologString String + + HiLink lprologCommentErr Error + HiLink lprologBrackErr Error + HiLink lprologParenErr Error + + HiLink lprologModuleName Special + HiLink lprologTypeName Identifier + + HiLink lprologVariable Keyword + HiLink lprologAtom Normal + HiLink lprologClause Type + + delcommand HiLink +endif + +let b:current_syntax = "lprolog" + +" vim: ts=8 diff --git a/runtime/syntax/lscript.vim b/runtime/syntax/lscript.vim new file mode 100644 index 000000000..648a0ebea --- /dev/null +++ b/runtime/syntax/lscript.vim @@ -0,0 +1,213 @@ +" Vim syntax file +" Language: LotusScript +" Maintainer: Taryn East (taryneast@hotmail.com) +" Last Change: 2003 May 11 + +" This is a rough amalgamation of the visual basic syntax file, and the UltraEdit +" and Textpad syntax highlighters. +" It's not too brilliant given that a) I've never written a syntax.vim file before +" and b) I'm not so crash hot at LotusScript either. If you see any problems +" feel free to email me with them. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" LotusScript is case insensitive +syn case ignore + +" These are Notes thingies that had an equivalent in the vb highlighter +" or I was already familiar with them +syn keyword lscriptStatement ActivateApp As And Base Beep Call Case ChDir ChDrive Class +syn keyword lscriptStatement Const Dim Declare DefCur DefDbl DefInt DefLng DefSng DefStr +syn keyword lscriptStatement DefVar Do Else %Else ElseIf %ElseIf End %End Erase Event Exit +syn keyword lscriptStatement Explicit FileCopy FALSE For ForAll Function Get GoTo GoSub +syn keyword lscriptStatement If %If In Is Kill Let List Lock Loop MkDir +syn keyword lscriptStatement Name Next New NoCase NoPitch Not Nothing NULL +syn keyword lscriptStatement On Option Or PI Pitch Preserve Private Public +syn keyword lscriptStatement Property Public Put +syn keyword lscriptStatement Randomize ReDim Reset Resume Return RmDir +syn keyword lscriptStatement Select SendKeys SetFileAttr Set Static Sub Then To TRUE +syn keyword lscriptStatement Type Unlock Until While WEnd With Write XOr + +syn keyword lscriptDatatype Array Currency Double Integer Long Single String String$ Variant + +syn keyword lscriptNotesType Field Button Navigator +syn keyword lscriptNotesType NotesACL NotesACLEntry NotesAgent NotesDatabase NotesDateRange +syn keyword lscriptNotesType NotesDateTime NotesDbDirectory NotesDocument +syn keyword lscriptNotesType NotesDocumentCollection NotesEmbeddedObject NotesForm +syn keyword lscriptNotesType NotesInternational NotesItem NotesLog NotesName NotesNewsLetter +syn keyword lscriptNotesType NotesMIMEEntry NotesOutline NotesOutlineEntry NotesRegistration +syn keyword lscriptNotesType NotesReplication NotesRichTextItem NotesRichTextParagraphStyle +syn keyword lscriptNotesType NotesRichTextStyle NotesRichTextTab +syn keyword lscriptNotesType NotesSession NotesTimer NotesView NotesViewColumn NotesViewEntry +syn keyword lscriptNotesType NotesViewEntryCollection NotesViewNavigator NotesUIDatabase +syn keyword lscriptNotesType NotesUIDocument NotesUIView NotesUIWorkspace + +syn keyword lscriptNotesConst ACLLEVEL_AUTHOR ACLLEVEL_DEPOSITOR ACLLEVEL_DESIGNER +syn keyword lscriptNotesConst ACLLEVEL_EDITOR ACLLEVEL_MANAGER ACLLEVEL_NOACCESS +syn keyword lscriptNotesConst ACLLEVEL_READER ACLTYPE_MIXED_GROUP ACLTYPE_PERSON +syn keyword lscriptNotesConst ACLTYPE_PERSON_GROUP ACLTYPE_SERVER ACLTYPE_SERVER_GROUP +syn keyword lscriptNotesConst ACLTYPE_UNSPECIFIED ACTIONCD ALIGN_CENTER +syn keyword lscriptNotesConst ALIGN_FULL ALIGN_LEFT ALIGN_NOWRAP ALIGN_RIGHT +syn keyword lscriptNotesConst ASSISTANTINFO ATTACHMENT AUTHORS COLOR_BLACK +syn keyword lscriptNotesConst COLOR_BLUE COLOR_CYAN COLOR_DARK_BLUE COLOR_DARK_CYAN +syn keyword lscriptNotesConst COLOR_DARK_GREEN COLOR_DARK_MAGENTA COLOR_DARK_RED +syn keyword lscriptNotesConst COLOR_DARK_YELLOW COLOR_GRAY COLOR_GREEN COLOR_LIGHT_GRAY +syn keyword lscriptNotesConst COLOR_MAGENTA COLOR_RED COLOR_WHITE COLOR_YELLOW +syn keyword lscriptNotesConst DATABASE DATETIMES DB_REPLICATION_PRIORITY_HIGH +syn keyword lscriptNotesConst DB_REPLICATION_PRIORITY_LOW DB_REPLICATION_PRIORITY_MED +syn keyword lscriptNotesConst DB_REPLICATION_PRIORITY_NOTSET EFFECTS_EMBOSS +syn keyword lscriptNotesConst EFFECTS_EXTRUDE EFFECTS_NONE EFFECTS_SHADOW +syn keyword lscriptNotesConst EFFECTS_SUBSCRIPT EFFECTS_SUPERSCRIPT EMBED_ATTACHMENT +syn keyword lscriptNotesConst EMBED_OBJECT EMBED_OBJECTLINK EMBEDDEDOBJECT ERRORITEM +syn keyword lscriptNotesConst EV_ALARM EV_COMM EV_MAIL EV_MISC EV_REPLICA EV_RESOURCE +syn keyword lscriptNotesConst EV_SECURITY EV_SERVER EV_UNKNOWN EV_UPDATE FONT_COURIER +syn keyword lscriptNotesConst FONT_HELV FONT_ROMAN FORMULA FT_DATABASE FT_DATE_ASC +syn keyword lscriptNotesConst FT_DATE_DES FT_FILESYSTEM FT_FUZZY FT_SCORES FT_STEMS +syn keyword lscriptNotesConst FT_THESAURUS HTML ICON ID_CERTIFIER ID_FLAT +syn keyword lscriptNotesConst ID_HIERARCHICAL LSOBJECT MIME_PART NAMES NOTESLINKS +syn keyword lscriptNotesConst NOTEREFS NOTES_DESKTOP_CLIENT NOTES_FULL_CLIENT +syn keyword lscriptNotesConst NOTES_LIMITED_CLIENT NUMBERS OTHEROBJECT +syn keyword lscriptNotesConst OUTLINE_CLASS_DATABASE OUTLINE_CLASS_DOCUMENT +syn keyword lscriptNotesConst OUTLINE_CLASS_FOLDER OUTLINE_CLASS_FORM +syn keyword lscriptNotesConst OUTLINE_CLASS_FRAMESET OUTLINE_CLASS_NAVIGATOR +syn keyword lscriptNotesConst OUTLINE_CLASS_PAGE OUTLINE_CLASS_UNKNOWN +syn keyword lscriptNotesConst OUTLINE_CLASS_VIEW OUTLINE_OTHER_FOLDERS_TYPE +syn keyword lscriptNotesConst OUTLINE_OTHER_UNKNOWN_TYPE OUTLINE_OTHER_VIEWS_TYPE +syn keyword lscriptNotesConst OUTLINE_TYPE_ACTION OUTLINE_TYPE_NAMEDELEMENT +syn keyword lscriptNotesConst OUTLINE_TYPE_NOTELINK OUTLINE_TYPE_URL PAGINATE_BEFORE +syn keyword lscriptNotesConst PAGINATE_DEFAULT PAGINATE_KEEP_TOGETHER +syn keyword lscriptNotesConst PAGINATE_KEEP_WITH_NEXT PICKLIST_CUSTOM PICKLIST_NAMES +syn keyword lscriptNotesConst PICKLIST_RESOURCES PICKLIST_ROOMS PROMPT_OK PROMPT_OKCANCELCOMBO +syn keyword lscriptNotesConst PROMPT_OKCANCELEDIT PROMPT_OKCANCELEDITCOMBO PROMPT_OKCANCELLIST +syn keyword lscriptNotesConst PROMPT_OKCANCELLISTMULT PROMPT_PASSWORD PROMPT_YESNO +syn keyword lscriptNotesConst PROMPT_YESNOCANCEL QUERYCD READERS REPLICA_CANDIDATE +syn keyword lscriptNotesConst RICHTEXT RULER_ONE_CENTIMETER RULER_ONE_INCH SEV_FAILURE +syn keyword lscriptNotesConst SEV_FATAL SEV_NORMAL SEV_WARNING1 SEV_WARNING2 +syn keyword lscriptNotesConst SIGNATURE SPACING_DOUBLE SPACING_ONE_POINT_50 +syn keyword lscriptNotesConst SPACING_SINGLE STYLE_NO_CHANGE TAB_CENTER TAB_DECIMAL +syn keyword lscriptNotesConst TAB_LEFT TAB_RIGHT TARGET_ALL_DOCS TARGET_ALL_DOCS_IN_VIEW +syn keyword lscriptNotesConst TARGET_NEW_DOCS TARGET_NEW_OR_MODIFIED_DOCS TARGET_NONE +syn keyword lscriptNotesConst TARGET_RUN_ONCE TARGET_SELECTED_DOCS TARGET_UNREAD_DOCS_IN_VIEW +syn keyword lscriptNotesConst TEMPLATE TEMPLATE_CANDIDATE TEXT TRIGGER_AFTER_MAIL_DELIVERY +syn keyword lscriptNotesConst TRIGGER_BEFORE_MAIL_DELIVERY TRIGGER_DOC_PASTED +syn keyword lscriptNotesConst TRIGGER_DOC_UPDATE TRIGGER_MANUAL TRIGGER_NONE +syn keyword lscriptNotesConst TRIGGER_SCHEDULED UNAVAILABLE UNKNOWN USERDATA +syn keyword lscriptNotesConst USERID VC_ALIGN_CENTER VC_ALIGN_LEFT VC_ALIGN_RIGHT +syn keyword lscriptNotesConst VC_ATTR_PARENS VC_ATTR_PUNCTUATED VC_ATTR_PERCENT +syn keyword lscriptNotesConst VC_FMT_ALWAYS VC_FMT_CURRENCY VC_FMT_DATE VC_FMT_DATETIME +syn keyword lscriptNotesConst VC_FMT_FIXED VC_FMT_GENERAL VC_FMT_HM VC_FMT_HMS +syn keyword lscriptNotesConst VC_FMT_MD VC_FMT_NEVER VC_FMT_SCIENTIFIC +syn keyword lscriptNotesConst VC_FMT_SOMETIMES VC_FMT_TIME VC_FMT_TODAYTIME VC_FMT_YM +syn keyword lscriptNotesConst VC_FMT_YMD VC_FMT_Y4M VC_FONT_BOLD VC_FONT_ITALIC +syn keyword lscriptNotesConst VC_FONT_STRIKEOUT VC_FONT_UNDERLINE VC_SEP_COMMA +syn keyword lscriptNotesConst VC_SEP_NEWLINE VC_SEP_SEMICOLON VC_SEP_SPACE +syn keyword lscriptNotesConst VIEWMAPDATA VIEWMAPLAYOUT VW_SPACING_DOUBLE +syn keyword lscriptNotesConst VW_SPACING_ONE_POINT_25 VW_SPACING_ONE_POINT_50 +syn keyword lscriptNotesConst VW_SPACING_ONE_POINT_75 VW_SPACING_SINGLE + +syn keyword lscriptFunction Abs Asc Atn Atn2 ACos ASin +syn keyword lscriptFunction CCur CDat CDbl Chr Chr$ CInt CLng Command Command$ +syn keyword lscriptFunction Cos CSng CStr +syn keyword lscriptFunction CurDir CurDir$ CVar Date Date$ DateNumber DateSerial DateValue +syn keyword lscriptFunction Day Dir Dir$ Environ$ Environ EOF Error Error$ Evaluate Exp +syn keyword lscriptFunction FileAttr FileDateTime FileLen Fix Format Format$ FreeFile +syn keyword lscriptFunction GetFileAttr GetThreadInfo Hex Hex$ Hour +syn keyword lscriptFunction IMESetMode IMEStatus Input Input$ InputB InputB$ +syn keyword lscriptFunction InputBP InputBP$ InputBox InputBox$ InStr InStrB InStrBP InstrC +syn keyword lscriptFunction IsA IsArray IsDate IsElement IsList IsNumeric +syn keyword lscriptFunction IsObject IsResponse IsScalar IsUnknown LCase LCase$ +syn keyword lscriptFunction Left Left$ LeftB LeftB$ LeftC +syn keyword lscriptFunction LeftBP LeftBP$ Len LenB LenBP LenC Loc LOF Log +syn keyword lscriptFunction LSet LTrim LTrim$ MessageBox Mid Mid$ MidB MidB$ MidC +syn keyword lscriptFunction Minute Month Now Oct Oct$ Responses Right Right$ +syn keyword lscriptFunction RightB RightB$ RightBP RightBP$ RightC Round Rnd RSet RTrim RTrim$ +syn keyword lscriptFunction Second Seek Sgn Shell Sin Sleep Space Space$ Spc Sqr Str Str$ +syn keyword lscriptFunction StrConv StrLeft StrleftBack StrRight StrRightBack +syn keyword lscriptFunction StrCompare Tab Tan Time Time$ TimeNumber Timer +syn keyword lscriptFunction TimeValue Trim Trim$ Today TypeName UCase UCase$ +syn keyword lscriptFunction UniversalID Val Weekday Year + +syn keyword lscriptMethods AppendToTextList ArrayAppend ArrayReplace ArrayGetIndex +syn keyword lscriptMethods Append Bind Close +"syn keyword lscriptMethods Contains +syn keyword lscriptMethods CopyToDatabase CopyAllItems Count CurrentDatabase Delete Execute +syn keyword lscriptMethods GetAllDocumentsByKey GetDatabase GetDocumentByKey +syn keyword lscriptMethods GetDocumentByUNID GetFirstDocument GetFirstItem +syn keyword lscriptMethods GetItems GetItemValue GetNthDocument GetView +syn keyword lscriptMethods IsEmpty IsNull %Include Items +syn keyword lscriptMethods Line LBound LoadMsgText Open Print +syn keyword lscriptMethods RaiseEvent ReplaceItemValue Remove RemoveItem Responses +syn keyword lscriptMethods Save Stop UBound UnprocessedDocuments Write + +syn keyword lscriptEvents Compare OnError + +"************************************************************************************* +"These are Notes thingies that I'm not sure how to classify as they had no vb equivalent +" At a wild guess I'd put them as Functions... +" if anyone sees something really out of place... tell me! + +syn keyword lscriptFunction Access Alias Any Bin Bin$ Binary ByVal +syn keyword lscriptFunction CodeLock CodeLockCheck CodeUnlock CreateLock +syn keyword lscriptFunction CurDrive CurDrive$ DataType DestroyLock Eqv +syn keyword lscriptFunction Erl Err Fraction From FromFunction FullTrim +syn keyword lscriptFunction Imp Int Lib Like ListTag LMBCS LSServer Me +syn keyword lscriptFunction Mod MsgDescription MsgText Output Published +syn keyword lscriptFunction Random Read Shared Step UChr UChr$ Uni Unicode +syn keyword lscriptFunction Until Use UseLSX UString UString$ Width Yield + + +syn keyword lscriptTodo contained TODO + +"integer number, or floating point number without a dot. +syn match lscriptNumber "\<\d\+\>" +"floating point number, with dot +syn match lscriptNumber "\<\d\+\.\d*\>" +"floating point number, starting with a dot +syn match lscriptNumber "\.\d\+\>" + +" String and Character constants +syn region lscriptString start=+"+ end=+"+ +syn region lscriptComment start="REM" end="$" contains=lscriptTodo +syn region lscriptComment start="'" end="$" contains=lscriptTodo +syn region lscriptLineNumber start="^\d" end="\s" +syn match lscriptTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_lscript_syntax_inits") + if version < 508 + let did_lscript_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + hi lscriptNotesType term=underline ctermfg=DarkGreen guifg=SeaGreen gui=bold + + HiLink lscriptNotesConst lscriptNotesType + HiLink lscriptLineNumber Comment + HiLink lscriptDatatype Type + HiLink lscriptNumber Number + HiLink lscriptError Error + HiLink lscriptStatement Statement + HiLink lscriptString String + HiLink lscriptComment Comment + HiLink lscriptTodo Todo + HiLink lscriptFunction Identifier + HiLink lscriptMethods PreProc + HiLink lscriptEvents Special + HiLink lscriptTypeSpecifier Type + + delcommand HiLink +endif + +let b:current_syntax = "lscript" + +" vim: ts=8 diff --git a/runtime/syntax/lss.vim b/runtime/syntax/lss.vim new file mode 100644 index 000000000..fe20701d1 --- /dev/null +++ b/runtime/syntax/lss.vim @@ -0,0 +1,133 @@ +" Vim syntax file +" Language: Lynx 2.7.1 style file +" Maintainer: Scott Bigham <dsb@cs.duke.edu> +" Last Change: 2001 May 09 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" This setup is probably atypical for a syntax highlighting file, because +" most of it is not really intended to be overrideable. 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 +" are comments, of course, and the initial keyword identifying the affected +" element, which will inherit the usual Identifier highlighting. + +syn match lssElement "^[^:]\+" nextgroup=lssMono + +syn match lssMono ":[^:]\+" contained nextgroup=lssFgColor contains=lssReverse,lssUnderline,lssBold,lssStandout + +syn keyword lssBold bold contained +syn keyword lssReverse reverse contained +syn keyword lssUnderline underline contained +syn keyword lssStandout standout contained + +syn match lssFgColor ":[^:]\+" contained nextgroup=lssBgColor contains=lssRedFg,lssBlueFg,lssGreenFg,lssBrownFg,lssMagentaFg,lssCyanFg,lssLightgrayFg,lssGrayFg,lssBrightredFg,lssBrightgreenFg,lssYellowFg,lssBrightblueFg,lssBrightmagentaFg,lssBrightcyanFg + +syn case ignore +syn keyword lssRedFg red contained +syn keyword lssBlueFg blue contained +syn keyword lssGreenFg green contained +syn keyword lssBrownFg brown contained +syn keyword lssMagentaFg magenta contained +syn keyword lssCyanFg cyan contained +syn keyword lssLightgrayFg lightgray contained +syn keyword lssGrayFg gray contained +syn keyword lssBrightredFg brightred contained +syn keyword lssBrightgreenFg brightgreen contained +syn keyword lssYellowFg yellow contained +syn keyword lssBrightblueFg brightblue contained +syn keyword lssBrightmagentaFg brightmagenta contained +syn keyword lssBrightcyanFg brightcyan contained +syn case match + +syn match lssBgColor ":[^:]\+" contained contains=lssRedBg,lssBlueBg,lssGreenBg,lssBrownBg,lssMagentaBg,lssCyanBg,lssLightgrayBg,lssGrayBg,lssBrightredBg,lssBrightgreenBg,lssYellowBg,lssBrightblueBg,lssBrightmagentaBg,lssBrightcyanBg,lssWhiteBg + +syn case ignore +syn keyword lssRedBg red contained +syn keyword lssBlueBg blue contained +syn keyword lssGreenBg green contained +syn keyword lssBrownBg brown contained +syn keyword lssMagentaBg magenta contained +syn keyword lssCyanBg cyan contained +syn keyword lssLightgrayBg lightgray contained +syn keyword lssGrayBg gray contained +syn keyword lssBrightredBg brightred contained +syn keyword lssBrightgreenBg brightgreen contained +syn keyword lssYellowBg yellow contained +syn keyword lssBrightblueBg brightblue contained +syn keyword lssBrightmagentaBg brightmagenta contained +syn keyword lssBrightcyanBg brightcyan contained +syn keyword lssWhiteBg white contained +syn case match + +syn match lssComment "#.*$" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_lss_syntax_inits") + if version < 508 + let did_lss_syntax_inits = 1 + endif + + hi def link lssComment Comment + hi def link lssElement Identifier + + hi def lssBold term=bold cterm=bold + hi def lssReverse term=reverse cterm=reverse + hi def lssUnderline term=underline cterm=underline + hi def lssStandout term=standout cterm=standout + + hi def lssRedFg ctermfg=red + hi def lssBlueFg ctermfg=blue + hi def lssGreenFg ctermfg=green + hi def lssBrownFg ctermfg=brown + hi def lssMagentaFg ctermfg=magenta + hi def lssCyanFg ctermfg=cyan + hi def lssGrayFg ctermfg=gray + if $COLORTERM == "rxvt" + " On rxvt's, bright colors are activated by setting the bold attribute. + hi def lssLightgrayFg ctermfg=gray cterm=bold + hi def lssBrightredFg ctermfg=red cterm=bold + hi def lssBrightgreenFg ctermfg=green cterm=bold + hi def lssYellowFg ctermfg=yellow cterm=bold + hi def lssBrightblueFg ctermfg=blue cterm=bold + hi def lssBrightmagentaFg ctermfg=magenta cterm=bold + hi def lssBrightcyanFg ctermfg=cyan cterm=bold + else + hi def lssLightgrayFg ctermfg=lightgray + hi def lssBrightredFg ctermfg=lightred + hi def lssBrightgreenFg ctermfg=lightgreen + hi def lssYellowFg ctermfg=yellow + hi def lssBrightblueFg ctermfg=lightblue + hi def lssBrightmagentaFg ctermfg=lightmagenta + hi def lssBrightcyanFg ctermfg=lightcyan + endif + + hi def lssRedBg ctermbg=red + hi def lssBlueBg ctermbg=blue + hi def lssGreenBg ctermbg=green + hi def lssBrownBg ctermbg=brown + hi def lssMagentaBg ctermbg=magenta + hi def lssCyanBg ctermbg=cyan + hi def lssLightgrayBg ctermbg=lightgray + hi def lssGrayBg ctermbg=gray + hi def lssBrightredBg ctermbg=lightred + hi def lssBrightgreenBg ctermbg=lightgreen + hi def lssYellowBg ctermbg=yellow + hi def lssBrightblueBg ctermbg=lightblue + hi def lssBrightmagentaBg ctermbg=lightmagenta + hi def lssBrightcyanBg ctermbg=lightcyan + hi def lssWhiteBg ctermbg=white ctermfg=black +endif + +let b:current_syntax = "lss" + +" vim: ts=8 diff --git a/runtime/syntax/lua.vim b/runtime/syntax/lua.vim new file mode 100644 index 000000000..0bcda6202 --- /dev/null +++ b/runtime/syntax/lua.vim @@ -0,0 +1,256 @@ +" Vim syntax file +" Language: Lua 4.0 and Lua 5.0 +" Maintainer: Marcus Aurelius Farias <marcuscf@vant.com.br> +" First Author: Carlos Augusto Teixeira Mendes <cmendes@inf.puc-rio.br> +" Last Change: 2003 May 04 +" Options: lua_version = 4 or 5 [default] +" +" Still has some syncing problems (long [[strings]])... + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("lua_version") + let lua_version = 5 +endif + +syn case match + +" Comments +syn keyword luaTodo contained TODO FIXME XXX +syn match luaComment "--.*$" contains=luaTodo +if lua_version > 4 + syn region luaComment matchgroup=luaComment start="--\[\[" end="\]\]" contains=luaTodo,luaInnerComment + syn region luaInnerComment contained transparent start="\[\[" end="\]\]" +endif +" First line may start with #! +syn match luaComment "\%^#!.*" + +" catch errors caused by wrong parenthesis and wrong curly brackets or +" keywords placed outside their respective blocks + +syn region luaParen transparent start='(' end=')' contains=ALLBUT,luaError,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaCondStart,luaBlock,luaRepeatBlock,luaRepeat,luaStatement +syn match luaError ")" +syn match luaError "}" +syn match luaError "\<\(end\|else\|elseif\|then\|until\|in\)\>" + + +" Function declaration +syn region luaFunctionBlock transparent matchgroup=luaFunction start="\<function\>" end="\<end\>" contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaRepeat + +" if then else elseif end +syn keyword luaCond contained else + +" then ... end +syn region luaCondEnd contained transparent matchgroup=luaCond start="\<then\>" end="\<end\>" contains=ALLBUT,luaTodo,luaSpecial,luaRepeat + +" elseif ... then +syn region luaCondElseif contained transparent matchgroup=luaCond start="\<elseif\>" end="\<then\>" contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaRepeat + +" if ... then +syn region luaCondStart transparent matchgroup=luaCond start="\<if\>" end="\<then\>"me=e-4 contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaRepeat nextgroup=luaCondEnd skipwhite skipempty + +" do ... end +syn region luaBlock transparent matchgroup=luaStatement start="\<do\>" end="\<end\>" contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaRepeat + +" repeat ... until +syn region luaRepeatBlock transparent matchgroup=luaRepeat start="\<repeat\>" end="\<until\>" contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaRepeat + +" while ... do +syn region luaRepeatBlock transparent matchgroup=luaRepeat start="\<while\>" end="\<do\>"me=e-2 contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaRepeat nextgroup=luaBlock skipwhite skipempty + +" for ... do and for ... in ... do +syn region luaRepeatBlock transparent matchgroup=luaRepeat start="\<for\>" end="\<do\>"me=e-2 contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd nextgroup=luaBlock skipwhite skipempty + +" Following 'else' example. This is another item to those +" contains=ALLBUT,... because only the 'for' luaRepeatBlock contains it. +syn keyword luaRepeat contained in + +" other keywords +syn keyword luaStatement return local break +syn keyword luaOperator and or not +syn keyword luaConstant nil +if lua_version > 4 + syn keyword luaConstant true false +endif + +" Pre processor doesn't exist since Lua 4.0 +" syn match luaPreProc "^\s*$\(debug\|nodebug\|if\|ifnot\|end\|else\|endinput\)\>" + +" Strings +syn match luaSpecial contained "\\[\\abfnrtv\'\"[\]]\|\\\d\{,3}" +syn region luaString start=+'+ end=+'+ skip=+\\\\\|\\'+ contains=luaSpecial +syn region luaString start=+"+ end=+"+ skip=+\\\\\|\\"+ contains=luaSpecial +" Nested strings +syn region luaString2 matchgroup=luaString start=+\[\[+ end=+\]\]+ contains=luaString2 + +" integer number +syn match luaNumber "\<[0-9]\+\>" +" floating point number, with dot, optional exponent +syn match luaFloat "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=\>" +" floating point number, starting with a dot, optional exponent +syn match luaFloat "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\>" +" floating point number, without dot, with exponent +syn match luaFloat "\<[0-9]\+e[-+]\=[0-9]\+\>" + +" tables +syn region luaTableBlock transparent matchgroup=luaTable start="{" end="}" contains=ALLBUT,luaTodo,luaSpecial,luaCond,luaCondElseif,luaCondEnd,luaCondStart,luaBlock,luaRepeatBlock,luaRepeat,luaStatement + +syn keyword luaFunc assert collectgarbage dofile error gcinfo next +syn keyword luaFunc print rawget rawset tonumber tostring type _VERSION + +if lua_version == 4 + syn keyword luaFunc _ALERT _ERRORMESSAGE + syn keyword luaFunc call copytagmethods dostring + syn keyword luaFunc foreach foreachi getglobal getn + syn keyword luaFunc gettagmethod globals newtag + syn keyword luaFunc setglobal settag settagmethod sort + syn keyword luaFunc tag tinsert tremove + syn keyword luaFunc _INPUT _OUTPUT _STDIN _STDOUT _STDERR + syn keyword luaFunc openfile closefile flush seek + syn keyword luaFunc setlocale execute remove rename tmpname + syn keyword luaFunc getenv date clock exit + syn keyword luaFunc readfrom writeto appendto read write + syn keyword luaFunc PI abs sin cos tan asin + syn keyword luaFunc acos atan atan2 ceil floor + syn keyword luaFunc mod frexp ldexp sqrt min max log + syn keyword luaFunc log10 exp deg rad random + syn keyword luaFunc randomseed strlen strsub strlower strupper + syn keyword luaFunc strchar strrep ascii strbyte + syn keyword luaFunc format strfind gsub + syn keyword luaFunc getinfo getlocal setlocal setcallhook setlinehook +else + syn keyword luaFunc _G getfenv getmetatable ipairs loadfile + syn keyword luaFunc loadlib loadstring pairs pcall rawequal + syn keyword luaFunc require setfenv setmetatable unpack xpcall + syn keyword luaFunc LUA_PATH _LOADED _REQUIREDNAME +" Not sure if all these functions need to be highlighted... + syn match luaFunc /coroutine\.create/ + syn match luaFunc /coroutine\.resume/ + syn match luaFunc /coroutine\.status/ + syn match luaFunc /coroutine\.wrap/ + syn match luaFunc /coroutine\.yield/ + syn match luaFunc /string\.byte/ + syn match luaFunc /string\.char/ + syn match luaFunc /string\.dump/ + syn match luaFunc /string\.find/ + syn match luaFunc /string\.len/ + syn match luaFunc /string\.lower/ + syn match luaFunc /string\.rep/ + syn match luaFunc /string\.sub/ + syn match luaFunc /string\.upper/ + syn match luaFunc /string\.format/ + syn match luaFunc /string\.gfind/ + syn match luaFunc /string\.gsub/ + syn match luaFunc /table\.concat/ + syn match luaFunc /table\.foreach/ + syn match luaFunc /table\.foreachi/ + syn match luaFunc /table\.getn/ + syn match luaFunc /table\.sort/ + syn match luaFunc /table\.insert/ + syn match luaFunc /table\.remove/ + syn match luaFunc /table\.setn/ + syn match luaFunc /math\.abs/ + syn match luaFunc /math\.acos/ + syn match luaFunc /math\.asin/ + syn match luaFunc /math\.atan/ + syn match luaFunc /math\.atan2/ + syn match luaFunc /math\.ceil/ + syn match luaFunc /math\.cos/ + syn match luaFunc /math\.deg/ + syn match luaFunc /math\.exp/ + syn match luaFunc /math\.floor/ + syn match luaFunc /math\.log/ + syn match luaFunc /math\.log10/ + syn match luaFunc /math\.max/ + syn match luaFunc /math\.min/ + syn match luaFunc /math\.mod/ + syn match luaFunc /math\.pow/ + syn match luaFunc /math\.rad/ + syn match luaFunc /math\.sin/ + syn match luaFunc /math\.sqrt/ + syn match luaFunc /math\.tan/ + syn match luaFunc /math\.frexp/ + syn match luaFunc /math\.ldexp/ + syn match luaFunc /math\.random/ + syn match luaFunc /math\.randomseed/ + syn match luaFunc /math\.pi/ + syn match luaFunc /io\.stdin/ + syn match luaFunc /io\.stdout/ + syn match luaFunc /io\.stderr/ + syn match luaFunc /io\.close/ + syn match luaFunc /io\.flush/ + syn match luaFunc /io\.input/ + syn match luaFunc /io\.lines/ + syn match luaFunc /io\.open/ + syn match luaFunc /io\.output/ + syn match luaFunc /io\.popen/ + syn match luaFunc /io\.read/ + syn match luaFunc /io\.tmpfile/ + syn match luaFunc /io\.type/ + syn match luaFunc /io\.write/ + syn match luaFunc /os\.clock/ + syn match luaFunc /os\.date/ + syn match luaFunc /os\.difftime/ + syn match luaFunc /os\.execute/ + syn match luaFunc /os\.exit/ + syn match luaFunc /os\.getenv/ + syn match luaFunc /os\.remove/ + syn match luaFunc /os\.rename/ + syn match luaFunc /os\.setlocale/ + syn match luaFunc /os\.time/ + syn match luaFunc /os\.tmpname/ + syn match luaFunc /debug\.debug/ + syn match luaFunc /debug\.gethook/ + syn match luaFunc /debug\.getinfo/ + syn match luaFunc /debug\.getlocal/ + syn match luaFunc /debug\.getupvalue/ + syn match luaFunc /debug\.setlocal/ + syn match luaFunc /debug\.setupvalue/ + syn match luaFunc /debug\.sethook/ + syn match luaFunc /debug\.traceback/ +endif + +"syncing method +syn sync minlines=100 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_lua_syntax_inits") + if version < 508 + let did_lua_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink luaStatement Statement + HiLink luaRepeat Repeat + HiLink luaString String + HiLink luaString2 String + HiLink luaNumber Number + HiLink luaFloat Float + HiLink luaOperator Operator + HiLink luaConstant Constant + HiLink luaCond Conditional + HiLink luaFunction Function + HiLink luaComment Comment + HiLink luaTodo Todo + HiLink luaTable Structure + HiLink luaError Error + HiLink luaSpecial SpecialChar + " HiLink luaPreProc PreProc + HiLink luaFunc Identifier + + delcommand HiLink +endif + +let b:current_syntax = "lua" + +" vim: noet ts=8 diff --git a/runtime/syntax/lynx.vim b/runtime/syntax/lynx.vim new file mode 100644 index 000000000..1dee1ef79 --- /dev/null +++ b/runtime/syntax/lynx.vim @@ -0,0 +1,98 @@ +" Lynx syntax file +" Filename: lynx.vim +" Language: Lynx configuration file ( lynx.cfg ) +" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au> +" URL: http://mugca.its.monash.edu.au/~djkea2/vim/syntax/lynx.vim +" Last Change: 2003 May 11 + +" TODO: more intelligent and complete argument highlighting + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match lynxLeadingWS "^\s*" transparent nextgroup=lynxOption + +syn match lynxComment "\(^\|\s\+\)#.*$" contains=lynxTodo + +syn keyword lynxTodo TODO NOTE FIXME XXX contained + +syn match lynxDelimiter ":" contained nextgroup=lynxBoolean,lynxNumber + +syn case ignore +syn keyword lynxBoolean TRUE FALSE contained +syn case match + +syn match lynxNumber "-\=\<\d\+\>" contained + +syn case ignore +syn keyword lynxOption ACCEPT_ALL_COOKIES ALERTSECS ALWAYS_RESUBMIT_POSTS ALWAYS_TRUSTED_EXEC ASSUME_CHARSET ASSUMED_COLOR contained nextgroup=lynxDelimiter +syn keyword lynxOption ASSUMED_DOC_CHARSET_CHOICE ASSUME_LOCAL_CHARSET ASSUME_UNREC_CHARSET AUTO_UNCACHE_DIRLISTS contained nextgroup=lynxDelimiter +syn keyword lynxOption BIBP_BIBHOST BIBP_GLOBAL_SERVER BLOCK_MULTI_BOOKMARKS BOLD_H1 BOLD_HEADERS BOLD_NAME_ANCHORS contained nextgroup=lynxDelimiter +syn keyword lynxOption CASE_SENSITIVE_ALWAYS_ON CHARACTER_SET CHARSETS_DIRECTORY CHARSET_SWITCH_RULES CHECKMAIL contained nextgroup=lynxDelimiter +syn keyword lynxOption COLLAPSE_BR_TAGS COLOR CONNECT_TIMEOUT COOKIE_ACCEPT_DOMAINS COOKIE_FILE contained nextgroup=lynxDelimiter +syn keyword lynxOption COOKIE_LOOSE_INVALID_DOMAINS COOKIE_QUERY_INVALID_DOMAINS COOKIE_REJECT_DOMAINS COOKIE_SAVE_FILE contained nextgroup=lynxDelimiter +syn keyword lynxOption COOKIE_STRICT_INVALID_DOMAINS CSO_PROXY CSWING_PATH DEFAULT_BOOKMARK_FILE DEFAULT_CACHE_SIZE contained nextgroup=lynxDelimiter +syn keyword lynxOption DEFAULT_EDITOR DEFAULT_INDEX_FILE DEFAULT_KEYPAD_MODE DEFAULT_KEYPAD_MODE_IS_NUMBERS_AS_ARROWS contained nextgroup=lynxDelimiter +syn keyword lynxOption DEFAULT_USER_MODE DEFAULT_VIRTUAL_MEMORY_SIZE DIRED_MENU DISPLAY_CHARSET_CHOICE DOWNLOADER contained nextgroup=lynxDelimiter +syn keyword lynxOption EMACS_KEYS_ALWAYS_ON ENABLE_LYNXRC ENABLE_SCROLLBACK EXTERNAL FINGER_PROXY FOCUS_WINDOW contained nextgroup=lynxDelimiter +syn keyword lynxOption FORCE_8BIT_TOUPPER FORCE_EMPTY_HREFLESS_A FORCE_SSL_COOKIES_SECURE FORMS_OPTIONS FTP_PASSIVE contained nextgroup=lynxDelimiter +syn keyword lynxOption FTP_PROXY GLOBAL_EXTENSION_MAP GLOBAL_MAILCAP GOPHER_PROXY GOTOBUFFER HELPFILE HIDDEN_LINK_MARKER contained nextgroup=lynxDelimiter +syn keyword lynxOption HISTORICAL_COMMENTS HTMLSRC_ATTRNAME_XFORM HTMLSRC_TAGNAME_XFORM HTTP_PROXY HTTPS_PROXY INCLUDE contained nextgroup=lynxDelimiter +syn keyword lynxOption INFOSECS JUMPBUFFER JUMPFILE JUMP_PROMPT JUSTIFY JUSTIFY_MAX_VOID_PERCENT KEYBOARD_LAYOUT KEYMAP contained nextgroup=lynxDelimiter +syn keyword lynxOption LEFTARROW_IN_TEXTFIELD_PROMPT LIST_FORMAT LIST_NEWS_DATES LIST_NEWS_NUMBERS LOCAL_DOMAIN contained nextgroup=lynxDelimiter +syn keyword lynxOption LOCAL_EXECUTION_LINKS_ALWAYS_ON LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE LOCALHOST_ALIAS contained nextgroup=lynxDelimiter +syn keyword lynxOption LYNXCGI_DOCUMENT_ROOT LYNXCGI_ENVIRONMENT LYNX_HOST_NAME LYNX_SIG_FILE MAIL_ADRS contained nextgroup=lynxDelimiter +syn keyword lynxOption MAIL_SYSTEM_ERROR_LOGGING MAKE_LINKS_FOR_ALL_IMAGES MAKE_PSEUDO_ALTS_FOR_INLINES MESSAGESECS contained nextgroup=lynxDelimiter +syn keyword lynxOption MINIMAL_COMMENTS MULTI_BOOKMARK_SUPPORT NCR_IN_BOOKMARKS NEWS_CHUNK_SIZE NEWS_MAX_CHUNK contained nextgroup=lynxDelimiter +syn keyword lynxOption NEWS_POSTING NEWSPOST_PROXY NEWS_PROXY NEWSREPLY_PROXY NNTP_PROXY NNTPSERVER NO_DOT_FILES contained nextgroup=lynxDelimiter +syn keyword lynxOption NO_FILE_REFERER NO_FORCED_CORE_DUMP NO_FROM_HEADER NO_ISMAP_IF_USEMAP NONRESTARTING_SIGWINCH contained nextgroup=lynxDelimiter +syn keyword lynxOption NO_PROXY NO_REFERER_HEADER NO_TABLE_CENTER OUTGOING_MAIL_CHARSET PARTIAL PARTIAL_THRES contained nextgroup=lynxDelimiter +syn keyword lynxOption PERSISTENT_COOKIES PERSONAL_EXTENSION_MAP PERSONAL_MAILCAP PREFERRED_CHARSET PREFERRED_LANGUAGE contained nextgroup=lynxDelimiter +syn keyword lynxOption PREPEND_BASE_TO_SOURCE PREPEND_CHARSET_TO_SOURCE PRETTYSRC PRETTYSRC_SPEC contained nextgroup=lynxDelimiter +syn keyword lynxOption PRETTYSRC_VIEW_NO_ANCHOR_NUMBERING PRINTER QUIT_DEFAULT_YES REFERER_WITH_QUERY REUSE_TEMPFILES contained nextgroup=lynxDelimiter +syn keyword lynxOption RULE RULESFILE SAVE_SPACE SCAN_FOR_BURIED_NEWS_REFS SCROLLBAR SCROLLBAR_ARROW SEEK_FRAG_AREA_IN_CUR contained nextgroup=lynxDelimiter +syn keyword lynxOption SEEK_FRAG_MAP_IN_CUR SET_COOKIES SHOW_CURSOR SHOW_KB_RATE SNEWSPOST_PROXY SNEWS_PROXY contained nextgroup=lynxDelimiter +syn keyword lynxOption SNEWSREPLY_PROXY SOFT_DQUOTES SOURCE_CACHE SOURCE_CACHE_FOR_ABORTED STARTFILE STRIP_DOTDOT_URLS contained nextgroup=lynxDelimiter +syn keyword lynxOption SUBSTITUTE_UNDERSCORES SUFFIX SUFFIX_ORDER SYSTEM_EDITOR SYSTEM_MAIL SYSTEM_MAIL_FLAGS TAGSOUP contained nextgroup=lynxDelimiter +syn keyword lynxOption TEXTFIELDS_NEED_ACTIVATION TIMEOUT TRIM_INPUT_FIELDS TRUSTED_EXEC TRUSTED_LYNXCGI UPLOADER contained nextgroup=lynxDelimiter +syn keyword lynxOption URL_DOMAIN_PREFIXES URL_DOMAIN_SUFFIXES USE_FIXED_RECORDS USE_MOUSE USE_SELECT_POPUPS VERBOSE_IMAGES contained nextgroup=lynxDelimiter +syn keyword lynxOption VIEWER VI_KEYS_ALWAYS_ON WAIS_PROXY XLOADIMAGE_COMMAND contained nextgroup=lynxDelimiter +syn case match + +" NOTE: set this if you want the cfg2html.pl formatting directives to be highlighted +if exists("lynx_formatting_directives") + syn match lynxFormatDir "^\.\(h1\|h2\)\s.*$" + syn match lynxFormatDir "^\.\(ex\|nf\)\(\s\+\d\+\)\=$" + syn match lynxFormatDir "^\.fi$" +endif + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_lynx_syn_inits") + if version < 508 + let did_lynx_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink lynxBoolean Boolean + HiLink lynxComment Comment + HiLink lynxDelimiter Special + HiLink lynxFormatDir Special + HiLink lynxNumber Number + HiLink lynxOption Identifier + HiLink lynxTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "lynx" + +" vim: ts=8 diff --git a/runtime/syntax/m4.vim b/runtime/syntax/m4.vim new file mode 100644 index 000000000..ef60a8ff7 --- /dev/null +++ b/runtime/syntax/m4.vim @@ -0,0 +1,73 @@ +" Vim syntax file +" Language: M4 +" Maintainer: Claudio Fleiner +" URL: http://www.fleiner.com/vim/syntax/m4.vim +" Last Change: 2001 Apr 26 + +" This file will highlight user function calls if they use only +" capital letters and have at least one argument (i.e. the '(' +" must be there). Let me know if this is a problem. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if !exists("main_syntax") + if version < 600 + syntax clear + elseif exists("b:current_syntax") + finish +endif +" we define it here so that included files can test for it + let main_syntax='m4' +endif + +" define the m4 syntax +syn match m4Variable contained "\$\d\+" +syn match m4Special contained "$[@*#]" +syn match m4Comment "dnl\>.*" contains=SpellErrors +syn match m4Constants "\(\<m4_\)\=__file__" +syn match m4Constants "\(\<m4_\)\=__line__" +syn keyword m4Constants divnum sysval m4_divnum m4_sysval +syn region m4Paren matchgroup=m4Delimiter start="(" end=")" contained contains=@m4Top +syn region m4Command matchgroup=m4Function start="\<\(m4_\)\=\(define\|defn\|pushdef\)(" end=")" contains=@m4Top +syn region m4Command matchgroup=m4Preproc start="\<\(m4_\)\=\(include\|sinclude\)("he=e-1 end=")" contains=@m4Top +syn region m4Command matchgroup=m4Statement start="\<\(m4_\)\=\(syscmd\|esyscmd\|ifdef\|ifelse\|indir\|builtin\|shift\|errprint\|m4exit\|changecom\|changequote\|changeword\|m4wrap\|debugfile\|divert\|undivert\)("he=e-1 end=")" contains=@m4Top +syn region m4Command matchgroup=m4builtin start="\<\(m4_\)\=\(len\|index\|regexp\|substr\|translit\|patsubst\|format\|incr\|decr\|eval\|maketemp\)("he=e-1 end=")" contains=@m4Top +syn keyword m4Statement divert undivert +syn region m4Command matchgroup=m4Type start="\<\(m4_\)\=\(undefine\|popdef\)("he=e-1 end=")" contains=@m4Top +syn region m4Function matchgroup=m4Type start="\<[_A-Z][_A-Z0-9]*("he=e-1 end=")" contains=@m4Top +syn region m4String start="`" end="'" contained contains=@m4Top,@m4StringContents,SpellErrors +syn cluster m4Top contains=m4Comment,m4Constants,m4Special,m4Variable,m4String,m4Paren,m4Command,m4Statement,m4Function + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_m4_syn_inits") + if version < 508 + let did_m4_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + HiLink m4Delimiter Delimiter + HiLink m4Comment Comment + HiLink m4Function Function + HiLink m4Keyword Keyword + HiLink m4Special Special + HiLink m4String String + HiLink m4Statement Statement + HiLink m4Preproc PreProc + HiLink m4Type Type + HiLink m4Special Special + HiLink m4Variable Special + HiLink m4Constants Constant + HiLink m4Builtin Statement + delcommand HiLink +endif + +let b:current_syntax = "m4" + +if main_syntax == 'm4' + unlet main_syntax +endif + +" vim: ts=4 diff --git a/runtime/syntax/mail.vim b/runtime/syntax/mail.vim new file mode 100644 index 000000000..6fc0afb9d --- /dev/null +++ b/runtime/syntax/mail.vim @@ -0,0 +1,92 @@ +" Vim syntax file +" Language: Mail file +" Previous Maintainer: Felix von Leitner <leitner@math.fu-berlin.de> +" Maintainer: Gautam Iyer <gautam@math.uchicago.edu> +" Last Change: Mon 23 Feb 2004 02:26:16 PM CST + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" The mail header is recognized starting with a "keyword:" line and ending +" with an empty line or other line that can't be in the header. All lines of +" the header are highlighted. Headers of quoted messages (quoted with >) are +" also highlighted. + +" Syntax clusters +syn cluster mailHeaderFields contains=mailHeaderKey,mailSubject,mailHeaderEmail,@mailLinks +syn cluster mailLinks contains=mailURL,mailEmail +syn cluster mailQuoteExps contains=mailQuoteExp1,mailQuoteExp2,mailQuoteExp3,mailQuoteExp4,mailQuoteExp5,mailQuoteExp6 + +syn case match +" For "From " matching case is required. The "From " is not matched in quoted +" emails +syn region mailHeader contains=@mailHeaderFields start="^From " skip="^\s" end="\v^[-A-Za-z0-9]*([^-A-Za-z0-9:]|$)"me=s-1 +syn match mailHeaderKey contained contains=mailEmail "^From\s.*$" + +syn case ignore +" Nothing else depends on case. Headers in properly quoted (with "> " or ">") +" emails are matched +syn region mailHeader keepend contains=@mailHeaderFields,@mailQuoteExps start="^\z(\(> \?\)*\)\v(newsgroups|from|((in-)?reply-)?to|b?cc|subject|return-path|received|date|replied):" skip="^\z1\s" end="\v^\z1[-a-z0-9]*([^-a-z0-9:]|$)"me=s-1 end="\v^\z1@!"me=s-1 end="\v^\z1(\> ?)+"me=s-1 + +syn region mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@mailQuoteExps start="\v(^(\> ?)*)@<=(to|b?cc):" skip=",$" end="$" +syn match mailHeaderKey contained contains=mailHeaderEmail,mailEmail "\v(^(\> ?)*)@<=(from|reply-to):.*$" +syn match mailHeaderKey contained "\v(^(\> ?)*)@<=date:" +syn match mailSubject contained "\v(^(\> ?)*)@<=subject:.*$" contains=@Spell + +" Anything in the header between < and > is an email address +syn match mailHeaderEmail contained "<.\{-}>" + +" Mail Signatures. (Begin with "--", end with change in quote level) +syn region mailSignature keepend contains=@mailLinks,@mailQuoteExps start="^\z(\(> \?\)*\)-- *$" end="^\z1$" end="^\z1\@!"me=s-1 end="^\z1\(> \?\)\+"me=s-1 + +" URLs start with a known protocol or www,web,w3. +syn match mailURL `\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^' <>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^' <>"]+)[a-z0-9/]` +syn match mailEmail "\v[_=a-z\./+0-9-]+\@[a-z0-9._-]+\a{2}" + +" Make sure quote markers in regions (header / signature) have correct color +syn match mailQuoteExp1 contained "\v^(\> ?)" +syn match mailQuoteExp2 contained "\v^(\> ?){2}" +syn match mailQuoteExp3 contained "\v^(\> ?){3}" +syn match mailQuoteExp4 contained "\v^(\> ?){4}" +syn match mailQuoteExp5 contained "\v^(\> ?){5}" +syn match mailQuoteExp6 contained "\v^(\> ?){6}" + +" Even and odd quoted lines. order is imporant here! +syn match mailQuoted1 contains=mailHeader,@mailLinks,mailSignature "^\([a-z]\+>\|[]|}>]\).*$" +syn match mailQuoted2 contains=mailHeader,@mailLinks,mailSignature "^\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{2}.*$" +syn match mailQuoted3 contains=mailHeader,@mailLinks,mailSignature "^\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{3}.*$" +syn match mailQuoted4 contains=mailHeader,@mailLinks,mailSignature "^\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{4}.*$" +syn match mailQuoted5 contains=mailHeader,@mailLinks,mailSignature "^\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{5}.*$" +syn match mailQuoted6 contains=mailHeader,@mailLinks,mailSignature "^\(\([a-z]\+>\|[]|}>]\)[ \t]*\)\{6}.*$" + +" Need to sync on the header. Assume we can do that within 100 lines +if exists("mail_minlines") + exec "syn sync minlines=" . mail_minlines +else + syn sync minlines=100 +endif + +" Define the default highlighting. +hi def link mailHeader Statement +hi def link mailHeaderKey Type +hi def link mailSignature PreProc +hi def link mailHeaderEmail mailEmail +hi def link mailEmail Special +hi def link mailURL String +hi def link mailSubject LineNR +hi def link mailQuoted1 Comment +hi def link mailQuoted3 mailQuoted1 +hi def link mailQuoted5 mailQuoted1 +hi def link mailQuoted2 Identifier +hi def link mailQuoted4 mailQuoted2 +hi def link mailQuoted6 mailQuoted2 +hi def link mailQuoteExp1 mailQuoted1 +hi def link mailQuoteExp2 mailQuoted2 +hi def link mailQuoteExp3 mailQuoted3 +hi def link mailQuoteExp4 mailQuoted4 +hi def link mailQuoteExp5 mailQuoted5 +hi def link mailQuoteExp6 mailQuoted6 + +let b:current_syntax = "mail" diff --git a/runtime/syntax/mailcap.vim b/runtime/syntax/mailcap.vim new file mode 100644 index 000000000..6d6270709 --- /dev/null +++ b/runtime/syntax/mailcap.vim @@ -0,0 +1,54 @@ +" Vim syntax file +" Language: Mailcap configuration file +" Maintainer: Doug Kearns +" Last Change: 2002 November 24 +" URL: http://mugca.its.monash.edu.au/~djkea2/vim/syntax/mailcap.vim + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match mailcapComment "^#.*" + +syn region mailcapString start=+"+ end=+"+ contains=mailcapSpecial oneline + +syn match mailcapDelimiter "\\\@<!;" + +syn match mailcapSpecial "\\\@<!%[nstF]" +syn match mailcapSpecial "\\\@<!%{[^}]*}" + +syn case ignore +syn match mailcapFlag "\(=\s*\)\@<!\<\(needsterminal\|copiousoutput\|x-\w\+\)\>" +syn match mailcapFieldname "\<\(compose\|composetyped\|print\|edit\|test\|x11-bitmap\|nametemplate\|textualnewlines\|description\|x-\w+\)\>\ze\s*=" +syn match mailcapTypeField "^\(text\|image\|audio\|video\|application\|message\|multipart\|model\|x-[[:graph:]]\+\)\(/\(\*\|[[:graph:]]\+\)\)\=\ze\s*;" +syn case match + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_mailcap_syntax_inits") + if version < 508 + let did_mailcap_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink mailcapComment Comment + HiLink mailcapDelimiter Delimiter + HiLink mailcapFlag Statement + HiLink mailcapFieldname Statement + HiLink mailcapSpecial Identifier + HiLink mailcapTypeField Type + HiLink mailcapString String + + delcommand HiLink +endif + +let b:current_syntax = "mailcap" + +" vim: tabstop=8 diff --git a/runtime/syntax/make.vim b/runtime/syntax/make.vim new file mode 100644 index 000000000..85da9800e --- /dev/null +++ b/runtime/syntax/make.vim @@ -0,0 +1,137 @@ +" Vim syntax file +" Language: Makefile +" Maintainer: Claudio Fleiner <claudio@fleiner.com> +" URL: http://www.fleiner.com/vim/syntax/make.vim +" Last Change: 2004 Apr 30 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" some special characters +syn match makeSpecial "^\s*[@-]\+" +syn match makeNextLine "\\\n\s*" + +" some directives +syn match makePreCondit "^\s*\(ifeq\>\|else\>\|endif\>\|ifneq\>\|ifdef\>\|ifndef\>\)" +syn match makeInclude "^\s*[-s]\=include" +syn match makeStatement "^\s*vpath" +syn match makeExport "^\s*\(export\|unexport\)\>" +syn match makeOverride "^\s*override" +hi link makeOverride makeStatement +hi link makeExport makeStatement + +" Koehler: catch unmatched define/endef keywords. endef only matches it is by itself on a line +syn region makeDefine start="^\s*define\s" end="^\s*endef\s*$" contains=makeStatement,makeIdent,makePreCondit,makeDefine + +" Microsoft Makefile specials +syn case ignore +syn match makeInclude "^!\s*include" +syn match makePreCondit "!\s*\(cmdswitches\|error\|message\|include\|if\|ifdef\|ifndef\|else\|elseif\|else if\|else\s*ifdef\|else\s*ifndef\|endif\|undef\)\>" +syn case match + +" identifiers +syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement,makeIdent,makeSString,makeDString +syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent,makeSString,makeDString +syn match makeIdent "\$\$\w*" +syn match makeIdent "\$[^({]" +syn match makeIdent "^\s*\a\w*\s*[:+?!*]="me=e-2 +syn match makeIdent "^\s*\a\w*\s*="me=e-1 +syn match makeIdent "%" + +" Makefile.in variables +syn match makeConfig "@[A-Za-z0-9_]\+@" + +" make targets +" syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>" +syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2 nextgroup=makeSource +syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:$"me=e-1 nextgroup=makeSource + +syn region makeTarget transparent matchgroup=makeTarget start="^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"rs=e-1 end=";"re=e-1,me=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands +syn match makeTarget "^[A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*::\=\s*$" contains=makeIdent,makeSpecTarget skipnl nextgroup=makeCommands,makeCommandError + +syn region makeSpecTarget transparent matchgroup=makeSpecTarget start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>:\{1,2}[^:=]"rs=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands +syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>::\=\s*$" contains=makeIdent skipnl nextgroup=makeCommands,makeCommandError + +syn match makeCommandError "^\s\+\S.*" contained +syn region makeCommands start=";"hs=s+1 start="^\t" end="^[^\t#]"me=e-1,re=e-1 end="^$" contained contains=makeCmdNextLine,makeSpecial,makeComment,makeIdent,makePreCondit,makeDefine,makeDString,makeSString nextgroup=makeCommandError +syn match makeCmdNextLine "\\\n."he=e-1 contained + + +" Statements / Functions (GNU make) +syn match makeStatement contained "(\(subst\|addprefix\|addsuffix\|basename\|call\|dir\|error\|filter-out\|filter\|findstring\|firstword\|foreach\|if\|join\|notdir\|origin\|patsubst\|shell\|sort\|strip\|suffix\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1 + +" Comment +if exists("make_microsoft") + syn match makeComment "#.*" contains=makeTodo +else + syn region makeComment start="#" end="^$" end="[^\\]$" keepend contains=makeTodo + syn match makeComment "#$" +endif +syn keyword makeTodo TODO FIXME XXX contained + +" match escaped quotes and any other escaped character +" except for $, as a backslash in front of a $ does +" not make it a standard character, but instead it will +" still act as the beginning of a variable +" The escaped char is not highlightet currently +syn match makeEscapedChar "\\[^$]" + + +syn region makeDString start=+\(\\\)\@<!"+ skip=+\\.+ end=+"+ contains=makeIdent +syn region makeSString start=+\(\\\)\@<!'+ skip=+\\.+ end=+'+ contains=makeIdent +syn region makeBString start=+\(\\\)\@<!`+ skip=+\\.+ end=+`+ contains=makeIdent,makeSString,makeDString,makeNextLine + +" Syncing +syn sync minlines=20 maxlines=200 + +" Sync on Make command block region: When searching backwards hits a line that +" can't be a command or a comment, use makeCommands if it looks like a target, +" NONE otherwise. +syn sync match makeCommandSync groupthere NONE "^[^\t#]" +syn sync match makeCommandSync groupthere makeCommands "^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]" +syn sync match makeCommandSync groupthere makeCommands "^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}\s*$" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_make_syn_inits") + if version < 508 + let did_make_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink makeNextLine makeSpecial + HiLink makeCmdNextLine makeSpecial + HiLink makeSpecTarget Statement + if !exists("make_no_commands") + HiLink makeCommands Number + endif + HiLink makeImplicit Function + HiLink makeTarget Function + HiLink makeInclude Include + HiLink makePreCondit PreCondit + HiLink makeStatement Statement + HiLink makeIdent Identifier + HiLink makeSpecial Special + HiLink makeComment Comment + HiLink makeDString String + HiLink makeSString String + HiLink makeBString Function + HiLink makeError Error + HiLink makeTodo Todo + HiLink makeDefine Define + HiLink makeCommandError Error + HiLink makeConfig PreCondit + delcommand HiLink +endif + +let b:current_syntax = "make" + +" vim: ts=8 diff --git a/runtime/syntax/man.vim b/runtime/syntax/man.vim new file mode 100644 index 000000000..347180c8d --- /dev/null +++ b/runtime/syntax/man.vim @@ -0,0 +1,67 @@ +" Vim syntax file +" Language: Man page +" Maintainer: Nam SungHyun <namsh@kldp.org> +" Previous Maintainer: Gautam H. Mudunuri <gmudunur@informatica.com> +" Version Info: +" Last Change: 2004 May 16 + +" Additional highlighting by Johannes Tanzler <johannes.tanzler@aon.at>: +" * manSubHeading +" * manSynopsis (only for sections 2 and 3) + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Get the CTRL-H syntax to handle backspaced text +if version >= 600 + runtime! syntax/ctrlh.vim +else + source <sfile>:p:h/ctrlh.vim +endif + +syn case ignore +syn match manReference "\f\+([1-9][a-z]\=)" +syn match manTitle "^\f\+([0-9]\+[a-z]\=).*" +syn match manSectionHeading "^[a-z][a-z ]*[a-z]$" +syn match manSubHeading "^\s\{3\}[a-z][a-z ]*[a-z]$" +syn match manOptionDesc "^\s*[+-][a-z0-9]\S*" +syn match manLongOptionDesc "^\s*--[a-z0-9-]\S*" +" syn match manHistory "^[a-z].*last change.*$" + +if getline(1) =~ '^[a-zA-Z_]\+([23])' + syntax include @cCode <sfile>:p:h/c.vim + syn match manCFuncDefinition display "\<\h\w*\>\s*("me=e-1 contained + syn region manSynopsis start="^SYNOPSIS"hs=s+8 end="^\u\+\s*$"he=e-12 keepend contains=manSectionHeading,@cCode,manCFuncDefinition +endif + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_man_syn_inits") + if version < 508 + let did_man_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink manTitle Title + HiLink manSectionHeading Statement + HiLink manOptionDesc Constant + HiLink manLongOptionDesc Constant + HiLink manReference PreProc + HiLink manSubHeading Function + HiLink manCFuncDefinition Function + + delcommand HiLink +endif + +let b:current_syntax = "man" + +" vim:ts=8 sts=2 sw=2: diff --git a/runtime/syntax/manual.vim b/runtime/syntax/manual.vim new file mode 100644 index 000000000..5ac045f60 --- /dev/null +++ b/runtime/syntax/manual.vim @@ -0,0 +1,25 @@ +" Vim syntax support file +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last Change: 2001 Jun 04 + +" This file is used for ":syntax manual". +" It installs the Syntax autocommands, but no the FileType autocommands. + +if !has("syntax") + finish +endif + +" Load the Syntax autocommands and set the default methods for highlighting. +if !exists("syntax_on") + so <sfile>:p:h/synload.vim +endif + +let syntax_manual = 1 + +" Remove the connection between FileType and Syntax autocommands. +silent! au! syntaxset FileType + +" If the GUI is already running, may still need to install the FileType menu. +if has("gui_running") && !exists("did_install_syntax_menu") + source $VIMRUNTIME/menu.vim +endif diff --git a/runtime/syntax/maple.vim b/runtime/syntax/maple.vim new file mode 100644 index 000000000..cda7c7516 --- /dev/null +++ b/runtime/syntax/maple.vim @@ -0,0 +1,582 @@ +" Vim syntax file +" Language: Maple V (based on release 4) +" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> +" Last Change: Mar 10, 2004 +" Version: 4 +" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax +" +" Package Function Selection: {{{1 +" Because there are a lot of packages, and because of the potential for namespace +" clashes, this version of <maple.vim> needs the user to select which, if any, +" package functions should be highlighted. Select your packages and put into your +" <.vimrc> none or more of the lines following let ...=1 lines: +" +" if exists("mvpkg_all") +" ... +" endif +" +" *OR* let mvpkg_all=1 + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Iskeyword Effects: {{{1 +if version < 600 + set iskeyword=$,48-57,_,a-z,@-Z +else + setlocal iskeyword=$,48-57,_,a-z,@-Z +endif + +" Package Selection: {{{1 +" allow user to simply select all packages for highlighting +if exists("mvpkg_all") + let mv_DEtools = 1 + let mv_Galois = 1 + let mv_GaussInt = 1 + let mv_LREtools = 1 + let mv_combinat = 1 + let mv_combstruct = 1 + let mv_difforms = 1 + let mv_finance = 1 + let mv_genfunc = 1 + let mv_geometry = 1 + let mv_grobner = 1 + let mv_group = 1 + let mv_inttrans = 1 + let mv_liesymm = 1 + let mv_linalg = 1 + let mv_logic = 1 + let mv_networks = 1 + let mv_numapprox = 1 + let mv_numtheory = 1 + let mv_orthopoly = 1 + let mv_padic = 1 + let mv_plots = 1 + let mv_plottools = 1 + let mv_powseries = 1 + let mv_process = 1 + let mv_simplex = 1 + let mv_stats = 1 + let mv_student = 1 + let mv_sumtools = 1 + let mv_tensor = 1 + let mv_totorder = 1 +endif + +" Parenthesis/curly/brace sanity checker: {{{1 +syn region mvZone matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" transparent contains=ALLBUT,mvError,mvBraceError,mvCurlyError +syn region mvZone matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" transparent contains=ALLBUT,mvError,mvBraceError,mvParenError +syn region mvZone matchgroup=Delimiter start="\[" matchgroup=Delimiter end="]" transparent contains=ALLBUT,mvError,mvCurlyError,mvParenError +syn match mvError "[)\]}]" +syn match mvBraceError "[)}]" contained +syn match mvCurlyError "[)\]]" contained +syn match mvParenError "[\]}]" contained +syn match mvComma "[,;:]" +syn match mvSemiError "[;:]" contained + +" Maple V Packages, circa Release 4: {{{1 +syn keyword mvPackage DEtools difforms group networks plots stats +syn keyword mvPackage Galois finance inttrans numapprox plottools student +syn keyword mvPackage GaussInt genfunc liesymm numtheory powseries sumtools +syn keyword mvPackage LREtools geometry linalg orthopoly process tensor +syn keyword mvPackage combinat grobner logic padic simplex totorder +syn keyword mvPackage combstruct + +" Language Support: {{{1 +syn keyword mvTodo contained TODO +syn region mvString start=+`+ skip=+``+ end=+`+ keepend contains=mvTodo +syn region mvDelayEval start=+'+ end=+'+ keepend contains=ALLBUT,mvError,mvBraceError,mvCurlyError,mvParenError,mvSemiError +syn match mvVarAssign "[a-zA-Z_][a-zA-Z_0-9]*[ \t]*:=" contains=mvAssign +syn match mvAssign ":=" contained + +" Lower-Priority Operators: {{{1 +syn match mvOper "\." + +" Number handling: {{{1 +syn match mvNumber "\<\d\+" " integer + syn match mvNumber "[-+]\=\.\d\+" " . integer +syn match mvNumber "\<\d\+\.\d\+" " integer . integer +syn match mvNumber "\<\d\+\." " integer . +syn match mvNumber "\<\d\+\.\." contains=mvRange " integer .. + +syn match mvNumber "\<\d\+e[-+]\=\d\+" " integer e [-+] integer +syn match mvNumber "[-+]\=\.\d\+e[-+]\=\d\+" " . integer e [-+] integer +syn match mvNumber "\<\d\+\.\d*e[-+]\=\d\+" " integer . [integer] e [-+] integer + +syn match mvNumber "[-+]\d\+" " integer +syn match mvNumber "[-+]\d\+\.\d\+" " integer . integer +syn match mvNumber "[-+]\d\+\." " integer . +syn match mvNumber "[-+]\d\+\.\." contains=mvRange " integer .. + +syn match mvNumber "[-+]\d\+e[-+]\=\d\+" " integer e [-+] integer +syn match mvNumber "[-+]\d\+\.\d*e[-+]\=\d\+" " integer . [integer] e [-+] integer + +syn match mvRange "\.\." + +" Operators: {{{1 +syn keyword mvOper and not or +syn match mvOper "<>\|[<>]=\|[<>]\|=" +syn match mvOper "&+\|&-\|&\*\|&\/\|&" +syn match mvError "\.\.\." + +" MapleV Statements: ? statement {{{1 +" Split into booleans, conditionals, operators, repeat-logic, etc +syn keyword mvBool true false +syn keyword mvCond elif else fi if then + +syn keyword mvRepeat by for in to +syn keyword mvRepeat do from od while + +syn keyword mvSpecial NULL +syn match mvSpecial "\[\]\|{}" + +syn keyword mvStatement Order fail options read save +syn keyword mvStatement break local point remember stop +syn keyword mvStatement done mod proc restart with +syn keyword mvStatement end mods quit return +syn keyword mvStatement error next + +" Builtin Constants: ? constants {{{1 +syn keyword mvConstant Catalan I gamma infinity +syn keyword mvConstant FAIL Pi + +" Comments: DEBUG, if in a comment, is specially highlighted. {{{1 +syn keyword mvDebug contained DEBUG +syn cluster mvCommentGroup contains=mvTodo,mvDebug,@Spell +syn match mvComment "#.*$" contains=@mvCommentGroup + +" Basic Library Functions: ? index[function] +syn keyword mvLibrary $ @ @@ ERROR +syn keyword mvLibrary AFactor KelvinHer arctan factor log rhs +syn keyword mvLibrary AFactors KelvinKei arctanh factors log10 root +syn keyword mvLibrary AiryAi KelvinKer argument fclose lprint roots +syn keyword mvLibrary AiryBi LambertW array feof map round +syn keyword mvLibrary AngerJ Lcm assign fflush map2 rsolve +syn keyword mvLibrary Berlekamp LegendreE assigned filepos match savelib +syn keyword mvLibrary BesselI LegendreEc asspar fixdiv matrix scanf +syn keyword mvLibrary BesselJ LegendreEc1 assume float max searchtext +syn keyword mvLibrary BesselK LegendreF asubs floor maximize sec +syn keyword mvLibrary BesselY LegendreKc asympt fnormal maxnorm sech +syn keyword mvLibrary Beta LegendreKc1 attribute fopen maxorder select +syn keyword mvLibrary C LegendrePi bernstein forget member seq +syn keyword mvLibrary Chi LegendrePic branches fortran min series +syn keyword mvLibrary Ci LegendrePic1 bspline fprintf minimize setattribute +syn keyword mvLibrary CompSeq Li cat frac minpoly shake +syn keyword mvLibrary Content Linsolve ceil freeze modp showprofile +syn keyword mvLibrary D MOLS chrem fremove modp1 showtime +syn keyword mvLibrary DESol Maple_floats close frontend modp2 sign +syn keyword mvLibrary Det MeijerG close fscanf modpol signum +syn keyword mvLibrary Diff Norm coeff fsolve mods simplify +syn keyword mvLibrary Dirac Normal coeffs galois msolve sin +syn keyword mvLibrary DistDeg Nullspace coeftayl gc mtaylor singular +syn keyword mvLibrary Divide Power collect gcd mul sinh +syn keyword mvLibrary Ei Powmod combine gcdex nextprime sinterp +syn keyword mvLibrary Eigenvals Prem commutat genpoly nops solve +syn keyword mvLibrary EllipticCE Primfield comparray harmonic norm sort +syn keyword mvLibrary EllipticCK Primitive compoly has normal sparse +syn keyword mvLibrary EllipticCPi Primpart conjugate hasfun numboccur spline +syn keyword mvLibrary EllipticE ProbSplit content hasoption numer split +syn keyword mvLibrary EllipticF Product convergs hastype op splits +syn keyword mvLibrary EllipticK Psi convert heap open sprem +syn keyword mvLibrary EllipticModulus Quo coords history optimize sprintf +syn keyword mvLibrary EllipticNome RESol copy hypergeom order sqrfree +syn keyword mvLibrary EllipticPi Randpoly cos iFFT parse sqrt +syn keyword mvLibrary Eval Randprime cosh icontent pclose sscanf +syn keyword mvLibrary Expand Ratrecon cost identity pclose ssystem +syn keyword mvLibrary FFT Re cot igcd pdesolve stack +syn keyword mvLibrary Factor Rem coth igcdex piecewise sturm +syn keyword mvLibrary Factors Resultant csc ilcm plot sturmseq +syn keyword mvLibrary FresnelC RootOf csch ilog plot3d subs +syn keyword mvLibrary FresnelS Roots csgn ilog10 plotsetup subsop +syn keyword mvLibrary Fresnelf SPrem dawson implicitdiff pochhammer substring +syn keyword mvLibrary Fresnelg Searchtext define indets pointto sum +syn keyword mvLibrary Frobenius Shi degree index poisson surd +syn keyword mvLibrary GAMMA Si denom indexed polar symmdiff +syn keyword mvLibrary GaussAGM Smith depends indices polylog symmetric +syn keyword mvLibrary Gaussejord Sqrfree diagonal inifcn polynom system +syn keyword mvLibrary Gausselim Ssi diff ininame powmod table +syn keyword mvLibrary Gcd StruveH dilog initialize prem tan +syn keyword mvLibrary Gcdex StruveL dinterp insert prevprime tanh +syn keyword mvLibrary HankelH1 Sum disassemble int primpart testeq +syn keyword mvLibrary HankelH2 Svd discont interface print testfloat +syn keyword mvLibrary Heaviside TEXT discrim interp printf thaw +syn keyword mvLibrary Hermite Trace dismantle invfunc procbody thiele +syn keyword mvLibrary Im WeberE divide invztrans procmake time +syn keyword mvLibrary Indep WeierstrassP dsolve iostatus product translate +syn keyword mvLibrary Interp WeierstrassPPrime eliminate iperfpow proot traperror +syn keyword mvLibrary Inverse WeierstrassSigma ellipsoid iquo property trigsubs +syn keyword mvLibrary Irreduc WeierstrassZeta entries iratrecon protect trunc +syn keyword mvLibrary Issimilar Zeta eqn irem psqrt type +syn keyword mvLibrary JacobiAM abs erf iroot quo typematch +syn keyword mvLibrary JacobiCD add erfc irreduc radnormal unames +syn keyword mvLibrary JacobiCN addcoords eulermac iscont radsimp unapply +syn keyword mvLibrary JacobiCS addressof eval isdifferentiable rand unassign +syn keyword mvLibrary JacobiDC algebraic evala isolate randomize unload +syn keyword mvLibrary JacobiDN algsubs evalapply ispoly randpoly unprotect +syn keyword mvLibrary JacobiDS alias evalb isqrfree range updatesR4 +syn keyword mvLibrary JacobiNC allvalues evalc isqrt rationalize userinfo +syn keyword mvLibrary JacobiND anames evalf issqr ratrecon value +syn keyword mvLibrary JacobiNS antisymm evalfint latex readbytes vector +syn keyword mvLibrary JacobiSC applyop evalgf lattice readdata verify +syn keyword mvLibrary JacobiSD arccos evalhf lcm readlib whattype +syn keyword mvLibrary JacobiSN arccosh evalm lcoeff readline with +syn keyword mvLibrary JacobiTheta1 arccot evaln leadterm readstat writebytes +syn keyword mvLibrary JacobiTheta2 arccoth evalr length realroot writedata +syn keyword mvLibrary JacobiTheta3 arccsc exp lexorder recipoly writeline +syn keyword mvLibrary JacobiTheta4 arccsch expand lhs rem writestat +syn keyword mvLibrary JacobiZeta arcsec expandoff limit remove writeto +syn keyword mvLibrary KelvinBei arcsech expandon ln residue zip +syn keyword mvLibrary KelvinBer arcsin extract lnGAMMA resultant ztrans +syn keyword mvLibrary KelvinHei arcsinh + + +" == PACKAGES ======================================================= {{{1 +" Note: highlighting of package functions is now user-selectable by package. + +" Package: DEtools differential equations tools {{{2 +if exists("mv_DEtools") + syn keyword mvPkg_DEtools DEnormal Dchangevar autonomous dfieldplot reduceOrder untranslate + syn keyword mvPkg_DEtools DEplot PDEchangecoords convertAlg indicialeq regularsp varparam + syn keyword mvPkg_DEtools DEplot3d PDEplot convertsys phaseportrait translate +endif + +" Package: Domains: create domains of computation {{{2 +if exists("mv_Domains") +endif + +" Package: GF: Galois Fields {{{2 +if exists("mv_GF") + syn keyword mvPkg_Galois galois +endif + +" Package: GaussInt: Gaussian Integers {{{2 +if exists("mv_GaussInt") + syn keyword mvPkg_GaussInt GIbasis GIfactor GIissqr GInorm GIquadres GIsmith + syn keyword mvPkg_GaussInt GIchrem GIfactors GIlcm GInormal GIquo GIsqrfree + syn keyword mvPkg_GaussInt GIdivisor GIgcd GImcmbine GIorder GIrem GIsqrt + syn keyword mvPkg_GaussInt GIfacpoly GIgcdex GInearest GIphi GIroots GIunitnormal + syn keyword mvPkg_GaussInt GIfacset GIhermite GInodiv GIprime GIsieve +endif + +" Package: LREtools: manipulate linear recurrence relations {{{2 +if exists("mv_LREtools") + syn keyword mvPkg_LREtools REcontent REprimpart REtodelta delta hypergeomsols ratpolysols + syn keyword mvPkg_LREtools REcreate REreduceorder REtoproc dispersion polysols shift + syn keyword mvPkg_LREtools REplot REtoDE constcoeffsol +endif + +" Package: combinat: combinatorial functions {{{2 +if exists("mv_combinat") + syn keyword mvPkg_combinat Chi composition graycode numbcomb permute randperm + syn keyword mvPkg_combinat bell conjpart inttovec numbcomp powerset stirling1 + syn keyword mvPkg_combinat binomial decodepart lastpart numbpart prevpart stirling2 + syn keyword mvPkg_combinat cartprod encodepart multinomial numbperm randcomb subsets + syn keyword mvPkg_combinat character fibonacci nextpart partition randpart vectoint + syn keyword mvPkg_combinat choose firstpart +endif + +" Package: combstruct: combinatorial structures {{{2 +if exists("mv_combstruct") + syn keyword mvPkg_combstruct allstructs draw iterstructs options specification structures + syn keyword mvPkg_combstruct count finished nextstruct +endif + +" Package: difforms: differential forms {{{2 +if exists("mv_difforms") + syn keyword mvPkg_difforms const defform formpart parity scalarpart wdegree + syn keyword mvPkg_difforms d form mixpar scalar simpform wedge +endif + +" Package: finance: financial mathematics {{{2 +if exists("mv_finance") + syn keyword mvPkg_finance amortization cashflows futurevalue growingperpetuity mv_finance presentvalue + syn keyword mvPkg_finance annuity effectiverate growingannuity levelcoupon perpetuity yieldtomaturity + syn keyword mvPkg_finance blackscholes +endif + +" Package: genfunc: rational generating functions {{{2 +if exists("mv_genfunc") + syn keyword mvPkg_genfunc rgf_charseq rgf_expand rgf_hybrid rgf_pfrac rgf_sequence rgf_term + syn keyword mvPkg_genfunc rgf_encode rgf_findrecur rgf_norm rgf_relate rgf_simp termscale +endif + +" Package: geometry: Euclidean geometry {{{2 +if exists("mv_geometry") + syn keyword mvPkg_geometry circle dsegment hyperbola parabola segment triangle + syn keyword mvPkg_geometry conic ellipse line point square +endif + +" Package: grobner: Grobner bases {{{2 +if exists("mv_grobner") + syn keyword mvPkg_grobner finduni gbasis leadmon normalf solvable spoly + syn keyword mvPkg_grobner finite gsolve +endif + +" Package: group: permutation and finitely-presented groups {{{2 +if exists("mv_group") + syn keyword mvPkg_group DerivedS areconjugate cosets grouporder issubgroup permrep + syn keyword mvPkg_group LCS center cosrep inter mulperms pres + syn keyword mvPkg_group NormalClosure centralizer derived invperm normalizer subgrel + syn keyword mvPkg_group RandElement convert grelgroup isabelian orbit type + syn keyword mvPkg_group Sylow core groupmember isnormal permgroup +endif + +" Package: inttrans: integral transforms {{{2 +if exists("mv_inttrans") + syn keyword mvPkg_inttrans addtable fouriercos hankel invfourier invlaplace mellin + syn keyword mvPkg_inttrans fourier fouriersin hilbert invhilbert laplace +endif + +" Package: liesymm: Lie symmetries {{{2 +if exists("mv_liesymm") + syn keyword mvPkg_liesymm &^ TD depvars getform mixpar vfix + syn keyword mvPkg_liesymm &mod annul determine hasclosure prolong wcollect + syn keyword mvPkg_liesymm Eta autosimp dvalue hook reduce wdegree + syn keyword mvPkg_liesymm Lie close extvars indepvars setup wedgeset + syn keyword mvPkg_liesymm Lrank d getcoeff makeforms translate wsubs +endif + +" Package: linalg: Linear algebra {{{2 +if exists("mv_linalg") + syn keyword mvPkg_linalg GramSchmidt coldim equal indexfunc mulcol singval + syn keyword mvPkg_linalg JordanBlock colspace exponential innerprod multiply smith + syn keyword mvPkg_linalg LUdecomp colspan extend intbasis norm stack + syn keyword mvPkg_linalg QRdecomp companion ffgausselim inverse normalize submatrix + syn keyword mvPkg_linalg addcol cond fibonacci ismith orthog subvector + syn keyword mvPkg_linalg addrow copyinto forwardsub issimilar permanent sumbasis + syn keyword mvPkg_linalg adjoint crossprod frobenius iszero pivot swapcol + syn keyword mvPkg_linalg angle curl gausselim jacobian potential swaprow + syn keyword mvPkg_linalg augment definite gaussjord jordan randmatrix sylvester + syn keyword mvPkg_linalg backsub delcols geneqns kernel randvector toeplitz + syn keyword mvPkg_linalg band delrows genmatrix laplacian rank trace + syn keyword mvPkg_linalg basis det grad leastsqrs references transpose + syn keyword mvPkg_linalg bezout diag hadamard linsolve row vandermonde + syn keyword mvPkg_linalg blockmatrix diverge hermite matadd rowdim vecpotent + syn keyword mvPkg_linalg charmat dotprod hessian matrix rowspace vectdim + syn keyword mvPkg_linalg charpoly eigenval hilbert minor rowspan vector + syn keyword mvPkg_linalg cholesky eigenvect htranspose minpoly scalarmul wronskian + syn keyword mvPkg_linalg col entermatrix ihermite +endif + +" Package: logic: Boolean logic {{{2 +if exists("mv_logic") + syn keyword mvPkg_logic MOD2 bsimp distrib environ randbool tautology + syn keyword mvPkg_logic bequal canon dual frominert satisfy toinert +endif + +" Package: networks: graph networks {{{2 +if exists("mv_networks") + syn keyword mvPkg_networks acycpoly connect dinic graph mincut show + syn keyword mvPkg_networks addedge connectivity djspantree graphical mindegree shrink + syn keyword mvPkg_networks addvertex contract dodecahedron gsimp neighbors span + syn keyword mvPkg_networks adjacency countcuts draw gunion new spanpoly + syn keyword mvPkg_networks allpairs counttrees duplicate head octahedron spantree + syn keyword mvPkg_networks ancestor cube edges icosahedron outdegree tail + syn keyword mvPkg_networks arrivals cycle ends incidence path tetrahedron + syn keyword mvPkg_networks bicomponents cyclebase eweight incident petersen tuttepoly + syn keyword mvPkg_networks charpoly daughter flow indegree random vdegree + syn keyword mvPkg_networks chrompoly degreeseq flowpoly induce rank vertices + syn keyword mvPkg_networks complement delete fundcyc isplanar rankpoly void + syn keyword mvPkg_networks complete departures getlabel maxdegree shortpathtree vweight + syn keyword mvPkg_networks components diameter girth +endif + +" Package: numapprox: numerical approximation {{{2 +if exists("mv_numapprox") + syn keyword mvPkg_numapprox chebdeg chebsort fnorm laurent minimax remez + syn keyword mvPkg_numapprox chebmult chebyshev hornerform laurent pade taylor + syn keyword mvPkg_numapprox chebpade confracform infnorm minimax +endif + +" Package: numtheory: number theory {{{2 +if exists("mv_numtheory") + syn keyword mvPkg_numtheory B cyclotomic invcfrac mcombine nthconver primroot + syn keyword mvPkg_numtheory F divisors invphi mersenne nthdenom quadres + syn keyword mvPkg_numtheory GIgcd euler isolve minkowski nthnumer rootsunity + syn keyword mvPkg_numtheory J factorEQ isprime mipolys nthpow safeprime + syn keyword mvPkg_numtheory L factorset issqrfree mlog order sigma + syn keyword mvPkg_numtheory M fermat ithprime mobius pdexpand sq2factor + syn keyword mvPkg_numtheory bernoulli ifactor jacobi mroot phi sum2sqr + syn keyword mvPkg_numtheory bigomega ifactors kronecker msqrt pprimroot tau + syn keyword mvPkg_numtheory cfrac imagunit lambda nearestp prevprime thue + syn keyword mvPkg_numtheory cfracpol index legendre nextprime +endif + +" Package: orthopoly: orthogonal polynomials {{{2 +if exists("mv_orthopoly") + syn keyword mvPkg_orthopoly G H L P T U +endif + +" Package: padic: p-adic numbers {{{2 +if exists("mv_padic") + syn keyword mvPkg_padic evalp function orderp ratvaluep rootp valuep + syn keyword mvPkg_padic expansion lcoeffp ordp +endif + +" Package: plots: graphics package {{{2 +if exists("mv_plots") + syn keyword mvPkg_plots animate coordplot3d gradplot3d listplot3d polarplot setoptions3d + syn keyword mvPkg_plots animate3d cylinderplot implicitplot loglogplot polygonplot spacecurve + syn keyword mvPkg_plots changecoords densityplot implicitplot3d logplot polygonplot3d sparsematrixplot + syn keyword mvPkg_plots complexplot display inequal matrixplot polyhedraplot sphereplot + syn keyword mvPkg_plots complexplot3d display3d listcontplot odeplot replot surfdata + syn keyword mvPkg_plots conformal fieldplot listcontplot3d pareto rootlocus textplot + syn keyword mvPkg_plots contourplot fieldplot3d listdensityplot pointplot semilogplot textplot3d + syn keyword mvPkg_plots contourplot3d gradplot listplot pointplot3d setoptions tubeplot + syn keyword mvPkg_plots coordplot +endif + +" Package: plottools: basic graphical objects {{{2 +if exists("mv_plottools") + syn keyword mvPkg_plottools arc curve dodecahedron hyperbola pieslice semitorus + syn keyword mvPkg_plottools arrow cutin ellipse icosahedron point sphere + syn keyword mvPkg_plottools circle cutout ellipticArc line polygon tetrahedron + syn keyword mvPkg_plottools cone cylinder hemisphere octahedron rectangle torus + syn keyword mvPkg_plottools cuboid disk hexahedron +endif + +" Package: powseries: formal power series {{{2 +if exists("mv_powseries") + syn keyword mvPkg_powseries compose multiply powcreate powlog powsolve reversion + syn keyword mvPkg_powseries evalpow negative powdiff powpoly powsqrt subtract + syn keyword mvPkg_powseries inverse powadd powexp powseries quotient tpsform + syn keyword mvPkg_powseries multconst powcos powint powsin +endif + +" Package: process: (Unix)-multi-processing {{{2 +if exists("mv_process") + syn keyword mvPkg_process block fork pclose pipe popen wait + syn keyword mvPkg_process exec kill +endif + +" Package: simplex: linear optimization {{{2 +if exists("mv_simplex") + syn keyword mvPkg_simplex NONNEGATIVE cterm dual maximize pivoteqn setup + syn keyword mvPkg_simplex basis define_zero equality minimize pivotvar standardize + syn keyword mvPkg_simplex convexhull display feasible pivot ratio +endif + +" Package: stats: statistics {{{2 +if exists("mv_stats") + syn keyword mvPkg_stats anova describe fit random statevalf statplots +endif + +" Package: student: student calculus {{{2 +if exists("mv_student") + syn keyword mvPkg_student D Product distance isolate middlesum rightsum + syn keyword mvPkg_student Diff Sum equate leftbox midpoint showtangent + syn keyword mvPkg_student Doubleint Tripleint extrema leftsum minimize simpson + syn keyword mvPkg_student Int changevar integrand makeproc minimize slope + syn keyword mvPkg_student Limit combine intercept maximize powsubs trapezoid + syn keyword mvPkg_student Lineint completesquare intparts middlebox rightbox value + syn keyword mvPkg_student Point +endif + +" Package: sumtools: indefinite and definite sums {{{2 +if exists("mv_sumtools") + syn keyword mvPkg_sumtools Hypersum extended_gosper hyperrecursion hyperterm sumrecursion sumtohyper + syn keyword mvPkg_sumtools Sumtohyper gosper hypersum simpcomb +endif + +" Package: tensor: tensor computations and General Relativity {{{2 +if exists("mv_tensor") + syn keyword mvPkg_tensor Christoffel1 Riemann connexF display_allGR get_compts partial_diff + syn keyword mvPkg_tensor Christoffel2 RiemannF contract dual get_rank permute_indices + syn keyword mvPkg_tensor Einstein Weyl convertNP entermetric invars petrov + syn keyword mvPkg_tensor Jacobian act cov_diff exterior_diff invert prod + syn keyword mvPkg_tensor Killing_eqns antisymmetrize create exterior_prod lin_com raise + syn keyword mvPkg_tensor Levi_Civita change_basis d1metric frame lower symmetrize + syn keyword mvPkg_tensor Lie_diff commutator d2metric geodesic_eqns npcurve tensorsGR + syn keyword mvPkg_tensor Ricci compare directional_diff get_char npspin transform + syn keyword mvPkg_tensor Ricciscalar conj displayGR +endif + +" Package: totorder: total orders on names {{{2 +if exists("mv_totorder") + syn keyword mvPkg_totorder forget init ordering tassume tis +endif +" ===================================================================== + +" Highlighting: Define the default highlighting. {{{1 +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_maplev_syntax_inits") + if version < 508 + let did_maplev_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " Maple->Maple Links {{{2 + HiLink mvBraceError mvError + HiLink mvCurlyError mvError + HiLink mvDebug mvTodo + HiLink mvParenError mvError + HiLink mvPkg_DEtools mvPkgFunc + HiLink mvPkg_Galois mvPkgFunc + HiLink mvPkg_GaussInt mvPkgFunc + HiLink mvPkg_LREtools mvPkgFunc + HiLink mvPkg_combinat mvPkgFunc + HiLink mvPkg_combstruct mvPkgFunc + HiLink mvPkg_difforms mvPkgFunc + HiLink mvPkg_finance mvPkgFunc + HiLink mvPkg_genfunc mvPkgFunc + HiLink mvPkg_geometry mvPkgFunc + HiLink mvPkg_grobner mvPkgFunc + HiLink mvPkg_group mvPkgFunc + HiLink mvPkg_inttrans mvPkgFunc + HiLink mvPkg_liesymm mvPkgFunc + HiLink mvPkg_linalg mvPkgFunc + HiLink mvPkg_logic mvPkgFunc + HiLink mvPkg_networks mvPkgFunc + HiLink mvPkg_numapprox mvPkgFunc + HiLink mvPkg_numtheory mvPkgFunc + HiLink mvPkg_orthopoly mvPkgFunc + HiLink mvPkg_padic mvPkgFunc + HiLink mvPkg_plots mvPkgFunc + HiLink mvPkg_plottools mvPkgFunc + HiLink mvPkg_powseries mvPkgFunc + HiLink mvPkg_process mvPkgFunc + HiLink mvPkg_simplex mvPkgFunc + HiLink mvPkg_stats mvPkgFunc + HiLink mvPkg_student mvPkgFunc + HiLink mvPkg_sumtools mvPkgFunc + HiLink mvPkg_tensor mvPkgFunc + HiLink mvPkg_totorder mvPkgFunc + HiLink mvRange mvOper + HiLink mvSemiError mvError + + " Maple->Standard Links {{{2 + HiLink mvAssign Delimiter + HiLink mvBool Boolean + HiLink mvComma Delimiter + HiLink mvComment Comment + HiLink mvCond Conditional + HiLink mvConstant Number + HiLink mvDelayEval Label + HiLink mvError Error + HiLink mvLibrary Statement + HiLink mvNumber Number + HiLink mvOper Operator + HiLink mvPackage Type + HiLink mvPkgFunc Function + HiLink mvPktOption Special + HiLink mvRepeat Repeat + HiLink mvSpecial Special + HiLink mvStatement Statement + HiLink mvString String + HiLink mvTodo Todo + + delcommand HiLink +endif + +" Current Syntax: {{{1 +let b:current_syntax = "maple" +" vim: ts=20 fdm=marker diff --git a/runtime/syntax/masm.vim b/runtime/syntax/masm.vim new file mode 100644 index 000000000..e11a0293a --- /dev/null +++ b/runtime/syntax/masm.vim @@ -0,0 +1,144 @@ +" Vim syntax file +" Language: Microsoft Assembler (80x86) +" Maintainer: Rob Brady <robb@datatone.com> +" Last Change: $Date$ +" URL: http://www.datatone.com/~robb/vim/syntax/masm.vim +" $Revision$ + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + + +" syn match masmType "\.word" + +syn match masmIdentifier "[a-z_$][a-z0-9_$]*" +syn match masmLabel "^[A-Z_$][A-Z0-9_$]*:"he=e-1 + +syn match masmDecimal "\d*" +syn match masmBinary "[0-1]\+b" "put this before hex or 0bfh dies! +syn match masmHexadecimal "[0-9]\x*h" +syn match masmFloat "[0-9]\x*r" + +syn match masmComment ";.*" +syn region masmString start=+'+ end=+'+ + +syn keyword masmOperator AND BYTE PTR CODEPTR DATAPTR DUP DWORD EQ FAR +syn keyword masmOperator FWORD GE GT HIGH LARGE LE LOW LT MOD NE NEAR +syn keyword masmOperator NOT OFFSET OR PROC PWORD QWORD SEG SHORT TBYTE +syn keyword masmOperator TYPE WORD PARA +syn keyword masmDirective ALIGN ARG ASSUME CODESEG COMM +syn keyword masmDirective CONST DATASEG DB DD DF DISPLAY DOSSEG DP +syn keyword masmDirective DQ DT DW ELSE ELSEIF EMUL END ENDIF ENDM ENDP +syn keyword masmDirective ENDS ENUM EQU PROC PUBLIC PUBLICDLL RADIX +syn keyword masmDirective EXTRN FARDATA GLOBAL RECORD SEGMENT SMALLSTACK +syn keyword masmDirective GROUP IF IF1 IF2 IFB IFDEF IFDIF IFDIFI +syn keyword masmDirective IFE IFIDN IFIDNI IFNB IFNDEF INCLUDE INCLUDLIB +syn keyword masmDirective LABEL LARGESTACK STACK STRUC SUBTTL TITLE +syn keyword masmDirective MODEL NAME NOEMUL UNION USES VERSION +syn keyword masmDirective ORG FLAT +syn match masmDirective "\.model" +syn match masmDirective "\.186" +syn match masmDirective "\.286" +syn match masmDirective "\.286c" +syn match masmDirective "\.286p" +syn match masmDirective "\.287" +syn match masmDirective "\.386" +syn match masmDirective "\.386c" +syn match masmDirective "\.386p" +syn match masmDirective "\.387" +syn match masmDirective "\.486" +syn match masmDirective "\.486c" +syn match masmDirective "\.486p" +syn match masmDirective "\.8086" +syn match masmDirective "\.8087" +syn match masmDirective "\.ALPHA" +syn match masmDirective "\.CODE" +syn match masmDirective "\.DATA" + +syn keyword masmRegister AX BX CX DX SI DI BP SP +syn keyword masmRegister ES DS SS CS +syn keyword masmRegister AH BH CH DH AL BL CL DL +syn keyword masmRegister EAX EBX ECX EDX ESI EDI EBP ESP + + +" these are current as of the 486 - don't have any pentium manuals handy +syn keyword masmOpcode AAA AAD AAM AAS ADC ADD AND ARPL BOUND BSF +syn keyword masmOpcode BSR BSWAP BT BTC BTR BTS BSWAP BT BTC BTR +syn keyword masmOpcode BTS CALL CBW CDQ CLC CLD CLI CLTS CMC CMP +syn keyword masmOpcode CMPS CMPSB CMPSW CMPSD CMPXCHG CWD CWDE DAA +syn keyword masmOpcode DAS DEC DIV ENTER HLT IDIV IMUL IN INC INS +syn keyword masmOpcode INSB INSW INSD INT INTO INVD INVLPG IRET +syn keyword masmOpcode IRETD JA JAE JB JBE JC JCXZ JECXZ JE JZ JG +syn keyword masmOpcode JGE JL JLE JNA JNAE JNB JNBE JNC JNE JNG JNGE +syn keyword masmOpcode JNL JNLE JNO JNP JNS JNZ JO JP JPE JPO JS JZ +syn keyword masmOpcode JMP LAHF LAR LEA LEAVE LGDT LIDT LGS LSS LFS +syn keyword masmOpcode LODS LODSB LODSW LODSD LOOP LOOPE LOOPZ LOONE +syn keyword masmOpcode LOOPNE RETF RETN +syn keyword masmOpcode LDS LES LLDT LMSW LOCK LSL LTR MOV MOVS MOVSB +syn keyword masmOpcode MOVSW MOVSD MOVSX MOVZX MUL NEG NOP NOT OR +syn keyword masmOpcode OUT OUTS OUTSB OUTSW OUTSD POP POPA POPD +syn keyword masmOpcode POPF POPFD PUSH PUSHA PUSHAD PUSHF PUSHFD +syn keyword masmOpcode RCL RCR ROL ROR REP REPE REPZ REPNE REPNZ +syn keyword masmOpcode RET SAHF SAL SAR SHL SHR SBB SCAS SCASB +syn keyword masmOpcode SCASW SCASD SETA SETAE SETB SETBE SETC SETE +syn keyword masmOpcode SETG SETGE SETL SETLE SETNA SETNAE SETNB +syn keyword masmOpcode SETNBE SETNC SETNE SETNG SETNGE SETNL SETNLE +syn keyword masmOpcode SETNO SETNP SETNS SETNZ SETO SETP SETPE SETPO +syn keyword masmOpcode SETS SETZ SGDT SIDT SHLD SHRD SLDT SMSW STC +syn keyword masmOpcode STD STI STOS STOSB STOSW STOSD STR SUB TEST +syn keyword masmOpcode VERR VERW WAIT WBINVD XADD XCHG XLAT XLATB XOR + +" floating point coprocessor as of 487 +syn keyword masmOpFloat F2XM1 FABS FADD FADDP FBLD FBSTP FCHS FCLEX +syn keyword masmOpFloat FNCLEX FCOM FCOMP FCOMPP FCOS FDECSTP FDISI +syn keyword masmOpFloat FNDISI FDIV FDIVP FDIVR FDIVRP FENI FNENI +syn keyword masmOpFloat FFREE FIADD FICOM FICOMP FIDIV FIDIVR FILD +syn keyword masmOpFloat FIMUL FINCSTP FINIT FNINIT FIST FISTP FISUB +syn keyword masmOpFloat FISUBR FLD FLDCW FLDENV FLDLG2 FLDLN2 FLDL2E +syn keyword masmOpFloat FLDL2T FLDPI FLDZ FLD1 FMUL FMULP FNOP FPATAN +syn keyword masmOpFloat FPREM FPREM1 FPTAN FRNDINT FRSTOR FSAVE +syn keyword masmOpFloat FNSAVE FSCALE FSETPM FSIN FSINCOS FSQRT FST +syn keyword masmOpFloat FSTCW FNSTCW FSTENV FNSTENV FSTP FSTSW FNSTSW +syn keyword masmOpFloat FSUB FSUBP FSUBR FSUBRP FTST FUCOM FUCOMP +syn keyword masmOpFloat FUCOMPP FWAIT FXAM FXCH FXTRACT FYL2X FYL2XP1 +syn match masmOpFloat "FSTSW[ \t]\+AX" +syn match masmOpFloat "FNSTSW[ \t]\+AX" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_masm_syntax_inits") + if version < 508 + let did_masm_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + HiLink masmLabel Label + HiLink masmComment Comment + HiLink masmDirective Statement + HiLink masmOperator Statement + HiLink masmString String + + HiLink masmHexadecimal Number + HiLink masmDecimal Number + HiLink masmBinary Number + HiLink masmFloat Number + + HiLink masmIdentifier Identifier + + delcommand HiLink +endif + +let b:current_syntax = "masm" + +" vim: ts=8 diff --git a/runtime/syntax/mason.vim b/runtime/syntax/mason.vim new file mode 100644 index 000000000..40bdb0eaa --- /dev/null +++ b/runtime/syntax/mason.vim @@ -0,0 +1,99 @@ +" Vim syntax file +" Language: Mason (Perl embedded in HTML) +" Maintainer: Andrew Smith <andrewdsmith@yahoo.com> +" Last change: 2003 May 11 +" URL: http://www.masonhq.com/editors/mason.vim +" +" This seems to work satisfactorily with html.vim and perl.vim for version 5.5. +" Please mail any fixes or improvements to the above address. Things that need +" doing include: +" +" - Add match for component names in <& &> blocks. +" - Add match for component names in <%def> and <%method> block delimiters. +" - Fix <%text> blocks to show HTML tags but ignore Mason tags. +" + +" Clear previous syntax settings unless this is v6 or above, in which case just +" exit without doing anything. +" +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +" The HTML syntax file included below uses this variable. +" +if !exists("main_syntax") + let main_syntax = 'mason' +endif + +" First pull in the HTML syntax. +" +if version < 600 + so <sfile>:p:h/html.vim +else + runtime! syntax/html.vim + unlet b:current_syntax +endif + +syn cluster htmlPreproc add=@masonTop + +" Now pull in the Perl syntax. +" +if version < 600 + syn include @perlTop <sfile>:p:h/perl.vim +else + syn include @perlTop syntax/perl.vim +endif + +" It's hard to reduce down to the correct sub-set of Perl to highlight in some +" of these cases so I've taken the safe option of just using perlTop in all of +" them. If you have any suggestions, please let me know. +" +syn region masonLine matchgroup=Delimiter start="^%" end="$" contains=@perlTop +syn region masonExpr matchgroup=Delimiter start="<%" end="%>" contains=@perlTop +syn region masonPerl matchgroup=Delimiter start="<%perl>" end="</%perl>" contains=@perlTop +syn region masonComp keepend matchgroup=Delimiter start="<&" end="&>" contains=@perlTop + +syn region masonArgs matchgroup=Delimiter start="<%args>" end="</%args>" contains=@perlTop + +syn region masonInit matchgroup=Delimiter start="<%init>" end="</%init>" contains=@perlTop +syn region masonCleanup matchgroup=Delimiter start="<%cleanup>" end="</%cleanup>" contains=@perlTop +syn region masonOnce matchgroup=Delimiter start="<%once>" end="</%once>" contains=@perlTop +syn region masonShared matchgroup=Delimiter start="<%shared>" end="</%shared>" contains=@perlTop + +syn region masonDef matchgroup=Delimiter start="<%def[^>]*>" end="</%def>" contains=@htmlTop +syn region masonMethod matchgroup=Delimiter start="<%method[^>]*>" end="</%method>" contains=@htmlTop + +syn region masonFlags matchgroup=Delimiter start="<%flags>" end="</%flags>" contains=@perlTop +syn region masonAttr matchgroup=Delimiter start="<%attr>" end="</%attr>" contains=@perlTop + +syn region masonFilter matchgroup=Delimiter start="<%filter>" end="</%filter>" contains=@perlTop + +syn region masonDoc matchgroup=Delimiter start="<%doc>" end="</%doc>" +syn region masonText matchgroup=Delimiter start="<%text>" end="</%text>" + +syn cluster masonTop contains=masonLine,masonExpr,masonPerl,masonComp,masonArgs,masonInit,masonCleanup,masonOnce,masonShared,masonDef,masonMethod,masonFlags,masonAttr,masonFilter,masonDoc,masonText + +" Set up default highlighting. Almost all of this is done in the included +" syntax files. +" +if version >= 508 || !exists("did_mason_syn_inits") + if version < 508 + let did_mason_syn_inits = 1 + com -nargs=+ HiLink hi link <args> + else + com -nargs=+ HiLink hi def link <args> + endif + + HiLink masonDoc Comment + + delc HiLink +endif + +let b:current_syntax = "mason" + +if main_syntax == 'mason' + unlet main_syntax +endif diff --git a/runtime/syntax/master.vim b/runtime/syntax/master.vim new file mode 100644 index 000000000..c2125c155 --- /dev/null +++ b/runtime/syntax/master.vim @@ -0,0 +1,50 @@ +" Vim syntax file +" Language: Focus Master File +" Maintainer: Rob Brady <robb@datatone.com> +" Last Change: $Date$ +" URL: http://www.datatone.com/~robb/vim/syntax/master.vim +" $Revision$ + +" this is a very simple syntax file - I will be improving it +" add entire DEFINE syntax + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case match + +" A bunch of useful keywords +syn keyword masterKeyword FILENAME SUFFIX SEGNAME SEGTYPE PARENT FIELDNAME +syn keyword masterKeyword FIELD ALIAS USAGE INDEX MISSING ON +syn keyword masterKeyword FORMAT CRFILE CRKEY +syn keyword masterDefine DEFINE DECODE EDIT +syn region masterString start=+"+ end=+"+ +syn region masterString start=+'+ end=+'+ +syn match masterComment "\$.*" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_master_syntax_inits") + if version < 508 + let did_master_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink masterKeyword Keyword + HiLink masterComment Comment + HiLink masterString String + + delcommand HiLink +endif + +let b:current_syntax = "master" + +" vim: ts=8 diff --git a/runtime/syntax/matlab.vim b/runtime/syntax/matlab.vim new file mode 100644 index 000000000..9bba9759c --- /dev/null +++ b/runtime/syntax/matlab.vim @@ -0,0 +1,109 @@ +" Vim syntax file +" Language: Matlab +" Maintainer: Preben 'Peppe' Guldberg <peppe-vim@wielders.org> +" Original author: Mario Eusebio +" Last Change: 30 May 2003 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn keyword matlabStatement return +syn keyword matlabLabel case switch +syn keyword matlabConditional else elseif end if otherwise +syn keyword matlabRepeat do for while + +syn keyword matlabTodo contained TODO + +" If you do not want these operators lit, uncommment them and the "hi link" below +syn match matlabArithmeticOperator "[-+]" +syn match matlabArithmeticOperator "\.\=[*/\\^]" +syn match matlabRelationalOperator "[=~]=" +syn match matlabRelationalOperator "[<>]=\=" +syn match matlabLogicalOperator "[&|~]" + +syn match matlabLineContinuation "\.\{3}" + +"syn match matlabIdentifier "\<\a\w*\>" + +" String +syn region matlabString start=+'+ end=+'+ oneline + +" If you don't like tabs +syn match matlabTab "\t" + +" Standard numbers +syn match matlabNumber "\<\d\+[ij]\=\>" +" floating point number, with dot, optional exponent +syn match matlabFloat "\<\d\+\(\.\d*\)\=\([edED][-+]\=\d\+\)\=[ij]\=\>" +" floating point number, starting with a dot, optional exponent +syn match matlabFloat "\.\d\+\([edED][-+]\=\d\+\)\=[ij]\=\>" + +" Transpose character and delimiters: Either use just [...] or (...) aswell +syn match matlabDelimiter "[][]" +"syn match matlabDelimiter "[][()]" +syn match matlabTransposeOperator "[])a-zA-Z0-9.]'"lc=1 + +syn match matlabSemicolon ";" + +syn match matlabComment "%.*$" contains=matlabTodo,matlabTab + +syn keyword matlabOperator break zeros default margin round ones rand +syn keyword matlabOperator ceil floor size clear zeros eye mean std cov + +syn keyword matlabFunction error eval function + +syn keyword matlabImplicit abs acos atan asin cos cosh exp log prod sum +syn keyword matlabImplicit log10 max min sign sin sqrt tan reshape + +syn match matlabError "-\=\<\d\+\.\d\+\.[^*/\\^]" +syn match matlabError "-\=\<\d\+\.\d\+[eEdD][-+]\=\d\+\.\([^*/\\^]\)" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_matlab_syntax_inits") + if version < 508 + let did_matlab_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink matlabTransposeOperator matlabOperator + HiLink matlabOperator Operator + HiLink matlabLineContinuation Special + HiLink matlabLabel Label + HiLink matlabConditional Conditional + HiLink matlabRepeat Repeat + HiLink matlabTodo Todo + HiLink matlabString String + HiLink matlabDelimiter Identifier + HiLink matlabTransposeOther Identifier + HiLink matlabNumber Number + HiLink matlabFloat Float + HiLink matlabFunction Function + HiLink matlabError Error + HiLink matlabImplicit matlabStatement + HiLink matlabStatement Statement + HiLink matlabSemicolon SpecialChar + HiLink matlabComment Comment + + HiLink matlabArithmeticOperator matlabOperator + HiLink matlabRelationalOperator matlabOperator + HiLink matlabLogicalOperator matlabOperator + +"optional highlighting + "HiLink matlabIdentifier Identifier + "HiLink matlabTab Error + + delcommand HiLink +endif + +let b:current_syntax = "matlab" + +"EOF vim: ts=8 noet tw=100 sw=8 sts=0 diff --git a/runtime/syntax/mel.vim b/runtime/syntax/mel.vim new file mode 100644 index 000000000..dab894865 --- /dev/null +++ b/runtime/syntax/mel.vim @@ -0,0 +1,121 @@ +" Vim syntax file +" Language: MEL (Maya Extension Language) +" Maintainer: Robert Minsk <egbert@centropolisfx.com> +" Last Change: May 27 1999 +" Based on: Bram Moolenaar <Bram@vim.org> C syntax file + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" when wanted, highlight trailing white space and spaces before tabs +if exists("mel_space_errors") + sy match melSpaceError "\s\+$" + sy match melSpaceError " \+\t"me=e-1 +endif + +" A bunch of usefull MEL keyworks +sy keyword melBoolean true false yes no on off + +sy keyword melFunction proc +sy match melIdentifier "\$\(\a\|_\)\w*" + +sy keyword melStatement break continue return +sy keyword melConditional if else switch +sy keyword melRepeat while for do in +sy keyword melLabel case default +sy keyword melOperator size eval env exists whatIs +sy keyword melKeyword alias +sy keyword melException catch error warning + +sy keyword melInclude source + +sy keyword melType int float string vector matrix +sy keyword melStorageClass global + +sy keyword melDebug trace + +sy keyword melTodo contained TODO FIXME XXX + +" MEL data types +sy match melCharSpecial contained "\\[ntr\\"]" +sy match melCharError contained "\\[^ntr\\"]" + +sy region melString start=+"+ skip=+\\"+ end=+"+ contains=melCharSpecial,melCharError + +sy case ignore +sy match melInteger "\<\d\+\(e[-+]\=\d\+\)\=\>" +sy match melFloat "\<\d\+\(e[-+]\=\d\+\)\=f\>" +sy match melFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=f\=\>" +sy match melFloat "\.\d\+\(e[-+]\=\d\+\)\=f\=\>" +sy case match + +sy match melCommaSemi contained "[,;]" +sy region melMatrixVector start=/<</ end=/>>/ contains=melInteger,melFloat,melIdentifier,melCommaSemi + +sy cluster melGroup contains=melFunction,melStatement,melConditional,melLabel,melKeyword,melStorageClass,melTODO,melCharSpecial,melCharError,melCommaSemi + +" catch errors caused by wrong parenthesis +sy region melParen transparent start='(' end=')' contains=ALLBUT,@melGroup,melParenError,melInParen +sy match melParenError ")" +sy match melInParen contained "[{}]" + +" comments +sy region melComment start="/\*" end="\*/" contains=melTodo,melSpaceError +sy match melComment "//.*" contains=melTodo,melSpaceError +sy match melCommentError "\*/" + +sy region melQuestionColon matchgroup=melConditional transparent start='?' end=':' contains=ALLBUT,@melGroup + +if !exists("mel_minlines") + let mel_minlines=15 +endif +exec "sy sync ccomment melComment minlines=" . mel_minlines + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_mel_syntax_inits") + if version < 508 + let did_mel_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink melBoolean Boolean + HiLink melFunction Function + HiLink melIdentifier Identifier + HiLink melStatement Statement + HiLink melConditional Conditional + HiLink melRepeat Repeat + HiLink melLabel Label + HiLink melOperator Operator + HiLink melKeyword Keyword + HiLink melException Exception + HiLink melInclude Include + HiLink melType Type + HiLink melStorageClass StorageClass + HiLink melDebug Debug + HiLink melTodo Todo + HiLink melCharSpecial SpecialChar + HiLink melString String + HiLink melInteger Number + HiLink melFloat Float + HiLink melMatrixVector Float + HiLink melComment Comment + HiLink melError Error + HiLink melSpaceError melError + HiLink melCharError melError + HiLink melParenError melError + HiLink melInParen melError + HiLink melCommentError melError + + delcommand HiLink +endif + +let b:current_syntax = "mel" diff --git a/runtime/syntax/mf.vim b/runtime/syntax/mf.vim new file mode 100644 index 000000000..8bc48fee4 --- /dev/null +++ b/runtime/syntax/mf.vim @@ -0,0 +1,197 @@ +" Vim syntax file +" Language: Metafont +" Maintainer: Andreas Scherer <andreas.scherer@pobox.com> +" Last Change: April 25, 2001 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +" Metafont 'primitives' as defined in chapter 25 of 'The METAFONTbook' +" Page 210: 'boolean expressions' +syn keyword mfBoolExp true false known unknown odd charexists not and or + +" Page 210: 'numeric expression' +syn keyword mfNumExp normaldeviate length ASCII oct hex angle turningnumber +syn keyword mfNumExp totalweight directiontime xpart ypart xxpart xypart +syn keyword mfNumExp yxpart yypart sqrt sind cosd mlog mexp floor +syn keyword mfNumExp uniformdeviate + +" Page 211: 'internal quantities' +syn keyword mfInternal tracingtitles tracingequations tracingcapsules +syn keyword mfInternal tracingchoices tracingspecs tracingpens +syn keyword mfInternal tracingcommands tracingrestores tracingmacros +syn keyword mfInternal tracingedges tracingoutput tracingonline tracingstats +syn keyword mfInternal pausing showstopping fontmaking proofing +syn keyword mfInternal turningcheck warningcheck smoothing autorounding +syn keyword mfInternal granularity fillin year month day time +syn keyword mfInternal charcode charext charwd charht chardp charic +syn keyword mfInternal chardx chardy designsize hppp vppp xoffset yoffset +syn keyword mfInternal boundarychar + +" Page 212: 'pair expressions' +syn keyword mfPairExp point of precontrol postcontrol penoffset rotated +syn keyword mfPairExp scaled shifted slanted transformed xscaled yscaled +syn keyword mfPairExp zscaled + +" Page 213: 'path expressions' +syn keyword mfPathExp makepath reverse subpath curl tension atleast +syn keyword mfPathExp controls cycle + +" Page 214: 'pen expressions' +syn keyword mfPenExp nullpen pencircle makepen + +" Page 214: 'picutre expressions' +syn keyword mfPicExp nullpicture + +" Page 214: 'string expressions' +syn keyword mfStringExp jobname readstring str char decimal substring + +" Page 217: 'commands and statements' +syn keyword mfCommand end dump save interim newinternal randomseed let +syn keyword mfCommand delimiters outer everyjob show showvariable showtoken +syn keyword mfCommand showdependencies showstats message errmessage errhelp +syn keyword mfCommand batchmode nonstopmode scrollmode errorstopmode +syn keyword mfCommand addto also contour doublepath withpen withweight cull +syn keyword mfCommand keeping dropping display inwindow openwindow at from to +syn keyword mfCommand shipout special numspecial + +" Page 56: 'types' +syn keyword mfType boolean numeric pair path pen picture string transform + +" Page 155: 'grouping' +syn keyword mfStatement begingroup endgroup + +" Page 165: 'definitions' +syn keyword mfDefinition enddef def expr suffix text primary secondary +syn keyword mfDefinition tertiary vardef primarydef secondarydef tertiarydef + +" Page 169: 'conditions and loops' +syn keyword mfCondition if fi else elseif endfor for forsuffixes forever +syn keyword mfCondition step until exitif + +" Other primitives listed in the index +syn keyword mfPrimitive charlist endinput expandafter extensible +syn keyword mfPrimitive fontdimen headerbyte inner input intersectiontimes +syn keyword mfPrimitive kern ligtable quote scantokens skipto + +" Keywords defined by plain.mf (defined on pp.262-278) +if !exists("plain_mf_macros") + let plain_mf_macros = 1 " Set this to '0' if your source gets too colourful + " metapost.vim does so to turn off Metafont macros +endif +if plain_mf_macros + syn keyword mfMacro abs addto_currentpicture aspect_ratio base_name + syn keyword mfMacro base_version beginchar blacker blankpicture bot bye byte + syn keyword mfMacro capsule_def ceiling change_width clear_pen_memory clearit + syn keyword mfMacro clearpen clearxy counterclockwise culldraw cullit + syn keyword mfMacro currentpen currentpen_path currentpicture + syn keyword mfMacro currenttransform currentwindow cutdraw cutoff d decr + syn keyword mfMacro define_blacker_pixels define_corrected_pixels + syn keyword mfMacro define_good_x_pixels define_good_y_pixels + syn keyword mfMacro define_horizontal_corrected_pixels define_pixels + syn keyword mfMacro define_whole_blacker_pixels define_whole_pixels + syn keyword mfMacro define_whole_vertical_blacker_pixels + syn keyword mfMacro define_whole_vertical_pixels dir direction directionpoint + syn keyword mfMacro displaying ditto div dotprod down downto draw drawdot + syn keyword mfMacro endchar eps epsilon extra_beginchar extra_endchar + syn keyword mfMacro extra_setup erase exitunless fill filldraw fix_units flex + syn keyword mfMacro font_coding_scheme font_extra_space font_identifier + syn keyword mfMacro font_normal_shrink font_normal_space font_normal_stretch + syn keyword mfMacro font_quad font_setup font_size font_slant font_x_height + syn keyword mfMacro fullcircle generate gfcorners gobble gobbled grayfont h + syn keyword mfMacro halfcircle hide hround identity image_rules incr infinity + syn keyword mfMacro interact interpath intersectionpoint inverse italcorr + syn keyword mfMacro join_radius killtext labelfont labels left lft localfont + syn keyword mfMacro loggingall lowres lowres_fix mag magstep makebox makegrid + syn keyword mfMacro makelabel maketicks max min mod mode mode_def mode_name + syn keyword mfMacro mode_setup nodisplays notransforms number_of_modes numtok + syn keyword mfMacro o_correction openit origin pen_bot pen_lft pen_rt pen_top + syn keyword mfMacro penlabels penpos penrazor penspeck pensquare penstroke + syn keyword mfMacro pickup pixels_per_inch proof proofoffset proofrule + syn keyword mfMacro proofrulethickness quartercircle range reflectedabout + syn keyword mfMacro relax right rotatedabout rotatedaround round rt rulepen + syn keyword mfMacro savepen screenchars screen_rows screen_cols screenrule + syn keyword mfMacro screenstrokes shipit showit slantfont smode smoke softjoin + syn keyword mfMacro solve stop superellipse takepower tensepath titlefont + syn keyword mfMacro tolerance top tracingall tracingnone undraw undrawdot + syn keyword mfMacro unfill unfilldraw unitpixel unitsquare unitvector up upto + syn keyword mfMacro vround w whatever +endif + +" Some other basic macro names, e.g., from cmbase, logo, etc. +if !exists("other_mf_macros") + let other_mf_macros = 1 " Set this to '0' if your code gets too colourful + " metapost.vim does so to turn off Metafont macros +endif +if other_mf_macros + syn keyword mfMacro beginlogochar +endif + +" Numeric tokens +syn match mfNumeric "[-]\=\d\+" +syn match mfNumeric "[-]\=\.\d\+" +syn match mfNumeric "[-]\=\d\+\.\d\+" + +" Metafont lengths +syn match mfLength "\<\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\>" +syn match mfLength "\<[-]\=\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=\>" +syn match mfLength "\<[-]\=\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=\>" +syn match mfLength "\<[-]\=\d\+\.\d\+\(bp\|cc\|cm\|dd\|in\|mm\|pc\|pt\)\#\=\>" + +" Metafont coordinates and points +syn match mfCoord "\<[xy]\d\+\>" +syn match mfPoint "\<z\d\+\>" + +" String constants +syn region mfString start=+"+ end=+"+ + +" Comments: +syn match mfComment "%.*$" + +" synchronizing +syn sync maxlines=50 + +" Define the default highlighting +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_mf_syntax_inits") + if version < 508 + let did_mf_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink mfBoolExp Statement + HiLink mfNumExp Statement + HiLink mfInternal Identifier + HiLink mfPairExp Statement + HiLink mfPathExp Statement + HiLink mfPenExp Statement + HiLink mfPicExp Statement + HiLink mfStringExp Statement + HiLink mfCommand Statement + HiLink mfType Type + HiLink mfStatement Statement + HiLink mfDefinition Statement + HiLink mfCondition Conditional + HiLink mfPrimitive Statement + HiLink mfMacro Macro + HiLink mfCoord Identifier + HiLink mfPoint Identifier + HiLink mfNumeric Number + HiLink mfLength Number + HiLink mfComment Comment + HiLink mfString String + + delcommand HiLink +endif + +let b:current_syntax = "mf" + +" vim: ts=8 diff --git a/runtime/syntax/mgp.vim b/runtime/syntax/mgp.vim new file mode 100644 index 000000000..76b96612e --- /dev/null +++ b/runtime/syntax/mgp.vim @@ -0,0 +1,83 @@ +" Vim syntax file +" Language: mgp - MaGic Point +" Maintainer: Gerfried Fuchs <alfie@ist.org> +" Filenames: *.mgp +" Last Change: 25 Apr 2001 +" URL: http://alfie.ist.org/vim/syntax/mgp.vim +" +" Comments are very welcome - but please make sure that you are commenting on +" the latest version of this file. +" SPAM is _NOT_ welcome - be ready to be reported! + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + + +syn match mgpLineSkip "\\$" + +" all the commands that are currently recognized +syn keyword mgpCommand contained size fore back bgrad left leftfill center +syn keyword mgpCommand contained right shrink lcutin rcutin cont xfont vfont +syn keyword mgpCommand contained tfont tmfont tfont0 bar image newimage +syn keyword mgpCommand contained prefix icon bimage default tab vgap hgap +syn keyword mgpCommand contained pause mark again system filter endfilter +syn keyword mgpCommand contained vfcap tfdir deffont font embed endembed +syn keyword mgpCommand contained noop pcache include + +" charset is not yet supported :-) +" syn keyword mgpCommand contained charset + +syn region mgpFile contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match mgpValue contained "\d\+" +syn match mgpSize contained "\d\+x\d\+" +syn match mgpLine +^%.*$+ contains=mgpCommand,mgpFile,mgpSize,mgpValue + +" Comments +syn match mgpPercent +^%%.*$+ +syn match mgpHash +^#.*$+ + +" these only work alone +syn match mgpPage +^%page$+ +syn match mgpNoDefault +^%nodefault$+ + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_mgp_syn_inits") + let did_mgp_syn_inits = 1 + if version < 508 + let did_mgp_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink mgpLineSkip Special + + HiLink mgpHash mgpComment + HiLink mgpPercent mgpComment + HiLink mgpComment Comment + + HiLink mgpCommand Identifier + + HiLink mgpLine Type + + HiLink mgpFile String + HiLink mgpSize Number + HiLink mgpValue Number + + HiLink mgpPage mgpDefine + HiLink mgpNoDefault mgpDefine + HiLink mgpDefine Define + + delcommand HiLink +endif + +let b:current_syntax = "mgp" diff --git a/runtime/syntax/mib.vim b/runtime/syntax/mib.vim new file mode 100644 index 000000000..a29242d0f --- /dev/null +++ b/runtime/syntax/mib.vim @@ -0,0 +1,77 @@ +" Vim syntax file +" Language: Vim syntax file for SNMPv1 and SNMPv2 MIB and SMI files +" Author: David Pascoe <pascoedj@spamcop.net> +" Written: Wed Jan 28 14:37:23 GMT--8:00 1998 +" Last Changed: Thu Feb 27 10:18:16 WST 2003 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if version >= 600 + setlocal iskeyword=@,48-57,_,128-167,224-235,-,:,= +else + set iskeyword=@,48-57,_,128-167,224-235,-,:,= +endif + +syn keyword mibImplicit ACCESS ANY AUGMENTS BEGIN BIT BITS BOOLEAN CHOICE +syn keyword mibImplicit COMPONENTS CONTACT-INFO DEFINITIONS DEFVAL +syn keyword mibImplicit DESCRIPTION DISPLAY-HINT END ENTERPRISE EXTERNAL FALSE +syn keyword mibImplicit FROM GROUP IMPLICIT IMPLIED IMPORTS INDEX +syn keyword mibImplicit LAST-UPDATED MANDATORY-GROUPS MAX-ACCESS +syn keyword mibImplicit MIN-ACCESS MODULE MODULE-COMPLIANCE MODULE-IDENTITY +syn keyword mibImplicit NOTIFICATION-GROUP NOTIFICATION-TYPE NOTIFICATIONS +syn keyword mibImplicit NULL OBJECT-GROUP OBJECT-IDENTITY OBJECT-TYPE +syn keyword mibImplicit OBJECTS OF OPTIONAL ORGANIZATION REFERENCE +syn keyword mibImplicit REVISION SEQUENCE SET SIZE STATUS SYNTAX +syn keyword mibImplicit TEXTUAL-CONVENTION TRAP-TYPE TRUE UNITS VARIABLES +syn keyword mibImplicit WRITE-SYNTAX ::= +syn keyword mibValue accessible-for-notify current DisplayString +syn keyword mibValue deprecated mandatory not-accessible obsolete optional +syn keyword mibValue read-create read-only read-write write-only INTEGER +syn keyword mibValue Counter Gauge IpAddress OCTET STRING experimental mib-2 +syn keyword mibValue TimeTicks RowStatus TruthValue UInteger32 snmpModules +syn keyword mibValue Integer32 Counter32 TestAndIncr TimeStamp InstancePointer +syn keyword mibValue OBJECT IDENTIFIER Gauge32 AutonomousType Counter64 +syn keyword mibValue PhysAddress TimeInterval MacAddress StorageType RowPointer +syn keyword mibValue TDomain TAddress ifIndex + +" Epilogue SMI extensions +syn keyword mibEpilogue FORCE-INCLUDE EXCLUDE cookie get-function set-function +syn keyword mibEpilogue test-function get-function-async set-function-async +syn keyword mibEpilogue test-function-async next-function next-function-async +syn keyword mibEpilogue leaf-name +syn keyword mibEpilogue DEFAULT contained + +syn match mibComment "\ *--.*$" +syn match mibNumber "\<['0-9a-fA-FhH]*\>" +syn region mibDescription start="\"" end="\"" contains=DEFAULT + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_mib_syn_inits") + if version < 508 + let did_mib_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink mibImplicit Statement + HiLink mibComment Comment + HiLink mibConstants String + HiLink mibNumber Number + HiLink mibDescription Identifier + HiLink mibEpilogue SpecialChar + HiLink mibValue Structure + delcommand HiLink +endif + +let b:current_syntax = "mib" + +" vim: ts=8 diff --git a/runtime/syntax/mma.vim b/runtime/syntax/mma.vim new file mode 100644 index 000000000..6eb8d66a9 --- /dev/null +++ b/runtime/syntax/mma.vim @@ -0,0 +1,63 @@ +" Vim syntax file +" Language: Mathematica +" Maintainer: Wolfgang Waltenberger <wwalten@ben.tuwien.ac.at> +" Last Change: Thu 26 Apr 2001 13:20:03 CEST + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match mmaError "\*)" +syn match mmaFixme "FIXME" +syn region mmaComment start=+(\*+ end=+\*)+ skipempty contains=mmaFixme +syn match mmaMessage "\a*::\a*" +syn region mmaString start=+'+ end=+'+ +syn region mmaString start=+"+ end=+"+ +syn region mmaString start=+\\\"+ end=+\"+ +syn region mmaString start=+\"+ end=+\"+ + +syn match mmaVariable "$\a*" + +syn match mmaPattern "[A-Za-z01-9`]*_\{1,3}" +syn match mmaPattern "[A-Za-z01-9`]*_\{1,3}\(Integer\|Real\|Pattern\|Symbol\)" +syn match mmaPattern "[A-Za-z01-9`]*_\{1,3}\(Rational\|Complex\|Head\)" +syn match mmaPattern "[A-Za-z01-9`]*_\{1,3}?[A-Za-z01-9`]*" + +" prefix/infix/postfix notations +syn match mmaGenericFunction "[A-Za-z01-9`]*\s*\(\[\|@\)"he=e-1 +syn match mmaGenericFunction "[A-Za-z01-9`]*\s*\(/@\|@@\)"he=e-2 +syn match mmaGenericFunction "\~\s*[A-Za-z01-9`]*\s*\~"hs=s+1,he=e-1 +syn match mmaGenericFunction "//\s*[A-Za-z01-9`]*"hs=s+2 +syn match mmaOperator "/;" + +syn match mmaPureFunction "#\d*" +syn match mmaPureFunction "&" + +syn match mmaUnicode "\\\[[a-zA-Z01-9]*\]" + +if version >= 508 || !exists("did_mma_syn_inits") + if version < 508 + let did_mma_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink mmaOperator Operator + HiLink mmaVariable Identifier + HiLink mmaString String + HiLink mmaUnicode String + HiLink mmaMessage Identifier + HiLink mmaPattern Identifier + HiLink mmaGenericFunction Function + HiLink mmaError Error + HiLink mmaFixme Error + HiLink mmaComment Comment + HiLink mmaPureFunction Operator + + delcommand HiLink +endif + +let b:current_syntax = "mma" diff --git a/runtime/syntax/mmix.vim b/runtime/syntax/mmix.vim new file mode 100644 index 000000000..5b6a44370 --- /dev/null +++ b/runtime/syntax/mmix.vim @@ -0,0 +1,162 @@ +" Vim syntax file +" Language: MMIX +" Maintainer: Dirk Hüsken, <huesken@informatik.uni-tuebingen.de> +" Last Change: Wed Apr 24 01:18:52 CEST 2002 +" Filenames: *.mms +" URL: http://homepages.uni-tuebingen.de/student/dirk.huesken/vim/syntax/mmix.vim + +" Limitations: Comments must start with either % or // +" (preferrably %, Knuth-Style) + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" MMIX data types +syn keyword mmixType byte wyde tetra octa + +" different literals... +syn match decNumber "[0-9]*" +syn match octNumber "0[0-7][0-7]\+" +syn match hexNumber "#[0-9a-fA-F]\+" +syn region mmixString start=+"+ skip=+\\"+ end=+"+ +syn match mmixChar "'.'" + +" ...and more special MMIX stuff +syn match mmixAt "@" +syn keyword mmixSegments Data_Segment Pool_Segment Stack_Segment + +syn match mmixIdentifier "[a-z_][a-z0-9_]*" + +" labels (for branches etc) +syn match mmixLabel "^[a-z0-9_:][a-z0-9_]*" +syn match mmixLabel "[0-9][HBF]" + +" pseudo-operations +syn keyword mmixPseudo is loc greg + +" comments +syn match mmixComment "%.*" +syn match mmixComment "//.*" +syn match mmixComment "^\*.*" + + +syn keyword mmixOpcode trap fcmp fun feql fadd fix fsub fixu +syn keyword mmixOpcode fmul fcmpe fune feqle fdiv fsqrt frem fint + +syn keyword mmixOpcode floti flotui sfloti sflotui i +syn keyword mmixOpcode muli mului divi divui +syn keyword mmixOpcode addi addui subi subui +syn keyword mmixOpcode 2addui 4addui 8addui 16addui +syn keyword mmixOpcode cmpi cmpui negi negui +syn keyword mmixOpcode sli slui sri srui +syn keyword mmixOpcode bnb bzb bpb bodb +syn keyword mmixOpcode bnnb bnzb bnpb bevb +syn keyword mmixOpcode pbnb pbzb pbpb pbodb +syn keyword mmixOpcode pbnnb pbnzb pbnpb pbevb +syn keyword mmixOpcode csni cszi cspi csodi +syn keyword mmixOpcode csnni csnzi csnpi csevi +syn keyword mmixOpcode zsni zszi zspi zsodi +syn keyword mmixOpcode zsnni zsnzi zsnpi zsevi +syn keyword mmixOpcode ldbi ldbui ldwi ldwui +syn keyword mmixOpcode ldti ldtui ldoi ldoui +syn keyword mmixOpcode ldsfi ldhti cswapi ldunci +syn keyword mmixOpcode ldvtsi preldi pregoi goi +syn keyword mmixOpcode stbi stbui stwi stwui +syn keyword mmixOpcode stti sttui stoi stoui +syn keyword mmixOpcode stsfi sthti stcoi stunci +syn keyword mmixOpcode syncdi presti syncidi pushgoi +syn keyword mmixOpcode ori orni nori xori +syn keyword mmixOpcode andi andni nandi nxori +syn keyword mmixOpcode bdifi wdifi tdifi odifi +syn keyword mmixOpcode muxi saddi mori mxori +syn keyword mmixOpcode muli mului divi divui + +syn keyword mmixOpcode flot flotu sflot sflotu +syn keyword mmixOpcode mul mulu div divu +syn keyword mmixOpcode add addu sub subu +syn keyword mmixOpcode 2addu 4addu 8addu 16addu +syn keyword mmixOpcode cmp cmpu neg negu +syn keyword mmixOpcode sl slu sr sru +syn keyword mmixOpcode bn bz bp bod +syn keyword mmixOpcode bnn bnz bnp bev +syn keyword mmixOpcode pbn pbz pbp pbod +syn keyword mmixOpcode pbnn pbnz pbnp pbev +syn keyword mmixOpcode csn csz csp csod +syn keyword mmixOpcode csnn csnz csnp csev +syn keyword mmixOpcode zsn zsz zsp zsod +syn keyword mmixOpcode zsnn zsnz zsnp zsev +syn keyword mmixOpcode ldb ldbu ldw ldwu +syn keyword mmixOpcode ldt ldtu ldo ldou +syn keyword mmixOpcode ldsf ldht cswap ldunc +syn keyword mmixOpcode ldvts preld prego go +syn keyword mmixOpcode stb stbu stw stwu +syn keyword mmixOpcode stt sttu sto stou +syn keyword mmixOpcode stsf stht stco stunc +syn keyword mmixOpcode syncd prest syncid pushgo +syn keyword mmixOpcode or orn nor xor +syn keyword mmixOpcode and andn nand nxor +syn keyword mmixOpcode bdif wdif tdif odif +syn keyword mmixOpcode mux sadd mor mxor + +syn keyword mmixOpcode seth setmh setml setl inch incmh incml incl +syn keyword mmixOpcode orh ormh orml orl andh andmh andml andnl +syn keyword mmixOpcode jmp pushj geta put +syn keyword mmixOpcode pop resume save unsave sync swym get trip +syn keyword mmixOpcode set lda + +" switch back to being case sensitive +syn case match + +" general-purpose and special-purpose registers +syn match mmixRegister "$[0-9]*" +syn match mmixRegister "r[A-Z]" +syn keyword mmixRegister rBB rTT rWW rXX rYY rZZ + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_mmix_syntax_inits") + if version < 508 + let did_mmix_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + HiLink mmixAt Type + HiLink mmixPseudo Type + HiLink mmixRegister Special + HiLink mmixSegments Type + + HiLink mmixLabel Special + HiLink mmixComment Comment + HiLink mmixOpcode Keyword + + HiLink hexNumber Number + HiLink decNumber Number + HiLink octNumber Number + + HiLink mmixString String + HiLink mmixChar String + + HiLink mmixType Type + HiLink mmixIdentifier Normal + HiLink mmixSpecialComment Comment + + " My default color overrides: + " hi mmixSpecialComment ctermfg=red + "hi mmixLabel ctermfg=lightcyan + " hi mmixType ctermbg=black ctermfg=brown + + delcommand HiLink +endif + +let b:current_syntax = "mmix" + +" vim: ts=8 diff --git a/runtime/syntax/modconf.vim b/runtime/syntax/modconf.vim new file mode 100644 index 000000000..569e13449 --- /dev/null +++ b/runtime/syntax/modconf.vim @@ -0,0 +1,66 @@ +" Vim syntax file +" Language: Linux modutils modules.conf File +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/modconf/ +" Latest Revision: 2004-05-22 +" arch-tag: b7981bdb-daa3-41d1-94b5-a3d60b627916 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" comments +syn region modconfComment start="#" skip="\\$" end="$" contains=modconfTodo + +" todo +syn keyword modconfTodo FIXME TODO XXX NOTE + +" keywords and similar +syn match modconfBegin "^" skipwhite nextgroup=modconfCommand,modconfComment + +syn match modconfCommand "\(add\s\+\)\=(above\|below\|probe\|probeall\}" +syn region modconfCommand transparent matchgroup=modconfCommand start="\(add\s\+\)\=options" skip="\\$" end="$" contains=modconfModOpt +syn keyword modconfCommand define remove keep install insmod_opt else endif +syn keyword modconfCommand nextgroup=modconfPath skipwhite alias depfile generic_stringfile pcimapfile include isapnpmapfile usbmapfile parportmapfile ieee1394mapfile pnpbiosmapfile persistdir prune +syn match modconfCommand "path\(\[\w\+\]\)\=" nextgroup=modconfPath skipwhite +syn region modconfCommand transparent matchgroup=modconfCommand start="^\s*\(if\|elseif\)" skip="\\$" end="$" contains=modconfOp +syn region modconfCommand transparent matchgroup=modconfCommand start="^\s*\(post\|pre\)-\(install\|remove\)" skip="\\$" end="$" + + +" expressions and similay +syn match modconfOp contained "\s-[fnk]\>" +syn region modconfPath contained start="\(=\@=\)\=/" skip="\\$" end="\\\@!\_s" +syn match modconfModOpt contained "\<\w\+=\@=" + +if exists("modconf_minlines") + let b:modconf_minlines = modconf_minlines +else + let b:modconf_minlines = 50 +endif +exec "syn sync minlines=" . b:modconf_minlines + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_modconf_syn_inits") + if version < 508 + let did_modconf_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink modconfComment Comment + HiLink modconfTodo Todo + HiLink modconfCommand Keyword + HiLink modconfPath String + HiLink modconfOp Identifier + HiLink modconfModOpt Identifier + delcommand HiLink +endif + +let b:current_syntax = "modconf" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/model.vim b/runtime/syntax/model.vim new file mode 100644 index 000000000..91b678131 --- /dev/null +++ b/runtime/syntax/model.vim @@ -0,0 +1,59 @@ +" Vim syntax file +" Language: Model +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last Change: 2001 Apr 25 + +" very basic things only (based on the vgrindefs file). +" If you use this language, please improve it, and send me the patches! + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" A bunch of keywords +syn keyword modelKeyword abs and array boolean by case cdnl char copied dispose +syn keyword modelKeyword div do dynamic else elsif end entry external FALSE false +syn keyword modelKeyword fi file for formal fortran global if iff ift in integer include +syn keyword modelKeyword inline is lbnd max min mod new NIL nil noresult not notin od of +syn keyword modelKeyword or procedure public read readln readonly record recursive rem rep +syn keyword modelKeyword repeat res result return set space string subscript such then TRUE +syn keyword modelKeyword true type ubnd union until varies while width + +" Special keywords +syn keyword modelBlock beginproc endproc + +" Comments +syn region modelComment start="\$" end="\$" end="$" + +" Strings +syn region modelString start=+"+ end=+"+ + +" Character constant (is this right?) +syn match modelString "'." + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_model_syntax_inits") + if version < 508 + let did_model_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink modelKeyword Statement + HiLink modelBlock PreProc + HiLink modelComment Comment + HiLink modelString String + + delcommand HiLink +endif + +let b:current_syntax = "model" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/modsim3.vim b/runtime/syntax/modsim3.vim new file mode 100644 index 000000000..04e9ab9ab --- /dev/null +++ b/runtime/syntax/modsim3.vim @@ -0,0 +1,109 @@ +" Vim syntax file +" Language: Modsim III, by compuware corporation (www.compuware.com) +" Maintainer: Philipp Jocham <flip@sbox.tu-graz.ac.at> +" Extension: *.mod +" Last Change: 2001 May 10 +" +" 2001 March 24: +" - Modsim III is a registered trademark from compuware corporation +" - made compatible with Vim 6.0 +" +" 1999 Apr 22 : Changed modsim3Literal from region to match +" +" very basic things only (based on the modula2 and c files). + +if version < 600 + " Remove any old syntax stuff hanging around + syn clear +elseif exists("b:current_syntax") + finish +endif + + +" syn case match " case sensitiv match is default + +" A bunch of keywords +syn keyword modsim3Keyword ACTID ALL AND AS ASK +syn keyword modsim3Keyword BY CALL CASE CLASS CONST DIV +syn keyword modsim3Keyword DOWNTO DURATION ELSE ELSIF EXIT FALSE FIXED FOR +syn keyword modsim3Keyword FOREACH FORWARD IF IN INHERITED INOUT +syn keyword modsim3Keyword INTERRUPT LOOP +syn keyword modsim3Keyword MOD MONITOR NEWVALUE +syn keyword modsim3Keyword NONMODSIM NOT OBJECT OF ON OR ORIGINAL OTHERWISE OUT +syn keyword modsim3Keyword OVERRIDE PRIVATE PROTO REPEAT +syn keyword modsim3Keyword RETURN REVERSED SELF STRERR TELL +syn keyword modsim3Keyword TERMINATE THISMETHOD TO TRUE TYPE UNTIL VALUE VAR +syn keyword modsim3Keyword WAIT WAITFOR WHEN WHILE WITH + +" Builtin functions and procedures +syn keyword modsim3Builtin ABS ACTIVATE ADDMONITOR CAP CHARTOSTR CHR CLONE +syn keyword modsim3Builtin DEACTIVATE DEC DISPOSE FLOAT GETMONITOR HIGH INC +syn keyword modsim3Builtin INPUT INSERT INTTOSTR ISANCESTOR LOW LOWER MAX MAXOF +syn keyword modsim3Builtin MIN MINOF NEW OBJTYPEID OBJTYPENAME OBJVARID ODD +syn keyword modsim3Builtin ONERROR ONEXIT ORD OUTPUT POSITION PRINT REALTOSTR +syn keyword modsim3Builtin REPLACE REMOVEMONITOR ROUND SCHAR SIZEOF SPRINT +syn keyword modsim3Builtin STRLEN STRTOCHAR STRTOINT STRTOREAL SUBSTR TRUNC +syn keyword modsim3Builtin UPDATEVALUE UPPER VAL + +syn keyword modsim3BuiltinNoParen HALT TRACE + +" Special keywords +syn keyword modsim3Block PROCEDURE METHOD MODULE MAIN DEFINITION IMPLEMENTATION +syn keyword modsim3Block BEGIN END + +syn keyword modsim3Include IMPORT FROM + +syn keyword modsim3Type ANYARRAY ANYOBJ ANYREC ARRAY BOOLEAN CHAR INTEGER +syn keyword modsim3Type LMONITORED LRMONITORED NILARRAY NILOBJ NILREC REAL +syn keyword modsim3Type RECORD RMONITOR RMONITORED STRING + +" catch errros cause by wrong parenthesis +" slight problem with "( *)" or "(* )". Hints? +syn region modsim3Paren transparent start='(' end=')' contains=ALLBUT,modsim3ParenError +syn match modsim3ParenError ")" + +" Comments +syn region modsim3Comment1 start="{" end="}" contains=modsim3Comment1,modsim3Comment2 +syn region modsim3Comment2 start="(\*" end="\*)" contains=modsim3Comment1,modsim3Comment2 +" highlighting is wrong for constructs like "{ (* } *)", +" which are allowed in Modsim III, but +" I think something like that shouldn't be used anyway. + +" Strings +syn region modsim3String start=+"+ end=+"+ + +" Literals +"syn region modsim3Literal start=+'+ end=+'+ +syn match modsim3Literal "'[^']'\|''''" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_modsim3_syntax_inits") + if version < 508 + let did_modsim3_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + HiLink modsim3Keyword Statement + HiLink modsim3Block Statement + HiLink modsim3Comment1 Comment + HiLink modsim3Comment2 Comment + HiLink modsim3String String + HiLink modsim3Literal Character + HiLink modsim3Include Statement + HiLink modsim3Type Type + HiLink modsim3ParenError Error + HiLink modsim3Builtin Function + HiLink modsim3BuiltinNoParen Function + + delcommand HiLink +endif + +let b:current_syntax = "modsim3" + +" vim: ts=8 sw=2 + diff --git a/runtime/syntax/modula2.vim b/runtime/syntax/modula2.vim new file mode 100644 index 000000000..3018900e8 --- /dev/null +++ b/runtime/syntax/modula2.vim @@ -0,0 +1,86 @@ +" Vim syntax file +" Language: Modula 2 +" Maintainer: pf@artcom0.north.de (Peter Funk) +" based on original work of Bram Moolenaar <Bram@vim.org> +" Last Change: 2001 May 09 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Don't ignore case (Modula-2 is case significant). This is the default in vim + +" Especially emphasize headers of procedures and modules: +syn region modula2Header matchgroup=modula2Header start="PROCEDURE " end="(" contains=modula2Ident oneline +syn region modula2Header matchgroup=modula2Header start="MODULE " end=";" contains=modula2Ident oneline +syn region modula2Header matchgroup=modula2Header start="BEGIN (\*" end="\*)" contains=modula2Ident oneline +syn region modula2Header matchgroup=modula2Header start="END " end=";" contains=modula2Ident oneline +syn region modula2Keyword start="END" end=";" contains=ALLBUT,modula2Ident oneline + +" Some very important keywords which should be emphasized more than others: +syn keyword modula2AttKeyword CONST EXIT HALT RETURN TYPE VAR +" All other keywords in alphabetical order: +syn keyword modula2Keyword AND ARRAY BY CASE DEFINITION DIV DO ELSE +syn keyword modula2Keyword ELSIF EXPORT FOR FROM IF IMPLEMENTATION IMPORT +syn keyword modula2Keyword IN LOOP MOD NOT OF OR POINTER QUALIFIED RECORD +syn keyword modula2Keyword SET THEN TO UNTIL WHILE WITH + +syn keyword modula2Type ADDRESS BITSET BOOLEAN CARDINAL CHAR INTEGER REAL WORD +syn keyword modula2StdFunc ABS CAP CHR DEC EXCL INC INCL ORD SIZE TSIZE VAL +syn keyword modula2StdConst FALSE NIL TRUE +" The following may be discussed, since NEW and DISPOSE are some kind of +" special builtin macro functions: +syn keyword modula2StdFunc NEW DISPOSE +" The following types are added later on and may be missing from older +" Modula-2 Compilers (they are at least missing from the original report +" by N.Wirth from March 1980 ;-) Highlighting should apply nevertheless: +syn keyword modula2Type BYTE LONGCARD LONGINT LONGREAL PROC SHORTCARD SHORTINT +" same note applies to min and max, which were also added later to m2: +syn keyword modula2StdFunc MAX MIN +" The underscore was originally disallowed in m2 ids, it was also added later: +syn match modula2Ident " [A-Z,a-z][A-Z,a-z,0-9,_]*" contained + +" Comments may be nested in Modula-2: +syn region modula2Comment start="(\*" end="\*)" contains=modula2Comment,modula2Todo +syn keyword modula2Todo contained TODO FIXME XXX + +" Strings +syn region modula2String start=+"+ end=+"+ +syn region modula2String start="'" end="'" +syn region modula2Set start="{" end="}" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_modula2_syntax_inits") + if version < 508 + let did_modula2_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink modula2Ident Identifier + HiLink modula2StdConst Boolean + HiLink modula2Type Identifier + HiLink modula2StdFunc Identifier + HiLink modula2Header Type + HiLink modula2Keyword Statement + HiLink modula2AttKeyword PreProc + HiLink modula2Comment Comment + " The following is just a matter of taste (you want to try this instead): + " hi modula2Comment term=bold ctermfg=DarkBlue guifg=Blue gui=bold + HiLink modula2Todo Todo + HiLink modula2String String + HiLink modula2Set String + + delcommand HiLink +endif + +let b:current_syntax = "modula2" + +" vim: ts=8 diff --git a/runtime/syntax/modula3.vim b/runtime/syntax/modula3.vim new file mode 100644 index 000000000..d6f72afbc --- /dev/null +++ b/runtime/syntax/modula3.vim @@ -0,0 +1,72 @@ +" Vim syntax file +" Language: Modula-3 +" Maintainer: Timo Pedersen <dat97tpe@ludat.lth.se> +" Last Change: 2001 May 10 + +" Basic things only... +" Based on the modula 2 syntax file + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Modula-3 is case-sensitive +" syn case ignore + +" Modula-3 keywords +syn keyword modula3Keyword ABS ADDRES ADR ADRSIZE AND ANY +syn keyword modula3Keyword ARRAY AS BITS BITSIZE BOOLEAN BRANDED BY BYTESIZE +syn keyword modula3Keyword CARDINAL CASE CEILING CHAR CONST DEC DEFINITION +syn keyword modula3Keyword DISPOSE DIV +syn keyword modula3Keyword EVAL EXIT EXCEPT EXCEPTION +syn keyword modula3Keyword EXIT EXPORTS EXTENDED FALSE FINALLY FIRST FLOAT +syn keyword modula3Keyword FLOOR FROM GENERIC IMPORT +syn keyword modula3Keyword IN INC INTEGER ISTYPE LAST LOCK +syn keyword modula3Keyword LONGREAL LOOPHOLE MAX METHOD MIN MOD MUTEX +syn keyword modula3Keyword NARROW NEW NIL NOT NULL NUMBER OF OR ORD RAISE +syn keyword modula3Keyword RAISES READONLY REAL RECORD REF REFANY +syn keyword modula3Keyword RETURN ROOT +syn keyword modula3Keyword ROUND SET SUBARRAY TEXT TRUE TRUNC TRY TYPE +syn keyword modula3Keyword TYPECASE TYPECODE UNSAFE UNTRACED VAL VALUE VAR WITH + +" Special keywords, block delimiters etc +syn keyword modula3Block PROCEDURE FUNCTION MODULE INTERFACE REPEAT THEN +syn keyword modula3Block BEGIN END OBJECT METHODS OVERRIDES RECORD REVEAL +syn keyword modula3Block WHILE UNTIL DO TO IF FOR ELSIF ELSE LOOP + +" Comments +syn region modula3Comment start="(\*" end="\*)" + +" Strings +syn region modula3String start=+"+ end=+"+ +syn region modula3String start=+'+ end=+'+ + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_modula3_syntax_inits") + if version < 508 + let did_modula3_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + HiLink modula3Keyword Statement + HiLink modula3Block PreProc + HiLink modula3Comment Comment + HiLink modula3String String + + delcommand HiLink +endif + +let b:current_syntax = "modula3" + +"I prefer to use this... +"set ai +"vim: ts=8 diff --git a/runtime/syntax/monk.vim b/runtime/syntax/monk.vim new file mode 100644 index 000000000..560b79c67 --- /dev/null +++ b/runtime/syntax/monk.vim @@ -0,0 +1,228 @@ +" Vim syntax file +" Language: Monk (See-Beyond Technologies) +" Maintainer: Mike Litherland <litherm@ccf.org> +" Last Change: March 6, 2002 + +" This syntax file is good enough for my needs, but others +" may desire more features. Suggestions and bug reports +" are solicited by the author (above). + +" Originally based on the Scheme syntax file by: + +" Maintainer: Dirk van Deun <dvandeun@poboxes.com> +" Last Change: April 30, 1998 + +" In fact it's almost identical. :) + +" The original author's notes: +" This script incorrectly recognizes some junk input as numerals: +" parsing the complete system of Scheme numerals using the pattern +" language is practically impossible: I did a lax approximation. + +" Initializing: + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" Fascist highlighting: everything that doesn't fit the rules is an error... + +syn match monkError oneline ![^ \t()";]*! +syn match monkError oneline ")" + +" Quoted and backquoted stuff + +syn region monkQuoted matchgroup=Delimiter start="['`]" end=![ \t()";]!me=e-1 contains=ALLBUT,monkStruc,monkSyntax,monkFunc + +syn region monkQuoted matchgroup=Delimiter start="['`](" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc +syn region monkQuoted matchgroup=Delimiter start="['`]#(" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc + +syn region monkStrucRestricted matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc +syn region monkStrucRestricted matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc + +syn region monkUnquote matchgroup=Delimiter start="," end=![ \t()";]!me=e-1 contains=ALLBUT,monkStruc,monkSyntax,monkFunc +syn region monkUnquote matchgroup=Delimiter start=",@" end=![ \t()";]!me=e-1 contains=ALLBUT,monkStruc,monkSyntax,monkFunc + +syn region monkUnquote matchgroup=Delimiter start=",(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc +syn region monkUnquote matchgroup=Delimiter start=",@(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc + +syn region monkUnquote matchgroup=Delimiter start=",#(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc +syn region monkUnquote matchgroup=Delimiter start=",@#(" end=")" contains=ALLBUT,monkStruc,monkSyntax,monkFunc + +" R5RS Scheme Functions and Syntax: + +if version < 600 + set iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ +else + setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ +endif + +syn keyword monkSyntax lambda and or if cond case define let let* letrec +syn keyword monkSyntax begin do delay set! else => +syn keyword monkSyntax quote quasiquote unquote unquote-splicing +syn keyword monkSyntax define-syntax let-syntax letrec-syntax syntax-rules + +syn keyword monkFunc not boolean? eq? eqv? equal? pair? cons car cdr set-car! +syn keyword monkFunc set-cdr! caar cadr cdar cddr caaar caadr cadar caddr +syn keyword monkFunc cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr +syn keyword monkFunc cadaar cadadr caddar cadddr cdaaar cdaadr cdadar cdaddr +syn keyword monkFunc cddaar cddadr cdddar cddddr null? list? list length +syn keyword monkFunc append reverse list-ref memq memv member assq assv assoc +syn keyword monkFunc symbol? symbol->string string->symbol number? complex? +syn keyword monkFunc real? rational? integer? exact? inexact? = < > <= >= +syn keyword monkFunc zero? positive? negative? odd? even? max min + * - / abs +syn keyword monkFunc quotient remainder modulo gcd lcm numerator denominator +syn keyword monkFunc floor ceiling truncate round rationalize exp log sin cos +syn keyword monkFunc tan asin acos atan sqrt expt make-rectangular make-polar +syn keyword monkFunc real-part imag-part magnitude angle exact->inexact +syn keyword monkFunc inexact->exact number->string string->number char=? +syn keyword monkFunc char-ci=? char<? char-ci<? char>? char-ci>? char<=? +syn keyword monkFunc char-ci<=? char>=? char-ci>=? char-alphabetic? char? +syn keyword monkFunc char-numeric? char-whitespace? char-upper-case? +syn keyword monkFunc char-lower-case? +syn keyword monkFunc char->integer integer->char char-upcase char-downcase +syn keyword monkFunc string? make-string string string-length string-ref +syn keyword monkFunc string-set! string=? string-ci=? string<? string-ci<? +syn keyword monkFunc string>? string-ci>? string<=? string-ci<=? string>=? +syn keyword monkFunc string-ci>=? substring string-append vector? make-vector +syn keyword monkFunc vector vector-length vector-ref vector-set! procedure? +syn keyword monkFunc apply map for-each call-with-current-continuation +syn keyword monkFunc call-with-input-file call-with-output-file input-port? +syn keyword monkFunc output-port? current-input-port current-output-port +syn keyword monkFunc open-input-file open-output-file close-input-port +syn keyword monkFunc close-output-port eof-object? read read-char peek-char +syn keyword monkFunc write display newline write-char call/cc +syn keyword monkFunc list-tail string->list list->string string-copy +syn keyword monkFunc string-fill! vector->list list->vector vector-fill! +syn keyword monkFunc force with-input-from-file with-output-to-file +syn keyword monkFunc char-ready? load transcript-on transcript-off eval +syn keyword monkFunc dynamic-wind port? values call-with-values +syn keyword monkFunc monk-report-environment null-environment +syn keyword monkFunc interaction-environment + +" Keywords specific to STC's implementation + +syn keyword monkFunc $event-clear $event-parse $event->string $make-event-map +syn keyword monkFunc $resolve-event-definition change-pattern copy copy-strip +syn keyword monkFunc count-data-children count-map-children count-rep data-map +syn keyword monkFunc duplicate duplicate-strip file-check file-lookup get +syn keyword monkFunc insert list-lookup node-has-data? not-verify path? +syn keyword monkFunc path-defined-as-repeating? path-nodeclear path-nodedepth +syn keyword monkFunc path-nodename path-nodeparentname path->string path-valid? +syn keyword monkFunc regex string->path timestamp uniqueid verify + +" Keywords from the Monk function library (from e*Gate 4.1 programmers ref) +syn keyword monkFunc allcap? capitalize char-punctuation? char-substitute +syn keyword monkFunc char-to-char conv count-used-children degc->degf +syn keyword monkFunc diff-two-dates display-error empty-string? fail_id +syn keyword monkFunc fail_id_if fail_translation fail_translation_if +syn keyword monkFunc find-get-after find-get-before get-timestamp julian-date? +syn keyword monkFunc julian->standard leap-year? map-string not-empty-string? +syn keyword monkFunc standard-date? standard->julian string-begins-with? +syn keyword monkFunc string-contains? string-ends-with? string-search-from-left +syn keyword monkFunc string-search-from-right string->ssn strip-punct +syn keyword monkFunc strip-string substring=? symbol-table-get symbol-table-put +syn keyword monkFunc trim-string-left trim-string-right valid-decimal? +syn keyword monkFunc valid-integer? verify-type + +" Writing out the complete description of Scheme numerals without +" using variables is a day's work for a trained secretary... +" This is a useful lax approximation: + +syn match monkNumber oneline "[-#+0-9.][-#+/0-9a-f@i.boxesfdl]*" +syn match monkError oneline ![-#+0-9.][-#+/0-9a-f@i.boxesfdl]*[^-#+/0-9a-f@i.boxesfdl \t()";][^ \t()";]*! + +syn match monkOther oneline ![+-][ \t()";]!me=e-1 +syn match monkOther oneline ![+-]$! +" ... so that a single + or -, inside a quoted context, would not be +" interpreted as a number (outside such contexts, it's a monkFunc) + +syn match monkDelimiter oneline !\.[ \t()";]!me=e-1 +syn match monkDelimiter oneline !\.$! +" ... and a single dot is not a number but a delimiter + +" Simple literals: + +syn match monkBoolean oneline "#[tf]" +syn match monkError oneline !#[tf][^ \t()";]\+! + +syn match monkChar oneline "#\\" +syn match monkChar oneline "#\\." +syn match monkError oneline !#\\.[^ \t()";]\+! +syn match monkChar oneline "#\\space" +syn match monkError oneline !#\\space[^ \t()";]\+! +syn match monkChar oneline "#\\newline" +syn match monkError oneline !#\\newline[^ \t()";]\+! + +" This keeps all other stuff unhighlighted, except *stuff* and <stuff>: + +syn match monkOther oneline ,[a-z!$%&*/:<=>?^_~][-a-z!$%&*/:<=>?^_~0-9+.@]*, +syn match monkError oneline ,[a-z!$%&*/:<=>?^_~][-a-z!$%&*/:<=>?^_~0-9+.@]*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*, + +syn match monkOther oneline "\.\.\." +syn match monkError oneline !\.\.\.[^ \t()";]\+! +" ... a special identifier + +syn match monkConstant oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[ \t()";],me=e-1 +syn match monkConstant oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*$, +syn match monkError oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*, + +syn match monkConstant oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[ \t()";],me=e-1 +syn match monkConstant oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>$, +syn match monkError oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*, + +" Monk input and output structures +syn match monkSyntax oneline "\(\~input\|\[I\]->\)[^ \t]*" +syn match monkFunc oneline "\(\~output\|\[O\]->\)[^ \t]*" + +" Non-quoted lists, and strings: + +syn region monkStruc matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALL +syn region monkStruc matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALL + +syn region monkString start=+"+ skip=+\\[\\"]+ end=+"+ + +" Comments: + +syn match monkComment ";.*$" + +" Synchronization and the wrapping up... + +syn sync match matchPlace grouphere NONE "^[^ \t]" +" ... i.e. synchronize on a line that starts at the left margin + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_monk_syntax_inits") + if version < 508 + let did_monk_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink monkSyntax Statement + HiLink monkFunc Function + + HiLink monkString String + HiLink monkChar Character + HiLink monkNumber Number + HiLink monkBoolean Boolean + + HiLink monkDelimiter Delimiter + HiLink monkConstant Constant + + HiLink monkComment Comment + HiLink monkError Error + + delcommand HiLink +endif + +let b:current_syntax = "monk" diff --git a/runtime/syntax/moo.vim b/runtime/syntax/moo.vim new file mode 100644 index 000000000..10c5d3b4b --- /dev/null +++ b/runtime/syntax/moo.vim @@ -0,0 +1,173 @@ +" Vim syntax file +" Language: MOO +" Maintainer: Timo Frenay <timo@frenay.net> +" Last Change: 2001 Oct 06 +" Note: Requires Vim 6.0 or above + +" Quit when a syntax file was already loaded +if version < 600 || exists("b:current_syntax") + finish +endif + +" Initializations +syn case ignore + +" C-style comments +syn match mooUncommentedError display ~\*/~ +syn match mooCStyleCommentError display ~/\ze\*~ contained +syn region mooCStyleComment matchgroup=mooComment start=~/\*~ end=~\*/~ contains=mooCStyleCommentError + +" Statements +if exists("moo_extended_cstyle_comments") + syn match mooIdentifier display ~\%(\%(/\*.\{-}\*/\s*\)*\)\@>\<\h\w*\>~ contained transparent contains=mooCStyleComment,@mooKeyword,mooType,mooVariable +else + syn match mooIdentifier display ~\<\h\w*\>~ contained transparent contains=@mooKeyword,mooType,mooVariable +endif +syn keyword mooStatement break continue else elseif endfor endfork endif endtry endwhile finally for if try +syn keyword mooStatement except fork while nextgroup=mooIdentifier skipwhite +syn keyword mooStatement return nextgroup=mooString skipwhite + +" Operators +syn keyword mooOperatorIn in + +" Error constants +syn keyword mooAny ANY +syn keyword mooErrorConstant E_ARGS E_INVARG E_DIV E_FLOAT E_INVIND E_MAXREC E_NACC E_NONE E_PERM E_PROPNF E_QUOTA E_RANGE E_RECMOVE E_TYPE E_VARNF E_VERBNF + +" Builtin variables +syn match mooType display ~\<\%(ERR\|FLOAT\|INT\|LIST\|NUM\|OBJ\|STR\)\>~ +syn match mooVariable display ~\<\%(args\%(tr\)\=\|caller\|dobj\%(str\)\=\|iobj\%(str\)\=\|player\|prepstr\|this\|verb\)\>~ + +" Strings +syn match mooStringError display ~[^\t -[\]-~]~ contained +syn match mooStringSpecialChar display ~\\["\\]~ contained +if !exists("moo_no_regexp") + " Regular expressions + syn match mooRegexp display ~%%~ contained containedin=mooString,mooRegexpParentheses transparent contains=NONE + syn region mooRegexpParentheses display matchgroup=mooRegexpOr start=~%(~ skip=~%%~ end=~%)~ contained containedin=mooString,mooRegexpParentheses transparent oneline + syn match mooRegexpOr display ~%|~ contained containedin=mooString,mooRegexpParentheses +endif +if !exists("moo_no_pronoun_sub") + " Pronoun substitutions + syn match mooPronounSub display ~%%~ contained containedin=mooString transparent contains=NONE + syn match mooPronounSub display ~%[#dilnopqrst]~ contained containedin=mooString + syn match mooPronounSub display ~%\[#[dilnt]\]~ contained containedin=mooString + syn match mooPronounSub display ~%(\h\w*)~ contained containedin=mooString + syn match mooPronounSub display ~%\[[dilnt]\h\w*\]~ contained containedin=mooString + syn match mooPronounSub display ~%<\%([dilnt]:\)\=\a\+>~ contained containedin=mooString +endif +if exists("moo_unmatched_quotes") + syn region mooString matchgroup=mooStringError start=~"~ end=~$~ contains=@mooStringContents keepend + syn region mooString start=~"~ skip=~\\.~ end=~"~ contains=@mooStringContents oneline keepend +else + syn region mooString start=~"~ skip=~\\.~ end=~"\|$~ contains=@mooStringContents keepend +endif + +" Numbers and object numbers +syn match mooNumber display ~\%(\%(\<\d\+\)\=\.\d\+\|\<\d\+\)\%(e[+\-]\=\d\+\)\=\>~ +syn match mooObject display ~#-\=\d\+\>~ + +" Properties and verbs +if exists("moo_builtin_properties") + "Builtin properties + syn keyword mooBuiltinProperty contents f location name owner programmer r w wizard contained containedin=mooPropRef +endif +if exists("moo_extended_cstyle_comments") + syn match mooPropRef display ~\.\s*\%(\%(/\*.\{-}\*/\s*\)*\)\@>\h\w*\>~ transparent contains=mooCStyleComment,@mooKeyword + syn match mooVerbRef display ~:\s*\%(\%(/\*.\{-}\*/\s*\)*\)\@>\h\w*\>~ transparent contains=mooCStyleComment,@mooKeyword +else + syn match mooPropRef display ~\.\s*\h\w*\>~ transparent contains=@mooKeyword + syn match mooVerbRef display ~:\s*\h\w*\>~ transparent contains=@mooKeyword +endif + +" Builtin functions, core properties and core verbs +if exists("moo_extended_cstyle_comments") + syn match mooBuiltinFunction display ~\<\h\w*\s*\%(\%(/\*.\{-}\*/\s*\)*\)\@>\ze(~ contains=mooCStyleComment + syn match mooCorePropOrVerb display ~\$\s*\%(\%(/\*.\{-}\*/\s*\)*\)\@>\%(in\>\)\@!\h\w*\>~ contains=mooCStyleComment,@mooKeyword +else + syn match mooBuiltinFunction display ~\<\h\w*\s*\ze(~ contains=NONE + syn match mooCorePropOrVerb display ~\$\s*\%(in\>\)\@!\h\w*\>~ contains=@mooKeyword +endif +if exists("moo_unknown_builtin_functions") + syn match mooUnknownBuiltinFunction ~\<\h\w*\>~ contained containedin=mooBuiltinFunction contains=mooKnownBuiltinFunction + " Known builtin functions as of version 1.8.1 of the server + " Add your own extensions to this group if you like + syn keyword mooKnownBuiltinFunction abs acos add_property add_verb asin atan binary_hash boot_player buffered_output_length callers caller_perms call_function ceil children chparent clear_property connected_players connected_seconds connection_name connection_option connection_options cos cosh create crypt ctime db_disk_size decode_binary delete_property delete_verb disassemble dump_database encode_binary equal eval exp floatstr floor flush_input force_input function_info idle_seconds index is_clear_property is_member is_player kill_task length listappend listdelete listen listeners listinsert listset log log10 match max max_object memory_usage min move notify object_bytes open_network_connection output_delimiters parent pass players properties property_info queued_tasks queue_info raise random read recycle renumber reset_max_object resume rindex rmatch seconds_left server_log server_version setadd setremove set_connection_option set_player_flag set_property_info set_task_perms set_verb_args set_verb_code set_verb_info shutdown sin sinh sqrt strcmp string_hash strsub substitute suspend tan tanh task_id task_stack ticks_left time tofloat toint toliteral tonum toobj tostr trunc typeof unlisten valid value_bytes value_hash verbs verb_args verb_code verb_info contained +endif + +" Enclosed expressions +syn match mooUnenclosedError display ~[')\]|}]~ +syn match mooParenthesesError display ~[';\]|}]~ contained +syn region mooParentheses start=~(~ end=~)~ transparent contains=@mooEnclosedContents,mooParenthesesError +syn match mooBracketsError display ~[');|}]~ contained +syn region mooBrackets start=~\[~ end=~\]~ transparent contains=@mooEnclosedContents,mooBracketsError +syn match mooBracesError display ~[');\]|]~ contained +syn region mooBraces start=~{~ end=~}~ transparent contains=@mooEnclosedContents,mooBracesError +syn match mooQuestionError display ~[');\]}]~ contained +syn region mooQuestion start=~?~ end=~|~ transparent contains=@mooEnclosedContents,mooQuestionError +syn match mooCatchError display ~[);\]|}]~ contained +syn region mooCatch matchgroup=mooExclamation start=~`~ end=~'~ transparent contains=@mooEnclosedContents,mooCatchError,mooExclamation +if exists("moo_extended_cstyle_comments") + syn match mooExclamation display ~[\t !%&(*+,\-/<=>?@[^`{|]\@<!\s*\%(\%(/\*.\{-}\*/\s*\)*\)\@>!=\@!~ contained contains=mooCStyleComment +else + syn match mooExclamation display ~[\t !%&(*+,\-/<=>?@[^`{|]\@<!\s*!=\@!~ contained +endif + +" Comments +syn match mooCommentSpecialChar display ~\\["\\]~ contained transparent contains=NONE +syn match mooComment ~[\t !%&*+,\-/<=>?@^|]\@<!\s*"\([^\"]\|\\.\)*"\s*;~ contains=mooStringError,mooCommentSpecialChar + +" Non-code +syn region mooNonCode start=~^\s*@\<~ end=~$~ +syn match mooNonCode display ~^\.$~ +syn match mooNonCode display ~^\s*\d\+:~he=e-1 + +" Overriding matches +syn match mooRangeOperator display ~\.\.~ transparent contains=NONE +syn match mooOrOperator display ~||~ transparent contains=NONE +if exists("moo_extended_cstyle_comments") + syn match mooScattering ~[,{]\@<=\s*\%(\%(/\*.\{-}\*/\s*\)*\)\@>?~ transparent contains=mooCStyleComment +else + syn match mooScattering ~[,{]\@<=\s*?~ transparent contains=NONE +endif + +" Clusters +syn cluster mooKeyword contains=mooStatement,mooOperatorIn,mooAny,mooErrorConstant +syn cluster mooStringContents contains=mooStringError,mooStringSpecialChar +syn cluster mooEnclosedContents contains=TOP,mooUnenclosedError,mooComment,mooNonCode + +" Define the default highlighting. +hi def link mooUncommentedError Error +hi def link mooCStyleCommentError Error +hi def link mooCStyleComment Comment +hi def link mooStatement Statement +hi def link mooOperatorIn Operator +hi def link mooAny Constant " link this to Keyword if you want +hi def link mooErrorConstant Constant +hi def link mooType Type +hi def link mooVariable Type +hi def link mooStringError Error +hi def link mooStringSpecialChar SpecialChar +hi def link mooRegexpOr SpecialChar +hi def link mooPronounSub SpecialChar +hi def link mooString String +hi def link mooNumber Number +hi def link mooObject Number +hi def link mooBuiltinProperty Type +hi def link mooBuiltinFunction Function +hi def link mooUnknownBuiltinFunction Error +hi def link mooKnownBuiltinFunction Function +hi def link mooCorePropOrVerb Identifier +hi def link mooUnenclosedError Error +hi def link mooParenthesesError Error +hi def link mooBracketsError Error +hi def link mooBracesError Error +hi def link mooQuestionError Error +hi def link mooCatchError Error +hi def link mooExclamation Exception +hi def link mooComment Comment +hi def link mooNonCode PreProc + +let b:current_syntax = "moo" + +" vim: ts=8 diff --git a/runtime/syntax/mp.vim b/runtime/syntax/mp.vim new file mode 100644 index 000000000..c0fd60b3d --- /dev/null +++ b/runtime/syntax/mp.vim @@ -0,0 +1,132 @@ +" Vim syntax file +" Language: MetaPost +" Maintainer: Andreas Scherer <andreas.scherer@pobox.com> +" Last Change: April 30, 2001 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +let plain_mf_macros = 0 " plain.mf has no special meaning for MetaPost +let other_mf_macros = 0 " cmbase.mf, logo.mf, ... neither + +" Read the Metafont syntax to start with +if version < 600 + source <sfile>:p:h/mf.vim +else + runtime! syntax/mf.vim +endif + +" MetaPost has TeX inserts for typeset labels +" verbatimtex, btex, and etex will be treated as keywords +syn match mpTeXbegin "\(verbatimtex\|btex\)" +syn match mpTeXend "etex" +syn region mpTeXinsert start="\(verbatimtex\|btex\)"hs=e+1 end="etex"he=s-1 contains=mpTeXbegin,mpTeXend keepend + +" MetaPost primitives not found in Metafont +syn keyword mpInternal bluepart clip color dashed fontsize greenpart infont +syn keyword mpInternal linecap linejoin llcorner lrcorner miterlimit mpxbreak +syn keyword mpInternal prologues redpart setbounds tracinglostchars +syn keyword mpInternal truecorners ulcorner urcorner withcolor + +" Metafont primitives not found in MetaPost +syn keyword notDefined autorounding chardx chardy fillin granularity hppp +syn keyword notDefined proofing smoothing tracingedges tracingpens +syn keyword notDefined turningcheck vppp xoffset yoffset + +" Keywords defined by plain.mp +if !exists("plain_mp_macros") + let plain_mp_macros = 1 " Set this to '0' if your source gets too colourful +endif +if plain_mp_macros + syn keyword mpMacro ahangle ahlength background bbox bboxmargin beginfig + syn keyword mpMacro beveled black blue buildcycle butt center cutafter + syn keyword mpMacro cutbefore cuttings dashpattern defaultfont defaultpen + syn keyword mpMacro defaultscale dotlabel dotlabels drawarrow drawdblarrow + syn keyword mpMacro drawoptions endfig evenly extra_beginfig extra_endfig + syn keyword mpMacro green label labeloffset mitered red rounded squared + syn keyword mpMacro thelabel white base_name base_version + syn keyword mpMacro upto downto exitunless relax gobble gobbled + syn keyword mpMacro interact loggingall tracingall tracingnone + syn keyword mpMacro eps epsilon infinity right left up down origin + syn keyword mpMacro quartercircle halfcircle fullcircle unitsquare identity + syn keyword mpMacro blankpicture withdots ditto EOF pensquare penrazor + syn keyword mpMacro penspeck whatever abs round ceiling byte dir unitvector + syn keyword mpMacro inverse counterclockwise tensepath mod div dotprod + syn keyword mpMacro takepower direction directionpoint intersectionpoint + syn keyword mpMacro softjoin incr decr reflectedabout rotatedaround + syn keyword mpMacro rotatedabout min max flex superellipse interpath + syn keyword mpMacro magstep currentpen currentpen_path currentpicture + syn keyword mpMacro fill draw filldraw drawdot unfill undraw unfilldraw + syn keyword mpMacro undrawdot erase cutdraw image pickup numeric_pickup + syn keyword mpMacro pen_lft pen_rt pen_top pen_bot savepen clearpen + syn keyword mpMacro clear_pen_memory lft rt top bot ulft urt llft lrt + syn keyword mpMacro penpos penstroke arrowhead makelabel labels penlabel + syn keyword mpMacro range numtok thru clearxy clearit clearpen pickup + syn keyword mpMacro shipit bye hide stop solve +endif + +" Keywords defined by mfplain.mp +if !exists("mfplain_mp_macros") + let mfplain_mp_macros = 0 " Set this to '1' to include these macro names +endif +if mfplain_mp_macros + syn keyword mpMacro beginchar blacker capsule_def change_width + syn keyword mpMacro define_blacker_pixels define_corrected_pixels + syn keyword mpMacro define_good_x_pixels define_good_y_pixels + syn keyword mpMacro define_horizontal_corrected_pixels + syn keyword mpMacro define_pixels define_whole_blacker_pixels + syn keyword mpMacro define_whole_vertical_blacker_pixels + syn keyword mpMacro define_whole_vertical_pixels endchar + syn keyword mpMacro extra_beginchar extra_endchar extra_setup + syn keyword mpMacro font_coding_scheme font_extra_space font_identifier + syn keyword mpMacro font_normal_shrink font_normal_space + syn keyword mpMacro font_normal_stretch font_quad font_size + syn keyword mpMacro font_slant font_x_height italcorr labelfont + syn keyword mpMacro makebox makegrid maketicks mode_def mode_setup + syn keyword mpMacro o_correction proofrule proofrulethickness rulepen smode + + " plus some no-ops, also from mfplain.mp + syn keyword mpMacro cullit currenttransform gfcorners grayfont hround + syn keyword mpMacro imagerules lowres_fix nodisplays notransforms openit + syn keyword mpMacro proofoffset screenchars screenrule screenstrokes + syn keyword mpMacro showit slantfont titlefont unitpixel vround +endif + +" Keywords defined by other macro packages, e.g., boxes.mp +if !exists("other_mp_macros") + let other_mp_macros = 1 " Set this to '0' if your source gets too colourful +endif +if other_mp_macros + syn keyword mpMacro circmargin defaultdx defaultdy + syn keyword mpMacro boxit boxjoin bpath circleit drawboxed drawboxes + syn keyword mpMacro drawunboxed fixpos fixsize pic +endif + +" Define the default highlighting +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_mp_syntax_inits") + if version < 508 + let did_mp_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink mpTeXinsert String + HiLink mpTeXbegin Statement + HiLink mpTeXend Statement + HiLink mpInternal mfInternal + HiLink mpMacro Macro + + delcommand HiLink +endif + +let b:current_syntax = "mp" + +" vim: ts=8 diff --git a/runtime/syntax/mplayerconf.vim b/runtime/syntax/mplayerconf.vim new file mode 100644 index 000000000..7abe20a1d --- /dev/null +++ b/runtime/syntax/mplayerconf.vim @@ -0,0 +1,111 @@ +" Vim syntax file +" Language: mplayer(1) configuration file +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/mplayerconf/ +" Latest Revision: 2004-05-22 +" arch-tag: c20b9381-5858-4452-b866-54e2e1891229 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Set iskeyword since we need `-' (and potentially others) in keywords. +" For version 5.x: Set it globally +" For version 6.x: Set it locally +if version >= 600 + command -nargs=1 SetIsk setlocal iskeyword=<args> +else + command -nargs=1 SetIsk set iskeyword=<args> +endif +SetIsk @,48-57,- +delcommand SetIsk + +" Todo +syn keyword mplayerconfTodo contained TODO FIXME XXX NOTE + +" Comments +syn region mplayerconfComment display matchgroup=mplayerconfComment start='#' end='$' contains=mplayerconfTodo + +" PreProc +syn keyword mplayerconfPreProc include + +" Booleans +syn keyword mplayerconfBoolean yes no + +" Numbers +syn match mplayerconfNumber '\<\d\+\>' + +" Options +syn keyword mplayerconfOption hardframedrop nomouseinput bandwidth dumpstream +syn keyword mplayerconfOption rtsp-stream-over-tcp tv overlapsub sub-bg-alpha +syn keyword mplayerconfOption subfont-outline unicode format vo edl cookies +syn keyword mplayerconfOption fps zrfd af-adv nosound audio-density +syn keyword mplayerconfOption passlogfile vobsuboutindex +syn keyword mplayerconfOption autoq autosync benchmark colorkey nocolorkey +syn keyword mplayerconfOption edlout enqueue fixed-vo framedrop h +syn keyword mplayerconfOption identify input lircconf list-options loop menu +syn keyword mplayerconfOption menu-cfg menu-root nojoystick nolirc +syn keyword mplayerconfOption nortc playlist quiet really-quiet shuffle skin +syn keyword mplayerconfOption slave softsleep speed sstep use-stdin aid alang +syn keyword mplayerconfOption audio-demuxer audiofile audiofile-cache +syn keyword mplayerconfOption cdrom-device cache cdda channels chapter +syn keyword mplayerconfOption cookies-file demuxer dumpaudio dumpfile +syn keyword mplayerconfOption dumpvideo dvbin dvd-device dvdangle forceidx +syn keyword mplayerconfOption frames hr-mp3-seek idx ipv4-only-proxy loadidx +syn keyword mplayerconfOption mc mf ni nobps noextbased passwd prefer-ipv4 +syn keyword mplayerconfOption prefer-ipv6 rawaudio rawvideo +syn keyword mplayerconfOption saveidx sb srate ss tskeepbroken tsprog tsprobe +syn keyword mplayerconfOption user user-agent vid vivo dumpjacosub +syn keyword mplayerconfOption dumpmicrodvdsub dumpmpsub dumpsami dumpsrtsub +syn keyword mplayerconfOption dumpsub ffactor flip-hebrew font forcedsubsonly +syn keyword mplayerconfOption fribidi-charset ifo noautosub osdlevel +syn keyword mplayerconfOption sid slang spuaa spualign spugauss sub +syn keyword mplayerconfOption sub-bg-color sub-demuxer sub-fuzziness +syn keyword mplayerconfOption sub-no-text-pp subalign subcc subcp subdelay +syn keyword mplayerconfOption subfile subfont-autoscale subfont-blur +syn keyword mplayerconfOption subfont-encoding subfont-osd-scale +syn keyword mplayerconfOption subfont-text-scale subfps subpos subwidth +syn keyword mplayerconfOption utf8 vobsub vobsubid abs ao aofile aop delay +syn keyword mplayerconfOption mixer nowaveheader aa bpp brightness contrast +syn keyword mplayerconfOption dfbopts display double dr dxr2 fb fbmode +syn keyword mplayerconfOption fbmodeconfig forcexv fs fsmode-dontuse fstype +syn keyword mplayerconfOption geometry guiwid hue jpeg monitor-dotclock +syn keyword mplayerconfOption monitor-hfreq monitor-vfreq monitoraspect +syn keyword mplayerconfOption nograbpointer nokeepaspect noxv ontop panscan +syn keyword mplayerconfOption rootwin saturation screenw stop-xscreensaver vm +syn keyword mplayerconfOption vsync wid xineramascreen z zrbw zrcrop zrdev +syn keyword mplayerconfOption zrhelp zrnorm zrquality zrvdec zrxdoff ac af +syn keyword mplayerconfOption afm aspect flip lavdopts noaspect noslices +syn keyword mplayerconfOption novideo oldpp pp pphelp ssf stereo sws vc vfm x +syn keyword mplayerconfOption xvidopts xy y zoom vf vop audio-delay +syn keyword mplayerconfOption audio-preload endpos ffourcc include info +syn keyword mplayerconfOption noautoexpand noskip o oac of ofps ovc +syn keyword mplayerconfOption skiplimit v vobsubout vobsuboutid +syn keyword mplayerconfOption lameopts lavcopts nuvopts xvidencopts + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_mplayer_syn_inits") + if version < 508 + let did_mplayer_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink mplayerconfTodo Todo + HiLink mplayerconfComment Comment + HiLink mplayerconfPreProc PreProc + HiLink mplayerconfBoolean Boolean + HiLink mplayerconfNumber Number + HiLink mplayerconfOption Keyword + + delcommand HiLink +endif + +let b:current_syntax = "mplayerconf" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/msidl.vim b/runtime/syntax/msidl.vim new file mode 100644 index 000000000..cf270eebd --- /dev/null +++ b/runtime/syntax/msidl.vim @@ -0,0 +1,92 @@ +" Vim syntax file +" Language: MS IDL (Microsoft dialect of Interface Description Language) +" Maintainer: Vadim Zeitlin <vadim@wxwindows.org> +" Last Change: 2003 May 11 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Misc basic +syn match msidlId "[a-zA-Z][a-zA-Z0-9_]*" +syn match msidlUUID "{\?[[:xdigit:]]\{8}-\([[:xdigit:]]\{4}-\)\{3}[[:xdigit:]]\{12}}\?" +syn region msidlString start=/"/ skip=/\\\(\\\\\)*"/ end=/"/ +syn match msidlLiteral "\d\+\(\.\d*\)\=" +syn match msidlLiteral "\.\d\+" +syn match msidlSpecial contained "[]\[{}:]" + +" Comments +syn keyword msidlTodo contained TODO FIXME XXX +syn region msidlComment start="/\*" end="\*/" contains=msidlTodo +syn match msidlComment "//.*" contains=msidlTodo +syn match msidlCommentError "\*/" + +" C style Preprocessor +syn region msidlIncluded contained start=+"+ skip=+\\\(\\\\\)*"+ end=+"+ +syn match msidlIncluded contained "<[^>]*>" +syn match msidlInclude "^[ \t]*#[ \t]*include\>[ \t]*["<]" contains=msidlIncluded,msidlString +syn region msidlPreCondit start="^[ \t]*#[ \t]*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=msidlComment,msidlCommentError +syn region msidlDefine start="^[ \t]*#[ \t]*\(define\>\|undef\>\)" skip="\\$" end="$" contains=msidlLiteral, msidlString + +" Attributes +syn keyword msidlAttribute contained in out propget propput propputref retval +syn keyword msidlAttribute contained aggregatable appobject binadable coclass control custom default defaultbind defaultcollelem defaultvalue defaultvtable dispinterface displaybind dual entry helpcontext helpfile helpstring helpstringdll hidden id immediatebind lcid library licensed nonbrowsable noncreatable nonextensible oleautomation optional object public readonly requestedit restricted source string uidefault usesgetlasterror vararg version +syn match msidlAttribute /uuid(.*)/he=s+4 contains=msidlUUID +syn match msidlAttribute /helpstring(.*)/he=s+10 contains=msidlString +syn region msidlAttributes start="\[" end="]" keepend contains=msidlSpecial,msidlString,msidlAttribute,msidlComment,msidlCommentError + +" Keywords +syn keyword msidlEnum enum +syn keyword msidlImport import importlib +syn keyword msidlStruct interface library coclass +syn keyword msidlTypedef typedef + +" Types +syn keyword msidlStandardType byte char double float hyper int long short void wchar_t +syn keyword msidlStandardType BOOL BSTR HRESULT VARIANT VARIANT_BOOL +syn region msidlSafeArray start="SAFEARRAY(" end=")" contains=msidlStandardType + +syn sync lines=50 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_msidl_syntax_inits") + if version < 508 + let did_msidl_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink msidlInclude Include + HiLink msidlPreProc PreProc + HiLink msidlPreCondit PreCondit + HiLink msidlDefine Macro + HiLink msidlIncluded String + HiLink msidlString String + HiLink msidlComment Comment + HiLink msidlTodo Todo + HiLink msidlSpecial SpecialChar + HiLink msidlLiteral Number + HiLink msidlUUID Number + + HiLink msidlImport Include + HiLink msidlEnum StorageClass + HiLink msidlStruct Structure + HiLink msidlTypedef Typedef + HiLink msidlAttribute StorageClass + + HiLink msidlStandardType Type + HiLink msidlSafeArray Type + + delcommand HiLink +endif + +let b:current_syntax = "msidl" + +" vi: set ts=8 sw=4: diff --git a/runtime/syntax/msql.vim b/runtime/syntax/msql.vim new file mode 100644 index 000000000..0716fbb1f --- /dev/null +++ b/runtime/syntax/msql.vim @@ -0,0 +1,100 @@ +" Vim syntax file +" Language: msql +" Maintainer: Lutz Eymers <ixtab@polzin.com> +" URL: http://www.isp.de/data/msql.vim +" Email: Subject: send syntax_vim.tgz +" Last Change: 2001 May 10 +" +" Options msql_sql_query = 1 for SQL syntax highligthing inside strings +" msql_minlines = x to sync at least x lines backwards + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'msql' +endif + +if version < 600 + so <sfile>:p:h/html.vim +else + runtime! syntax/html.vim + unlet b:current_syntax +endif + +syn cluster htmlPreproc add=msqlRegion + +syn case match + +" Internal Variables +syn keyword msqlIntVar ERRMSG contained + +" Env Variables +syn keyword msqlEnvVar SERVER_SOFTWARE SERVER_NAME SERVER_URL GATEWAY_INTERFACE contained +syn keyword msqlEnvVar SERVER_PROTOCOL SERVER_PORT REQUEST_METHOD PATH_INFO contained +syn keyword msqlEnvVar PATH_TRANSLATED SCRIPT_NAME QUERY_STRING REMOTE_HOST contained +syn keyword msqlEnvVar REMOTE_ADDR AUTH_TYPE REMOTE_USER CONTEN_TYPE contained +syn keyword msqlEnvVar CONTENT_LENGTH HTTPS HTTPS_KEYSIZE HTTPS_SECRETKEYSIZE contained +syn keyword msqlEnvVar HTTP_ACCECT HTTP_USER_AGENT HTTP_IF_MODIFIED_SINCE contained +syn keyword msqlEnvVar HTTP_FROM HTTP_REFERER contained + +" Inlclude lLite +syn include @msqlLite <sfile>:p:h/lite.vim + +" Msql Region +syn region msqlRegion matchgroup=Delimiter start="<!$" start="<![^!->D]" end=">" contains=@msqlLite,msql.* + +" sync +if exists("msql_minlines") + exec "syn sync minlines=" . msql_minlines +else + syn sync minlines=100 +endif + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_msql_syn_inits") + if version < 508 + let did_msql_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink msqlComment Comment + HiLink msqlString String + HiLink msqlNumber Number + HiLink msqlFloat Float + HiLink msqlIdentifier Identifier + HiLink msqlGlobalIdentifier Identifier + HiLink msqlIntVar Identifier + HiLink msqlEnvVar Identifier + HiLink msqlFunctions Function + HiLink msqlRepeat Repeat + HiLink msqlConditional Conditional + HiLink msqlStatement Statement + HiLink msqlType Type + HiLink msqlInclude Include + HiLink msqlDefine Define + HiLink msqlSpecialChar SpecialChar + HiLink msqlParentError Error + HiLink msqlTodo Todo + HiLink msqlOperator Operator + HiLink msqlRelation Operator + + delcommand HiLink +endif + +let b:current_syntax = "msql" + +if main_syntax == 'msql' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/runtime/syntax/mush.vim b/runtime/syntax/mush.vim new file mode 100644 index 000000000..556592783 --- /dev/null +++ b/runtime/syntax/mush.vim @@ -0,0 +1,132 @@ +" MUSHcode syntax file +" Maintainer: Bek Oberin <gossamer@tertius.net.au> +" Last updated by Rimnal on Mon Aug 20 08:28:56 MDT 2001 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + +" regular mush functions +syntax keyword mushFunction contained abs acos add after and andflags aposs +syntax keyword mushFunction contained asin atan before capstr cat ceil center +syntax keyword mushFunction contained comp con conn controls convsecs convtime +syntax keyword mushFunction contained cos default delete dist2d dist3d div e +syntax keyword mushFunction contained edefault edit elements elock eq escape +syntax keyword mushFunction contained exit exp extract fdiv filter first flags +syntax keyword mushFunction contained floor fold foreach findable fullname get +syntax keyword mushFunction contained get_eval grab gt gte hasattr hasflag +syntax keyword mushFunction contained home idle index insert isdbref isnum +syntax keyword mushFunction contained isword iter last lattr lcon lcstr +syntax keyword mushFunction contained ldelete left lexits ljust ln lnum loc +syntax keyword mushFunction contained locate lock log lpos lt lte lwho map +syntax keyword mushFunction contained match matchall max member merge mid min +syntax keyword mushFunction contained mix mod money mudname mul munge name +syntax keyword mushFunction contained nearby neq next not num obj objeval +syntax keyword mushFunction contained objmem or orflags owner parent parse pi +syntax keyword mushFunction contained ports pos poss power r rand remove repeat +syntax keyword mushFunction contained replace rest reverse revwords right +syntax keyword mushFunction contained rjust rloc room round s scramble search +syntax keyword mushFunction contained secs secure setdiff setinter setq +syntax keyword mushFunction contained setunion shuffle sign sin sort sortby +syntax keyword mushFunction contained space splice sqrt squish starttime stats +syntax keyword mushFunction contained strlen strmatch sub subj switch tan time +syntax keyword mushFunction contained trim trunc type u ucstr udefault ulocal +syntax keyword mushFunction contained v version visible where wordpos words +syntax keyword mushFunction contained xcon xor +" only highligh functions when they have an in-bracket immediately after +syntax match mushFunctionBrackets "\i\I*(" contains=mushFunction + +" regular mush commands +syntax keyword mushAtCommandList contained @alias @chown @clone @create +syntax keyword mushAtCommandList contained @decompile @destroy @doing @dolist +syntax keyword mushAtCommandList contained @drain @edit @emit @entrances @femit +syntax keyword mushAtCommandList contained @force @fpose @fsay @halt @last +syntax keyword mushAtCommandList contained @link @list @listmotd @lock @mudwho +syntax keyword mushAtCommandList contained @mvattr @name @notify @oemit @parent +syntax keyword mushAtCommandList contained @password @pemit @ps @quota @robot +syntax keyword mushAtCommandList contained @search @set @stats @sweep @switch +syntax keyword mushAtCommandList contained @teleport @trigger @unlink @unlock +syntax keyword mushAtCommandList contained @verb @wait @wipe +syntax match mushCommand "@\i\I*" contains=mushAtCommandList + + +syntax keyword mushCommand drop enter examine get give goto help inventory +syntax keyword mushCommand kill leave look news page pose say score use +syntax keyword mushCommand version whisper DOING LOGOUT OUTPUTPREFIX +syntax keyword mushCommand OUTPUTSUFFIX QUIT SESSION WHO + +syntax match mushSpecial "\*\|!\|=\|-\|\\\|+" +syntax match mushSpecial2 contained "\*" + +syntax match mushIdentifier "&[^ ]\+" + +syntax match mushVariable "%r\|%t\|%cr\|%[A-Za-z0-9]\+\|%#\|##\|here" + +" numbers +syntax match mushNumber +[0-9]\++ + +" A comment line starts with a or # or " at the start of the line +" or an @@ +syntax keyword mushTodo contained TODO FIXME XXX +syntax match mushComment +^\s*@@.*$+ contains=mushTodo +syntax match mushComment +^".*$+ contains=mushTodo +syntax match mushComment +^#.*$+ contains=mushTodo + +syntax region mushFuncBoundaries start="\[" end="\]" contains=mushFunction,mushFlag,mushAttributes,mushNumber,mushCommand,mushVariable,mushSpecial2 + +" FLAGS +syntax keyword mushFlag PLAYER ABODE BUILDER CHOWN_OK DARK FLOATING +syntax keyword mushFlag GOING HAVEN INHERIT JUMP_OK KEY LINK_OK MONITOR +syntax keyword mushFlag NOSPOOF OPAQUE QUIET STICKY TRACE UNFINDABLE VISUAL +syntax keyword mushFlag WIZARD PARENT_OK ZONE AUDIBLE CONNECTED DESTROY_OK +syntax keyword mushFlag ENTER_OK HALTED IMMORTAL LIGHT MYOPIC PUPPET TERSE +syntax keyword mushFlag ROBOT SAFE TRANSPARENT VERBOSE CONTROL_OK COMMANDS + +syntax keyword mushAttribute aahear aclone aconnect adesc adfail adisconnect +syntax keyword mushAttribute adrop aefail aenter afail agfail ahear akill +syntax keyword mushAttribute aleave alfail alias amhear amove apay arfail +syntax keyword mushAttribute asucc atfail atport aufail ause away charges +syntax keyword mushAttribute cost desc dfail drop ealias efail enter fail +syntax keyword mushAttribute filter forwardlist gfail idesc idle infilter +syntax keyword mushAttribute inprefix kill lalias last lastsite leave lfail +syntax keyword mushAttribute listen move odesc odfail odrop oefail oenter +syntax keyword mushAttribute ofail ogfail okill oleave olfail omove opay +syntax keyword mushAttribute orfail osucc otfail otport oufail ouse oxenter +syntax keyword mushAttribute oxleave oxtport pay prefix reject rfail runout +syntax keyword mushAttribute semaphore sex startup succ tfail tport ufail +syntax keyword mushAttribute use va vb vc vd ve vf vg vh vi vj vk vl vm vn +syntax keyword mushAttribute vo vp vq vr vs vt vu vv vw vx vy vz + + +if version >= 508 || !exists("did_mush_syntax_inits") + if version < 508 + let did_mush_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + HiLink mushAttribute Constant + HiLink mushCommand Function + HiLink mushComment Comment + HiLink mushNumber Number + HiLink mushSetting PreProc + HiLink mushFunction Statement + HiLink mushVariable Identifier + HiLink mushSpecial Special + HiLink mushTodo Todo + HiLink mushFlag Special + HiLink mushIdentifier Identifier + + delcommand HiLink +endif + +let b:current_syntax = "mush" + +" mush: ts=17 diff --git a/runtime/syntax/muttrc.vim b/runtime/syntax/muttrc.vim new file mode 100644 index 000000000..4a1f1a90b --- /dev/null +++ b/runtime/syntax/muttrc.vim @@ -0,0 +1,248 @@ +" Vim syntax file +" Language: Mutt setup files +" Maintainer: Preben 'Peppe' Guldberg <peppe-vim@wielders.org> +" Contributor: Gary Johnson <garyjohn@spk.agilent.com> +" Last Change: 27 May 2004 + +" This file covers mutt version 1.4.2.1i + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Set the keyword characters +if version < 600 + set isk=@,48-57,_,- +else + setlocal isk=@,48-57,_,- +endif + +syn match muttrcComment "^#.*$" +syn match muttrcComment "[^\\]#.*$"lc=1 + +" Escape sequences (back-tick and pipe goes here too) +syn match muttrcEscape +\\[#tnr"'Cc]+ +syn match muttrcEscape +[`|]+ + +" The variables takes the following arguments +syn match muttrcString "=\s*[^ #"']\+"lc=1 contains=muttrcEscape +syn region muttrcString start=+"+ms=e skip=+\\"+ end=+"+ contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcMacro,muttrcCommand +syn region muttrcString start=+'+ms=e skip=+\\'+ end=+'+ contains=muttrcEscape,muttrcSet,muttrcUnset,muttrcReset,muttrcToggle,muttrcMacro,muttrcCommand + +syn match muttrcSpecial +\(['"]\)!\1+ + +" Numbers and Quadoptions may be surrounded by " or ' +syn match muttrcNumber /=\s*\d\+/lc=1 +syn match muttrcNumber /=\s*"\d\+"/lc=1 +syn match muttrcNumber /=\s*'\d\+'/lc=1 +syn match muttrcQuadopt +=\s*\(ask-\)\=\(yes\|no\)+lc=1 +syn match muttrcQuadopt +=\s*"\(ask-\)\=\(yes\|no\)"+lc=1 +syn match muttrcQuadopt +=\s*'\(ask-\)\=\(yes\|no\)'+lc=1 + +" Now catch some email addresses and headers (purified version from mail.vim) +syn match muttrcEmail "[a-zA-Z0-9._-]\+@[a-zA-Z0-9./-]\+" +syn match muttrcHeader "\<\(From\|To\|Cc\|Bcc\|Reply-To\|Subject\|Return-Path\|Received\|Date\|Replied\|Attach\)\>:\=" + +syn match muttrcKeySpecial contained +\(\\[Cc'"]\|\^\|\\[01]\d\{2}\)+ +syn match muttrcKey contained "\S\+" contains=muttrcKeySpecial +syn region muttrcKey contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=muttrcKeySpecial +syn region muttrcKey contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=muttrcKeySpecial +syn match muttrcKeyName contained "\<f\(\d\|10\)\>" +syn match muttrcKeyName contained "\\[trne]" +syn match muttrcKeyName contained "<\(BackSpace\|Delete\|Down\|End\|Enter\|Esc\|Home\|Insert\|Left\|PageDown\|PageUp\|Return\|Right\|Space\|Tab\|Up\)>" + +syn keyword muttrcVarBool contained allow_8bit allow_ansi arrow_cursor ascii_chars askbcc askcc attach_split +syn keyword muttrcVarBool contained auto_tag autoedit beep beep_new bounce_delivered check_new collapse_unread +syn keyword muttrcVarBool contained confirmappend confirmcreate delete_untag digest_collapse duplicate_threads +syn keyword muttrcVarBool contained edit_hdrs edit_headers encode_from envelope_from fast_reply fcc_attach +syn keyword muttrcVarBool contained fcc_clear followup_to force_name forw_decode forw_decrypt forw_quote +syn keyword muttrcVarBool contained forward_decode forward_decrypt forward_quote hdrs header help hidden_host +syn keyword muttrcVarBool contained hide_limited hide_missing hide_top_limited hide_top_missing ignore_list_reply_to +syn keyword muttrcVarBool contained imap_force_ssl imap_list_subscribed imap_passive imap_peek imap_servernoise +syn keyword muttrcVarBool contained implicit_autoview keep_flagged mailcap_sanitize maildir_trash mark_old markers +syn keyword muttrcVarBool contained menu_scroll meta_key metoo mh_purge mime_forward_decode pager_stop pgp_autoencrypt +syn keyword muttrcVarBool contained pgp_autosign pgp_ignore_subkeys pgp_long_ids pgp_replyencrypt pgp_replysign +syn keyword muttrcVarBool contained pgp_replysignencrypted pgp_retainable_sigs pgp_show_unusable pgp_strict_enc +syn keyword muttrcVarBool contained pipe_decode pipe_split pop_auth_try_all pop_last print_decode print_split +syn keyword muttrcVarBool contained prompt_after read_only reply_self resolve reverse_alias reverse_name +syn keyword muttrcVarBool contained reverse_realname rfc2047_parameters save_address save_empty save_name score +syn keyword muttrcVarBool contained sig_dashes sig_on_top smart_wrap sort_re ssl_use_sslv2 ssl_use_sslv3 ssl_use_tlsv1 +syn keyword muttrcVarBool contained ssl_usesystemcerts status_on_top strict_threads suspend text_flowed thorough_search +syn keyword muttrcVarBool contained thread_received tilde uncollapse_jump use_8bitmime use_domain use_from use_ipv6 +syn keyword muttrcVarBool contained user_agent wait_key weed wrap_search write_bcc + +syn keyword muttrcVarBool contained noallow_8bit noallow_ansi noarrow_cursor noascii_chars noaskbcc noaskcc +syn keyword muttrcVarBool contained noattach_split noauto_tag noautoedit nobeep nobeep_new nobounce_delivered +syn keyword muttrcVarBool contained nocheck_new nocollapse_unread noconfirmappend noconfirmcreate nodelete_untag +syn keyword muttrcVarBool contained nodigest_collapse noduplicate_threads noedit_hdrs noedit_headers noencode_from +syn keyword muttrcVarBool contained noenvelope_from nofast_reply nofcc_attach nofcc_clear nofollowup_to noforce_name +syn keyword muttrcVarBool contained noforw_decode noforw_decrypt noforw_quote noforward_decode noforward_decrypt +syn keyword muttrcVarBool contained noforward_quote nohdrs noheader nohelp nohidden_host nohide_limited nohide_missing +syn keyword muttrcVarBool contained nohide_top_limited nohide_top_missing noignore_list_reply_to noimap_force_ssl +syn keyword muttrcVarBool contained noimap_list_subscribed noimap_passive noimap_peek noimap_servernoise +syn keyword muttrcVarBool contained noimplicit_autoview nokeep_flagged nomailcap_sanitize nomaildir_trash nomark_old +syn keyword muttrcVarBool contained nomarkers nomenu_scroll nometa_key nometoo nomh_purge nomime_forward_decode +syn keyword muttrcVarBool contained nopager_stop nopgp_autoencrypt nopgp_autosign nopgp_ignore_subkeys nopgp_long_ids +syn keyword muttrcVarBool contained nopgp_replyencrypt nopgp_replysign nopgp_replysignencrypted nopgp_retainable_sigs +syn keyword muttrcVarBool contained nopgp_show_unusable nopgp_strict_enc nopipe_decode nopipe_split nopop_auth_try_all +syn keyword muttrcVarBool contained nopop_last noprint_decode noprint_split noprompt_after noread_only noreply_self +syn keyword muttrcVarBool contained noresolve noreverse_alias noreverse_name noreverse_realname norfc2047_parameters +syn keyword muttrcVarBool contained nosave_address nosave_empty nosave_name noscore nosig_dashes nosig_on_top +syn keyword muttrcVarBool contained nosmart_wrap nosort_re nossl_use_sslv2 nossl_use_sslv3 nossl_use_tlsv1 +syn keyword muttrcVarBool contained nossl_usesystemcerts nostatus_on_top nostrict_threads nosuspend notext_flowed +syn keyword muttrcVarBool contained nothorough_search nothread_received notilde nouncollapse_jump nouse_8bitmime +syn keyword muttrcVarBool contained nouse_domain nouse_from nouse_ipv6 nouser_agent nowait_key noweed nowrap_search +syn keyword muttrcVarBool contained nowrite_bcc + +syn keyword muttrcVarBool contained invallow_8bit invallow_ansi invarrow_cursor invascii_chars invaskbcc invaskcc +syn keyword muttrcVarBool contained invattach_split invauto_tag invautoedit invbeep invbeep_new invbounce_delivered +syn keyword muttrcVarBool contained invcheck_new invcollapse_unread invconfirmappend invconfirmcreate invdelete_untag +syn keyword muttrcVarBool contained invdigest_collapse invduplicate_threads invedit_hdrs invedit_headers invencode_from +syn keyword muttrcVarBool contained invenvelope_from invfast_reply invfcc_attach invfcc_clear invfollowup_to invforce_name +syn keyword muttrcVarBool contained invforw_decode invforw_decrypt invforw_quote invforward_decode invforward_decrypt +syn keyword muttrcVarBool contained invforward_quote invhdrs invheader invhelp invhidden_host invhide_limited +syn keyword muttrcVarBool contained invhide_missing invhide_top_limited invhide_top_missing invignore_list_reply_to +syn keyword muttrcVarBool contained invimap_force_ssl invimap_list_subscribed invimap_passive invimap_peek +syn keyword muttrcVarBool contained invimap_servernoise invimplicit_autoview invkeep_flagged invmailcap_sanitize +syn keyword muttrcVarBool contained invmaildir_trash invmark_old invmarkers invmenu_scroll invmeta_key invmetoo +syn keyword muttrcVarBool contained invmh_purge invmime_forward_decode invpager_stop invpgp_autoencrypt invpgp_autosign +syn keyword muttrcVarBool contained invpgp_ignore_subkeys invpgp_long_ids invpgp_replyencrypt invpgp_replysign +syn keyword muttrcVarBool contained invpgp_replysignencrypted invpgp_retainable_sigs invpgp_show_unusable invpgp_strict_enc +syn keyword muttrcVarBool contained invpipe_decode invpipe_split invpop_auth_try_all invpop_last invprint_decode +syn keyword muttrcVarBool contained invprint_split invprompt_after invread_only invreply_self invresolve invreverse_alias +syn keyword muttrcVarBool contained invreverse_name invreverse_realname invrfc2047_parameters invsave_address invsave_empty +syn keyword muttrcVarBool contained invsave_name invscore invsig_dashes invsig_on_top invsmart_wrap invsort_re +syn keyword muttrcVarBool contained invssl_use_sslv2 invssl_use_sslv3 invssl_use_tlsv1 invssl_usesystemcerts +syn keyword muttrcVarBool contained invstatus_on_top invstrict_threads invsuspend invtext_flowed invthorough_search +syn keyword muttrcVarBool contained invthread_received invtilde invuncollapse_jump invuse_8bitmime invuse_domain invuse_from +syn keyword muttrcVarBool contained invuse_ipv6 invuser_agent invwait_key invweed invwrap_search invwrite_bcc + +syn keyword muttrcVarQuad contained abort_nosubject abort_unmodified copy delete honor_followup_to include mime_forward +syn keyword muttrcVarQuad contained mime_forward_rest mime_fwd move pgp_create_traditional pgp_verify_sig pop_delete +syn keyword muttrcVarQuad contained pop_reconnect postpone print quit recall reply_to ssl_starttls + +syn keyword muttrcVarQuad contained noabort_nosubject noabort_unmodified nocopy nodelete nohonor_followup_to +syn keyword muttrcVarQuad contained noinclude nomime_forward nocontained nomime_forward_rest nomime_fwd nomove +syn keyword muttrcVarQuad contained nopgp_create_traditional nopgp_verify_sig nopop_delete nopop_reconnect +syn keyword muttrcVarQuad contained nopostpone noprint noquit norecall noreply_to nossl_starttls + +syn keyword muttrcVarQuad contained invabort_nosubject invabort_unmodified invcopy invdelete invhonor_followup_to +syn keyword muttrcVarQuad contained invinclude invmime_forward invcontained invmime_forward_rest invmime_fwd invmove +syn keyword muttrcVarQuad contained invpgp_create_traditional invpgp_verify_sig invpop_delete invpop_reconnect +syn keyword muttrcVarQuad contained invpostpone invprint invquit invrecall invreply_to invssl_starttls + +syn keyword muttrcVarNum contained connect_timeout history imap_keepalive mail_check pager_context pager_index_lines +syn keyword muttrcVarNum contained pgp_timeout pop_checkinterval read_inc score_threshold_delete score_threshold_flag +syn keyword muttrcVarNum contained score_threshold_read sendmail_wait sleep_time timeout wrapmargin write_inc + +syn keyword muttrcVarStr contained alias_file alias_format alternates attach_format attach_sep attribution certificate_file +syn keyword muttrcVarStr contained charset compose_format date_format default_hook display_filter dotlock_program dsn_notify +syn keyword muttrcVarStr contained dsn_return editor entropy_file escape folder folder_format forw_format forward_format +syn keyword muttrcVarStr contained from gecos_mask hdr_format hostname imap_authenticators imap_delim_chars +syn keyword muttrcVarStr contained imap_home_namespace imap_pass imap_user indent_str indent_string index_format ispell +syn keyword muttrcVarStr contained locale mailcap_path mask mbox mbox_type message_format mh_seq_flagged mh_seq_replied +syn keyword muttrcVarStr contained mh_seq_unseen mix_entry_format mixmaster msg_format pager pager_format +syn keyword muttrcVarStr contained pgp_clearsign_command pgp_decode_command pgp_decrypt_command pgp_encrypt_only_command +syn keyword muttrcVarStr contained pgp_encrypt_sign_command pgp_entry_format pgp_export_command pgp_getkeys_command +syn keyword muttrcVarStr contained pgp_good_sign pgp_import_command pgp_list_pubring_command pgp_list_secring_command +syn keyword muttrcVarStr contained pgp_sign_as pgp_sign_command pgp_sort_keys pgp_verify_command pgp_verify_key_command +syn keyword muttrcVarStr contained pipe_sep pop_authenticators pop_host pop_pass pop_user post_indent_str post_indent_string +syn keyword muttrcVarStr contained postponed preconnect print_cmd print_command query_command quote_regexp realname record +syn keyword muttrcVarStr contained reply_regexp send_charset sendmail shell signature simple_search smileys sort sort_alias +syn keyword muttrcVarStr contained sort_aux sort_browser spoolfile status_chars status_format tmpdir to_chars tunnel visual + +syn keyword muttrcMenu contained alias attach browser compose editor index pager postpone pgp mix query generic + +syn keyword muttrcCommand account-hook auto_view alternative_order charset-hook uncolor exec fcc-hook fcc-save-hook +syn keyword muttrcCommand folder-hook hdr_order iconv-hook ignore lists mailboxes message-hook mbox-hook my_hdr +syn keyword muttrcCommand pgp-hook push save-hook score send-hook source subscribe unalias unauto_view unhdr_order +syn keyword muttrcCommand unhook unignore unlists unmono unmy_hdr unscore unsubscribe + +syn keyword muttrcSet set skipwhite nextgroup=muttrcVar.* +syn keyword muttrcUnset unset skipwhite nextgroup=muttrcVar.* +syn keyword muttrcReset reset skipwhite nextgroup=muttrcVar.* +syn keyword muttrcToggle toggle skipwhite nextgroup=muttrcVar.* + +syn keyword muttrcBind contained bind skipwhite nextgroup=muttrcMenu +syn match muttrcBindLine "^\s*bind\s\+\S\+" skipwhite nextgroup=muttrcKey\(Name\)\= contains=muttrcBind + +syn keyword muttrcMacro contained macro skipwhite nextgroup=muttrcMenu +syn match muttrcMacroLine "^\s*macro\s\+\S\+" skipwhite nextgroup=muttrcKey\(Name\)\= contains=muttrcMacro + +syn keyword muttrcAlias contained alias +syn match muttrcAliasLine "^\s*alias\s\+\S\+" contains=muttrcAlias + +" Colour definitions takes object, foreground and background arguments (regexps excluded). +syn keyword muttrcColorField contained attachment body bold error hdrdefault header index +syn keyword muttrcColorField contained indicator markers message normal quoted search signature +syn keyword muttrcColorField contained status tilde tree underline +syn match muttrcColorField contained "\<quoted\d\=\>" +syn keyword muttrcColorFG contained black blue cyan default green magenta red white yellow +syn keyword muttrcColorFG contained brightblack brightblue brightcyan brightdefault brightgreen +syn keyword muttrcColorFG contained brightmagenta brightred brightwhite brightyellow +syn match muttrcColorFG contained "\<\(bright\)\=color\d\{1,2}\>" +syn keyword muttrcColorBG contained black blue cyan default green magenta red white yellow +syn match muttrcColorBG contained "\<color\d\{1,2}\>" +" Now for the match +syn keyword muttrcColor contained color skipwhite nextgroup=muttrcColorField +syn match muttrcColorInit contained "^\s*color\s\+\S\+" skipwhite nextgroup=muttrcColorFG contains=muttrcColor +syn match muttrcColorLine "^\s*color\s\+\S\+\s\+\S" skipwhite nextgroup=muttrcColorBG contains=muttrcColorInit + +" Mono are almost like color (ojects inherited from color) +syn keyword muttrcMonoAttrib contained bold none normal reverse standout underline +syn keyword muttrcMono contained mono skipwhite nextgroup=muttrcColorField +syn match muttrcMonoLine "^\s*mono\s\+\S\+" skipwhite nextgroup=muttrcMonoAttrib contains=muttrcMono + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_muttrc_syntax_inits") + if version < 508 + let did_muttrc_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink muttrcComment Comment + HiLink muttrcEscape SpecialChar + HiLink muttrcString String + HiLink muttrcSpecial Special + HiLink muttrcNumber Number + HiLink muttrcQuadopt Boolean + HiLink muttrcEmail Special + HiLink muttrcHeader Type + HiLink muttrcKeySpecial SpecialChar + HiLink muttrcKey Type + HiLink muttrcKeyName Macro + HiLink muttrcVarBool Identifier + HiLink muttrcVarQuad Identifier + HiLink muttrcVarNum Identifier + HiLink muttrcVarStr Identifier + HiLink muttrcMenu Identifier + HiLink muttrcCommand Keyword + HiLink muttrcSet muttrcCommand + HiLink muttrcUnset muttrcCommand + HiLink muttrcReset muttrcCommand + HiLink muttrcToggle muttrcCommand + HiLink muttrcBind muttrcCommand + HiLink muttrcMacro muttrcCommand + HiLink muttrcAlias muttrcCommand + HiLink muttrcAliasLine Identifier + HiLink muttrcColorField Identifier + HiLink muttrcColorFG String + HiLink muttrcColorBG muttrcColorFG + HiLink muttrcColor muttrcCommand + HiLink muttrcMonoAttrib muttrcColorFG + HiLink muttrcMono muttrcCommand + + delcommand HiLink +endif + +let b:current_syntax = "muttrc" + +"EOF vim: ts=8 noet tw=100 sw=8 sts=0 diff --git a/runtime/syntax/mysql.vim b/runtime/syntax/mysql.vim new file mode 100644 index 000000000..68b8e9de8 --- /dev/null +++ b/runtime/syntax/mysql.vim @@ -0,0 +1,296 @@ +" Vim syntax file +" Language: mysql +" Maintainer: Kenneth J. Pronovici <pronovic@ieee.org> +" Last Change: $Date$ +" Filenames: *.mysql +" URL: ftp://cedar-solutions.com/software/mysql.vim +" Note: The definitions below are taken from the mysql user manual as of April 2002, for version 3.23 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Always ignore case +syn case ignore + +" General keywords which don't fall into other categories +syn keyword mysqlKeyword action add after aggregate all alter as asc auto_increment avg avg_row_length +syn keyword mysqlKeyword both by +syn keyword mysqlKeyword cascade change character check checksum column columns comment constraint create cross +syn keyword mysqlKeyword current_date current_time current_timestamp +syn keyword mysqlKeyword data database databases day day_hour day_minute day_second +syn keyword mysqlKeyword default delayed delay_key_write delete desc describe distinct distinctrow drop +syn keyword mysqlKeyword enclosed escape escaped explain +syn keyword mysqlKeyword fields file first flush for foreign from full function +syn keyword mysqlKeyword global grant grants group +syn keyword mysqlKeyword having heap high_priority hosts hour hour_minute hour_second +syn keyword mysqlKeyword identified ignore index infile inner insert insert_id into isam +syn keyword mysqlKeyword join +syn keyword mysqlKeyword key keys kill last_insert_id leading left limit lines load local lock logs long +syn keyword mysqlKeyword low_priority +syn keyword mysqlKeyword match max_rows middleint min_rows minute minute_second modify month myisam +syn keyword mysqlKeyword natural no +syn keyword mysqlKeyword on optimize option optionally order outer outfile +syn keyword mysqlKeyword pack_keys partial password primary privileges procedure process processlist +syn keyword mysqlKeyword read references reload rename replace restrict returns revoke row rows +syn keyword mysqlKeyword second select show shutdown soname sql_big_result sql_big_selects sql_big_tables sql_log_off +syn keyword mysqlKeyword sql_log_update sql_low_priority_updates sql_select_limit sql_small_result sql_warnings starting +syn keyword mysqlKeyword status straight_join string +syn keyword mysqlKeyword table tables temporary terminated to trailing type +syn keyword mysqlKeyword unique unlock unsigned update usage use using +syn keyword mysqlKeyword values varbinary variables varying +syn keyword mysqlKeyword where with write +syn keyword mysqlKeyword year_month +syn keyword mysqlKeyword zerofill + +" Special values +syn keyword mysqlSpecial false null true + +" Strings (single- and double-quote) +syn region mysqlString start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn region mysqlString start=+'+ skip=+\\\\\|\\'+ end=+'+ + +" Numbers and hexidecimal values +syn match mysqlNumber "-\=\<[0-9]*\>" +syn match mysqlNumber "-\=\<[0-9]*\.[0-9]*\>" +syn match mysqlNumber "-\=\<[0-9]*e[+-]\=[0-9]*\>" +syn match mysqlNumber "-\=\<[0-9]*\.[0-9]*e[+-]\=[0-9]*\>" +syn match mysqlNumber "\<0x[abcdefABCDEF0-9]*\>" + +" User variables +syn match mysqlVariable "@\a*[A-Za-z0-9]*[._]*[A-Za-z0-9]*" + +" Comments (c-style, mysql-style and modified sql-style) +syn region mysqlComment start="/\*" end="\*/" +syn match mysqlComment "#.*" +syn match mysqlComment "-- .*" +syn sync ccomment mysqlComment + +" Column types +" +" This gets a bit ugly. There are two different problems we have to +" deal with. +" +" The first problem is that some keywoards like 'float' can be used +" both with and without specifiers, i.e. 'float', 'float(1)' and +" 'float(@var)' are all valid. We have to account for this and we +" also have to make sure that garbage like floatn or float_(1) is not +" highlighted. +" +" The second problem is that some of these keywords are included in +" function names. For instance, year() is part of the name of the +" dayofyear() function, and the dec keyword (no parenthesis) is part of +" the name of the decode() function. + +syn keyword mysqlType tinyint smallint mediumint int integer bigint +syn keyword mysqlType date datetime time bit bool +syn keyword mysqlType tinytext mediumtext longtext text +syn keyword mysqlType tinyblob mediumblob longblob blob +syn region mysqlType start="float\W" end="."me=s-1 +syn region mysqlType start="float$" end="."me=s-1 +syn region mysqlType start="float(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="double\W" end="."me=s-1 +syn region mysqlType start="double$" end="."me=s-1 +syn region mysqlType start="double(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="double precision\W" end="."me=s-1 +syn region mysqlType start="double precision$" end="."me=s-1 +syn region mysqlType start="double precision(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="real\W" end="."me=s-1 +syn region mysqlType start="real$" end="."me=s-1 +syn region mysqlType start="real(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="numeric(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="dec\W" end="."me=s-1 +syn region mysqlType start="dec$" end="."me=s-1 +syn region mysqlType start="dec(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="decimal\W" end="."me=s-1 +syn region mysqlType start="decimal$" end="."me=s-1 +syn region mysqlType start="decimal(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="\Wtimestamp\W" end="."me=s-1 +syn region mysqlType start="\Wtimestamp$" end="."me=s-1 +syn region mysqlType start="\Wtimestamp(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="^timestamp\W" end="."me=s-1 +syn region mysqlType start="^timestamp$" end="."me=s-1 +syn region mysqlType start="^timestamp(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="\Wyear(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="^year(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="char(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="varchar(" end=")" contains=mysqlNumber,mysqlVariable +syn region mysqlType start="enum(" end=")" contains=mysqlString,mysqlVariable +syn region mysqlType start="\Wset(" end=")" contains=mysqlString,mysqlVariable +syn region mysqlType start="^set(" end=")" contains=mysqlString,mysqlVariable + +" Logical, string and numeric operators +syn keyword mysqlOperator between not and or is in like regexp rlike binary exists +syn region mysqlOperator start="isnull(" end=")" contains=ALL +syn region mysqlOperator start="coalesce(" end=")" contains=ALL +syn region mysqlOperator start="interval(" end=")" contains=ALL + +" Control flow functions +syn keyword mysqlFlow case when then else end +syn region mysqlFlow start="ifnull(" end=")" contains=ALL +syn region mysqlFlow start="nullif(" end=")" contains=ALL +syn region mysqlFlow start="if(" end=")" contains=ALL + +" General Functions +" +" I'm leery of just defining keywords for functions, since according to the MySQL manual: +" +" Function names do not clash with table or column names. For example, ABS is a +" valid column name. The only restriction is that for a function call, no spaces +" are allowed between the function name and the `(' that follows it. +" +" This means that if I want to highlight function names properly, I have to use a +" region to define them, not just a keyword. This will probably cause the syntax file +" to load more slowly, but at least it will be 'correct'. + +syn region mysqlFunction start="abs(" end=")" contains=ALL +syn region mysqlFunction start="acos(" end=")" contains=ALL +syn region mysqlFunction start="adddate(" end=")" contains=ALL +syn region mysqlFunction start="ascii(" end=")" contains=ALL +syn region mysqlFunction start="asin(" end=")" contains=ALL +syn region mysqlFunction start="atan(" end=")" contains=ALL +syn region mysqlFunction start="atan2(" end=")" contains=ALL +syn region mysqlFunction start="benchmark(" end=")" contains=ALL +syn region mysqlFunction start="bin(" end=")" contains=ALL +syn region mysqlFunction start="bit_and(" end=")" contains=ALL +syn region mysqlFunction start="bit_count(" end=")" contains=ALL +syn region mysqlFunction start="bit_or(" end=")" contains=ALL +syn region mysqlFunction start="ceiling(" end=")" contains=ALL +syn region mysqlFunction start="character_length(" end=")" contains=ALL +syn region mysqlFunction start="char_length(" end=")" contains=ALL +syn region mysqlFunction start="concat(" end=")" contains=ALL +syn region mysqlFunction start="concat_ws(" end=")" contains=ALL +syn region mysqlFunction start="connection_id(" end=")" contains=ALL +syn region mysqlFunction start="conv(" end=")" contains=ALL +syn region mysqlFunction start="cos(" end=")" contains=ALL +syn region mysqlFunction start="cot(" end=")" contains=ALL +syn region mysqlFunction start="count(" end=")" contains=ALL +syn region mysqlFunction start="curdate(" end=")" contains=ALL +syn region mysqlFunction start="curtime(" end=")" contains=ALL +syn region mysqlFunction start="date_add(" end=")" contains=ALL +syn region mysqlFunction start="date_format(" end=")" contains=ALL +syn region mysqlFunction start="date_sub(" end=")" contains=ALL +syn region mysqlFunction start="dayname(" end=")" contains=ALL +syn region mysqlFunction start="dayofmonth(" end=")" contains=ALL +syn region mysqlFunction start="dayofweek(" end=")" contains=ALL +syn region mysqlFunction start="dayofyear(" end=")" contains=ALL +syn region mysqlFunction start="decode(" end=")" contains=ALL +syn region mysqlFunction start="degrees(" end=")" contains=ALL +syn region mysqlFunction start="elt(" end=")" contains=ALL +syn region mysqlFunction start="encode(" end=")" contains=ALL +syn region mysqlFunction start="encrypt(" end=")" contains=ALL +syn region mysqlFunction start="exp(" end=")" contains=ALL +syn region mysqlFunction start="export_set(" end=")" contains=ALL +syn region mysqlFunction start="extract(" end=")" contains=ALL +syn region mysqlFunction start="field(" end=")" contains=ALL +syn region mysqlFunction start="find_in_set(" end=")" contains=ALL +syn region mysqlFunction start="floor(" end=")" contains=ALL +syn region mysqlFunction start="format(" end=")" contains=ALL +syn region mysqlFunction start="from_days(" end=")" contains=ALL +syn region mysqlFunction start="from_unixtime(" end=")" contains=ALL +syn region mysqlFunction start="get_lock(" end=")" contains=ALL +syn region mysqlFunction start="greatest(" end=")" contains=ALL +syn region mysqlFunction start="group_unique_users(" end=")" contains=ALL +syn region mysqlFunction start="hex(" end=")" contains=ALL +syn region mysqlFunction start="inet_aton(" end=")" contains=ALL +syn region mysqlFunction start="inet_ntoa(" end=")" contains=ALL +syn region mysqlFunction start="instr(" end=")" contains=ALL +syn region mysqlFunction start="lcase(" end=")" contains=ALL +syn region mysqlFunction start="least(" end=")" contains=ALL +syn region mysqlFunction start="length(" end=")" contains=ALL +syn region mysqlFunction start="load_file(" end=")" contains=ALL +syn region mysqlFunction start="locate(" end=")" contains=ALL +syn region mysqlFunction start="log(" end=")" contains=ALL +syn region mysqlFunction start="log10(" end=")" contains=ALL +syn region mysqlFunction start="lower(" end=")" contains=ALL +syn region mysqlFunction start="lpad(" end=")" contains=ALL +syn region mysqlFunction start="ltrim(" end=")" contains=ALL +syn region mysqlFunction start="make_set(" end=")" contains=ALL +syn region mysqlFunction start="master_pos_wait(" end=")" contains=ALL +syn region mysqlFunction start="max(" end=")" contains=ALL +syn region mysqlFunction start="md5(" end=")" contains=ALL +syn region mysqlFunction start="mid(" end=")" contains=ALL +syn region mysqlFunction start="min(" end=")" contains=ALL +syn region mysqlFunction start="mod(" end=")" contains=ALL +syn region mysqlFunction start="monthname(" end=")" contains=ALL +syn region mysqlFunction start="now(" end=")" contains=ALL +syn region mysqlFunction start="oct(" end=")" contains=ALL +syn region mysqlFunction start="octet_length(" end=")" contains=ALL +syn region mysqlFunction start="ord(" end=")" contains=ALL +syn region mysqlFunction start="period_add(" end=")" contains=ALL +syn region mysqlFunction start="period_diff(" end=")" contains=ALL +syn region mysqlFunction start="pi(" end=")" contains=ALL +syn region mysqlFunction start="position(" end=")" contains=ALL +syn region mysqlFunction start="pow(" end=")" contains=ALL +syn region mysqlFunction start="power(" end=")" contains=ALL +syn region mysqlFunction start="quarter(" end=")" contains=ALL +syn region mysqlFunction start="radians(" end=")" contains=ALL +syn region mysqlFunction start="rand(" end=")" contains=ALL +syn region mysqlFunction start="release_lock(" end=")" contains=ALL +syn region mysqlFunction start="repeat(" end=")" contains=ALL +syn region mysqlFunction start="reverse(" end=")" contains=ALL +syn region mysqlFunction start="round(" end=")" contains=ALL +syn region mysqlFunction start="rpad(" end=")" contains=ALL +syn region mysqlFunction start="rtrim(" end=")" contains=ALL +syn region mysqlFunction start="sec_to_time(" end=")" contains=ALL +syn region mysqlFunction start="session_user(" end=")" contains=ALL +syn region mysqlFunction start="sign(" end=")" contains=ALL +syn region mysqlFunction start="sin(" end=")" contains=ALL +syn region mysqlFunction start="soundex(" end=")" contains=ALL +syn region mysqlFunction start="space(" end=")" contains=ALL +syn region mysqlFunction start="sqrt(" end=")" contains=ALL +syn region mysqlFunction start="std(" end=")" contains=ALL +syn region mysqlFunction start="stddev(" end=")" contains=ALL +syn region mysqlFunction start="strcmp(" end=")" contains=ALL +syn region mysqlFunction start="subdate(" end=")" contains=ALL +syn region mysqlFunction start="substring(" end=")" contains=ALL +syn region mysqlFunction start="substring_index(" end=")" contains=ALL +syn region mysqlFunction start="sum(" end=")" contains=ALL +syn region mysqlFunction start="sysdate(" end=")" contains=ALL +syn region mysqlFunction start="system_user(" end=")" contains=ALL +syn region mysqlFunction start="tan(" end=")" contains=ALL +syn region mysqlFunction start="time_format(" end=")" contains=ALL +syn region mysqlFunction start="time_to_sec(" end=")" contains=ALL +syn region mysqlFunction start="to_days(" end=")" contains=ALL +syn region mysqlFunction start="trim(" end=")" contains=ALL +syn region mysqlFunction start="ucase(" end=")" contains=ALL +syn region mysqlFunction start="unique_users(" end=")" contains=ALL +syn region mysqlFunction start="unix_timestamp(" end=")" contains=ALL +syn region mysqlFunction start="upper(" end=")" contains=ALL +syn region mysqlFunction start="user(" end=")" contains=ALL +syn region mysqlFunction start="version(" end=")" contains=ALL +syn region mysqlFunction start="week(" end=")" contains=ALL +syn region mysqlFunction start="weekday(" end=")" contains=ALL +syn region mysqlFunction start="yearweek(" end=")" contains=ALL + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_mysql_syn_inits") + if version < 508 + let did_mysql_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink mysqlKeyword Statement + HiLink mysqlSpecial Special + HiLink mysqlString String + HiLink mysqlNumber Number + HiLink mysqlVariable Identifier + HiLink mysqlComment Comment + HiLink mysqlType Type + HiLink mysqlOperator Statement + HiLink mysqlFlow Statement + HiLink mysqlFunction Function + + delcommand HiLink +endif + +let b:current_syntax = "mysql" + diff --git a/runtime/syntax/named.vim b/runtime/syntax/named.vim new file mode 100644 index 000000000..0918352f6 --- /dev/null +++ b/runtime/syntax/named.vim @@ -0,0 +1,234 @@ +" Vim syntax file +" Language: BIND 8.x configuration file +" Maintainer: glory hump <rnd@web-drive.ru> +" Last change: Mon May 21 04:51:01 SAMST 2001 +" Filenames: named.conf +" URL: http://rnd.web-drive.ru/vim/syntax/named.vim +" $Id$ +" +" NOTE +" it was not widely tested, i just tried it on my simple +" single-master-single-slave configuration. most syntax was borrowed +" directly from "BIND Configuration File Guide" without testing. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case match + +if version >= 600 + setlocal iskeyword=.,-,48-58,A-Z,a-z,_ +else + set iskeyword=.,-,48-58,A-Z,a-z,_ +endif + +let s:save_cpo = &cpo +set cpo-=C + +" BIND configuration file + +syn match namedComment "//.*" +syn region namedComment start="/\*" end="\*/" +syn region namedString start=/"/ end=/"/ contained +" --- omitted trailing semicolon FIXME +syn match namedError /[^;{]$/ + +" --- top-level keywords + +syn keyword namedInclude include nextgroup=namedString skipwhite +syn keyword namedKeyword acl key nextgroup=namedIntIdent skipwhite +syn keyword namedKeyword server nextgroup=namedIdentifier skipwhite +syn keyword namedKeyword controls nextgroup=namedSection skipwhite +syn keyword namedKeyword trusted-keys nextgroup=namedIntSection skipwhite +syn keyword namedKeyword logging nextgroup=namedLogSection skipwhite +syn keyword namedKeyword options nextgroup=namedOptSection skipwhite +syn keyword namedKeyword zone nextgroup=namedZoneString skipwhite + +" --- Identifier: name of following { ... } Section +syn match namedIdentifier contained /\k\+/ nextgroup=namedSection skipwhite +" --- IntIdent: name of following IntSection +syn match namedIntIdent contained /"\=\k\+"\=/ nextgroup=namedIntSection skipwhite + +" --- Section: { ... } clause +syn region namedSection contained start=+{+ end=+};+ contains=namedSection,namedIntKeyword + +" --- IntSection: section that does not contain other sections +syn region namedIntSection contained start=+{+ end=+}+ contains=namedIntKeyword,namedError + +" --- IntKeyword: keywords contained within `{ ... }' sections only +" + these keywords are contained within `key' and `acl' sections +syn keyword namedIntKeyword contained key algorithm +syn keyword namedIntKeyword contained secret nextgroup=namedString skipwhite + +" + these keywords are contained within `server' section only +syn keyword namedIntKeyword contained bogus support-ixfr nextgroup=namedBool,namedNotBool skipwhite +syn keyword namedIntKeyword contained transfers nextgroup=namedNumber,namedNotNumber skipwhite +syn keyword namedIntKeyword contained transfer-format +syn keyword namedIntKeyword contained keys nextgroup=namedIntSection skipwhite + +" + these keywords are contained within `controls' section only +syn keyword namedIntKeyword contained inet nextgroup=namedIPaddr,namedIPerror skipwhite +syn keyword namedIntKeyword contained unix nextgroup=namedString skipwhite +syn keyword namedIntKeyword contained port perm owner group nextgroup=namedNumber,namedNotNumber skipwhite +syn keyword namedIntKeyword contained allow nextgroup=namedIntSection skipwhite + +" --- options +syn region namedOptSection contained start=+{+ end=+};+ contains=namedOption,namedCNOption,namedComment,namedParenError + +syn keyword namedOption contained version directory +\ nextgroup=namedString skipwhite +syn keyword namedOption contained named-xfer dump-file pid-file +\ nextgroup=namedString skipwhite +syn keyword namedOption contained mem-statistics-file statistics-file +\ nextgroup=namedString skipwhite +syn keyword namedOption contained auth-nxdomain deallocate-on-exit +\ nextgroup=namedBool,namedNotBool skipwhite +syn keyword namedOption contained dialup fake-iquery fetch-glue +\ nextgroup=namedBool,namedNotBool skipwhite +syn keyword namedOption contained has-old-clients host-statistics +\ nextgroup=namedBool,namedNotBool skipwhite +syn keyword namedOption contained maintain-ixfr-base multiple-cnames +\ nextgroup=namedBool,namedNotBool skipwhite +syn keyword namedOption contained notify recursion rfc2308-type1 +\ nextgroup=namedBool,namedNotBool skipwhite +syn keyword namedOption contained use-id-pool treat-cr-as-space +\ nextgroup=namedBool,namedNotBool skipwhite +syn keyword namedOption contained also-notify forwarders +\ nextgroup=namedIntSection skipwhite +syn keyword namedOption contained forward check-names +syn keyword namedOption contained allow-query allow-transfer allow-recursion nextgroup=namedAML skipwhite +syn keyword namedOption contained blackhole listen-on +\ nextgroup=namedIntSection skipwhite +syn keyword namedOption contained lame-ttl max-transfer-time-in +\ nextgroup=namedNumber,namedNotNumber skipwhite +syn keyword namedOption contained max-ncache-ttl min-roots +\ nextgroup=namedNumber,namedNotNumber skipwhite +syn keyword namedOption contained serial-queries transfers-in +\ nextgroup=namedNumber,namedNotNumber skipwhite +syn keyword namedOption contained transfers-out transfers-per-ns +syn keyword namedOption contained transfer-format +syn keyword namedOption contained transfer-source +\ nextgroup=namedIPaddr,namedIPerror skipwhite +syn keyword namedOption contained max-ixfr-log-size +\ nextgroup=namedNumber,namedNotNumber skipwhite +syn keyword namedOption contained coresize datasize files stacksize +syn keyword namedOption contained cleaning-interval interface-interval statistics-interval heartbeat-interval +\ nextgroup=namedNumber,namedNotNumber skipwhite +syn keyword namedOption contained topology sortlist rrset-order +\ nextgroup=namedIntSection skipwhite + +syn match namedOption contained /\<query-source\s\+.*;/he=s+12 contains=namedQSKeywords +syn keyword namedQSKeywords contained address port +syn match namedCNOption contained /\<check-names\s\+.*;/he=s+11 contains=namedCNKeywords +syn keyword namedCNKeywords contained fail warn ignore master slave response + +" --- logging facilities +syn region namedLogSection contained start=+{+ end=+};+ contains=namedLogOption +syn keyword namedLogOption contained channel nextgroup=namedIntIdent skipwhite +syn keyword namedLogOption contained category nextgroup=namedIntIdent skipwhite +syn keyword namedIntKeyword contained syslog null versions size severity +syn keyword namedIntKeyword contained file nextgroup=namedString skipwhite +syn keyword namedIntKeyword contained print-category print-severity print-time nextgroup=namedBool,namedNotBool skipwhite + +" --- zone section +syn region namedZoneString contained oneline start=+"+ end=+"+ skipwhite +\ contains=namedDomain,namedIllegalDom +\ nextgroup=namedZoneClass,namedZoneSection +syn keyword namedZoneClass contained in hs hesiod chaos +\ IN HS HESIOD CHAOS +\ nextgroup=namedZoneSection skipwhite + +syn region namedZoneSection contained start=+{+ end=+};+ contains=namedZoneOpt,namedCNOption,namedComment,namedMasters,namedParenError +syn keyword namedZoneOpt contained file ixfr-base +\ nextgroup=namedString skipwhite +syn keyword namedZoneOpt contained notify dialup +\ nextgroup=namedBool,namedNotBool skipwhite +syn keyword namedZoneOpt contained pubkey forward +syn keyword namedZoneOpt contained max-transfer-time-in +\ nextgroup=namedNumber,namedNotNumber skipwhite +syn keyword namedZoneOpt contained type nextgroup=namedZoneType skipwhite +syn keyword namedZoneType contained master slave stub forward hint + +syn keyword namedZoneOpt contained masters forwarders +\ nextgroup=namedIPlist skipwhite +syn region namedIPlist contained start=+{+ end=+};+ contains=namedIPaddr,namedIPerror,namedParenError,namedComment +syn match namedZoneOpt contained "\<allow-\(update\|query\|transfer\)" +\ nextgroup=namedAML skipwhite + +" --- boolean parameter +syn match namedNotBool contained "[^ ;]\+" +syn keyword namedBool contained yes no true false 1 0 + +" --- number parameter +syn match namedNotNumber contained "[^ 0-9;]\+" +syn match namedNumber contained "\d\+" + +" --- address match list +syn region namedAML contained start=+{+ end=+};+ contains=namedParenError,namedComment + +" --- IPs & Domains +syn match namedIPaddr contained /\<[0-9]\{1,3}\(\.[0-9]\{1,3}\)\{3};/he=e-1 +syn match namedDomain contained /\<[0-9A-Za-z][-0-9A-Za-z.]\+\>/ nextgroup=namedSpareDot +syn match namedDomain contained /"\."/ms=s+1,me=e-1 +syn match namedSpareDot contained /\./ + +" --- syntax errors +syn match namedIllegalDom contained /"\S*[^-A-Za-z0-9.[:space:]]\S*"/ms=s+1,me=e-1 +syn match namedIPerror contained /\<\S*[^0-9.[:space:];]\S*/ +syn match namedEParenError contained +{+ +syn match namedParenError +}\([^;]\|$\)+ + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_named_syn_inits") + if version < 508 + let did_named_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink namedComment Comment + HiLink namedInclude Include + HiLink namedKeyword Keyword + HiLink namedIntKeyword Keyword + HiLink namedIdentifier Identifier + HiLink namedIntIdent Identifier + + HiLink namedString String + HiLink namedBool Type + HiLink namedNotBool Error + HiLink namedNumber Number + HiLink namedNotNumber Error + + HiLink namedOption namedKeyword + HiLink namedLogOption namedKeyword + HiLink namedCNOption namedKeyword + HiLink namedQSKeywords Type + HiLink namedCNKeywords Type + HiLink namedLogCategory Type + HiLink namedDomain Identifier + HiLink namedZoneOpt namedKeyword + HiLink namedZoneType Type + HiLink namedParenError Error + HiLink namedEParenError Error + HiLink namedIllegalDom Error + HiLink namedIPerror Error + HiLink namedSpareDot Error + HiLink namedError Error + + delcommand HiLink +endif + +let &cpo = s:save_cpo +unlet s:save_cpo + +let b:current_syntax = "named" + +" vim: ts=17 diff --git a/runtime/syntax/nasm.vim b/runtime/syntax/nasm.vim new file mode 100644 index 000000000..6bbf33a9c --- /dev/null +++ b/runtime/syntax/nasm.vim @@ -0,0 +1,522 @@ +" Vim syntax file +" Language: NASM - The Netwide Assembler (v0.98) +" Maintainer: Manuel M.H. Stol <mmh.stol@gmx.net> +" Last Change: 2003 May 11 +" Vim URL: http://www.vim.org/lang.html +" NASM Home: http://www.cryogen.com/Nasm/ + + + +" Setup Syntax: +" Clear old syntax settings +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif +" Assembler syntax is case insensetive +syn case ignore + + + +" Vim search and movement commands on identifers +if version < 600 + " Comments at start of a line inside which to skip search for indentifiers + set comments=:; + " Identifier Keyword characters (defines \k) + set iskeyword=@,48-57,#,$,.,?,@-@,_,~ +else + " Comments at start of a line inside which to skip search for indentifiers + setlocal comments=:; + " Identifier Keyword characters (defines \k) + setlocal iskeyword=@,48-57,#,$,.,?,@-@,_,~ +endif + + + +" Comments: +syn region nasmComment start=";" keepend end="$" contains=@nasmGrpInComments +syn region nasmSpecialComment start=";\*\*\*" keepend end="$" +syn keyword nasmInCommentTodo contained TODO FIXME XXX[XXXXX] +syn cluster nasmGrpInComments contains=nasmInCommentTodo +syn cluster nasmGrpComments contains=@nasmGrpInComments,nasmComment,nasmSpecialComment + + + +" Label Identifiers: +" in NASM: 'Everything is a Label' +" Definition Label = label defined by %[i]define or %[i]assign +" Identifier Label = label defined as first non-keyword on a line or %[i]macro +syn match nasmLabelError "$\=\(\d\+\K\|[#\.@]\|\$\$\k\)\k*\>" +syn match nasmLabel "\<\(\h\|[?@]\)\k*\>" +syn match nasmLabel "[\$\~]\(\h\|[?@]\)\k*\>"lc=1 +" Labels starting with one or two '.' are special +syn match nasmLocalLabel "\<\.\(\w\|[#$?@~]\)\k*\>" +syn match nasmLocalLabel "\<\$\.\(\w\|[#$?@~]\)\k*\>"ms=s+1 +if !exists("nasm_no_warn") + syn match nasmLabelWarn "\<\~\=\$\=[_\.][_\.\~]*\>" +endif +if exists("nasm_loose_syntax") + syn match nasmSpecialLabel "\<\.\.@\k\+\>" + syn match nasmSpecialLabel "\<\$\.\.@\k\+\>"ms=s+1 + if !exists("nasm_no_warn") + syn match nasmLabelWarn "\<\$\=\.\.@\(\d\|[#$\.~]\)\k*\>" + endif + " disallow use of nasm internal label format + syn match nasmLabelError "\<\$\=\.\.@\d\+\.\k*\>" +else + syn match nasmSpecialLabel "\<\.\.@\(\h\|[?@]\)\k*\>" + syn match nasmSpecialLabel "\<\$\.\.@\(\h\|[?@]\)\k*\>"ms=s+1 +endif +" Labels can be dereferenced with '$' to destinguish them from reserved words +syn match nasmLabelError "\<\$\K\k*\s*:" +syn match nasmLabelError "^\s*\$\K\k*\>" +syn match nasmLabelError "\<\~\s*\(\k*\s*:\|\$\=\.\k*\)" + + + +" Constants: +syn match nasmStringError +["']+ +syn match nasmString +\("[^"]\{-}"\|'[^']\{-}'\)+ +syn match nasmBinNumber "\<[0-1]\+b\>" +syn match nasmBinNumber "\<\~[0-1]\+b\>"lc=1 +syn match nasmOctNumber "\<\o\+q\>" +syn match nasmOctNumber "\<\~\o\+q\>"lc=1 +syn match nasmDecNumber "\<\d\+\>" +syn match nasmDecNumber "\<\~\d\+\>"lc=1 +syn match nasmHexNumber "\<\(\d\x*h\|0x\x\+\|\$\d\x*\)\>" +syn match nasmHexNumber "\<\~\(\d\x*h\|0x\x\+\|\$\d\x*\)\>"lc=1 +syn match nasmFltNumber "\<\d\+\.\d*\(e[+-]\=\d\+\)\=\>" +syn keyword nasmFltNumber Inf Infinity Indefinite NaN SNaN QNaN +syn match nasmNumberError "\<\~\s*\d\+\.\d*\(e[+-]\=\d\+\)\=\>" + + + +" Netwide Assembler Storage Directives: +" Storage types +syn keyword nasmTypeError DF EXTRN FWORD RESF TBYTE +syn keyword nasmType FAR NEAR SHORT +syn keyword nasmType BYTE WORD DWORD QWORD DQWORD HWORD DHWORD TWORD +syn keyword nasmType CDECL FASTCALL NONE PASCAL STDCALL +syn keyword nasmStorage DB DW DD DQ DDQ DT +syn keyword nasmStorage RESB RESW RESD RESQ RESDQ REST +syn keyword nasmStorage EXTERN GLOBAL COMMON +" Structured storage types +syn match nasmTypeError "\<\(AT\|I\=\(END\)\=\(STRUCT\=\|UNION\)\|I\=END\)\>" +syn match nasmStructureLabel contained "\<\(AT\|I\=\(END\)\=\(STRUCT\=\|UNION\)\|I\=END\)\>" +" structures cannot be nested (yet) -> use: 'keepend' and 're=' +syn cluster nasmGrpCntnStruc contains=ALLBUT,@nasmGrpInComments,nasmMacroDef,@nasmGrpInMacros,@nasmGrpInPreCondits,nasmStructureDef,@nasmGrpInStrucs +syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="^\s*STRUCT\>"hs=e-5 end="^\s*ENDSTRUCT\>"re=e-9 contains=@nasmGrpCntnStruc +syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="^\s*STRUC\>"hs=e-4 end="^\s*ENDSTRUC\>"re=e-8 contains=@nasmGrpCntnStruc +syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="\<ISTRUCT\=\>" end="\<IEND\(STRUCT\=\)\=\>" contains=@nasmGrpCntnStruc,nasmInStructure +" union types are not part of nasm (yet) +"syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="^\s*UNION\>"hs=e-4 end="^\s*ENDUNION\>"re=e-8 contains=@nasmGrpCntnStruc +"syn region nasmStructureDef transparent matchgroup=nasmStructure keepend start="\<IUNION\>" end="\<IEND\(UNION\)\=\>" contains=@nasmGrpCntnStruc,nasmInStructure +syn match nasmInStructure contained "^\s*AT\>"hs=e-1 +syn cluster nasmGrpInStrucs contains=nasmStructure,nasmInStructure,nasmStructureLabel + + + +" PreProcessor Instructions: +" NAsm PreProcs start with %, but % is not a character +syn match nasmPreProcError "%{\=\(%\=\k\+\|%%\+\k*\|[+-]\=\d\+\)}\=" +if exists("nasm_loose_syntax") + syn cluster nasmGrpNxtCtx contains=nasmStructureLabel,nasmLabel,nasmLocalLabel,nasmSpecialLabel,nasmLabelError,nasmPreProcError +else + syn cluster nasmGrpNxtCtx contains=nasmStructureLabel,nasmLabel,nasmLabelError,nasmPreProcError +endif + +" Multi-line macro +syn cluster nasmGrpCntnMacro contains=ALLBUT,@nasmGrpInComments,nasmStructureDef,@nasmGrpInStrucs,nasmMacroDef,@nasmGrpPreCondits,nasmMemReference,nasmInMacPreCondit,nasmInMacStrucDef +syn region nasmMacroDef matchgroup=nasmMacro keepend start="^\s*%macro\>"hs=e-5 start="^\s*%imacro\>"hs=e-6 end="^\s*%endmacro\>"re=e-9 contains=@nasmGrpCntnMacro,nasmInMacStrucDef +if exists("nasm_loose_syntax") + syn match nasmInMacLabel contained "%\(%\k\+\>\|{%\k\+}\)" + syn match nasmInMacLabel contained "%\($\+\(\w\|[#\.?@~]\)\k*\>\|{$\+\(\w\|[#\.?@~]\)\k*}\)" + syn match nasmInMacPreProc contained "^\s*%\(push\|repl\)\>"hs=e-4 skipwhite nextgroup=nasmStructureLabel,nasmLabel,nasmInMacParam,nasmLocalLabel,nasmSpecialLabel,nasmLabelError,nasmPreProcError + if !exists("nasm_no_warn") + syn match nasmInMacLblWarn contained "%\(%[$\.]\k*\>\|{%[$\.]\k*}\)" + syn match nasmInMacLblWarn contained "%\($\+\(\d\|[#\.@~]\)\k*\|{\$\+\(\d\|[#\.@~]\)\k*}\)" + hi link nasmInMacCatLabel nasmInMacLblWarn + else + hi link nasmInMacCatLabel nasmInMacLabel + endif +else + syn match nasmInMacLabel contained "%\(%\(\w\|[#?@~]\)\k*\>\|{%\(\w\|[#?@~]\)\k*}\)" + syn match nasmInMacLabel contained "%\($\+\(\h\|[?@]\)\k*\>\|{$\+\(\h\|[?@]\)\k*}\)" + hi link nasmInMacCatLabel nasmLabelError +endif +syn match nasmInMacCatLabel contained "\d\K\k*"lc=1 +syn match nasmInMacLabel contained "\d}\k\+"lc=2 +if !exists("nasm_no_warn") + syn match nasmInMacLblWarn contained "%\(\($\+\|%\)[_~][._~]*\>\|{\($\+\|%\)[_~][._~]*}\)" +endif +syn match nasmInMacPreProc contained "^\s*%pop\>"hs=e-3 +syn match nasmInMacPreProc contained "^\s*%\(push\|repl\)\>"hs=e-4 skipwhite nextgroup=@nasmGrpNxtCtx +" structures cannot be nested (yet) -> use: 'keepend' and 're=' +syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="^\s*STRUCT\>"hs=e-5 end="^\s*ENDSTRUCT\>"re=e-9 contains=@nasmGrpCntnMacro +syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="^\s*STRUC\>"hs=e-4 end="^\s*ENDSTRUC\>"re=e-8 contains=@nasmGrpCntnMacro +syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="\<ISTRUCT\=\>" end="\<IEND\(STRUCT\=\)\=\>" contains=@nasmGrpCntnMacro,nasmInStructure +" union types are not part of nasm (yet) +"syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="^\s*UNION\>"hs=e-4 end="^\s*ENDUNION\>"re=e-8 contains=@nasmGrpCntnMacro +"syn region nasmInMacStrucDef contained transparent matchgroup=nasmStructure keepend start="\<IUNION\>" end="\<IEND\(UNION\)\=\>" contains=@nasmGrpCntnMacro,nasmInStructure +syn region nasmInMacPreConDef contained transparent matchgroup=nasmInMacPreCondit start="^\s*%ifnidni\>"hs=e-7 start="^\s*%if\(idni\|n\(ctx\|def\|idn\|num\|str\)\)\>"hs=e-6 start="^\s*%if\(ctx\|def\|idn\|nid\|num\|str\)\>"hs=e-5 start="^\s*%ifid\>"hs=e-4 start="^\s*%if\>"hs=e-2 end="%endif\>" contains=@nasmGrpCntnMacro,nasmInMacPreCondit,nasmInPreCondit +syn match nasmInMacPreCondit contained transparent "ctx\s"lc=3 skipwhite nextgroup=@nasmGrpNxtCtx +syn match nasmInMacPreCondit contained "^\s*%elifctx\>"hs=e-7 skipwhite nextgroup=@nasmGrpNxtCtx +syn match nasmInMacPreCondit contained "^\s*%elifnctx\>"hs=e-8 skipwhite nextgroup=@nasmGrpNxtCtx +syn match nasmInMacParamNum contained "\<\d\+\.list\>"me=e-5 +syn match nasmInMacParamNum contained "\<\d\+\.nolist\>"me=e-7 +syn match nasmInMacDirective contained "\.\(no\)\=list\>" +syn match nasmInMacMacro contained transparent "macro\s"lc=5 skipwhite nextgroup=nasmStructureLabel +syn match nasmInMacMacro contained "^\s*%rotate\>"hs=e-6 +syn match nasmInMacParam contained "%\([+-]\=\d\+\|{[+-]\=\d\+}\)" +" nasm conditional macro operands/arguments +" Todo: check feasebility; add too nasmGrpInMacros, etc. +"syn match nasmInMacCond contained "\<\(N\=\([ABGL]E\=\|[CEOSZ]\)\|P[EO]\=\)\>" +syn cluster nasmGrpInMacros contains=nasmMacro,nasmInMacMacro,nasmInMacParam,nasmInMacParamNum,nasmInMacDirective,nasmInMacLabel,nasmInMacLblWarn,nasmInMacMemRef,nasmInMacPreConDef,nasmInMacPreCondit,nasmInMacPreProc,nasmInMacStrucDef + +" Context pre-procs that are better used inside a macro +if exists("nasm_ctx_outside_macro") + syn region nasmPreConditDef transparent matchgroup=nasmCtxPreCondit start="^\s*%ifnctx\>"hs=e-6 start="^\s*%ifctx\>"hs=e-5 end="%endif\>" contains=@nasmGrpCntnPreCon + syn match nasmCtxPreProc "^\s*%pop\>"hs=e-3 + if exists("nasm_loose_syntax") + syn match nasmCtxLocLabel "%$\+\(\w\|[#\.?@~]\)\k*\>" + else + syn match nasmCtxLocLabel "%$\+\(\h\|[?@]\)\k*\>" + endif + syn match nasmCtxPreProc "^\s*%\(push\|repl\)\>"hs=e-4 skipwhite nextgroup=@nasmGrpNxtCtx + syn match nasmCtxPreCondit contained transparent "ctx\s"lc=3 skipwhite nextgroup=@nasmGrpNxtCtx + syn match nasmCtxPreCondit contained "^\s*%elifctx\>"hs=e-7 skipwhite nextgroup=@nasmGrpNxtCtx + syn match nasmCtxPreCondit contained "^\s*%elifnctx\>"hs=e-8 skipwhite nextgroup=@nasmGrpNxtCtx + if exists("nasm_no_warn") + hi link nasmCtxPreCondit nasmPreCondit + hi link nasmCtxPreProc nasmPreProc + hi link nasmCtxLocLabel nasmLocalLabel + else + hi link nasmCtxPreCondit nasmPreProcWarn + hi link nasmCtxPreProc nasmPreProcWarn + hi link nasmCtxLocLabel nasmLabelWarn + endif +endif + +" Conditional assembly +syn cluster nasmGrpCntnPreCon contains=ALLBUT,@nasmGrpInComments,@nasmGrpInMacros,@nasmGrpInStrucs +syn region nasmPreConditDef transparent matchgroup=nasmPreCondit start="^\s*%ifnidni\>"hs=e-7 start="^\s*%if\(idni\|n\(def\|idn\|num\|str\)\)\>"hs=e-6 start="^\s*%if\(def\|idn\|nid\|num\|str\)\>"hs=e-5 start="^\s*%ifid\>"hs=e-4 start="^\s*%if\>"hs=e-2 end="%endif\>" contains=@nasmGrpCntnPreCon +syn match nasmInPreCondit contained "^\s*%el\(if\|se\)\>"hs=e-4 +syn match nasmInPreCondit contained "^\s*%elifid\>"hs=e-6 +syn match nasmInPreCondit contained "^\s*%elif\(def\|idn\|nid\|num\|str\)\>"hs=e-7 +syn match nasmInPreCondit contained "^\s*%elif\(n\(def\|idn\|num\|str\)\|idni\)\>"hs=e-8 +syn match nasmInPreCondit contained "^\s*%elifnidni\>"hs=e-9 +syn cluster nasmGrpInPreCondits contains=nasmPreCondit,nasmInPreCondit,nasmCtxPreCondit +syn cluster nasmGrpPreCondits contains=nasmPreConditDef,@nasmGrpInPreCondits,nasmCtxPreProc,nasmCtxLocLabel + +" Other pre-processor statements +syn match nasmPreProc "^\s*%rep\>"hs=e-3 +syn match nasmPreProc "^\s*%line\>"hs=e-4 +syn match nasmPreProc "^\s*%\(clear\|error\)\>"hs=e-5 +syn match nasmPreProc "^\s*%endrep\>"hs=e-6 +syn match nasmPreProc "^\s*%exitrep\>"hs=e-7 +syn match nasmDefine "^\s*%undef\>"hs=e-5 +syn match nasmDefine "^\s*%\(assign\|define\)\>"hs=e-6 +syn match nasmDefine "^\s*%i\(assign\|define\)\>"hs=e-7 +syn match nasmInclude "^\s*%include\>"hs=e-7 + +" Multiple pre-processor instructions on single line detection (obsolete) +"syn match nasmPreProcError +^\s*\([^\t "%';][^"%';]*\|[^\t "';][^"%';]\+\)%\a\+\>+ +syn cluster nasmGrpPreProcs contains=nasmMacroDef,@nasmGrpInMacros,@nasmGrpPreCondits,nasmPreProc,nasmDefine,nasmInclude,nasmPreProcWarn,nasmPreProcError + + + +" Register Identifiers: +" Register operands: +syn match nasmGen08Register "\<[A-D][HL]\>" +syn match nasmGen16Register "\<\([A-D]X\|[DS]I\|[BS]P\)\>" +syn match nasmGen32Register "\<E\([A-D]X\|[DS]I\|[BS]P\)\>" +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 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 "\<ST\((\d)\|[8-9]\>\)" +syn match nasmRegisterError "\<E\([A-D][HL]\|[C-GS]S\)\>" +" Memory reference operand (address): +syn match nasmMemRefError "[\[\]]" +syn cluster nasmGrpCntnMemRef contains=ALLBUT,@nasmGrpComments,@nasmGrpPreProcs,@nasmGrpInStrucs,nasmMemReference,nasmMemRefError +syn match nasmInMacMemRef contained "\[[^;\[\]]\{-}\]" contains=@nasmGrpCntnMemRef,nasmPreProcError,nasmInMacLabel,nasmInMacLblWarn,nasmInMacParam +syn match nasmMemReference "\[[^;\[\]]\{-}\]" contains=@nasmGrpCntnMemRef,nasmPreProcError,nasmCtxLocLabel + + + +" Netwide Assembler Directives: +" Compilation constants +syn keyword nasmConstant __BITS__ __DATE__ __FILE__ __FORMAT__ __LINE__ +syn keyword nasmConstant __NASM_MAJOR__ __NASM_MINOR__ __NASM_VERSION__ +syn keyword nasmConstant __TIME__ +" Instruction modifiers +syn match nasmInstructnError "\<TO\>" +syn match nasmInstrModifier "\(^\|:\)\s*[C-GS]S\>"ms=e-1 +syn keyword nasmInstrModifier A16 A32 O16 O32 +syn match nasmInstrModifier "\<F\(ADD\|MUL\|\(DIV\|SUB\)R\=\)\s\+TO\>"lc=5,ms=e-1 +" the 'to' keyword is not allowed for fpu-pop instructions (yet) +"syn match nasmInstrModifier "\<F\(ADD\|MUL\|\(DIV\|SUB\)R\=\)P\s\+TO\>"lc=6,ms=e-1 +" 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 ENDSECTION ENDSEGMENT +syn keyword nasmDirective __SECT__ +" Macro created standard directives: (requires %include) +syn case match +syn keyword nasmStdDirective ENDPROC EPILOGUE LOCALS PROC PROLOGUE USES +syn keyword nasmStdDirective ENDIF ELSE ELIF ELSIF IF +"syn keyword nasmStdDirective BREAK CASE DEFAULT ENDSWITCH SWITCH +"syn keyword nasmStdDirective CASE OF ENDCASE +syn keyword nasmStdDirective DO ENDFOR ENDWHILE FOR REPEAT UNTIL WHILE EXIT +syn case ignore +" Format specific directives: (all formats) +" (excluded: extension directives to section, global, common and extern) +syn keyword nasmFmtDirective ORG +syn keyword nasmFmtDirective EXPORT IMPORT GROUP UPPERCASE SEG WRT +syn keyword nasmFmtDirective LIBRARY +syn case match +syn keyword nasmFmtDirective _GLOBAL_OFFSET_TABLE_ __GLOBAL_OFFSET_TABLE_ +syn keyword nasmFmtDirective ..start ..got ..gotoff ..gotpc ..plt ..sym +syn case ignore + + + +" Standard Instructions: +syn match nasmInstructnError "\<\(F\=CMOV\|SET\)N\=\a\{0,2}\>" +syn keyword nasmInstructnError CMPS MOVS LCS LODS STOS XLAT +syn match nasmStdInstruction "\<MOV\>" +syn match nasmInstructnError "\<MOV\s[^,;[]*\<CS\>\s*[^:]"he=e-1 +syn match nasmStdInstruction "\<\(CMOV\|J\|SET\)\(N\=\([ABGL]E\=\|[CEOSZ]\)\|P[EO]\=\)\>" +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 +syn keyword nasmStdInstruction CMPXCHG CMPXCHG8B CPUID CWD[E] +syn keyword nasmStdInstruction DAA DAS DEC DIV ENTER +syn keyword nasmStdInstruction IDIV IMUL INC INT[O] IRET[D] IRETW +syn keyword nasmStdInstruction JCXZ JECXZ JMP +syn keyword nasmStdInstruction LAHF LDS LEA LEAVE LES LFS LGS LODSB LODSD +syn keyword nasmStdInstruction LODSW LOOP[E] LOOPNE LOOPNZ LOOPZ LSS +syn keyword nasmStdInstruction MOVSB MOVSD MOVSW MOVSX MOVZX MUL NEG NOP NOT +syn keyword nasmStdInstruction OR POPA[D] POPAW POPF[D] POPFW +syn keyword nasmStdInstruction PUSH[AD] PUSHAW PUSHF[D] PUSHFW +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 SUB +syn keyword nasmStdInstruction TEST XADD XCHG XLATB XOR + + +" System Instructions: (usually privileged) +" Verification of pointer parameters +syn keyword nasmSysInstruction ARPL LAR LSL VERR VERW +" Addressing descriptor tables +syn keyword nasmSysInstruction LLDT SLDT LGDT SGDT +" Multitasking +syn keyword nasmSysInstruction LTR STR +" Coprocessing and Multiprocessing (requires fpu and multiple cpu's resp.) +syn keyword nasmSysInstruction CLTS LOCK WAIT +" Input and Output +syn keyword nasmInstructnError INS OUTS +syn keyword nasmSysInstruction IN INSB INSW INSD OUT OUTSB OUTSB OUTSW OUTSD +" Interrupt control +syn keyword nasmSysInstruction CLI STI LIDT SIDT +" System control +syn match nasmSysInstruction "\<MOV\s[^;]\{-}\<CR\o\>"me=s+3 +syn keyword nasmSysInstruction HLT INVD LMSW +syn keyword nasmSseInstruction PREFETCHT0 PREFETCHT1 PREFETCHT2 PREFETCHNTA +syn keyword nasmSseInstruction RSM SFENCE SMSW SYSENTER SYSEXIT UD2 WBINVD +" TLB (Translation Lookahead Buffer) testing +syn match nasmSysInstruction "\<MOV\s[^;]\{-}\<TR\o\>"me=s+3 +syn keyword nasmSysInstruction INVLPG + +" Debugging Instructions: (privileged) +syn match nasmDbgInstruction "\<MOV\s[^;]\{-}\<DR\o\>"me=s+3 +syn keyword nasmDbgInstruction INT1 INT3 RDMSR RDTSC RDPMC WRMSR + + +" Floating Point Instructions: (requires FPU) +syn match nasmFpuInstruction "\<FCMOVN\=\([AB]E\=\|[CEPUZ]\)\>" +syn keyword nasmFpuInstruction F2XM1 FABS FADD[P] FBLD FBSTP +syn keyword nasmFpuInstruction FCHS FCLEX FCOM[IP] FCOMP[P] FCOS +syn keyword nasmFpuInstruction FDECSTP FDISI FDIV[P] FDIVR[P] FENI FFREE +syn keyword nasmFpuInstruction FIADD FICOM[P] FIDIV[R] FILD +syn keyword nasmFpuInstruction FIMUL FINCSTP FINIT FIST[P] FISUB[R] +syn keyword nasmFpuInstruction FLD[1] FLDCW FLDENV FLDL2E FLDL2T FLDLG2 +syn keyword nasmFpuInstruction FLDLN2 FLDPI FLDZ FMUL[P] +syn keyword nasmFpuInstruction FNCLEX FNDISI FNENI FNINIT FNOP FNSAVE +syn keyword nasmFpuInstruction FNSTCW FNSTENV FNSTSW FNSTSW +syn keyword nasmFpuInstruction FPATAN FPREM[1] FPTAN FRNDINT FRSTOR +syn keyword nasmFpuInstruction FSAVE FSCALE FSETPM FSIN FSINCOS FSQRT +syn keyword nasmFpuInstruction FSTCW FSTENV FST[P] FSTSW FSUB[P] FSUBR[P] +syn keyword nasmFpuInstruction FTST FUCOM[IP] FUCOMP[P] +syn keyword nasmFpuInstruction FXAM FXCH FXTRACT FYL2X FYL2XP1 + + +" Multi Media Xtension Packed Instructions: (requires MMX unit) +" Standard MMX instructions: (requires MMX1 unit) +syn match nasmInstructnError "\<P\(ADD\|SUB\)U\=S\=[DQ]\=\>" +syn match nasmInstructnError "\<PCMP\a\{0,2}[BDWQ]\=\>" +syn keyword nasmMmxInstruction EMMS MOVD MOVQ +syn keyword nasmMmxInstruction PACKSSDW PACKSSWB PACKUSWB PADDB PADDD PADDW +syn keyword nasmMmxInstruction PADDSB PADDSW PADDUSB PADDUSW PAND[N] +syn keyword nasmMmxInstruction PCMPEQB PCMPEQD PCMPEQW PCMPGTB PCMPGTD PCMPGTW +syn keyword nasmMmxInstruction PMACHRIW PMADDWD PMULHW PMULLW POR +syn keyword nasmMmxInstruction PSLLD PSLLQ PSLLW PSRAD PSRAW PSRLD PSRLQ PSRLW +syn keyword nasmMmxInstruction PSUBB PSUBD PSUBW PSUBSB PSUBSW PSUBUSB PSUBUSW +syn keyword nasmMmxInstruction PUNPCKHBW PUNPCKHDQ PUNPCKHWD +syn keyword nasmMmxInstruction PUNPCKLBW PUNPCKLDQ PUNPCKLWD PXOR +" Extended MMX instructions: (requires MMX2/SSE unit) +syn keyword nasmMmxInstruction MASKMOVQ MOVNTQ +syn keyword nasmMmxInstruction PAVGB PAVGW PEXTRW PINSRW PMAXSW PMAXUB +syn keyword nasmMmxInstruction PMINSW PMINUB PMOVMSKB PMULHUW PSADBW PSHUFW + + +" Streaming SIMD Extension Packed Instructions: (requires SSE unit) +syn match nasmInstructnError "\<CMP\a\{1,5}[PS]S\>" +syn match nasmSseInstruction "\<CMP\(N\=\(EQ\|L[ET]\)\|\(UN\)\=ORD\)\=[PS]S\>" +syn keyword nasmSseInstruction ADDPS ADDSS ANDNPS ANDPS +syn keyword nasmSseInstruction COMISS CVTPI2PS CVTPS2PI +syn keyword nasmSseInstruction CVTSI2SS CVTSS2SI CVTTPS2PI CVTTSS2SI +syn keyword nasmSseInstruction DIVPS DIVSS FXRSTOR FXSAVE LDMXCSR +syn keyword nasmSseInstruction MAXPS MAXSS MINPS MINSS MOVAPS MOVHLPS MOVHPS +syn keyword nasmSseInstruction MOVLHPS MOVLPS MOVMSKPS MOVNTPS MOVSS MOVUPS +syn keyword nasmSseInstruction MULPS MULSS +syn keyword nasmSseInstruction ORPS RCPPS RCPSS RSQRTPS RSQRTSS +syn keyword nasmSseInstruction SHUFPS SQRTPS SQRTSS STMXCSR SUBPS SUBSS +syn keyword nasmSseInstruction UCOMISS UNPCKHPS UNPCKLPS XORPS + + +" Three Dimensional Now Packed Instructions: (requires 3DNow! unit) +syn keyword nasmNowInstruction FEMMS PAVGUSB PF2ID PFACC PFADD PFCMPEQ PFCMPGE +syn keyword nasmNowInstruction PFCMPGT PFMAX PFMIN PFMUL PFRCP PFRCPIT1 +syn keyword nasmNowInstruction PFRCPIT2 PFRSQIT1 PFRSQRT PFSUB[R] PI2FD +syn keyword nasmNowInstruction PMULHRWA PREFETCH[W] + + +" Vendor Specific Instructions: +" Cyrix instructions (requires Cyrix processor) +syn keyword nasmCrxInstruction PADDSIW PAVEB PDISTIB PMAGW PMULHRW[C] PMULHRIW +syn keyword nasmCrxInstruction PMVGEZB PMVLZB PMVNZB PMVZB PSUBSIW +syn keyword nasmCrxInstruction RDSHR RSDC RSLDT SMINT SMINTOLD SVDC SVLDT SVTS +syn keyword nasmCrxInstruction WRSHR +" AMD instructions (requires AMD processor) +syn keyword nasmAmdInstruction SYSCALL SYSRET + + +" Undocumented Instructions: +syn match nasmUndInstruction "\<POP\s[^;]*\<CS\>"me=s+3 +syn keyword nasmUndInstruction CMPXCHG486 IBTS ICEBP INT01 INT03 LOADALL +syn keyword nasmUndInstruction LOADALL286 LOADALL386 SALC SMI UD1 UMOV XBTS + + + +" Synchronize Syntax: +syn sync clear +syn sync minlines=50 "for multiple region nesting +syn sync match nasmSync grouphere nasmMacroDef "^\s*%i\=macro\>"me=s-1 +syn sync match nasmSync grouphere NONE "^\s*%endmacro\>" + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later : only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_nasm_syntax_inits") + if version < 508 + let did_nasm_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " Sub Links: + HiLink nasmInMacDirective nasmDirective + HiLink nasmInMacLabel nasmLocalLabel + HiLink nasmInMacLblWarn nasmLabelWarn + HiLink nasmInMacMacro nasmMacro + HiLink nasmInMacParam nasmMacro + HiLink nasmInMacParamNum nasmDecNumber + HiLink nasmInMacPreCondit nasmPreCondit + HiLink nasmInMacPreProc nasmPreProc + HiLink nasmInPreCondit nasmPreCondit + HiLink nasmInStructure nasmStructure + HiLink nasmStructureLabel nasmStructure + + " Comment Group: + HiLink nasmComment Comment + HiLink nasmSpecialComment SpecialComment + HiLink nasmInCommentTodo Todo + + " Constant Group: + HiLink nasmString String + HiLink nasmStringError Error + HiLink nasmBinNumber Number + HiLink nasmOctNumber Number + HiLink nasmDecNumber Number + HiLink nasmHexNumber Number + HiLink nasmFltNumber Float + HiLink nasmNumberError Error + + " Identifier Group: + HiLink nasmLabel Identifier + HiLink nasmLocalLabel Identifier + HiLink nasmSpecialLabel Special + HiLink nasmLabelError Error + HiLink nasmLabelWarn Todo + + " PreProc Group: + HiLink nasmPreProc PreProc + HiLink nasmDefine Define + HiLink nasmInclude Include + HiLink nasmMacro Macro + HiLink nasmPreCondit PreCondit + HiLink nasmPreProcError Error + HiLink nasmPreProcWarn Todo + + " Type Group: + HiLink nasmType Type + HiLink nasmStorage StorageClass + HiLink nasmStructure Structure + HiLink nasmTypeError Error + + " Directive Group: + HiLink nasmConstant Constant + HiLink nasmInstrModifier Operator + HiLink nasmRepeat Repeat + HiLink nasmDirective Keyword + HiLink nasmStdDirective Operator + HiLink nasmFmtDirective Keyword + + " Register Group: + HiLink nasmCtrlRegister Special + HiLink nasmDebugRegister Debug + HiLink nasmTestRegister Special + HiLink nasmRegisterError Error + HiLink nasmMemRefError Error + + " Instruction Group: + HiLink nasmStdInstruction Statement + HiLink nasmSysInstruction Statement + HiLink nasmDbgInstruction Debug + HiLink nasmFpuInstruction Statement + HiLink nasmMmxInstruction Statement + HiLink nasmSseInstruction Statement + HiLink nasmNowInstruction Statement + HiLink nasmAmdInstruction Special + HiLink nasmCrxInstruction Special + HiLink nasmUndInstruction Todo + HiLink nasmInstructnError Error + + delcommand HiLink +endif + +let b:current_syntax = "nasm" + +" vim:ts=8 sw=4 diff --git a/runtime/syntax/nastran.vim b/runtime/syntax/nastran.vim new file mode 100644 index 000000000..f7927693f --- /dev/null +++ b/runtime/syntax/nastran.vim @@ -0,0 +1,193 @@ +" Vim syntax file +" Language: NASTRAN input/DMAP +" Maintainer: Tom Kowalski <trk@schaefferas.com> +" Last change: April 27, 2001 +" Thanks to the authors and maintainers of fortran.vim. +" Since DMAP shares some traits with fortran, this syntax file +" is based on the fortran.vim syntax file. +"---------------------------------------------------------------------- +" Remove any old syntax stuff hanging around +"syn clear +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif +" DMAP is not case dependent +syn case ignore +" +"--------------------DMAP SYNTAX--------------------------------------- +" +" -------Executive Modules and Statements +" +syn keyword nastranDmapexecmod call dbview delete end equiv equivx exit +syn keyword nastranDmapexecmod file message purge purgex return subdmap +syn keyword nastranDmapType type +syn keyword nastranDmapLabel go to goto +syn keyword nastranDmapRepeat if else elseif endif then +syn keyword nastranDmapRepeat do while +syn region nastranDmapString start=+"+ end=+"+ oneline +syn region nastranDmapString start=+'+ end=+'+ oneline +" If you don't like initial tabs in dmap (or at all) +"syn match nastranDmapIniTab "^\t.*$" +"syn match nastranDmapTab "\t" + +" Any integer +syn match nastranDmapNumber "-\=\<[0-9]\+\>" +" floating point number, with dot, optional exponent +syn match nastranDmapFloat "\<[0-9]\+\.[0-9]*\([edED][-+]\=[0-9]\+\)\=\>" +" floating point number, starting with a dot, optional exponent +syn match nastranDmapFloat "\.[0-9]\+\([edED][-+]\=[0-9]\+\)\=\>" +" floating point number, without dot, with exponent +syn match nastranDmapFloat "\<[0-9]\+[edED][-+]\=[0-9]\+\>" + +syn match nastranDmapLogical "\(true\|false\)" + +syn match nastranDmapPreCondit "^#define\>" +syn match nastranDmapPreCondit "^#include\>" +" +" -------Comments may be contained in another line. +" +syn match nastranDmapComment "^[\$].*$" +syn match nastranDmapComment "\$.*$" +syn match nastranDmapComment "^[\$].*$" contained +syn match nastranDmapComment "\$.*$" contained +" Treat all past 72nd column as a comment. Do not work with tabs! +" Breaks down when 72-73rd column is in another match (eg number or keyword) +syn match nastranDmapComment "^.\{-72}.*$"lc=72 contained + +" +" -------Utility Modules +" +syn keyword nastranDmapUtilmod append copy dbc dbdict dbdir dmin drms1 +syn keyword nastranDmapUtilmod dtiin eltprt ifp ifp1 inputt2 inputt4 lamx +syn keyword nastranDmapUtilmod matgen matgpr matmod matpch matprn matprt +syn keyword nastranDmapUtilmod modtrl mtrxin ofp output2 output4 param +syn keyword nastranDmapUtilmod paraml paramr prtparam pvt scalar +syn keyword nastranDmapUtilmod seqp setval tabedit tabprt tabpt vec vecplot +syn keyword nastranDmapUtilmod xsort +" +" -------Matrix Modules +" +syn keyword nastranDmapMatmod add add5 cead dcmp decomp diagonal fbs merge +syn keyword nastranDmapMatmod mpyad norm read reigl smpyad solve solvit +syn keyword nastranDmapMatmod trnsp umerge umerge1 upartn dmiin partn +syn region nastranDmapMatmod start=+^ *[Dd][Mm][Ii]+ end=+[\/]+ +" +" -------Implicit Functions +" +syn keyword nastranDmapImplicit abs acos acosh andl asin asinh atan atan2 +syn keyword nastranDmapImplicit atanh atanh2 char clen clock cmplx concat1 +syn keyword nastranDmapImplicit concat2 concat3 conjg cos cosh dble diagoff +syn keyword nastranDmapImplicit diagon dim dlablank dlxblank dprod eqvl exp +syn keyword nastranDmapImplicit getdiag getsys ichar imag impl index indexstr +syn keyword nastranDmapImplicit int itol leq lge lgt lle llt lne log log10 +syn keyword nastranDmapImplicit logx ltoi mcgetsys mcputsys max min mod neqvl +syn keyword nastranDmapImplicit nint noop normal notl numeq numge numgt numle +syn keyword nastranDmapImplicit numlt numne orl pi precison putdiag putsys +syn keyword nastranDmapImplicit rand rdiagon real rtimtogo setcore sign sin +syn keyword nastranDmapImplicit sinh sngl sprod sqrt substrin tan tanh +syn keyword nastranDmapImplicit timetogo wlen xorl +" +" +"--------------------INPUT FILE SYNTAX--------------------------------------- +" +" +" -------Nastran Statement +" +syn keyword nastranNastranCard nastran +" +" -------The File Management Section (FMS) +" +syn region nastranFMSCard start=+^ *[Aa][Cc][Qq][Uu][Ii]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Aa][Ss][Ss][Ii][Gg]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Cc][oO][Nn][Nn][Ee]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Bb][Cc][Ll][Ee]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Bb][Dd][Ii][Cc]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Bb][Dd][Ii][Rr]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Bb][Ff][Ii][Xx]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Bb][Ll][Oo][Aa]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Bb][Ll][Oo][Cc]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Bb][Ss][Ee][Tt]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Bb][Uu][Nn][Ll]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Bb][Uu][Pp][Dd]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Dd][Ee][Ff][Ii][Nn]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Ee][Nn][Dd][Jj][Oo]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Ee][Xx][Pp][Aa][Nn]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Ii][Nn][Cc][Ll][Uu]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Ii][Nn][Ii][Tt]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Pp][Rr][Oo][Jj]+ end=+$+ oneline +syn region nastranFMSCard start=+^ *[Rr][Ee][Ss][Tt]+ end=+$+ oneline +syn match nastranDmapUtilmod "^ *[Rr][Ee][Ss][Tt][Aa].*,.*," contains=nastranDmapComment +" +" -------Executive Control Section +" +syn region nastranECSCard start=+^ *[Aa][Ll][Tt][Ee][Rr]+ end=+$+ oneline +syn region nastranECSCard start=+^ *[Aa][Pp][Pp]+ end=+$+ oneline +syn region nastranECSCard start=+^ *[Cc][Oo][Mm][Pp][Ii]+ end=+$+ oneline +syn region nastranECSCard start=+^ *[Dd][Ii][Aa][Gg] + end=+$+ oneline +syn region nastranECSCard start=+^ *[Ee][Cc][Hh][Oo]+ end=+$+ oneline +syn region nastranECSCard start=+^ *[Ee][Nn][Dd][Aa][Ll]+ end=+$+ oneline +syn region nastranECSCard start=+^ *[Ii][Dd]+ end=+$+ oneline +syn region nastranECSCard start=+^ *[Ii][Nn][Cc][Ll][Uu]+ end=+$+ oneline +syn region nastranECSCard start=+^ *[Ll][Ii][Nn][Kk]+ end=+$+ oneline +syn region nastranECSCard start=+^ *[Mm][Aa][Ll][Tt][Ee]+ end=+$+ oneline +syn region nastranECSCard start=+^ *[Ss][Oo][Ll] + end=+$+ oneline +syn region nastranECSCard start=+^ *[Tt][Ii][Mm][Ee]+ end=+$+ oneline +" +" -------Delimiters +" +syn match nastranDelimiter "[Cc][Ee][Nn][Dd]" contained +syn match nastranDelimiter "[Bb][Ee][Gg][Ii][Nn]" contained +syn match nastranDelimiter " *[Bb][Uu][Ll][Kk]" contained +syn match nastranDelimiter "[Ee][Nn][Dd] *[dD][Aa][Tt][Aa]" contained +" +" -------Case Control section +" +syn region nastranCC start=+^ *[Cc][Ee][Nn][Dd]+ end=+^ *[Bb][Ee][Gg][Ii][Nn]+ contains=nastranDelimiter,nastranBulkData,nastranDmapComment + +" +" -------Bulk Data section +" +syn region nastranBulkData start=+ *[Bb][Uu][Ll][Kk] *$+ end=+^ [Ee][Nn][Dd] *[Dd]+ contains=nastranDelimiter,nastranDmapComment +" +" -------The following cards may appear in multiple sections of the file +" +syn keyword nastranUtilCard ECHOON ECHOOFF INCLUDE PARAM + + +if version >= 508 || !exists("did_nastran_syntax_inits") + if version < 508 + let did_nastran_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi link <args> + endif + " The default methods for highlighting. Can be overridden later + HiLink nastranDmapexecmod Statement + HiLink nastranDmapType Type + HiLink nastranDmapPreCondit Error + HiLink nastranDmapUtilmod PreProc + HiLink nastranDmapMatmod nastranDmapUtilmod + HiLink nastranDmapString String + HiLink nastranDmapNumber Constant + HiLink nastranDmapFloat nastranDmapNumber + HiLink nastranDmapInitTab nastranDmapNumber + HiLink nastranDmapTab nastranDmapNumber + HiLink nastranDmapLogical nastranDmapExecmod + HiLink nastranDmapImplicit Identifier + HiLink nastranDmapComment Comment + HiLink nastranDmapRepeat nastranDmapexecmod + HiLink nastranNastranCard nastranDmapPreCondit + HiLink nastranECSCard nastranDmapUtilmod + HiLink nastranFMSCard nastranNastranCard + HiLink nastranCC nastranDmapexecmod + HiLink nastranDelimiter Special + HiLink nastranBulkData nastranDmapType + HiLink nastranUtilCard nastranDmapexecmod + delcommand HiLink +endif + +let b:current_syntax = "nastran" + +"EOF vim: ts=8 noet tw=120 sw=8 sts=0 diff --git a/runtime/syntax/natural.vim b/runtime/syntax/natural.vim new file mode 100644 index 000000000..f7f140f58 --- /dev/null +++ b/runtime/syntax/natural.vim @@ -0,0 +1,205 @@ +" Vim syntax file +" +" Language: NATURAL +" Version: 2.0.26.17 +" Maintainer: Marko Leipert <vim@mleipert.de> +" Last Changed: 2002-02-28 09:50:36 +" Support: http://www.winconsole.de/vim/syntax.html + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when this syntax file was already loaded +if v:version < 600 + syntax clear + set iskeyword+=-,*,#,+,_,/ +elseif exists("b:current_syntax") + finish +else + setlocal iskeyword+=-,*,#,+,_,/ +endif + +" NATURAL is case insensitive +syntax case ignore + +" preprocessor +syn keyword naturalInclude include nextgroup=naturalObjName skipwhite + +" define data +syn keyword naturalKeyword define data end-define +syn keyword naturalKeyword independent global parameter local redefine view +syn keyword naturalKeyword const[ant] init initial + +" loops +syn keyword naturalLoop read end-read end-work find end-find histogram end-histogram +syn keyword naturalLoop end-all sort end-sort sorted descending ascending +syn keyword naturalRepeat repeat end-repeat while until for step end-for +syn keyword naturalKeyword in file with field starting from ending at thru by isn where +syn keyword naturalError on error end-error +syn keyword naturalKeyword accept reject end-enddata number unique retain as release +syn keyword naturalKeyword start end-start break end-break physical page top sequence +syn keyword naturalKeyword end-toppage end-endpage end-endfile before processing +syn keyword naturalKeyword end-before + +" conditionals +syn keyword naturalConditional if then else end-if end-norec +syn keyword naturalConditional decide end-decide value when condition none any + +" assignment / calculation +syn keyword naturalKeyword reset assign move left right justified compress to into edited +syn keyword naturalKeyword add subtract multiply divide compute name +syn keyword naturalKeyword all giving remainder rounded leaving space +syn keyword naturalKeyword examine full replace giving separate delimiter modified +syn keyword naturalKeyword suspend identical suppress + +" program flow +syn keyword naturalFlow callnat fetch return enter escape bottom top stack formatted +syn keyword naturalFlow command call +syn keyword naturalflow end-subroutine routine + +" file operations +syn keyword naturalKeyword update store get delete end transaction work once close + +" other keywords +syn keyword naturalKeyword first every of no record[s] found ignore immediate +syn keyword naturalKeyword set settime key control stop terminate + +" in-/output +syn keyword naturalKeyword write display input reinput notitle nohdr map newpage mark +syn keyword naturalKeyword alarm text help eject index +syn keyword naturalKeyword format printer skip lines + +" functions +syn keyword naturalKeyword abs atn cos exp frac int log sgn sin sqrt tan val old + +" report mode keywords +syn keyword naturalRMKeyword same loop obtain indexed do doend + +" Subroutine name +syn keyword naturalFlow perform subroutine nextgroup=naturalFunction skipwhite +syn match naturalFunction "\<[a-z][-_a-z0-9]*\>" + +syn keyword naturalFlow using nextgroup=naturalKeyword,naturalObjName skipwhite +syn match naturalObjName "\<[a-z][-_a-z0-9]\{,7}\>" + +" Labels +syn match naturalLabel "\<[+#a-z][-_#a-z0-9]*\." +syn match naturalRef "\<[+#a-z][-_#a-z0-9]*\>\.\<[+#a-z][*]\=[-_#a-z0-9]*\>" + +" System variables +syn match naturalSysVar "\<\*[a-z][-a-z0-9]*\>" + +"integer number, or floating point number without a dot. +syn match naturalNumber "\<-\=\d\+\>" +"floating point number, with dot +syn match naturalNumber "\<-\=\d\+\.\d\+\>" +"floating point number, starting with a dot +syn match naturalNumber "\.\d\+" + +" Formats in write statement +syn match naturalFormat "\<\d\+[TX]\>" + +" String and Character contstants +syn match naturalString "H'\x\+'" +syn region naturalString start=+"+ end=+"+ +syn region naturalString start=+'+ end=+'+ + +" Type definition +syn match naturalAttribute "\<[-a-z][a-z]=[-a-z0-9_\.,]\+\>" +syn match naturalType contained "\<[ABINP]\d\+\(,\d\+\)\=\>" +syn match naturalType contained "\<[CL]\>" + +" "TODO" / other comments +syn keyword naturalTodo contained todo test +syn match naturalCommentMark contained "[a-z][^ \t/:|]*\(\s[^ \t/:'"|]\+\)*:\s"he=e-1 + +" comments +syn region naturalComment start="/\*" end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark +syn region naturalComment start="^\*[\ \*]" end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark +syn region naturalComment start="^\d\{4} \*[\ \*]"lc=5 end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark +syn match naturalComment "^*$" +syn match naturalComment "^\d\{4} \*$"lc=5 +" /* is legal syntax in parentheses e.g. "#ident(label./*)" +syn region naturalPComment contained start="/\*\s*[^),]" end="$" contains=naturalTodo,naturalLineRef,naturalCommentMark + +" operators +syn keyword naturalOperator and or not eq ne gt lt ge le mask scan + +" constants +syn keyword naturalBoolean true false + +syn match naturalLineNo "^\d\{4}" + +" identifiers +syn match naturalIdent "\<[+#a-z][-_#a-z0-9]*\>[^\.']"me=e-1 +syn match naturalIdent "\<[+#a-z][-_#a-z0-9]*$" +syn match naturalLegalIdent "[+#a-z][-_#a-z0-9]*/[-_#a-z0-9]*" + +" parentheses +syn region naturalPar matchgroup=naturalParGui start="(" end=")" contains=naturalLabel,naturalRef,naturalOperator,@naturalConstant,naturalType,naturalSysVar,naturalPar,naturalLineNo,naturalPComment +syn match naturalLineRef "(\d\{4})" + +" build syntax groups +syntax cluster naturalConstant contains=naturalString,naturalNumber,naturalAttribute,naturalBoolean + +" folding +if v:version >= 600 + set foldignore=* +endif + + +if v:version >= 508 || !exists("did_natural_syntax_inits") + if v:version < 508 + let did_natural_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + " The default methods for highlighting. Can be overridden later + + " Constants + HiLink naturalFormat Constant + HiLink naturalAttribute Constant + HiLink naturalNumber Number + HiLink naturalString String + HiLink naturalBoolean Boolean + + " All kinds of keywords + HiLink naturalConditional Conditional + HiLink naturalRepeat Repeat + HiLink naturalLoop Repeat + HiLink naturalFlow Keyword + HiLink naturalError Keyword + HiLink naturalKeyword Keyword + HiLink naturalOperator Operator + HiLink naturalParGui Operator + + " Labels + HiLink naturalLabel Label + HiLink naturalRefLabel Label + + " Comments + HiLink naturalPComment Comment + HiLink naturalComment Comment + HiLink naturalTodo Todo + HiLink naturalCommentMark PreProc + + HiLink naturalInclude Include + HiLink naturalSysVar Identifier + HiLink naturalLineNo LineNr + HiLink naturalLineRef Error + HiLink naturalSpecial Special + HiLink naturalComKey Todo + + " illegal things + HiLink naturalRMKeyword Error + HiLink naturalLegalIdent Error + + HiLink naturalType Type + HiLink naturalFunction Function + HiLink naturalObjName Function + + delcommand HiLink +endif + +let b:current_syntax = "natural" + +" vim:set ts=4 sw=4 noet ft=vim list: diff --git a/runtime/syntax/ncf.vim b/runtime/syntax/ncf.vim new file mode 100644 index 000000000..15c74c8fa --- /dev/null +++ b/runtime/syntax/ncf.vim @@ -0,0 +1,258 @@ +" Vim syntax file +" Language: Novell "NCF" Batch File +" Maintainer: Jonathan J. Miner <miner@doit.wisc.edu> +" Last Change: Tue, 04 Sep 2001 16:20:33 CDT +" $Id$ + +" Remove any old syntax stuff hanging around +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +syn keyword ncfCommands mount load unload +syn keyword ncfBoolean on off +syn keyword ncfCommands set nextgroup=ncfSetCommands +syn keyword ncfTimeTypes Reference Primary Secondary Single +syn match ncfLoad "\(unl\|l\)oad .*"lc=4 contains=ALLBUT,Error +syn match ncfMount "mount .*"lc=5 contains=ALLBUT,Error + +syn match ncfComment "^\ *rem.*$" +syn match ncfComment "^\ *;.*$" +syn match ncfComment "^\ *#.*$" + +syn match ncfSearchPath "search \(add\|del\) " nextgroup=ncfPath +syn match ncfPath "\<[^: ]\+:\([A-Za-z0-9._]\|\\\)*\>" +syn match ncfServerName "^file server name .*$" +syn match ncfIPXNet "^ipx internal net" + +" String +syn region ncfString start=+"+ end=+"+ +syn match ncfContString "= \(\(\.\{0,1}\(OU=\|O=\)\{0,1}[A-Z_]\+\)\+;\{0,1}\)\+"lc=2 + +syn match ncfHexNumber "\<\d\(\d\+\|[A-F]\+\)*\>" +syn match ncfNumber "\<\d\+\.\{0,1}\d*\>" +syn match ncfIPAddr "\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}" +syn match ncfTime "\(+|=\)\{0,1}\d\{1,2}:\d\{1,2}:\d\{1,2}" +syn match ncfDSTTime "([^ ]\+ [^ ]\+ \(FIRST\|LAST\)\s*\d\{1,2}:\d\{1,2}:\d\{1,2} \(AM\|PM\))" +syn match ncfTimeZone "[A-Z]\{3}\d[A-Z]\{3}" + +syn match ncfLogins "^\([Dd]is\|[Ee]n\)able login[s]*" +syn match ncfScript "[^ ]*\.ncf" + +" SET Commands that take a Number following +syn match ncfSetCommandsNum "\(Alert Message Nodes\)\s*=" +syn match ncfSetCommandsNum "\(Auto Restart After Abend\)\s*=" +syn match ncfSetCommandsNum "\(Auto Restart After Abend Delay Time\)\s*=" +syn match ncfSetCommandsNum "\(Compression Daily Check Starting Hour\)\s*=" +syn match ncfSetCommandsNum "\(Compression Daily Check Stop Hour\)\s*=" +syn match ncfSetCommandsNum "\(Concurrent Remirror Requests\)\s*=" +syn match ncfSetCommandsNum "\(Convert Compressed to Uncompressed Option\)\s*=" +syn match ncfSetCommandsNum "\(Days Untouched Before Compression\)\s*=" +syn match ncfSetCommandsNum "\(Decompress Free Space Warning Interval\)\s*=" +syn match ncfSetCommandsNum "\(Decompress Percent Disk Space Free to Allow Commit\)\s*=" +syn match ncfSetCommandsNum "\(Deleted Files Compression Option\)\s*=" +syn match ncfSetCommandsNum "\(Directory Cache Allocation Wait Time\)\s*=" +syn match ncfSetCommandsNum "\(Enable IPX Checksums\)\s*=" +syn match ncfSetCommandsNum "\(Garbage Collection Interval\)\s*=" +syn match ncfSetCommandsNum "\(IPX NetBIOS Replication Option\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Concurrent Compressions\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Concurrent Directory Cache Writes\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Concurrent Disk Cache Writes\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Directory Cache Buffers\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Extended Attributes per File or Path\)\s*=" +syn match ncfSetCommandsNum "\(Maximum File Locks\)\s*=" +syn match ncfSetCommandsNum "\(Maximum File Locks Per Connection\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Interrupt Events\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Number of Directory Handles\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Number of Internal Directory Handles\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Outstanding NCP Searches\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Packet Receive Buffers\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Physical Receive Packet Size\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Record Locks\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Record Locks Per Connection\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Service Processes\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Subdirectory Tree Depth\)\s*=" +syn match ncfSetCommandsNum "\(Maximum Transactions\)\s*=" +syn match ncfSetCommandsNum "\(Minimum Compression Percentage Gain\)\s*=" +syn match ncfSetCommandsNum "\(Minimum Directory Cache Buffers\)\s*=" +syn match ncfSetCommandsNum "\(Minimum File Cache Buffers\)\s*=" +syn match ncfSetCommandsNum "\(Minimum File Cache Report Threshold\)\s*=" +syn match ncfSetCommandsNum "\(Minimum Free Memory for Garbage Collection\)\s*=" +syn match ncfSetCommandsNum "\(Minimum Packet Receive Buffers\)\s*=" +syn match ncfSetCommandsNum "\(Minimum Service Processes\)\s*=" +syn match ncfSetCommandsNum "\(NCP Packet Signature Option\)\s*=" +syn match ncfSetCommandsNum "\(NDS Backlink Interval\)\s*=" +syn match ncfSetCommandsNum "\(NDS Client NCP Retries\)\s*=" +syn match ncfSetCommandsNum "\(NDS External Reference Life Span\)\s*=" +syn match ncfSetCommandsNum "\(NDS Inactivity Synchronization Interval\)\s*=" +syn match ncfSetCommandsNum "\(NDS Janitor Interval\)\s*=" +syn match ncfSetCommandsNum "\(New Service Process Wait Time\)\s*=" +syn match ncfSetCommandsNum "\(Number of Frees for Garbage Collection\)\s*=" +syn match ncfSetCommandsNum "\(Number of Watchdog Packets\)\s*=" +syn match ncfSetCommandsNum "\(Pseudo Preemption Count\)\s*=" +syn match ncfSetCommandsNum "\(Read Ahead LRU Sitting Time Threshold\)\s*=" +syn match ncfSetCommandsNum "\(Remirror Block Size\)\s*=" +syn match ncfSetCommandsNum "\(Reserved Buffers Below 16 Meg\)\s*=" +syn match ncfSetCommandsNum "\(Server Log File Overflow Size\)\s*=" +syn match ncfSetCommandsNum "\(Server Log File State\)\s*=" +syn match ncfSetCommandsNum "\(SMP Polling Count\)\s*=" +syn match ncfSetCommandsNum "\(SMP Stack Size\)\s*=" +syn match ncfSetCommandsNum "\(TIMESYNC Polling Count\)\s*=" +syn match ncfSetCommandsNum "\(TIMESYNC Polling Interval\)\s*=" +syn match ncfSetCommandsNum "\(TIMESYNC Synchronization Radius\)\s*=" +syn match ncfSetCommandsNum "\(TIMESYNC Write Value\)\s*=" +syn match ncfSetCommandsNum "\(Volume Log File Overflow Size\)\s*=" +syn match ncfSetCommandsNum "\(Volume Log File State\)\s*=" +syn match ncfSetCommandsNum "\(Volume Low Warning Reset Threshold\)\s*=" +syn match ncfSetCommandsNum "\(Volume Low Warning Threshold\)\s*=" +syn match ncfSetCommandsNum "\(Volume TTS Log File Overflow Size\)\s*=" +syn match ncfSetCommandsNum "\(Volume TTS Log File State\)\s*=" +syn match ncfSetCommandsNum "\(Worker Thread Execute In a Row Count\)\s*=" + +" SET Commands that take a Boolean (ON/OFF) + +syn match ncfSetCommandsBool "\(Alloc Memory Check Flag\)\s*=" +syn match ncfSetCommandsBool "\(Allow Audit Passwords\)\s*=" +syn match ncfSetCommandsBool "\(Allow Change to Client Rights\)\s*=" +syn match ncfSetCommandsBool "\(Allow Deletion of Active Directories\)\s*=" +syn match ncfSetCommandsBool "\(Allow Invalid Pointers\)\s*=" +syn match ncfSetCommandsBool "\(Allow LIP\)\s*=" +syn match ncfSetCommandsBool "\(Allow Unencrypted Passwords\)\s*=" +syn match ncfSetCommandsBool "\(Allow Unowned Files To Be Extended\)\s*=" +syn match ncfSetCommandsBool "\(Auto Register Memory Above 16 Megabytes\)\s*=" +syn match ncfSetCommandsBool "\(Auto TTS Backout Flag\)\s*=" +syn match ncfSetCommandsBool "\(Automatically Repair Bad Volumes\)\s*=" +syn match ncfSetCommandsBool "\(Check Equivalent to Me\)\s*=" +syn match ncfSetCommandsBool "\(Command Line Prompt Default Choice\)\s*=" +syn match ncfSetCommandsBool "\(Console Display Watchdog Logouts\)\s*=" +syn match ncfSetCommandsBool "\(Daylight Savings Time Status\)\s*=" +syn match ncfSetCommandsBool "\(Developer Option\)\s*=" +syn match ncfSetCommandsBool "\(Display Incomplete IPX Packet Alerts\)\s*=" +syn match ncfSetCommandsBool "\(Display Lost Interrupt Alerts\)\s*=" +syn match ncfSetCommandsBool "\(Display NCP Bad Component Warnings\)\s*=" +syn match ncfSetCommandsBool "\(Display NCP Bad Length Warnings\)\s*=" +syn match ncfSetCommandsBool "\(Display Old API Names\)\s*=" +syn match ncfSetCommandsBool "\(Display Relinquish Control Alerts\)\s*=" +syn match ncfSetCommandsBool "\(Display Spurious Interrupt Alerts\)\s*=" +syn match ncfSetCommandsBool "\(Enable Deadlock Detection\)\s*=" +syn match ncfSetCommandsBool "\(Enable Disk Read After Write Verify\)\s*=" +syn match ncfSetCommandsBool "\(Enable File Compression\)\s*=" +syn match ncfSetCommandsBool "\(Enable IO Handicap Attribute\)\s*=" +syn match ncfSetCommandsBool "\(Enable SECURE.NCF\)\s*=" +syn match ncfSetCommandsBool "\(Fast Volume Mounts\)\s*=" +syn match ncfSetCommandsBool "\(Global Pseudo Preemption\)\s*=" +syn match ncfSetCommandsBool "\(Halt System on Invalid Parameters\)\s*=" +syn match ncfSetCommandsBool "\(Ignore Disk Geometry\)\s*=" +syn match ncfSetCommandsBool "\(Immediate Purge of Deleted Files\)\s*=" +syn match ncfSetCommandsBool "\(NCP File Commit\)\s*=" +syn match ncfSetCommandsBool "\(NDS Trace File Length to Zero\)\s*=" +syn match ncfSetCommandsBool "\(NDS Trace to File\)\s*=" +syn match ncfSetCommandsBool "\(NDS Trace to Screen\)\s*=" +syn match ncfSetCommandsBool "\(New Time With Daylight Savings Time Status\)\s*=" +syn match ncfSetCommandsBool "\(Read Ahead Enabled\)\s*=" +syn match ncfSetCommandsBool "\(Read Fault Emulation\)\s*=" +syn match ncfSetCommandsBool "\(Read Fault Notification\)\s*=" +syn match ncfSetCommandsBool "\(Reject NCP Packets with Bad Components\)\s*=" +syn match ncfSetCommandsBool "\(Reject NCP Packets with Bad Lengths\)\s*=" +syn match ncfSetCommandsBool "\(Replace Console Prompt with Server Name\)\s*=" +syn match ncfSetCommandsBool "\(Reply to Get Nearest Server\)\s*=" +syn match ncfSetCommandsBool "\(SMP Developer Option\)\s*=" +syn match ncfSetCommandsBool "\(SMP Flush Processor Cache\)\s*=" +syn match ncfSetCommandsBool "\(SMP Intrusive Abend Mode\)\s*=" +syn match ncfSetCommandsBool "\(SMP Memory Protection\)\s*=" +syn match ncfSetCommandsBool "\(Sound Bell for Alerts\)\s*=" +syn match ncfSetCommandsBool "\(TIMESYNC Configured Sources\)\s*=" +syn match ncfSetCommandsBool "\(TIMESYNC Directory Tree Mode\)\s*=" +syn match ncfSetCommandsBool "\(TIMESYNC Hardware Clock\)\s*=" +syn match ncfSetCommandsBool "\(TIMESYNC RESET\)\s*=" +syn match ncfSetCommandsBool "\(TIMESYNC Restart Flag\)\s*=" +syn match ncfSetCommandsBool "\(TIMESYNC Service Advertising\)\s*=" +syn match ncfSetCommandsBool "\(TIMESYNC Write Parameters\)\s*=" +syn match ncfSetCommandsBool "\(TTS Abort Dump Flag\)\s*=" +syn match ncfSetCommandsBool "\(Upgrade Low Priority Threads\)\s*=" +syn match ncfSetCommandsBool "\(Volume Low Warn All Users\)\s*=" +syn match ncfSetCommandsBool "\(Write Fault Emulation\)\s*=" +syn match ncfSetCommandsBool "\(Write Fault Notification\)\s*=" + +" Set Commands that take a "string" -- NOT QUOTED + +syn match ncfSetCommandsStr "\(Default Time Server Type\)\s*=" +syn match ncfSetCommandsStr "\(SMP NetWare Kernel Mode\)\s*=" +syn match ncfSetCommandsStr "\(Time Zone\)\s*=" +syn match ncfSetCommandsStr "\(TIMESYNC ADD Time Source\)\s*=" +syn match ncfSetCommandsStr "\(TIMESYNC REMOVE Time Source\)\s*=" +syn match ncfSetCommandsStr "\(TIMESYNC Time Source\)\s*=" +syn match ncfSetCommandsStr "\(TIMESYNC Type\)\s*=" + +" SET Commands that take a "Time" + +syn match ncfSetCommandsTime "\(Command Line Prompt Time Out\)\s*=" +syn match ncfSetCommandsTime "\(Delay Before First Watchdog Packet\)\s*=" +syn match ncfSetCommandsTime "\(Delay Between Watchdog Packets\)\s*=" +syn match ncfSetCommandsTime "\(Directory Cache Buffer NonReferenced Delay\)\s*=" +syn match ncfSetCommandsTime "\(Dirty Directory Cache Delay Time\)\s*=" +syn match ncfSetCommandsTime "\(Dirty Disk Cache Delay Time\)\s*=" +syn match ncfSetCommandsTime "\(File Delete Wait Time\)\s*=" +syn match ncfSetCommandsTime "\(Minimum File Delete Wait Time\)\s*=" +syn match ncfSetCommandsTime "\(Mirrored Devices Are Out of Sync Message Frequency\)\s*=" +syn match ncfSetCommandsTime "\(New Packet Receive Buffer Wait Time\)\s*=" +syn match ncfSetCommandsTime "\(TTS Backout File Truncation Wait Time\)\s*=" +syn match ncfSetCommandsTime "\(TTS UnWritten Cache Wait Time\)\s*=" +syn match ncfSetCommandsTime "\(Turbo FAT Re-Use Wait Time\)\s*=" +syn match ncfSetCommandsTime "\(Daylight Savings Time Offset\)\s*=" + +syn match ncfSetCommandsTimeDate "\(End of Daylight Savings Time\)\s*=" +syn match ncfSetCommandsTimeDate "\(Start of Daylight Savings Time\)\s*=" + +syn match ncfSetCommandsBindCon "\(Bindery Context\)\s*=" nextgroup=ncfContString + +syn cluster ncfSetCommands contains=ncfSetCommandsNum,ncfSetCommandsBool,ncfSetCommandsStr,ncfSetCommandsTime,ncfSetCommandsTimeDate,ncfSetCommandsBindCon + + +if exists("ncf_highlight_unknowns") + syn match Error "[^ \t]*" contains=ALL +endif + +if version >= 508 || !exists("did_ncf_syntax_inits") + if version < 508 + let did_ncf_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + HiLink ncfCommands Statement + HiLink ncfSetCommands ncfCommands + HiLink ncfLogins ncfCommands + HiLink ncfString String + HiLink ncfContString ncfString + HiLink ncfComment Comment + HiLink ncfImplicit Type + HiLink ncfBoolean Boolean + HiLink ncfScript Identifier + HiLink ncfNumber Number + HiLink ncfIPAddr ncfNumber + HiLink ncfHexNumber ncfNumber + HiLink ncfTime ncfNumber + HiLink ncfDSTTime ncfNumber + HiLink ncfPath Constant + HiLink ncfServerName Special + HiLink ncfIPXNet ncfServerName + HiLink ncfTimeTypes Constant + HiLink ncfSetCommandsNum ncfSetCommands + HiLink ncfSetCommandsBool ncfSetCommands + HiLink ncfSetCommandsStr ncfSetCommands + HiLink ncfSetCommandsTime ncfSetCommands + HiLink ncfSetCommandsTimeDate ncfSetCommands + HiLink ncfSetCommandsBindCon ncfSetCommands + + delcommand HiLink + +endif + +let b:current_syntax = "ncf" diff --git a/runtime/syntax/nosyntax.vim b/runtime/syntax/nosyntax.vim new file mode 100644 index 000000000..b0b0c17df --- /dev/null +++ b/runtime/syntax/nosyntax.vim @@ -0,0 +1,29 @@ +" Vim syntax support file +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last Change: 2000 Jul 15 + +" This file is used for ":syntax off". +" It removes the autocommands and stops highlighting for all buffers. + +if !has("syntax") + finish +endif + +" remove all syntax autocommands and remove the syntax for each buffer +augroup syntaxset + au! + au BufEnter * syn clear + au BufEnter * if exists("b:current_syntax") | unlet b:current_syntax | endif + doautoall syntaxset BufEnter * + au! +augroup END + +" Just in case: remove all autocommands for the Syntax event +au! Syntax + +if exists("syntax_on") + unlet syntax_on +endif +if exists("syntax_manual") + unlet syntax_manual +endif diff --git a/runtime/syntax/nqc.vim b/runtime/syntax/nqc.vim new file mode 100644 index 000000000..0a3cd6bc7 --- /dev/null +++ b/runtime/syntax/nqc.vim @@ -0,0 +1,378 @@ +" Vim syntax file +" Language: NQC - Not Quite C, for LEGO mindstorms +" NQC homepage: http://www.enteract.com/~dbaum/nqc/ +" Maintainer: Stefan Scherer <stefan@enotes.de> +" Last Change: 2001 May 10 +" URL: http://www.enotes.de/twiki/pub/Home/LegoMindstorms/nqc.vim +" Filenames: .nqc + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Statements +syn keyword nqcStatement break return continue start stop abs sign +syn keyword nqcStatement sub task +syn keyword nqcLabel case default +syn keyword nqcConditional if else switch +syn keyword nqcRepeat while for do until repeat + +" Scout and RCX2 +syn keyword nqcEvents acquire catch monitor + +" types and classes +syn keyword nqcType int true false void +syn keyword nqcStorageClass asm const inline + + + +" Sensors -------------------------------------------- +" Input Sensors +syn keyword nqcConstant SENSOR_1 SENSOR_2 SENSOR_3 + +" Types for SetSensorType() +syn keyword nqcConstant SENSOR_TYPE_TOUCH SENSOR_TYPE_TEMPERATURE +syn keyword nqcConstant SENSOR_TYPE_LIGHT SENSOR_TYPE_ROTATION +syn keyword nqcConstant SENSOR_LIGHT SENSOR_TOUCH + +" Modes for SetSensorMode() +syn keyword nqcConstant SENSOR_MODE_RAW SENSOR_MODE_BOOL +syn keyword nqcConstant SENSOR_MODE_EDGE SENSOR_MODE_PULSE +syn keyword nqcConstant SENSOR_MODE_PERCENT SENSOR_MODE_CELSIUS +syn keyword nqcConstant SENSOR_MODE_FAHRENHEIT SENSOR_MODE_ROTATION + +" Sensor configurations for SetSensor() +syn keyword nqcConstant SENSOR_TOUCH SENSOR_LIGHT SENSOR_ROTATION +syn keyword nqcConstant SENSOR_CELSIUS SENSOR_FAHRENHEIT SENSOR_PULSE +syn keyword nqcConstant SENSOR_EDGE + +" Functions - All +syn keyword nqcFunction ClearSensor +syn keyword nqcFunction SensorValue SensorType + +" Functions - RCX +syn keyword nqcFunction SetSensor SetSensorType +syn keyword nqcFunction SensorValueBool + +" Functions - RCX, CyberMaster +syn keyword nqcFunction SetSensorMode SensorMode + +" Functions - RCX, Scout +syn keyword nqcFunction SensorValueRaw + +" Functions - Scout +syn keyword nqcFunction SetSensorLowerLimit SetSensorUpperLimit +syn keyword nqcFunction SetSensorHysteresis CalibrateSensor + + +" Outputs -------------------------------------------- +" Outputs for On(), Off(), etc. +syn keyword nqcConstant OUT_A OUT_B OUT_C + +" Modes for SetOutput() +syn keyword nqcConstant OUT_ON OUT_OFF OUT_FLOAT + +" Directions for SetDirection() +syn keyword nqcConstant OUT_FWD OUT_REV OUT_TOGGLE + +" Output power for SetPower() +syn keyword nqcConstant OUT_LOW OUT_HALF OUT_FULL + +" Functions - All +syn keyword nqcFunction SetOutput SetDirection SetPower OutputStatus +syn keyword nqcFunction On Off Float Fwd Rev Toggle +syn keyword nqcFunction OnFwd OnRev OnFor + +" Functions - RXC2, Scout +syn keyword nqcFunction SetGlobalOutput SetGlobalDirection SetMaxPower +syn keyword nqcFunction GlobalOutputStatus + + +" Sound ---------------------------------------------- +" Sounds for PlaySound() +syn keyword nqcConstant SOUND_CLICK SOUND_DOUBLE_BEEP SOUND_DOWN +syn keyword nqcConstant SOUND_UP SOUND_LOW_BEEP SOUND_FAST_UP + +" Functions - All +syn keyword nqcFunction PlaySound PlayTone + +" Functions - RCX2, Scout +syn keyword nqcFunction MuteSound UnmuteSound ClearSound +syn keyword nqcFunction SelectSounds + + +" LCD ------------------------------------------------ +" Modes for SelectDisplay() +syn keyword nqcConstant DISPLAY_WATCH DISPLAY_SENSOR_1 DISPLAY_SENSOR_2 +syn keyword nqcConstant DISPLAY_SENSOR_3 DISPLAY_OUT_A DISPLAY_OUT_B +syn keyword nqcConstant DISPLAY_OUT_C +" RCX2 +syn keyword nqcConstant DISPLAY_USER + +" Functions - RCX +syn keyword nqcFunction SelectDisplay +" Functions - RCX2 +syn keyword nqcFunction SetUserDisplay + + +" Communication -------------------------------------- +" Messages - RCX, Scout ------------------------------ +" Tx power level for SetTxPower() +syn keyword nqcConstant TX_POWER_LO TX_POWER_HI + +" Functions - RCX, Scout +syn keyword nqcFunction Message ClearMessage SendMessage SetTxPower + +" Serial - RCX2 -------------------------------------- +" for SetSerialComm() +syn keyword nqcConstant SERIAL_COMM_DEFAULT SERIAL_COMM_4800 +syn keyword nqcConstant SERIAL_COMM_DUTY25 SERIAL_COMM_76KHZ + +" for SetSerialPacket() +syn keyword nqcConstant SERIAL_PACKET_DEFAULT SERIAL_PACKET_PREAMBLE +syn keyword nqcConstant SERIAL_PACKET_NEGATED SERIAL_PACKET_CHECKSUM +syn keyword nqcConstant SERIAL_PACKET_RCX + +" Functions - RCX2 +syn keyword nqcFunction SetSerialComm SetSerialPacket SetSerialData +syn keyword nqcFunction SerialData SendSerial + +" VLL - Scout ---------------------------------------- +" Functions - Scout +syn keyword nqcFunction SendVLL + + +" Timers --------------------------------------------- +" Functions - All +syn keyword nqcFunction ClearTimer Timer + +" Functions - RCX2 +syn keyword nqcFunction SetTimer FastTimer + + +" Counters ------------------------------------------- +" Functions - RCX2, Scout +syn keyword nqcFunction ClearCounter IncCounter DecCounter Counter + + +" Access Control ------------------------------------- +syn keyword nqcConstant ACQUIRE_OUT_A ACQUIRE_OUT_B ACQUIRE_OUT_C +syn keyword nqcConstant ACQUIRE_SOUND +" RCX2 only +syn keyword nqcConstant ACQUIRE_USER_1 ACQUIRE_USER_2 ACQUIRE_USER_3 +syn keyword nqcConstant ACQUIRE_USER_4 + +" Functions - RCX2, Scout +syn keyword nqcFunction SetPriority + + +" Events --------------------------------------------- +" RCX2 Events +syn keyword nqcConstant EVENT_TYPE_PRESSED EVENT_TYPE_RELEASED +syn keyword nqcConstant EVENT_TYPE_PULSE EVENT_TYPE_EDGE +syn keyword nqcConstant EVENT_TYPE_FAST_CHANGE EVENT_TYPE_LOW +syn keyword nqcConstant EVENT_TYPE_NORMAL EVENT_TYPE_HIGH +syn keyword nqcConstant EVENT_TYPE_CLICK EVENT_TYPE_DOUBLECLICK +syn keyword nqcConstant EVENT_TYPE_MESSAGE + +" Scout Events +syn keyword nqcConstant EVENT_1_PRESSED EVENT_1_RELEASED +syn keyword nqcConstant EVENT_2_PRESSED EVENT_2_RELEASED +syn keyword nqcConstant EVENT_LIGHT_HIGH EVENT_LIGHT_NORMAL +syn keyword nqcConstant EVENT_LIGHT_LOW EVENT_LIGHT_CLICK +syn keyword nqcConstant EVENT_LIGHT_DOUBLECLICK EVENT_COUNTER_0 +syn keyword nqcConstant EVENT_COUNTER_1 EVENT_TIMER_0 EVENT_TIMER_1 +syn keyword nqcConstant EVENT_TIMER_2 EVENT_MESSAGE + +" Functions - RCX2, Scout +syn keyword nqcFunction ActiveEvents Event + +" Functions - RCX2 +syn keyword nqcFunction CurrentEvents +syn keyword nqcFunction SetEvent ClearEvent ClearAllEvents EventState +syn keyword nqcFunction CalibrateEvent SetUpperLimit UpperLimit +syn keyword nqcFunction SetLowerLimit LowerLimit SetHysteresis +syn keyword nqcFunction Hysteresis +syn keyword nqcFunction SetClickTime ClickTime SetClickCounter +syn keyword nqcFunction ClickCounter + +" Functions - Scout +syn keyword nqcFunction SetSensorClickTime SetCounterLimit +syn keyword nqcFunction SetTimerLimit + + +" Data Logging --------------------------------------- +" Functions - RCX +syn keyword nqcFunction CreateDatalog AddToDatalog +syn keyword nqcFunction UploadDatalog + + +" General Features ----------------------------------- +" Functions - All +syn keyword nqcFunction Wait StopAllTasks Random +syn keyword nqcFunction SetSleepTime SleepNow + +" Functions - RCX +syn keyword nqcFunction Program Watch SetWatch + +" Functions - RCX2 +syn keyword nqcFunction SetRandomSeed SelectProgram +syn keyword nqcFunction BatteryLevel FirmwareVersion + +" Functions - Scout +" Parameters for SetLight() +syn keyword nqcConstant LIGHT_ON LIGHT_OFF +syn keyword nqcFunction SetScoutRules ScoutRules SetScoutMode +syn keyword nqcFunction SetEventFeedback EventFeedback SetLight + +" additional CyberMaster defines +syn keyword nqcConstant OUT_L OUT_R OUT_X +syn keyword nqcConstant SENSOR_L SENSOR_M SENSOR_R +" Functions - CyberMaster +syn keyword nqcFunction Drive OnWait OnWaitDifferent +syn keyword nqcFunction ClearTachoCounter TachoCount TachoSpeed +syn keyword nqcFunction ExternalMotorRunning AGC + + + +" nqcCommentGroup allows adding matches for special things in comments +syn keyword nqcTodo contained TODO FIXME XXX +syn cluster nqcCommentGroup contains=nqcTodo + +"when wanted, highlight trailing white space +if exists("nqc_space_errors") + if !exists("nqc_no_trail_space_error") + syn match nqcSpaceError display excludenl "\s\+$" + endif + if !exists("nqc_no_tab_space_error") + syn match nqcSpaceError display " \+\t"me=e-1 + endif +endif + +"catch errors caused by wrong parenthesis and brackets +syn cluster nqcParenGroup contains=nqcParenError,nqcIncluded,nqcCommentSkip,@nqcCommentGroup,nqcCommentStartError,nqcCommentSkip,nqcCppOut,nqcCppOut2,nqcCppSkip,nqcNumber,nqcFloat,nqcNumbers +if exists("nqc_no_bracket_error") + syn region nqcParen transparent start='(' end=')' contains=ALLBUT,@nqcParenGroup,nqcCppParen + " nqcCppParen: same as nqcParen but ends at end-of-line; used in nqcDefine + syn region nqcCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@nqcParenGroup,nqcParen + syn match nqcParenError display ")" + syn match nqcErrInParen display contained "[{}]" +else + syn region nqcParen transparent start='(' end=')' contains=ALLBUT,@nqcParenGroup,nqcCppParen,nqcErrInBracket,nqcCppBracket + " nqcCppParen: same as nqcParen but ends at end-of-line; used in nqcDefine + syn region nqcCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@nqcParenGroup,nqcErrInBracket,nqcParen,nqcBracket + syn match nqcParenError display "[\])]" + syn match nqcErrInParen display contained "[\]{}]" + syn region nqcBracket transparent start='\[' end=']' contains=ALLBUT,@nqcParenGroup,nqcErrInParen,nqcCppParen,nqcCppBracket + " nqcCppBracket: same as nqcParen but ends at end-of-line; used in nqcDefine + syn region nqcCppBracket transparent start='\[' skip='\\$' excludenl end=']' end='$' contained contains=ALLBUT,@nqcParenGroup,nqcErrInParen,nqcParen,nqcBracket + syn match nqcErrInBracket display contained "[);{}]" +endif + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match nqcNumbers display transparent "\<\d\|\.\d" contains=nqcNumber,nqcFloat +" Same, but without octal error (for comments) +syn match nqcNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" +"hex number +syn match nqcNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" +" Flag the first zero of an octal number as something special +syn match nqcFloat display contained "\d\+f" +"floating point number, with dot, optional exponent +syn match nqcFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" +"floating point number, starting with a dot, optional exponent +syn match nqcFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match nqcFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" +" flag an octal number with wrong digits +syn case match + +syn region nqcCommentL start="//" skip="\\$" end="$" keepend contains=@nqcCommentGroup,nqcSpaceError +syn region nqcComment matchgroup=nqcCommentStart start="/\*" matchgroup=NONE end="\*/" contains=@nqcCommentGroup,nqcCommentStartError,nqcSpaceError + +" keep a // comment separately, it terminates a preproc. conditional +syntax match nqcCommentError display "\*/" +syntax match nqcCommentStartError display "/\*" contained + + + + + +syn region nqcPreCondit start="^\s*#\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" end="//"me=s-1 contains=nqcComment,nqcCharacter,nqcCppParen,nqcParenError,nqcNumbers,nqcCommentError,nqcSpaceError +syn match nqcPreCondit display "^\s*#\s*\(else\|endif\)\>" +if !exists("nqc_no_if0") + syn region nqcCppOut start="^\s*#\s*if\s\+0\>" end=".\|$" contains=nqcCppOut2 + syn region nqcCppOut2 contained start="0" end="^\s*#\s*\(endif\>\|else\>\|elif\>\)" contains=nqcSpaceError,nqcCppSkip + syn region nqcCppSkip contained start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*#\s*endif\>" contains=nqcSpaceError,nqcCppSkip +endif +syn region nqcIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match nqcInclude display "^\s*#\s*include\>\s*["]" contains=nqcIncluded +"syn match nqcLineSkip "\\$" +syn cluster nqcPreProcGroup contains=nqcPreCondit,nqcIncluded,nqcInclude,nqcDefine,nqcErrInParen,nqcErrInBracket,nqcCppOut,nqcCppOut2,nqcCppSkip,nqcNumber,nqcFloat,nqcNumbers,nqcCommentSkip,@nqcCommentGroup,nqcCommentStartError,nqcParen,nqcBracket +syn region nqcDefine start="^\s*#\s*\(define\|undef\)\>" skip="\\$" end="$" contains=ALLBUT,@nqcPreProcGroup +syn region nqcPreProc start="^\s*#\s*\(pragma\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@nqcPreProcGroup + +if !exists("nqc_minlines") + if !exists("nqc_no_if0") + let nqc_minlines = 50 " #if 0 constructs can be long + else + let nqc_minlines = 15 " mostly for () constructs + endif +endif +exec "syn sync ccomment nqcComment minlines=" . nqc_minlines + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_nqc_syn_inits") + if version < 508 + let did_nqc_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + HiLink nqcLabel Label + HiLink nqcConditional Conditional + HiLink nqcRepeat Repeat + HiLink nqcCharacter Character + HiLink nqcNumber Number + HiLink nqcFloat Float + HiLink nqcFunction Function + HiLink nqcParenError nqcError + HiLink nqcErrInParen nqcError + HiLink nqcErrInBracket nqcError + HiLink nqcCommentL nqcComment + HiLink nqcCommentStart nqcComment + HiLink nqcCommentError nqcError + HiLink nqcCommentStartError nqcError + HiLink nqcSpaceError nqcError + HiLink nqcStorageClass StorageClass + HiLink nqcInclude Include + HiLink nqcPreProc PreProc + HiLink nqcDefine Macro + HiLink nqcIncluded String + HiLink nqcError Error + HiLink nqcStatement Statement + HiLink nqcEvents Statement + HiLink nqcPreCondit PreCondit + HiLink nqcType Type + HiLink nqcConstant Constant + HiLink nqcCommentSkip nqcComment + HiLink nqcComment Comment + HiLink nqcTodo Todo + HiLink nqcCppSkip nqcCppOut + HiLink nqcCppOut2 nqcCppOut + HiLink nqcCppOut Comment + + delcommand HiLink +endif + +let b:current_syntax = "nqc" + +" vim: ts=8 diff --git a/runtime/syntax/nroff.vim b/runtime/syntax/nroff.vim new file mode 100644 index 000000000..2f004d605 --- /dev/null +++ b/runtime/syntax/nroff.vim @@ -0,0 +1,259 @@ +" VIM syntax file +" Language: nroff/groff +" Maintainer: Alejandro López-Valencia <dradul@yahoo.com> +" URL: http://dradul.tripod.com/vim +" Last Change: 2003 May 24 +" +" {{{1 Acknowledgements +" +" ACKNOWLEDGEMENTS: +" +" My thanks to Jérôme Plût <Jerome.Plut@ens.fr>, who was the +" creator and maintainer of this syntax file for several years. +" May I be as good at it as he has been. +" +" {{{1 Todo +" +" TODO: +" +" * Write syntax highlighting files for the preprocessors, +" and integrate with nroff.vim. +" +" +" {{{1 Start syntax highlighting. +" +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +" +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" +" {{{1 plugin settings... +" +" {{{2 enable spacing error highlighting +" +if exists("nroff_space_errors") + syn match nroffError /\s\+$/ + syn match nroffSpaceError /[.,:;!?]\s\{2,}/ +endif +" +" +" {{{1 Special file settings +" +" {{{2 ms exdented paragraphs are not in the default paragraphs list. +" +setlocal paragraphs+=XP +" +" {{{2 Activate navigation to preporcessor sections. +" +if exists("b:preprocs_as_sections") + setlocal sections=EQTSPS[\ G1GS +endif + +" {{{1 Escape sequences +" ------------------------------------------------------------ + +syn match nroffEscChar /\\[CN]/ nextgroup=nroffEscCharArg +syn match nroffEscape /\\[*fgmnYV]/ nextgroup=nroffEscRegPar,nroffEscRegArg +syn match nroffEscape /\\s[+-]\=/ nextgroup=nroffSize +syn match nroffEscape /\\[$AbDhlLRvxXZ]/ nextgroup=nroffEscPar,nroffEscArg + +syn match nroffEscRegArg /./ contained +syn match nroffEscRegArg2 /../ contained +syn match nroffEscRegPar /(/ contained nextgroup=nroffEscRegArg2 +syn match nroffEscArg /./ contained +syn match nroffEscArg2 /../ contained +syn match nroffEscPar /(/ contained nextgroup=nroffEscArg2 +syn match nroffSize /\((\d\)\=\d/ contained + +syn region nroffEscCharArg start=/'/ end=/'/ contained +syn region nroffEscArg start=/'/ end=/'/ contained contains=nroffEscape,@nroffSpecial + +if exists("b:nroff_is_groff") + syn region nroffEscRegArg matchgroup=nroffEscape start=/\[/ end=/\]/ contained oneline + syn region nroffSize matchgroup=nroffEscape start=/\[/ end=/\]/ contained +endif + +syn match nroffEscape /\\[adprtu{}]/ +syn match nroffEscape /\\$/ +syn match nroffEscape /\\\$[@*]/ + +" {{{1 Strings and special characters +" ------------------------------------------------------------ + +syn match nroffSpecialChar /\\[\\eE?!-]/ +syn match nroffSpace "\\[&%~|^0)/,]" +syn match nroffSpecialChar /\\(../ + +if exists("b:nroff_is_groff") + syn match nroffSpecialChar /\\\[[^]]*]/ + syn region nroffPreserve matchgroup=nroffSpecialChar start=/\\?/ end=/\\?/ oneline +endif + +syn region nroffPreserve matchgroup=nroffSpecialChar start=/\\!/ end=/$/ oneline + +syn cluster nroffSpecial contains=nroffSpecialChar,nroffSpace + + +syn region nroffString start=/"/ end=/"/ skip=/\\$/ contains=nroffEscape,@nroffSpecial contained +syn region nroffString start=/'/ end=/'/ skip=/\\$/ contains=nroffEscape,@nroffSpecial contained + + +" {{{1 Numbers and units +" ------------------------------------------------------------ +syn match nroffNumBlock /[0-9.]\a\=/ contained contains=nroffNumber +syn match nroffNumber /\d\+\(\.\d*\)\=/ contained nextgroup=nroffUnit,nroffBadChar +syn match nroffNumber /\.\d\+)/ contained nextgroup=nroffUnit,nroffBadChar +syn match nroffBadChar /./ contained +syn match nroffUnit /[icpPszmnvMu]/ contained + + +" {{{1 Requests +" ------------------------------------------------------------ + +" Requests begin with . or ' at the beginning of a line, or +" after .if or .ie. + +syn match nroffReqLeader /^[.']/ nextgroup=nroffReqName skipwhite +syn match nroffReqLeader /[.']/ contained nextgroup=nroffReqName skipwhite + +if exists("b:nroff_is_groff") +" +" GNU troff allows long request names +" +syn match nroffReqName /[^\t \\\[?]\+/ contained nextgroup=nroffReqArg +else + syn match nroffReqName /[^\t \\\[?]\{1,2}/ contained nextgroup=nroffReqArg +endif + +syn region roffReqArg start=/\S/ skip=/\\$/ end=/$/ contained contains=nroffEscape,@nroffSpecial,nroffString,nroffError,nroffSpaceError,nroffNumBlock,nroffComment + +" {{{2 Conditional: .if .ie .el +syn match nroffReqName /\(if\|ie\)/ contained nextgroup=nroffCond skipwhite +syn match nroffReqName /el/ contained nextgroup=nroffReqLeader skipwhite +syn match nroffCond /\S\+/ contained nextgroup=nroffReqLeader skipwhite + +" {{{2 String definition: .ds .as +syn match nroffReqname /[da]s/ contained nextgroup=nroffDefIdent skipwhite +syn match nroffDefIdent /\S\+/ contained nextgroup=nroffDefinition skipwhite +syn region nroffDefinition matchgroup=nroffSpecialChar start=/"/ matchgroup=NONE end=/\\"/me=e-2 skip=/\\$/ start=/\S/ end=/$/ contained contains=nroffDefSpecial +syn match nroffDefSpecial /\\$/ contained +syn match nroffDefSpecial /\\\((.\)\=./ contained + +if exists("b:nroff_is_groff") + syn match nroffDefSpecial /\\\[[^]]*]/ contained +endif + +" {{{2 Macro definition: .de .am, also diversion: .di +syn match nroffReqName /\(d[ei]\|am\)/ contained nextgroup=nroffIdent skipwhite +syn match nroffIdent /[^[?( \t]\+/ contained +if exists("b:nroff_is_groff") + syn match nroffReqName /als/ contained nextgroup=nroffIdent skipwhite +endif + +" {{{2 Register definition: .rn .rr +syn match nroffReqName /[rn]r/ contained nextgroup=nroffIdent skipwhite +if exists("b:nroff_is_groff") + syn match nroffReqName /\(rnn\|aln\)/ contained nextgroup=nroffIdent skipwhite +endif + + +" {{{1 eqn/tbl/pic +" ------------------------------------------------------------ +" <jp> +" XXX: write proper syntax highlight for eqn / tbl / pic ? +" <jp /> + +syn region nroffEquation start=/^\.\s*EQ\>/ end=/^\.\s*EN\>/ +syn region nroffTable start=/^\.\s*TS\>/ end=/^\.\s*TE\>/ +syn region nroffPicture start=/^\.\s*PS\>/ end=/^\.\s*PE\>/ +syn region nroffRefer start=/^\.\s*\[\>/ end=/^\.\s*\]\>/ +syn region nroffGrap start=/^\.\s*G1\>/ end=/^\.\s*G2\>/ +syn region nroffGremlin start=/^\.\s*GS\>/ end=/^\.\s*GE|GF\>/ + +" {{{1 Comments +" ------------------------------------------------------------ + +syn region nroffIgnore start=/^[.']\s*ig/ end=/^['.]\s*\./ +syn match nroffComment /\(^[.']\s*\)\=\\".*/ contains=nroffTodo +syn match nroffComment /^'''.*/ contains=nroffTodo + +if exists("b:nroff_is_groff") + syn match nroffComment "\\#.*$" contains=nroffTodo +endif + +syn keyword nroffTodo TODO XXX FIXME contained + +" {{{1 Hilighting +" ------------------------------------------------------------ +" + +" +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +" +if version >= 508 || !exists("did_nroff_syn_inits") + + if version < 508 + let did_nroff_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink nroffEscChar nroffSpecialChar + HiLink nroffEscCharAr nroffSpecialChar + HiLink nroffSpecialChar SpecialChar + HiLink nroffSpace Delimiter + + HiLink nroffEscRegArg2 nroffEscRegArg + HiLink nroffEscRegArg nroffIdent + + HiLink nroffEscArg2 nroffEscArg + HiLink nroffEscPar nroffEscape + + HiLink nroffEscRegPar nroffEscape + HiLink nroffEscArg nroffEscape + HiLink nroffSize nroffEscape + HiLink nroffEscape Preproc + + HiLink nroffIgnore Comment + HiLink nroffComment Comment + HiLink nroffTodo Todo + + HiLink nroffReqLeader nroffRequest + HiLink nroffReqName nroffRequest + HiLink nroffRequest Statement + HiLink nroffCond PreCondit + HiLink nroffDefIdent nroffIdent + HiLink nroffIdent Identifier + + HiLink nroffEquation PreProc + HiLink nroffTable PreProc + HiLink nroffPicture PreProc + HiLink nroffRefer PreProc + HiLink nroffGrap PreProc + HiLink nroffGremlin PreProc + + HiLink nroffNumber Number + HiLink nroffBadChar nroffError + HiLink nroffSpaceError nroffError + HiLink nroffError Error + + HiLink nroffPreserve String + HiLink nroffString String + HiLink nroffDefinition String + HiLink nroffDefSpecial Special + + delcommand HiLink + +endif + +let b:current_syntax = "nroff" + +" vim600: set fdm=marker fdl=2: diff --git a/runtime/syntax/nsis.vim b/runtime/syntax/nsis.vim new file mode 100644 index 000000000..d6d803714 --- /dev/null +++ b/runtime/syntax/nsis.vim @@ -0,0 +1,271 @@ +" Vim syntax file +" Language: NSIS script, for version of NSIS 1.91 and later +" Maintainer: Alex Jakushev <Alex.Jakushev@kemek.lt> +" Last Change: 2004 May 12 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + + +"COMMENTS +syn keyword nsisTodo todo attention note fixme readme +syn region nsisComment start=";" end="$" contains=nsisTodo +syn region nsisComment start="#" end="$" contains=nsisTodo + +"LABELS +syn match nsisLocalLabel "\a\S\{-}:" +syn match nsisGlobalLabel "\.\S\{-1,}:" + +"PREPROCESSOR +syn match nsisPreprocSubst "${.\{-}}" +syn match nsisDefine "!define\>" +syn match nsisDefine "!undef\>" +syn match nsisPreCondit "!ifdef\>" +syn match nsisPreCondit "!ifndef\>" +syn match nsisPreCondit "!endif\>" +syn match nsisPreCondit "!else\>" +syn match nsisMacro "!macro\>" +syn match nsisMacro "!macroend\>" +syn match nsisMacro "!insertmacro\>" + +"COMPILER UTILITY +syn match nsisInclude "!include\>" +syn match nsisSystem "!cd\>" +syn match nsisSystem "!system\>" +syn match nsisSystem "!packhdr\>" + +"VARIABLES +syn match nsisUserVar "$\d" +syn match nsisUserVar "$R\d" +syn match nsisSysVar "$INSTDIR" +syn match nsisSysVar "$OUTDIR" +syn match nsisSysVar "$CMDLINE" +syn match nsisSysVar "$PROGRAMFILES" +syn match nsisSysVar "$DESKTOP" +syn match nsisSysVar "$EXEDIR" +syn match nsisSysVar "$WINDIR" +syn match nsisSysVar "$SYSDIR" +syn match nsisSysVar "$TEMP" +syn match nsisSysVar "$STARTMENU" +syn match nsisSysVar "$SMPROGRAMS" +syn match nsisSysVar "$SMSTARTUP" +syn match nsisSysVar "$QUICKLAUNCH" +syn match nsisSysVar "$HWNDPARENT" +syn match nsisSysVar "$\\r" +syn match nsisSysVar "$\\n" +syn match nsisSysVar "$\$" + +"STRINGS +syn region nsisString start=/"/ skip=/'\|`/ end=/"/ contains=nsisPreprocSubst,nsisUserVar,nsisSysVar,nsisRegistry +syn region nsisString start=/'/ skip=/"\|`/ end=/'/ contains=nsisPreprocSubst,nsisUserVar,nsisSysVar,nsisRegistry +syn region nsisString start=/`/ skip=/"\|'/ end=/`/ contains=nsisPreprocSubst,nsisUserVar,nsisSysVar,nsisRegistry + +"CONSTANTS +syn keyword nsisBoolean true false on off + +syn keyword nsisAttribOptions hide show nevershow auto force try ifnewer normal silent silentlog +syn keyword nsisAttribOptions smooth colored SET CUR END RO none listonly textonly both current all +syn keyword nsisAttribOptions zlib bzip2 lzma + +syn match nsisAttribOptions '\/NOCUSTOM' +syn match nsisAttribOptions '\/CUSTOMSTRING' +syn match nsisAttribOptions '\/COMPONENTSONLYONCUSTOM' +syn match nsisAttribOptions '\/windows' +syn match nsisAttribOptions '\/r' +syn match nsisAttribOptions '\/oname' +syn match nsisAttribOptions '\/REBOOTOK' +syn match nsisAttribOptions '\/SILENT' +syn match nsisAttribOptions '\/FILESONLY' +syn match nsisAttribOptions '\/SHORT' + +syn keyword nsisExecShell SW_SHOWNORMAL SW_SHOWMAXIMIZED SW_SHOWMINIMIZED + +syn keyword nsisRegistry HKCR HKLM HKCU HKU HKCC HKDD HKPD +syn keyword nsisRegistry HKEY_CLASSES_ROOT HKEY_LOCAL_MACHINE HKEY_CURRENT_USER HKEY_USERS +syn keyword nsisRegistry HKEY_CURRENT_CONFIG HKEY_DYN_DATA HKEY_PERFORMANCE_DATA + +syn keyword nsisFileAttrib NORMAL ARCHIVE HIDDEN OFFLINE READONLY SYSTEM TEMPORARY +syn keyword nsisFileAttrib FILE_ATTRIBUTE_NORMAL FILE_ATTRIBUTE_ARCHIVE FILE_ATTRIBUTE_HIDDEN +syn keyword nsisFileAttrib FILE_ATTRIBUTE_OFFLINE FILE_ATTRIBUTE_READONLY FILE_ATTRIBUTE_SYSTEM +syn keyword nsisFileAttrib FILE_ATTRIBUTE_TEMPORARY + +syn keyword nsisMessageBox MB_OK MB_OKCANCEL MB_ABORTRETRYIGNORE MB_RETRYCANCEL MB_YESNO MB_YESNOCANCEL +syn keyword nsisMessageBox MB_ICONEXCLAMATION MB_ICONINFORMATION MB_ICONQUESTION MB_ICONSTOP +syn keyword nsisMessageBox MB_TOPMOST MB_SETFOREGROUND MB_RIGHT +syn keyword nsisMessageBox MB_DEFBUTTON1 MB_DEFBUTTON2 MB_DEFBUTTON3 MB_DEFBUTTON4 +syn keyword nsisMessageBox IDABORT IDCANCEL IDIGNORE IDNO IDOK IDRETRY IDYES + +syn match nsisNumber "\<[^0]\d*\>" +syn match nsisNumber "\<0x\x\+\>" +syn match nsisNumber "\<0\o*\>" + + +"INSTALLER ATTRIBUTES - General installer configuration +syn keyword nsisAttribute OutFile Name Caption SubCaption BrandingText Icon +syn keyword nsisAttribute WindowIcon BGGradient SilentInstall SilentUnInstall +syn keyword nsisAttribute CRCCheck MiscButtonText InstallButtonText FileErrorText + +"INSTALLER ATTRIBUTES - Install directory configuration +syn keyword nsisAttribute InstallDir InstallDirRegKey + +"INSTALLER ATTRIBUTES - License page configuration +syn keyword nsisAttribute LicenseText LicenseData + +"INSTALLER ATTRIBUTES - Component page configuration +syn keyword nsisAttribute ComponentText InstType EnabledBitmap DisabledBitmap SpaceTexts + +"INSTALLER ATTRIBUTES - Directory page configuration +syn keyword nsisAttribute DirShow DirText AllowRootDirInstall + +"INSTALLER ATTRIBUTES - Install page configuration +syn keyword nsisAttribute InstallColors InstProgressFlags AutoCloseWindow +syn keyword nsisAttribute ShowInstDetails DetailsButtonText CompletedText + +"INSTALLER ATTRIBUTES - Uninstall configuration +syn keyword nsisAttribute UninstallText UninstallIcon UninstallCaption +syn keyword nsisAttribute UninstallSubCaption ShowUninstDetails UninstallButtonText + +"COMPILER ATTRIBUTES +syn keyword nsisCompiler SetOverwrite SetCompress SetCompressor SetDatablockOptimize SetDateSave + + +"FUNCTIONS - general purpose +syn keyword nsisInstruction SetOutPath File Exec ExecWait ExecShell +syn keyword nsisInstruction Rename Delete RMDir + +"FUNCTIONS - registry & ini +syn keyword nsisInstruction WriteRegStr WriteRegExpandStr WriteRegDWORD WriteRegBin +syn keyword nsisInstruction WriteINIStr ReadRegStr ReadRegDWORD ReadINIStr ReadEnvStr +syn keyword nsisInstruction ExpandEnvStrings DeleteRegValue DeleteRegKey EnumRegKey +syn keyword nsisInstruction EnumRegValue DeleteINISec DeleteINIStr + +"FUNCTIONS - general purpose, advanced +syn keyword nsisInstruction CreateDirectory CopyFiles SetFileAttributes CreateShortCut +syn keyword nsisInstruction GetFullPathName SearchPath GetTempFileName CallInstDLL +syn keyword nsisInstruction RegDLL UnRegDLL GetDLLVersion GetDLLVersionLocal +syn keyword nsisInstruction GetFileTime GetFileTimeLocal + +"FUNCTIONS - Branching, flow control, error checking, user interaction, etc instructions +syn keyword nsisInstruction Goto Call Return IfErrors ClearErrors SetErrors FindWindow +syn keyword nsisInstruction SendMessage IsWindow IfFileExists MessageBox StrCmp +syn keyword nsisInstruction IntCmp IntCmpU Abort Quit GetFunctionAddress GetLabelAddress +syn keyword nsisInstruction GetCurrentAddress + +"FUNCTIONS - File and directory i/o instructions +syn keyword nsisInstruction FindFirst FindNext FindClose FileOpen FileClose FileRead +syn keyword nsisInstruction FileWrite FileReadByte FileWriteByte FileSeek + +"FUNCTIONS - Misc instructions +syn keyword nsisInstruction SetDetailsView SetDetailsPrint SetAutoClose DetailPrint +syn keyword nsisInstruction Sleep BringToFront HideWindow SetShellVarContext + +"FUNCTIONS - String manipulation support +syn keyword nsisInstruction StrCpy StrLen + +"FUNCTIONS - Stack support +syn keyword nsisInstruction Push Pop Exch + +"FUNCTIONS - Integer manipulation support +syn keyword nsisInstruction IntOp IntFmt + +"FUNCTIONS - Rebooting support +syn keyword nsisInstruction Reboot IfRebootFlag SetRebootFlag + +"FUNCTIONS - Uninstaller instructions +syn keyword nsisInstruction WriteUninstaller + +"FUNCTIONS - Install logging instructions +syn keyword nsisInstruction LogSet LogText + +"FUNCTIONS - Section management instructions +syn keyword nsisInstruction SectionSetFlags SectionGetFlags SectionSetText +syn keyword nsisInstruction SectionGetText + + +"SPECIAL FUNCTIONS - install +syn match nsisCallback "\.onInit" +syn match nsisCallback "\.onUserAbort" +syn match nsisCallback "\.onInstSuccess" +syn match nsisCallback "\.onInstFailed" +syn match nsisCallback "\.onVerifyInstDir" +syn match nsisCallback "\.onNextPage" +syn match nsisCallback "\.onPrevPage" +syn match nsisCallback "\.onSelChange" + +"SPECIAL FUNCTIONS - uninstall +syn match nsisCallback "un\.onInit" +syn match nsisCallback "un\.onUserAbort" +syn match nsisCallback "un\.onInstSuccess" +syn match nsisCallback "un\.onInstFailed" +syn match nsisCallback "un\.onVerifyInstDir" +syn match nsisCallback "un\.onNextPage" + + +"STATEMENTS - sections +syn keyword nsisStatement Section SectionIn SectionEnd SectionDivider +syn keyword nsisStatement AddSize + +"STATEMENTS - functions +syn keyword nsisStatement Function FunctionEnd + +"STATEMENTS - pages +syn keyword nsisStatement Page UninstPage PageEx PageExEnc PageCallbacks + + +"ERROR +syn keyword nsisError UninstallExeName + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_nsis_syn_inits") + + if version < 508 + let did_nsys_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + + HiLink nsisInstruction Function + HiLink nsisComment Comment + HiLink nsisLocalLabel Label + HiLink nsisGlobalLabel Label + HiLink nsisStatement Statement + HiLink nsisString String + HiLink nsisBoolean Boolean + HiLink nsisAttribOptions Constant + HiLink nsisExecShell Constant + HiLink nsisFileAttrib Constant + HiLink nsisMessageBox Constant + HiLink nsisRegistry Identifier + HiLink nsisNumber Number + HiLink nsisError Error + HiLink nsisUserVar Identifier + HiLink nsisSysVar Identifier + HiLink nsisAttribute Type + HiLink nsisCompiler Type + HiLink nsisTodo Todo + HiLink nsisCallback Operator + " preprocessor commands + HiLink nsisPreprocSubst PreProc + HiLink nsisDefine Define + HiLink nsisMacro Macro + HiLink nsisPreCondit PreCondit + HiLink nsisInclude Include + HiLink nsisSystem PreProc + + delcommand HiLink +endif + +let b:current_syntax = "nsis" + diff --git a/runtime/syntax/objc.vim b/runtime/syntax/objc.vim new file mode 100644 index 000000000..5a965a0f1 --- /dev/null +++ b/runtime/syntax/objc.vim @@ -0,0 +1,107 @@ +" Vim syntax file +" Language: Objective C +" Maintainer: Kazunobu Kuriyama <kazunobu.kuriyama@nifty.com> +" Ex-maintainer: Anthony Hodsdon <ahodsdon@fastmail.fm> +" First Author: Valentino Kyriakides <1kyriaki@informatik.uni-hamburg.de> +" Last Change: 2004 May 20 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if &filetype != 'objcpp' + " Read the C syntax to start with + if version < 600 + source <sfile>:p:h/c.vim + else + runtime! syntax/c.vim + endif +endif + +" Objective C extentions follow below +" +" NOTE: Objective C is abbreviated to ObjC/objc +" and uses *.h, *.m as file extensions! + + +" ObjC keywords, types, type qualifiers etc. +syn keyword objcStatement self super _cmd +syn keyword objcType id Class SEL IMP BOOL nil Nil +syn keyword objcTypeModifier bycopy in out inout oneway + +" Match the ObjC #import directive (like C's #include) +syn region objcImported display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match objcImported display contained "<[_0-9a-zA-Z.\/]*>" +syn match objcImport display "^\s*\(%:\|#\)\s*import\>\s*["<]" contains=objcImported + +" Match the important ObjC directives +syn match objcScopeDecl "@public\|@private\|@protected" +syn match objcDirective "@interface\|@implementation" +syn match objcDirective "@class\|@end\|@defs" +syn match objcDirective "@encode\|@protocol\|@selector" + +" Match the ObjC method types +" +" NOTE: here I match only the indicators, this looks +" much nicer and reduces cluttering color highlightings. +" However, if you prefer full method declaration matching +" append .* at the end of the next two patterns! +" +syn match objcInstMethod "^\s*-\s*" +syn match objcFactMethod "^\s*+\s*" + +" To distinguish from a header inclusion from a protocol list. +syn match objcProtocol display "<[_a-zA-Z][_a-zA-Z0-9]*>" contains=objcType,cType,Type + + +" To distinguish labels from the keyword for a method's parameter. +syn region objcKeyForMethodParam display + \ start="^\s*[_a-zA-Z][_a-zA-Z0-9]*\s*:\s*(" + \ end=")\s*[_a-zA-Z][_a-zA-Z0-9]*" + \ contains=objcType,objcTypeModifier,cType,cStructure,cStorageClass,Type + +" Objective-C Constant Strings +syn match objcSpecial display "%@" contained +syn region objcString start=+\(@"\|"\)+ skip=+\\\\\|\\"+ end=+"+ contains=cFormat,cSpecial,objcSpecial + +" Objective-C Message Expressions +syn region objcMessage display start="\[" end="\]" contains=objcMessage,objcStatement,objcType,objcTypeModifier,objcString,objcConstant,objcDirective,cType,cStructure,cStorageClass,cString,cCharacter,cSpecialCharacter,cNumbers,cConstant,cOperator,cComment,cCommentL,Type + +syn cluster cParenGroup add=objcMessage +syn cluster cPreProcGroup add=objcMessage + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_objc_syntax_inits") + if version < 508 + let did_objc_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink objcImport Include + HiLink objcImported cString + HiLink objcTypeModifier objcType + HiLink objcType Type + HiLink objcScopeDecl Statement + HiLink objcInstMethod Function + HiLink objcFactMethod Function + HiLink objcStatement Statement + HiLink objcDirective Statement + HiLink objcKeyForMethodParam None + HiLink objcString cString + HiLink objcSpecial Special + HiLink objcProtocol None + + delcommand HiLink +endif + +let b:current_syntax = "objc" + +" vim: ts=8 diff --git a/runtime/syntax/objcpp.vim b/runtime/syntax/objcpp.vim new file mode 100644 index 000000000..5ce380cc7 --- /dev/null +++ b/runtime/syntax/objcpp.vim @@ -0,0 +1,31 @@ +" Vim syntax file +" Language: ObjC++ +" Maintainer: Anthony Hodsdon <ahodsdon@fastmail.fm> +" Last change: 2003 Apr 25 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read in C++ and ObjC syntax files +if version < 600 + so <sfile>:p:h/cpp.vim + so <sflie>:p:h/objc.vim +else + runtime! syntax/cpp.vim + unlet b:current_syntax + runtime! syntax/objc.vim +endif + +" Note that we already have a region for method calls ( [objc_class method] ) +" by way of cBracket. +syn region objCFunc start="^\s*[-+]" end="$" contains=ALLBUT,cErrInParen,cErrInBracket + +syn keyword objCppNonStructure class template namespace transparent contained +syn keyword objCppNonStatement new delete friend using transparent contained + +let b:current_syntax = "objcpp" diff --git a/runtime/syntax/ocaml.vim b/runtime/syntax/ocaml.vim new file mode 100644 index 000000000..95534a489 --- /dev/null +++ b/runtime/syntax/ocaml.vim @@ -0,0 +1,317 @@ +" Vim syntax file +" Language: OCaml +" Filenames: *.ml *.mli *.mll *.mly +" Maintainers: Markus Mottl <markus@oefai.at> +" Karl-Heinz Sylla <Karl-Heinz.Sylla@gmd.de> +" Issac Trotts <<ijtrotts@ucdavis.edu> +" URL: http://www.oefai.at/~markus/vim/syntax/ocaml.vim +" Last Change: 2003 May 04 +" 2002 Oct 24 - Small fix for "module type" (MM) +" 2002 Jun 16 - Added "&&", "<" and ">" as operators (MM) + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" OCaml is case sensitive. +syn case match + +" Script headers highlighted like comments +syn match ocamlComment "^#!.*" + +" Scripting directives +syn match ocamlScript "^#\<\(quit\|labels\|warnings\|directory\|cd\|load\|use\|install_printer\|remove_printer\|trace\|untrace\|untrace_all\|print_depth\|print_length\)\>" + +" lowercase identifier - the standard way to match +syn match ocamlLCIdentifier /\<\(\l\|_\)\(\w\|'\)*\>/ + +syn match ocamlKeyChar "|" + +" Errors +syn match ocamlBraceErr "}" +syn match ocamlBrackErr "\]" +syn match ocamlParenErr ")" +syn match ocamlArrErr "|]" + +syn match ocamlCommentErr "\*)" + +syn match ocamlCountErr "\<downto\>" +syn match ocamlCountErr "\<to\>" + +if !exists("ocaml_revised") + syn match ocamlDoErr "\<do\>" +endif + +syn match ocamlDoneErr "\<done\>" +syn match ocamlThenErr "\<then\>" + +" Error-highlighting of "end" without synchronization: +" as keyword or as error (default) +if exists("ocaml_noend_error") + syn match ocamlKeyword "\<end\>" +else + syn match ocamlEndErr "\<end\>" +endif + +" Some convenient clusters +syn cluster ocamlAllErrs contains=ocamlBraceErr,ocamlBrackErr,ocamlParenErr,ocamlCommentErr,ocamlCountErr,ocamlDoErr,ocamlDoneErr,ocamlEndErr,ocamlThenErr + +syn cluster ocamlAENoParen contains=ocamlBraceErr,ocamlBrackErr,ocamlCommentErr,ocamlCountErr,ocamlDoErr,ocamlDoneErr,ocamlEndErr,ocamlThenErr + +syn cluster ocamlContained contains=ocamlTodo,ocamlPreDef,ocamlModParam,ocamlModParam1,ocamlPreMPRestr,ocamlMPRestr,ocamlMPRestr1,ocamlMPRestr2,ocamlMPRestr3,ocamlModRHS,ocamlFuncWith,ocamlFuncStruct,ocamlModTypeRestr,ocamlModTRWith,ocamlWith,ocamlWithRest,ocamlModType,ocamlFullMod + + +" Enclosing delimiters +syn region ocamlEncl transparent matchgroup=ocamlKeyword start="(" matchgroup=ocamlKeyword end=")" contains=ALLBUT,@ocamlContained,ocamlParenErr +syn region ocamlEncl transparent matchgroup=ocamlKeyword start="{" matchgroup=ocamlKeyword end="}" contains=ALLBUT,@ocamlContained,ocamlBraceErr +syn region ocamlEncl transparent matchgroup=ocamlKeyword start="\[" matchgroup=ocamlKeyword end="\]" contains=ALLBUT,@ocamlContained,ocamlBrackErr +syn region ocamlEncl transparent matchgroup=ocamlKeyword start="\[|" matchgroup=ocamlKeyword end="|\]" contains=ALLBUT,@ocamlContained,ocamlArrErr + + +" Comments +syn region ocamlComment start="(\*" end="\*)" contains=ocamlComment,ocamlTodo +syn keyword ocamlTodo contained TODO FIXME XXX + + +" Objects +syn region ocamlEnd matchgroup=ocamlKeyword start="\<object\>" matchgroup=ocamlKeyword end="\<end\>" contains=ALLBUT,@ocamlContained,ocamlEndErr + + +" Blocks +if !exists("ocaml_revised") + syn region ocamlEnd matchgroup=ocamlKeyword start="\<begin\>" matchgroup=ocamlKeyword end="\<end\>" contains=ALLBUT,@ocamlContained,ocamlEndErr +endif + + +" "for" +syn region ocamlNone matchgroup=ocamlKeyword start="\<for\>" matchgroup=ocamlKeyword end="\<\(to\|downto\)\>" contains=ALLBUT,@ocamlContained,ocamlCountErr + + +" "do" +if !exists("ocaml_revised") + syn region ocamlDo matchgroup=ocamlKeyword start="\<do\>" matchgroup=ocamlKeyword end="\<done\>" contains=ALLBUT,@ocamlContained,ocamlDoneErr +endif + +" "if" +syn region ocamlNone matchgroup=ocamlKeyword start="\<if\>" matchgroup=ocamlKeyword end="\<then\>" contains=ALLBUT,@ocamlContained,ocamlThenErr + + +"" Modules + +" "struct" +syn region ocamlStruct matchgroup=ocamlModule start="\<struct\>" matchgroup=ocamlModule end="\<end\>" contains=ALLBUT,@ocamlContained,ocamlEndErr + +" "sig" +syn region ocamlSig matchgroup=ocamlModule start="\<sig\>" matchgroup=ocamlModule end="\<end\>" contains=ALLBUT,@ocamlContained,ocamlEndErr,ocamlModule +syn region ocamlModSpec matchgroup=ocamlKeyword start="\<module\>" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\>" contained contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlModTRWith,ocamlMPRestr + +" "open" +syn region ocamlNone matchgroup=ocamlKeyword start="\<open\>" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\(\.\u\(\w\|'\)*\)*\>" contains=@ocamlAllErrs,ocamlComment + +" "include" +syn match ocamlKeyword "\<include\>" contained skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod + +" "module" - somewhat complicated stuff ;-) +syn region ocamlModule matchgroup=ocamlKeyword start="\<module\>" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\>" contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlPreDef +syn region ocamlPreDef start="."me=e-1 matchgroup=ocamlKeyword end="\l\|="me=e-1 contained contains=@ocamlAllErrs,ocamlComment,ocamlModParam,ocamlModTypeRestr,ocamlModTRWith nextgroup=ocamlModPreRHS +syn region ocamlModParam start="([^*]" end=")" contained contains=@ocamlAENoParen,ocamlModParam1 +syn match ocamlModParam1 "\<\u\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=ocamlPreMPRestr + +syn region ocamlPreMPRestr start="."me=e-1 end=")"me=e-1 contained contains=@ocamlAllErrs,ocamlComment,ocamlMPRestr,ocamlModTypeRestr + +syn region ocamlMPRestr start=":" end="."me=e-1 contained contains=@ocamlComment skipwhite skipempty nextgroup=ocamlMPRestr1,ocamlMPRestr2,ocamlMPRestr3 +syn region ocamlMPRestr1 matchgroup=ocamlModule start="\ssig\s\=" matchgroup=ocamlModule end="\<end\>" contained contains=ALLBUT,@ocamlContained,ocamlEndErr,ocamlModule +syn region ocamlMPRestr2 start="\sfunctor\(\s\|(\)\="me=e-1 matchgroup=ocamlKeyword end="->" contained contains=@ocamlAllErrs,ocamlComment,ocamlModParam skipwhite skipempty nextgroup=ocamlFuncWith,ocamlMPRestr2 +syn match ocamlMPRestr3 "\w\(\w\|'\)*\(\.\w\(\w\|'\)*\)*" contained +syn match ocamlModPreRHS "=" contained skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod +syn region ocamlModRHS start="." end=".\w\|([^*]"me=e-2 contained contains=ocamlComment skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod +syn match ocamlFullMod "\<\u\(\w\|'\)*\(\.\u\(\w\|'\)*\)*" contained skipwhite skipempty nextgroup=ocamlFuncWith + +syn region ocamlFuncWith start="([^*]"me=e-1 end=")" contained contains=ocamlComment,ocamlWith,ocamlFuncStruct skipwhite skipempty nextgroup=ocamlFuncWith +syn region ocamlFuncStruct matchgroup=ocamlModule start="[^a-zA-Z]struct\>"hs=s+1 matchgroup=ocamlModule end="\<end\>" contains=ALLBUT,@ocamlContained,ocamlEndErr + +syn match ocamlModTypeRestr "\<\w\(\w\|'\)*\(\.\w\(\w\|'\)*\)*\>" contained +syn region ocamlModTRWith start=":\s*("hs=s+1 end=")" contained contains=@ocamlAENoParen,ocamlWith +syn match ocamlWith "\<\(\u\(\w\|'\)*\.\)*\w\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=ocamlWithRest +syn region ocamlWithRest start="[^)]" end=")"me=e-1 contained contains=ALLBUT,@ocamlContained + +" "module type" +syn region ocamlKeyword start="\<module\>\s*\<type\>" matchgroup=ocamlModule end="\<\w\(\w\|'\)*\>" contains=ocamlComment skipwhite skipempty nextgroup=ocamlMTDef +syn match ocamlMTDef "=\s*\w\(\w\|'\)*\>"hs=s+1,me=s + +syn keyword ocamlKeyword and as assert class +syn keyword ocamlKeyword constraint else +syn keyword ocamlKeyword exception external fun + +syn keyword ocamlKeyword in inherit initializer +syn keyword ocamlKeyword land lazy let match +syn keyword ocamlKeyword method mutable new of +syn keyword ocamlKeyword parser private raise rec +syn keyword ocamlKeyword try type +syn keyword ocamlKeyword val virtual when while with + +if exists("ocaml_revised") + syn keyword ocamlKeyword do value + syn keyword ocamlBoolean True False +else + syn keyword ocamlKeyword function + syn keyword ocamlBoolean true false + syn match ocamlKeyChar "!" +endif + +syn keyword ocamlType array bool char exn float format int +syn keyword ocamlType list option string unit + +syn keyword ocamlOperator asr lor lsl lsr lxor mod not + +syn match ocamlConstructor "(\s*)" +syn match ocamlConstructor "\[\s*\]" +syn match ocamlConstructor "\[|\s*>|]" +syn match ocamlConstructor "\[<\s*>\]" +syn match ocamlConstructor "\u\(\w\|'\)*\>" + +" Polymorphic variants +syn match ocamlConstructor "`\w\(\w\|'\)*\>" + +" Module prefix +syn match ocamlModPath "\u\(\w\|'\)*\."he=e-1 + +syn match ocamlCharacter "'\\\d\d\d'\|'\\[\'ntbr]'\|'.'" +syn match ocamlCharErr "'\\\d\d'\|'\\\d'" +syn match ocamlCharErr "'\\[^\'ntbr]'" +syn region ocamlString start=+"+ skip=+\\\\\|\\"+ end=+"+ + +syn match ocamlFunDef "->" +syn match ocamlRefAssign ":=" +syn match ocamlTopStop ";;" +syn match ocamlOperator "\^" +syn match ocamlOperator "::" + +syn match ocamlOperator "&&" +syn match ocamlOperator "<" +syn match ocamlOperator ">" +syn match ocamlAnyVar "\<_\>" +syn match ocamlKeyChar "|[^\]]"me=e-1 +syn match ocamlKeyChar ";" +syn match ocamlKeyChar "\~" +syn match ocamlKeyChar "?" +syn match ocamlKeyChar "\*" +syn match ocamlKeyChar "=" + +if exists("ocaml_revised") + syn match ocamlErr "<-" +else + syn match ocamlOperator "<-" +endif + +syn match ocamlNumber "\<-\=\d\+\>" +syn match ocamlNumber "\<-\=0[x|X]\x\+\>" +syn match ocamlNumber "\<-\=0[o|O]\o\+\>" +syn match ocamlNumber "\<-\=0[b|B][01]\+\>" +syn match ocamlFloat "\<-\=\d\+\.\d*\([eE][-+]\=\d\+\)\=[fl]\=\>" + +" Labels +syn match ocamlLabel "\~\(\l\|_\)\(\w\|'\)*"lc=1 +syn match ocamlLabel "?\(\l\|_\)\(\w\|'\)*"lc=1 +syn region ocamlLabel transparent matchgroup=ocamlLabel start="?(\(\l\|_\)\(\w\|'\)*"lc=2 end=")"me=e-1 contains=ALLBUT,@ocamlContained,ocamlParenErr + + +" Synchronization +syn sync minlines=50 +syn sync maxlines=500 + +if !exists("ocaml_revised") + syn sync match ocamlDoSync grouphere ocamlDo "\<do\>" + syn sync match ocamlDoSync groupthere ocamlDo "\<done\>" +endif + +if exists("ocaml_revised") + syn sync match ocamlEndSync grouphere ocamlEnd "\<\(object\)\>" +else + syn sync match ocamlEndSync grouphere ocamlEnd "\<\(begin\|object\)\>" +endif + +syn sync match ocamlEndSync groupthere ocamlEnd "\<end\>" +syn sync match ocamlStructSync grouphere ocamlStruct "\<struct\>" +syn sync match ocamlStructSync groupthere ocamlStruct "\<end\>" +syn sync match ocamlSigSync grouphere ocamlSig "\<sig\>" +syn sync match ocamlSigSync groupthere ocamlSig "\<end\>" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_ocaml_syntax_inits") + if version < 508 + let did_ocaml_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink ocamlBraceErr Error + HiLink ocamlBrackErr Error + HiLink ocamlParenErr Error + HiLink ocamlArrErr Error + + HiLink ocamlCommentErr Error + + HiLink ocamlCountErr Error + HiLink ocamlDoErr Error + HiLink ocamlDoneErr Error + HiLink ocamlEndErr Error + HiLink ocamlThenErr Error + + HiLink ocamlCharErr Error + + HiLink ocamlErr Error + + HiLink ocamlComment Comment + + HiLink ocamlModPath Include + HiLink ocamlModule Include + HiLink ocamlModParam1 Include + HiLink ocamlModType Include + HiLink ocamlMPRestr3 Include + HiLink ocamlFullMod Include + HiLink ocamlModTypeRestr Include + HiLink ocamlWith Include + HiLink ocamlMTDef Include + + HiLink ocamlScript Include + + HiLink ocamlConstructor Constant + + HiLink ocamlModPreRHS Keyword + HiLink ocamlMPRestr2 Keyword + HiLink ocamlKeyword Keyword + HiLink ocamlFunDef Keyword + HiLink ocamlRefAssign Keyword + HiLink ocamlKeyChar Keyword + HiLink ocamlAnyVar Keyword + HiLink ocamlTopStop Keyword + HiLink ocamlOperator Keyword + + HiLink ocamlBoolean Boolean + HiLink ocamlCharacter Character + HiLink ocamlNumber Number + HiLink ocamlFloat Float + HiLink ocamlString String + + HiLink ocamlLabel Identifier + + HiLink ocamlType Type + + HiLink ocamlTodo Todo + + HiLink ocamlEncl Keyword + + delcommand HiLink +endif + +let b:current_syntax = "ocaml" + +" vim: ts=8 diff --git a/runtime/syntax/occam.vim b/runtime/syntax/occam.vim new file mode 100644 index 000000000..1c84bf00f --- /dev/null +++ b/runtime/syntax/occam.vim @@ -0,0 +1,126 @@ +" Vim syntax file +" Language: occam +" Copyright: Fred Barnes <frmb2@kent.ac.uk>, Mario Schweigler <ms44@kent.ac.uk> +" Maintainer: Mario Schweigler <ms44@kent.ac.uk> +" Last Change: 24 May 2003 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +"{{{ Settings +" Set shift width for indent +setlocal shiftwidth=2 +" Set the tab key size to two spaces +setlocal softtabstop=2 +" Let tab keys always be expanded to spaces +setlocal expandtab + +" Dots are valid in occam identifiers +setlocal iskeyword+=. +"}}} + +syn case match + +syn keyword occamType BYTE BOOL INT INT16 INT32 INT64 REAL32 REAL64 ANY +syn keyword occamType CHAN DATA OF TYPE TIMER INITIAL VAL PORT MOBILE PLACED +syn keyword occamType PROCESSOR PACKED RECORD PROTOCOL SHARED ROUND TRUNC + +syn keyword occamStructure SEQ PAR IF ALT PRI FORKING PLACE AT + +syn keyword occamKeyword PROC IS TRUE FALSE SIZE RECURSIVE REC +syn keyword occamKeyword RETYPES RESHAPES STEP FROM FOR RESCHEDULE STOP SKIP FORK +syn keyword occamKeyword FUNCTION VALOF RESULT ELSE CLONE CLAIM +syn keyword occamBoolean TRUE FALSE +syn keyword occamRepeat WHILE +syn keyword occamConditional CASE +syn keyword occamConstant MOSTNEG MOSTPOS + +syn match occamBrackets /\[\|\]/ +syn match occamParantheses /(\|)/ + +syn keyword occamOperator AFTER TIMES MINUS PLUS INITIAL REM AND OR XOR NOT +syn keyword occamOperator BITAND BITOR BITNOT BYTESIN OFFSETOF + +syn match occamOperator /::\|:=\|?\|!/ +syn match occamOperator /<\|>\|+\|-\|\*\|\/\|\\\|=\|\~/ +syn match occamOperator /@\|\$\$\|%\|&&\|<&\|&>\|<\]\|\[>\|\^/ + +syn match occamSpecialChar /\M**\|*'\|*"\|*#\(\[0-9A-F\]\+\)/ contained +syn match occamChar /\M\L\='\[^*\]'/ +syn match occamChar /L'[^']*'/ contains=occamSpecialChar + +syn case ignore +syn match occamTodo /\<todo\>:\=/ contained +syn match occamNote /\<note\>:\=/ contained +syn case match +syn keyword occamNote NOT contained + +syn match occamComment /--.*/ contains=occamCommentTitle,occamTodo,occamNote +syn match occamCommentTitle /--\s*\u\a*\(\s\+\u\a*\)*:/hs=s+2 contained contains=occamTodo,occamNote +syn match occamCommentTitle /--\s*KROC-LIBRARY\(\.so\|\.a\)\=\s*$/hs=s+2 contained +syn match occamCommentTitle /--\s*\(KROC-OPTIONS:\|RUN-PARAMETERS:\)/hs=s+2 contained + +syn match occamIdentifier /\<[A-Z.][A-Z.0-9]*\>/ +syn match occamFunction /\<[A-Za-z.][A-Za-z0-9.]*\>/ contained + +syn match occamPPIdentifier /##.\{-}\>/ + +syn region occamString start=/"/ skip=/\M*"/ end=/"/ contains=occamSpecialChar +syn region occamCharString start=/'/ end=/'/ contains=occamSpecialChar + +syn match occamNumber /\<\d\+\(\.\d\+\(E\(+\|-\)\d\+\)\=\)\=/ +syn match occamNumber /-\d\+\(\.\d\+\(E\(+\|-\)\d\+\)\=\)\=/ +syn match occamNumber /#\(\d\|[A-F]\)\+/ +syn match occamNumber /-#\(\d\|[A-F]\)\+/ + +syn keyword occamCDString SHARED EXTERNAL DEFINED NOALIAS NOUSAGE NOT contained +syn keyword occamCDString FILE LINE PROCESS.PRIORITY OCCAM2.5 contained +syn keyword occamCDString USER.DEFINED.OPERATORS INITIAL.DECL MOBILES contained +syn keyword occamCDString BLOCKING.SYSCALLS VERSION NEED.QUAD.ALIGNMENT contained +syn keyword occamCDString TARGET.CANONICAL TARGET.CPU TARGET.OS TARGET.VENDOR contained +syn keyword occamCDString TRUE FALSE AND OR contained +syn match occamCDString /<\|>\|=\|(\|)/ contained + +syn region occamCDirective start=/#\(USE\|INCLUDE\|PRAGMA\|DEFINE\|UNDEFINE\|UNDEF\|IF\|ELIF\|ELSE\|ENDIF\|WARNING\|ERROR\|RELAX\)\>/ end=/$/ contains=occamString,occamComment,occamCDString + +if version >= 508 || !exists("did_occam_syn_inits") + if version < 508 + let did_occam_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink occamType Type + HiLink occamKeyword Keyword + HiLink occamComment Comment + HiLink occamCommentTitle PreProc + HiLink occamTodo Todo + HiLink occamNote Todo + HiLink occamString String + HiLink occamCharString String + HiLink occamNumber Number + HiLink occamCDirective PreProc + HiLink occamCDString String + HiLink occamPPIdentifier PreProc + HiLink occamBoolean Boolean + HiLink occamSpecialChar SpecialChar + HiLink occamChar Character + HiLink occamStructure Structure + HiLink occamIdentifier Identifier + HiLink occamConstant Constant + HiLink occamOperator Operator + HiLink occamFunction Ignore + HiLink occamRepeat Repeat + HiLink occamConditional Conditional + HiLink occamBrackets Type + HiLink occamParantheses Delimiter + + delcommand HiLink +endif + +let b:current_syntax = "occam" + diff --git a/runtime/syntax/omnimark.vim b/runtime/syntax/omnimark.vim new file mode 100644 index 000000000..698b3c09f --- /dev/null +++ b/runtime/syntax/omnimark.vim @@ -0,0 +1,123 @@ +" Vim syntax file +" Language: Omnimark +" Maintainer: Paul Terray <mailto:terray@4dconcept.fr> +" Last Change: 11 Oct 2000 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if version < 600 + set iskeyword=@,48-57,_,128-167,224-235,- +else + setlocal iskeyword=@,48-57,_,128-167,224-235,- +endif + +syn keyword omnimarkKeywords ACTIVATE AGAIN +syn keyword omnimarkKeywords CATCH CLEAR CLOSE COPY COPY-CLEAR CROSS-TRANSLATE +syn keyword omnimarkKeywords DEACTIVATE DECLARE DECREMENT DEFINE DISCARD DIVIDE DO DOCUMENT-END DOCUMENT-START DONE DTD-START +syn keyword omnimarkKeywords ELEMENT ELSE ESCAPE EXIT +syn keyword omnimarkKeywords FAIL FIND FIND-END FIND-START FORMAT +syn keyword omnimarkKeywords GROUP +syn keyword omnimarkKeywords HALT HALT-EVERYTHING +syn keyword omnimarkKeywords IGNORE IMPLIED INCLUDE INCLUDE-END INCLUDE-START INCREMENT INPUT +syn keyword omnimarkKeywords JOIN +syn keyword omnimarkKeywords LINE-END LINE-START LOG LOOKAHEAD +syn keyword omnimarkKeywords MACRO +syn keyword omnimarkKeywords MACRO-END MARKED-SECTION MARKUP-COMMENT MARKUP-ERROR MARKUP-PARSER MASK MATCH MINUS MODULO +syn keyword omnimarkKeywords NEW NEWLINE NEXT +syn keyword omnimarkKeywords OPEN OUTPUT OUTPUT-TO OVER +syn keyword omnimarkKeywords PROCESS PROCESS-END PROCESS-START PROCESSING-INSTRUCTION PROLOG-END PROLOG-IN-ERROR PUT +syn keyword omnimarkKeywords REMOVE REOPEN REPEAT RESET RETHROW RETURN +syn keyword omnimarkKeywords WHEN WHITE-SPACE +syn keyword omnimarkKeywords SAVE SAVE-CLEAR SCAN SELECT SET SGML SGML-COMMENT SGML-DECLARATION-END SGML-DTD SGML-DTDS SGML-ERROR SGML-IN SGML-OUT SGML-PARSE SGML-PARSER SHIFT SUBMIT SUCCEED SUPPRESS +syn keyword omnimarkKeywords SYSTEM-CALL +syn keyword omnimarkKeywords TEST-SYSTEM THROW TO TRANSLATE +syn keyword omnimarkKeywords UC UL UNLESS UP-TRANSLATE +syn keyword omnimarkKeywords XML-PARSE + +syn keyword omnimarkCommands ACTIVE AFTER ANCESTOR AND ANOTHER ARG AS ATTACHED ATTRIBUTE ATTRIBUTES +syn keyword omnimarkCommands BASE BEFORE BINARY BINARY-INPUT BINARY-MODE BINARY-OUTPUT BREAK-WIDTH BUFFER BY +syn keyword omnimarkCommands CASE CHILDREN CLOSED COMPILED-DATE COMPLEMENT CONREF CONTENT CONTEXT-TRANSLATE COUNTER CREATED CREATING CREATOR CURRENT +syn keyword omnimarkCommands DATA-ATTRIBUTE DATA-ATTRIBUTES DATA-CONTENT DATA-LETTERS DATE DECLARED-CONREF DECLARED-CURRENT DECLARED-DEFAULTED DECLARED-FIXED DECLARED-IMPLIED DECLARED-REQUIRED +syn keyword omnimarkCommands DEFAULT-ENTITY DEFAULTED DEFAULTING DELIMITER DIFFERENCE DIRECTORY DOCTYPE DOCUMENT DOCUMENT-ELEMENT DOMAIN-FREE DOWN-TRANSLATE DTD DTD-END DTDS +syn keyword omnimarkCommands ELEMENTS ELSEWHERE EMPTY ENTITIES ENTITY EPILOG-START EQUAL EXCEPT EXISTS EXTERNAL EXTERNAL-DATA-ENTITY EXTERNAL-ENTITY EXTERNAL-FUNCTION EXTERNAL-OUTPUT-FUNCTION +syn keyword omnimarkCommands EXTERNAL-TEXT-ENTITY +syn keyword omnimarkCommands FALSE FILE FUNCTION FUNCTION-LIBRARY +syn keyword omnimarkCommands GENERAL GLOBAL GREATER-EQUAL GREATER-THAN GROUPS +syn keyword omnimarkCommands HAS HASNT HERALDED-NAMES +syn keyword omnimarkCommands ID ID-CHECKING IDREF IDREFS IN IN-LIBRARY INCLUSION INITIAL INITIAL-SIZE INSERTION-BREAK INSTANCE INTERNAL INVALID-DATA IS ISNT ITEM +syn keyword omnimarkCommands KEY KEYED +syn keyword omnimarkCommands LAST LASTMOST LC LENGTH LESS-EQUAL LESS-THAN LETTERS LIBRARY LITERAL LOCAL +syn keyword omnimarkCommands MATCHES MIXED MODIFIABLE +syn keyword omnimarkCommands NAME NAME-LETTERS NAMECASE NAMED NAMES NDATA-ENTITY NEGATE NESTED-REFERENTS NMTOKEN NMTOKENS NO NO-DEFAULT-IO NON-CDATA NON-IMPLIED NON-SDATA NOT NOTATION NUMBER-OF NUMBERS +syn keyword omnimarkCommands NUTOKEN NUTOKENS +syn keyword omnimarkCommands OCCURRENCE OF OPAQUE OPTIONAL OR +syn keyword omnimarkCommands PARAMETER PARENT PAST PATTERN PLUS PREPARENT PREVIOUS PROPER PUBLIC +syn keyword omnimarkCommands READ-ONLY READABLE REFERENT REFERENTS REFERENTS-ALLOWED REFERENTS-DISPLAYED REFERENTS-NOT-ALLOWED REMAINDER REPEATED REPLACEMENT-BREAK REVERSED +syn keyword omnimarkCommands SILENT-REFERENT SIZE SKIP SOURCE SPECIFIED STATUS STREAM SUBDOC-ENTITY SUBDOCUMENT SUBDOCUMENTS SUBELEMENT SWITCH SYMBOL SYSTEM +syn keyword omnimarkCommands TEXT-MODE THIS TIMES TOKEN TRUE +syn keyword omnimarkCommands UNANCHORED UNATTACHED UNION USEMAP USING +syn keyword omnimarkCommands VALUE VALUED VARIABLE +syn keyword omnimarkCommands WITH WRITABLE +syn keyword omnimarkCommands XML XML-DTD XML-DTDS +syn keyword omnimarkCommands YES +syn keyword omnimarkCommands #ADDITIONAL-INFO #APPINFO #CAPACITY #CHARSET #CLASS #COMMAND-LINE-NAMES #CONSOLE #CURRENT-INPUT #CURRENT-OUTPUT #DATA #DOCTYPE #DOCUMENT #DTD #EMPTY #ERROR #ERROR-CODE +syn keyword omnimarkCommands #FILE-NAME #FIRST #GROUP #IMPLIED #ITEM #LANGUAGE-VERSION #LAST #LIBPATH #LIBRARY #LIBVALUE #LINE-NUMBER #MAIN-INPUT #MAIN-OUTPUT #MARKUP-ERROR-COUNT #MARKUP-ERROR-TOTAL +syn keyword omnimarkCommands #MARKUP-PARSER #MARKUP-WARNING-COUNT #MARKUP-WARNING-TOTAL #MESSAGE #NONE #OUTPUT #PLATFORM-INFO #PROCESS-INPUT #PROCESS-OUTPUT #RECOVERY-INFO #SGML #SGML-ERROR-COUNT +syn keyword omnimarkCommands #SGML-ERROR-TOTAL #SGML-WARNING-COUNT #SGML-WARNING-TOTAL #SUPPRESS #SYNTAX #! + +syn keyword omnimarkPatterns ANY ANY-TEXT +syn keyword omnimarkPatterns BLANK +syn keyword omnimarkPatterns CDATA CDATA-ENTITY CONTENT-END CONTENT-START +syn keyword omnimarkPatterns DIGIT +syn keyword omnimarkPatterns LETTER +syn keyword omnimarkPatterns NUMBER +syn keyword omnimarkPatterns PCDATA +syn keyword omnimarkPatterns RCDATA +syn keyword omnimarkPatterns SDATA SDATA-ENTITY SPACE +syn keyword omnimarkPatterns TEXT +syn keyword omnimarkPatterns VALUE-END VALUE-START +syn keyword omnimarkPatterns WORD-END WORD-START + +syn region omnimarkComment start=";" end="$" + +" strings +syn region omnimarkString matchgroup=Normal start=+'+ end=+'+ skip=+%'+ contains=omnimarkEscape +syn region omnimarkString matchgroup=Normal start=+"+ end=+"+ skip=+%"+ contains=omnimarkEscape +syn match omnimarkEscape contained +%.+ +syn match omnimarkEscape contained +%[0-9][0-9]#+ + +"syn sync maxlines=100 +syn sync minlines=2000 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_omnimark_syntax_inits") + if version < 508 + let did_omnimark_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink omnimarkCommands Statement + HiLink omnimarkKeywords Identifier + HiLink omnimarkString String + HiLink omnimarkPatterns Macro +" HiLink omnimarkNumber Number + HiLink omnimarkComment Comment + HiLink omnimarkEscape Special + + delcommand HiLink +endif + +let b:current_syntax = "omnimark" + +" vim: ts=8 + diff --git a/runtime/syntax/openroad.vim b/runtime/syntax/openroad.vim new file mode 100644 index 000000000..3f9a78d55 --- /dev/null +++ b/runtime/syntax/openroad.vim @@ -0,0 +1,266 @@ +" Vim syntax file +" Language: CA-OpenROAD +" Maintainer: Luis Moreno <lmoreno@eresmas.net> +" Last change: 2001 Jun 12 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +" +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syntax case ignore + +" Keywords +" +syntax keyword openroadKeyword ABORT ALL ALTER AND ANY AS ASC AT AVG BEGIN +syntax keyword openroadKeyword BETWEEN BY BYREF CALL CALLFRAME CALLPROC CASE +syntax keyword openroadKeyword CLEAR CLOSE COMMIT CONNECT CONTINUE COPY COUNT +syntax keyword openroadKeyword CREATE CURRENT DBEVENT DECLARE DEFAULT DELETE +syntax keyword openroadKeyword DELETEROW DESC DIRECT DISCONNECT DISTINCT DO +syntax keyword openroadKeyword DROP ELSE ELSEIF END ENDCASE ENDDECLARE ENDFOR +syntax keyword openroadKeyword ENDIF ENDLOOP ENDWHILE ESCAPE EXECUTE EXISTS +syntax keyword openroadKeyword EXIT FETCH FIELD FOR FROM GOTOFRAME GRANT GROUP +syntax keyword openroadKeyword HAVING IF IMMEDIATE IN INDEX INITIALISE +syntax keyword openroadKeyword INITIALIZE INQUIRE_INGRES INQUIRE_SQL INSERT +syntax keyword openroadKeyword INSERTROW INSTALLATION INTEGRITY INTO KEY LIKE +syntax keyword openroadKeyword LINK MAX MESSAGE METHOD MIN MODE MODIFY NEXT +syntax keyword openroadKeyword NOECHO NOT NULL OF ON OPEN OPENFRAME OR ORDER +syntax keyword openroadKeyword PERMIT PROCEDURE PROMPT QUALIFICATION RAISE +syntax keyword openroadKeyword REGISTER RELOCATE REMOVE REPEAT REPEATED RESUME +syntax keyword openroadKeyword RETURN RETURNING REVOKE ROLE ROLLBACK RULE SAVE +syntax keyword openroadKeyword SAVEPOINT SELECT SET SLEEP SOME SUM SYSTEM TABLE +syntax keyword openroadKeyword THEN TO TRANSACTION UNION UNIQUE UNTIL UPDATE +syntax keyword openroadKeyword VALUES VIEW WHERE WHILE WITH WORK + +syntax keyword openroadTodo contained TODO + +" Catch errors caused by wrong parenthesis +" +syntax cluster openroadParenGroup contains=openroadParenError,openroadTodo +syntax region openroadParen transparent start='(' end=')' contains=ALLBUT,@openroadParenGroup +syntax match openroadParenError ")" +highlight link openroadParenError cError + +" Numbers +" +syntax match openroadNumber "\<[0-9]\+\>" + +" String +" +syntax region openroadString start=+'+ end=+'+ + +" Operators, Data Types and Functions +" +syntax match openroadOperator /[\+\-\*\/=\<\>;\(\)]/ + +syntax keyword openroadType ARRAY BYTE CHAR DATE DECIMAL FLOAT FLOAT4 +syntax keyword openroadType FLOAT8 INT1 INT2 INT4 INTEGER INTEGER1 +syntax keyword openroadType INTEGER2 INTEGER4 MONEY OBJECT_KEY +syntax keyword openroadType SECURITY_LABEL SMALLINT TABLE_KEY VARCHAR + +syntax keyword openroadFunc IFNULL + +" System Classes +" +syntax keyword openroadClass ACTIVEFIELD ANALOGFIELD APPFLAG APPSOURCE +syntax keyword openroadClass ARRAYOBJECT ATTRIBUTEOBJECT BARFIELD +syntax keyword openroadClass BITMAPOBJECT BOXTRIM BREAKSPEC BUTTONFIELD +syntax keyword openroadClass CELLATTRIBUTE CHOICEBITMAP CHOICEDETAIL +syntax keyword openroadClass CHOICEFIELD CHOICEITEM CHOICELIST CLASS +syntax keyword openroadClass CLASSSOURCE COLUMNCROSS COLUMNFIELD +syntax keyword openroadClass COMPOSITEFIELD COMPSOURCE CONTROLBUTTON +syntax keyword openroadClass CROSSTABLE CURSORBITMAP CURSOROBJECT DATASTREAM +syntax keyword openroadClass DATEOBJECT DBEVENTOBJECT DBSESSIONOBJECT +syntax keyword openroadClass DISPLAYFORM DYNEXPR ELLIPSESHAPE ENTRYFIELD +syntax keyword openroadClass ENUMFIELD EVENT EXTOBJECT EXTOBJFIELD +syntax keyword openroadClass FIELDOBJECT FLEXIBLEFORM FLOATOBJECT FORMFIELD +syntax keyword openroadClass FRAMEEXEC FRAMEFORM FRAMESOURCE FREETRIM +syntax keyword openroadClass GHOSTEXEC GHOSTSOURCE IMAGEFIELD IMAGETRIM +syntax keyword openroadClass INTEGEROBJECT LISTFIELD LISTVIEWCOLATTR +syntax keyword openroadClass LISTVIEWFIELD LONGBYTEOBJECT LONGVCHAROBJECT +syntax keyword openroadClass MATRIXFIELD MENUBAR MENUBUTTON MENUFIELD +syntax keyword openroadClass MENUGROUP MENUITEM MENULIST MENUSEPARATOR +syntax keyword openroadClass MENUSTACK MENUTOGGLE METHODEXEC METHODOBJECT +syntax keyword openroadClass MONEYOBJECT OBJECT OPTIONFIELD OPTIONMENU +syntax keyword openroadClass PALETTEFIELD POPUPBUTTON PROC4GLSOURCE PROCEXEC +syntax keyword openroadClass PROCHANDLE QUERYCOL QUERYOBJECT QUERYPARM +syntax keyword openroadClass QUERYTABLE RADIOFIELD RECTANGLESHAPE ROWCROSS +syntax keyword openroadClass SCALARFIELD SCOPE SCROLLBARFIELD SEGMENTSHAPE +syntax keyword openroadClass SESSIONOBJECT SHAPEFIELD SLIDERFIELD SQLSELECT +syntax keyword openroadClass STACKFIELD STRINGOBJECT SUBFORM TABBAR +syntax keyword openroadClass TABFIELD TABFOLDER TABLEFIELD TABPAGE +syntax keyword openroadClass TOGGLEFIELD TREE TREENODE TREEVIEWFIELD +syntax keyword openroadClass USERCLASSOBJECT USEROBJECT VIEWPORTFIELD + +" System Events +" +syntax keyword openroadEvent CHILDCLICK CHILDCLICKPOINT CHILDCOLLAPSED +syntax keyword openroadEvent CHILDDETAILS CHILDDOUBLECLICK CHILDDRAGBOX +syntax keyword openroadEvent CHILDDRAGSEGMENT CHILDENTRY CHILDEXIT +syntax keyword openroadEvent CHILDEXPANDED CHILDHEADERCLICK CHILDMOVED +syntax keyword openroadEvent CHILDPROPERTIES CHILDRESIZED CHILDSCROLL +syntax keyword openroadEvent CHILDSELECT CHILDSELECTIONCHANGED CHILDSETVALUE +syntax keyword openroadEvent CHILDUNSELECT CHILDVALIDATE CLICK CLICKPOINT +syntax keyword openroadEvent COLLAPSED DBEVENT DETAILS DOUBLECLICK DRAGBOX +syntax keyword openroadEvent DRAGSEGMENT ENTRY EXIT EXPANDED EXTCLASSEVENT +syntax keyword openroadEvent FRAMEACTIVATE FRAMEDEACTIVATE HEADERCLICK +syntax keyword openroadEvent INSERTROW LABELCHANGED MOVED PAGEACTIVATED +syntax keyword openroadEvent PAGECHANGED PAGEDEACTIVATED PROPERTIES RESIZED +syntax keyword openroadEvent SCROLL SELECT SELECTIONCHANGED SETVALUE +syntax keyword openroadEvent TERMINATE UNSELECT USEREVENT VALIDATE +syntax keyword openroadEvent WINDOWCLOSE WINDOWICON WINDOWMOVED WINDOWRESIZED +syntax keyword openroadEvent WINDOWVISIBLE + +" System Constants +" +syntax keyword openroadConst BF_BMP BF_GIF BF_SUNRASTER BF_TIFF +syntax keyword openroadConst BF_WINDOWCURSOR BF_WINDOWICON BF_XBM +syntax keyword openroadConst CC_BACKGROUND CC_BLACK CC_BLUE CC_BROWN CC_CYAN +syntax keyword openroadConst CC_DEFAULT_1 CC_DEFAULT_10 CC_DEFAULT_11 +syntax keyword openroadConst CC_DEFAULT_12 CC_DEFAULT_13 CC_DEFAULT_14 +syntax keyword openroadConst CC_DEFAULT_15 CC_DEFAULT_16 CC_DEFAULT_17 +syntax keyword openroadConst CC_DEFAULT_18 CC_DEFAULT_19 CC_DEFAULT_2 +syntax keyword openroadConst CC_DEFAULT_20 CC_DEFAULT_21 CC_DEFAULT_22 +syntax keyword openroadConst CC_DEFAULT_23 CC_DEFAULT_24 CC_DEFAULT_25 +syntax keyword openroadConst CC_DEFAULT_26 CC_DEFAULT_27 CC_DEFAULT_28 +syntax keyword openroadConst CC_DEFAULT_29 CC_DEFAULT_3 CC_DEFAULT_30 +syntax keyword openroadConst CC_DEFAULT_4 CC_DEFAULT_5 CC_DEFAULT_6 +syntax keyword openroadConst CC_DEFAULT_7 CC_DEFAULT_8 CC_DEFAULT_9 +syntax keyword openroadConst CC_FOREGROUND CC_GRAY CC_GREEN CC_LIGHT_BLUE +syntax keyword openroadConst CC_LIGHT_BROWN CC_LIGHT_CYAN CC_LIGHT_GRAY +syntax keyword openroadConst CC_LIGHT_GREEN CC_LIGHT_ORANGE CC_LIGHT_PINK +syntax keyword openroadConst CC_LIGHT_PURPLE CC_LIGHT_RED CC_LIGHT_YELLOW +syntax keyword openroadConst CC_MAGENTA CC_ORANGE CC_PALE_BLUE CC_PALE_BROWN +syntax keyword openroadConst CC_PALE_CYAN CC_PALE_GRAY CC_PALE_GREEN +syntax keyword openroadConst CC_PALE_ORANGE CC_PALE_PINK CC_PALE_PURPLE +syntax keyword openroadConst CC_PALE_RED CC_PALE_YELLOW CC_PINK CC_PURPLE +syntax keyword openroadConst CC_RED CC_SYS_ACTIVEBORDER CC_SYS_ACTIVECAPTION +syntax keyword openroadConst CC_SYS_APPWORKSPACE CC_SYS_BACKGROUND +syntax keyword openroadConst CC_SYS_BTNFACE CC_SYS_BTNSHADOW CC_SYS_BTNTEXT +syntax keyword openroadConst CC_SYS_CAPTIONTEXT CC_SYS_GRAYTEXT +syntax keyword openroadConst CC_SYS_HIGHLIGHT CC_SYS_HIGHLIGHTTEXT +syntax keyword openroadConst CC_SYS_INACTIVEBORDER CC_SYS_INACTIVECAPTION +syntax keyword openroadConst CC_SYS_INACTIVECAPTIONTEXT CC_SYS_MENU +syntax keyword openroadConst CC_SYS_MENUTEXT CC_SYS_SCROLLBAR CC_SYS_SHADOW +syntax keyword openroadConst CC_SYS_WINDOW CC_SYS_WINDOWFRAME +syntax keyword openroadConst CC_SYS_WINDOWTEXT CC_WHITE CC_YELLOW +syntax keyword openroadConst CL_INVALIDVALUE CP_BOTH CP_COLUMNS CP_NONE +syntax keyword openroadConst CP_ROWS CS_CLOSED CS_CURRENT CS_NOCURRENT +syntax keyword openroadConst CS_NO_MORE_ROWS CS_OPEN CS_OPEN_CACHED DC_BW +syntax keyword openroadConst DC_COLOR DP_AUTOSIZE_FIELD DP_CLIP_IMAGE +syntax keyword openroadConst DP_SCALE_IMAGE_H DP_SCALE_IMAGE_HW +syntax keyword openroadConst DP_SCALE_IMAGE_W DS_CONNECTED DS_DISABLED +syntax keyword openroadConst DS_DISCONNECTED DS_INGRES_DBMS DS_NO_DBMS +syntax keyword openroadConst DS_ORACLE_DBMS DS_SQLSERVER_DBMS DV_NULL +syntax keyword openroadConst DV_STRING DV_SYSTEM EH_NEXT_HANDLER EH_RESUME +syntax keyword openroadConst EH_RETRY EP_INTERACTIVE EP_NONE EP_OUTPUT +syntax keyword openroadConst ER_FAIL ER_NAMEEXISTS ER_OK ER_OUTOFRANGE +syntax keyword openroadConst ER_ROWNOTFOUND ER_USER1 ER_USER10 ER_USER2 +syntax keyword openroadConst ER_USER3 ER_USER4 ER_USER5 ER_USER6 ER_USER7 +syntax keyword openroadConst ER_USER8 ER_USER9 FALSE FA_BOTTOMCENTER +syntax keyword openroadConst FA_BOTTOMLEFT FA_BOTTOMRIGHT FA_CENTER +syntax keyword openroadConst FA_CENTERLEFT FA_CENTERRIGHT FA_DEFAULT FA_NONE +syntax keyword openroadConst FA_TOPCENTER FA_TOPLEFT FA_TOPRIGHT +syntax keyword openroadConst FB_CHANGEABLE FB_CLICKPOINT FB_DIMMED FB_DRAGBOX +syntax keyword openroadConst FB_DRAGSEGMENT FB_FLEXIBLE FB_INVISIBLE +syntax keyword openroadConst FB_LANDABLE FB_MARKABLE FB_RESIZEABLE +syntax keyword openroadConst FB_VIEWABLE FB_VISIBLE FC_LOWER FC_NONE FC_UPPER +syntax keyword openroadConst FM_QUERY FM_READ FM_UPDATE FM_USER1 FM_USER2 +syntax keyword openroadConst FM_USER3 FO_DEFAULT FO_HORIZONTAL FO_VERTICAL +syntax keyword openroadConst FP_BITMAP FP_CLEAR FP_CROSSHATCH FP_DARKSHADE +syntax keyword openroadConst FP_DEFAULT FP_HORIZONTAL FP_LIGHTSHADE FP_SHADE +syntax keyword openroadConst FP_SOLID FP_VERTICAL FT_NOTSETVALUE FT_SETVALUE +syntax keyword openroadConst FT_TABTO FT_TAKEFOCUS GF_BOTTOM GF_DEFAULT +syntax keyword openroadConst GF_LEFT GF_RIGHT GF_TOP HC_DOUBLEQUOTE +syntax keyword openroadConst HC_FORMFEED HC_NEWLINE HC_QUOTE HC_SPACE HC_TAB +syntax keyword openroadConst HV_CONTENTS HV_CONTEXT HV_HELPONHELP HV_KEY +syntax keyword openroadConst HV_QUIT LS_3D LS_DASH LS_DASHDOT LS_DASHDOTDOT +syntax keyword openroadConst LS_DEFAULT LS_DOT LS_SOLID LW_DEFAULT +syntax keyword openroadConst LW_EXTRATHIN LW_MAXIMUM LW_MIDDLE LW_MINIMUM +syntax keyword openroadConst LW_NOLINE LW_THICK LW_THIN LW_VERYTHICK +syntax keyword openroadConst LW_VERYTHIN MB_DISABLED MB_ENABLED MB_INVISIBLE +syntax keyword openroadConst MB_MOVEABLE MT_ERROR MT_INFO MT_NONE MT_WARNING +syntax keyword openroadConst OP_APPEND OP_NONE OS3D OS_DEFAULT OS_SHADOW +syntax keyword openroadConst OS_SOLID PU_CANCEL PU_OK QS_ACTIVE QS_INACTIVE +syntax keyword openroadConst QS_SETCOL QY_ARRAY QY_CACHE QY_CURSOR QY_DIRECT +syntax keyword openroadConst RC_CHILDSELECTED RC_DOWN RC_END RC_FIELDFREED +syntax keyword openroadConst RC_FIELDORPHANED RC_GROUPSELECT RC_HOME RC_LEFT +syntax keyword openroadConst RC_MODECHANGED RC_MOUSECLICK RC_MOUSEDRAG +syntax keyword openroadConst RC_NEXT RC_NOTAPPLICABLE RC_PAGEDOWN RC_PAGEUP +syntax keyword openroadConst RC_PARENTSELECTED RC_PREVIOUS RC_PROGRAM +syntax keyword openroadConst RC_RESUME RC_RETURN RC_RIGHT RC_ROWDELETED +syntax keyword openroadConst RC_ROWINSERTED RC_ROWSALLDELETED RC_SELECT +syntax keyword openroadConst RC_TFSCROLL RC_TOGGLESELECT RC_UP RS_CHANGED +syntax keyword openroadConst RS_DELETED RS_NEW RS_UNCHANGED RS_UNDEFINED +syntax keyword openroadConst SK_CLOSE SK_COPY SK_CUT SK_DELETE SK_DETAILS +syntax keyword openroadConst SK_DUPLICATE SK_FIND SK_GO SK_HELP SK_NEXT +syntax keyword openroadConst SK_NONE SK_PASTE SK_PROPS SK_QUIT SK_REDO +syntax keyword openroadConst SK_SAVE SK_TFDELETEALLROWS SK_TFDELETEROW +syntax keyword openroadConst SK_TFFIND SK_TFINSERTROW SK_UNDO SP_APPSTARTING +syntax keyword openroadConst SP_ARROW SP_CROSS SP_IBEAM SP_ICON SP_NO +syntax keyword openroadConst SP_SIZE SP_SIZENESW SP_SIZENS SP_SIZENWSE +syntax keyword openroadConst SP_SIZEWE SP_UPARROW SP_WAIT SY_NT SY_OS2 +syntax keyword openroadConst SY_UNIX SY_VMS SY_WIN95 TF_COURIER TF_HELVETICA +syntax keyword openroadConst TF_LUCIDA TF_MENUDEFAULT TF_NEWCENTURY TF_SYSTEM +syntax keyword openroadConst TF_TIMESROMAN TRUE UE_DATAERROR UE_EXITED +syntax keyword openroadConst UE_NOTACTIVE UE_PURGED UE_RESUMED UE_UNKNOWN +syntax keyword openroadConst WI_MOTIF WI_MSWIN32 WI_MSWINDOWS WI_NONE WI_PM +syntax keyword openroadConst WP_FLOATING WP_INTERACTIVE WP_PARENTCENTERED +syntax keyword openroadConst WP_PARENTRELATIVE WP_SCREENCENTERED +syntax keyword openroadConst WP_SCREENRELATIVE WV_ICON WV_INVISIBLE +syntax keyword openroadConst WV_UNREALIZED WV_VISIBLE + +" System Variables +" +syntax keyword openroadVar CurFrame CurProcedure CurMethod CurObject + +" Identifiers +" +syntax match openroadIdent /[a-zA-Z_][a-zA-Z_]*![a-zA-Z_][a-zA-Z_]*/ + +" Comments +" +if exists("openroad_comment_strings") + syntax match openroadCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region openroadCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" + syntax region openroadComment start="/\*" end="\*/" contains=openroadCommentString,openroadCharacter,openroadNumber + syntax match openroadComment "//.*" contains=openroadComment2String,openroadCharacter,openroadNumber +else + syn region openroadComment start="/\*" end="\*/" + syn match openroadComment "//.*" +endif + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +" +if version >= 508 || !exists("did_openroad_syntax_inits") + if version < 508 + let did_openroad_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink openroadKeyword Statement + HiLink openroadNumber Number + HiLink openroadString String + HiLink openroadComment Comment + HiLink openroadOperator Operator + HiLink openroadType Type + HiLink openroadFunc Special + HiLink openroadClass Type + HiLink openroadEvent Statement + HiLink openroadConst Constant + HiLink openroadVar Identifier + HiLink openroadIdent Identifier + HiLink openroadTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "openroad" diff --git a/runtime/syntax/opl.vim b/runtime/syntax/opl.vim new file mode 100644 index 000000000..1914a050f --- /dev/null +++ b/runtime/syntax/opl.vim @@ -0,0 +1,96 @@ +" Vim syntax file +" Language: OPL +" Maintainer: Czo <Olivier.Sirol@lip6.fr> +" $Id$ + +" Open Psion Language... (EPOC16/EPOC32) + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" case is not significant +syn case ignore + +" A bunch of useful OPL keywords +syn keyword OPLStatement proc endp abs acos addr adjustalloc alert alloc app +syn keyword OPLStatement append appendsprite asc asin at atan back beep +syn keyword OPLStatement begintrans bookmark break busy byref cache +syn keyword OPLStatement cachehdr cacherec cachetidy call cancel caption +syn keyword OPLStatement changesprite chr$ clearflags close closesprite cls +syn keyword OPLStatement cmd$ committrans compact compress const continue +syn keyword OPLStatement copy cos count create createsprite cursor +syn keyword OPLStatement datetosecs datim$ day dayname$ days daystodate +syn keyword OPLStatement dbuttons dcheckbox dchoice ddate declare dedit +syn keyword OPLStatement deditmulti defaultwin deg delete dfile dfloat +syn keyword OPLStatement dialog diaminit diampos dinit dir$ dlong do dow +syn keyword OPLStatement dposition drawsprite dtext dtime dxinput edit else +syn keyword OPLStatement elseif enda endif endv endwh entersend entersend0 +syn keyword OPLStatement eof erase err err$ errx$ escape eval exist exp ext +syn keyword OPLStatement external find findfield findlib first fix$ flags +syn keyword OPLStatement flt font freealloc gat gborder gbox gbutton +syn keyword OPLStatement gcircle gclock gclose gcls gcolor gcopy gcreate +syn keyword OPLStatement gcreatebit gdrawobject gellipse gen$ get get$ +syn keyword OPLStatement getcmd$ getdoc$ getevent getevent32 geteventa32 +syn keyword OPLStatement geteventc getlibh gfill gfont ggmode ggrey gheight +syn keyword OPLStatement gidentity ginfo ginfo32 ginvert giprint glineby +syn keyword OPLStatement glineto gloadbit gloadfont global gmove gorder +syn keyword OPLStatement goriginx goriginy goto gotomark gpatt gpeekline +syn keyword OPLStatement gpoly gprint gprintb gprintclip grank gsavebit +syn keyword OPLStatement gscroll gsetpenwidth gsetwin gstyle gtmode gtwidth +syn keyword OPLStatement gunloadfont gupdate guse gvisible gwidth gx +syn keyword OPLStatement gxborder gxprint gy hex$ hour iabs icon if include +syn keyword OPLStatement input insert int intf intrans key key$ keya keyc +syn keyword OPLStatement killmark kmod last lclose left$ len lenalloc +syn keyword OPLStatement linklib ln loadlib loadm loc local lock log lopen +syn keyword OPLStatement lower$ lprint max mcard mcasc mean menu mid$ min +syn keyword OPLStatement minit minute mkdir modify month month$ mpopup +syn keyword OPLStatement newobj newobjh next notes num$ odbinfo off onerr +syn keyword OPLStatement open openr opx os parse$ path pause peek pi +syn keyword OPLStatement pointerfilter poke pos position possprite print +syn keyword OPLStatement put rad raise randomize realloc recsize rename +syn keyword OPLStatement rept$ return right$ rmdir rnd rollback sci$ screen +syn keyword OPLStatement screeninfo second secstodate send setdoc setflags +syn keyword OPLStatement setname setpath sin space sqr statuswin +syn keyword OPLStatement statwininfo std stop style sum tan testevent trap +syn keyword OPLStatement type uadd unloadlib unloadm until update upper$ +syn keyword OPLStatement use usr usr$ usub val var vector week while year +" syn keyword OPLStatement rem + + +syn match OPLNumber "\<\d\+\>" +syn match OPLNumber "\<\d\+\.\d*\>" +syn match OPLNumber "\.\d\+\>" + +syn region OPLString start=+"+ end=+"+ +syn region OPLComment start="REM[\t ]" end="$" +syn match OPLMathsOperator "-\|=\|[:<>+\*^/\\]" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_OPL_syntax_inits") + if version < 508 + let did_OPL_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink OPLStatement Statement + HiLink OPLNumber Number + HiLink OPLString String + HiLink OPLComment Comment + HiLink OPLMathsOperator Conditional +" HiLink OPLError Error + + delcommand HiLink +endif + +let b:current_syntax = "opl" + +" vim: ts=8 diff --git a/runtime/syntax/ora.vim b/runtime/syntax/ora.vim new file mode 100644 index 000000000..bf5d3220a --- /dev/null +++ b/runtime/syntax/ora.vim @@ -0,0 +1,478 @@ +" Vim syntax file +" Language: Oracle config files (.ora) (Oracle 8i, ver. 8.1.5) +" Maintainer: Sandor Kopanyi <sandor.kopanyi@mailbox.hu> +" Url: <-> +" Last Change: 2003 May 11 + +" * the keywords are listed by file (sqlnet.ora, listener.ora, etc.) +" * the parathesis-checking is made at the beginning for all keywords +" * possible values are listed also +" * there are some overlappings (e.g. METHOD is mentioned both for +" sqlnet-ora and tnsnames.ora; since will not cause(?) problems +" is easier to follow separately each file's keywords) + +" Remove any old syntax stuff hanging around, if needed +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'ora' +endif + +syn case ignore + +"comments +syn match oraComment "\#.*" + +" catch errors caused by wrong parenthesis +syn region oraParen transparent start="(" end=")" contains=@oraAll,oraParen +syn match oraParenError ")" + +" strings +syn region oraString start=+"+ end=+"+ + +"common .ora staff + +"common protocol parameters +syn keyword oraKeywordGroup ADDRESS ADDRESS_LIST +syn keyword oraKeywordGroup DESCRIPTION_LIST DESCRIPTION +"all protocols +syn keyword oraKeyword PROTOCOL +syn keyword oraValue ipc tcp nmp +"Bequeath +syn keyword oraKeyword PROGRAM ARGV0 ARGS +"IPC +syn keyword oraKeyword KEY +"Named Pipes +syn keyword oraKeyword SERVER PIPE +"LU6.2 +syn keyword oraKeyword LU_NAME LLU LOCAL_LU LLU_NAME LOCAL_LU_NAME +syn keyword oraKeyword MODE MDN +syn keyword oraKeyword PLU PARTNER_LU_NAME PLU_LA PARTNER_LU_LOCAL_ALIAS +syn keyword oraKeyword TP_NAME TPN +"SPX +syn keyword oraKeyword SERVICE +"TCP/IP and TCP/IP with SSL +syn keyword oraKeyword HOST PORT + +"misc. keywords I've met but didn't find in manual (maybe they are deprecated?) +syn keyword oraKeywordGroup COMMUNITY_LIST +syn keyword oraKeyword COMMUNITY NAME DEFAULT_ZONE +syn keyword oraValue tcpcom + +"common values +syn keyword oraValue yes no on off true false null all none ok +"word 'world' is used a lot... +syn keyword oraModifier world + +"misc. common keywords +syn keyword oraKeyword TRACE_DIRECTORY TRACE_LEVEL TRACE_FILE + + +"sqlnet.ora +syn keyword oraKeywordPref NAMES NAMESCTL +syn keyword oraKeywordPref OSS SOURCE SQLNET TNSPING +syn keyword oraKeyword AUTOMATIC_IPC BEQUEATH_DETACH DAEMON TRACE_MASK +syn keyword oraKeyword DISABLE_OOB +syn keyword oraKeyword LOG_DIRECTORY_CLIENT LOG_DIRECTORY_SERVER +syn keyword oraKeyword LOG_FILE_CLIENT LOG_FILE_SERVER +syn keyword oraKeyword DCE PREFIX DEFAULT_DOMAIN DIRECTORY_PATH +syn keyword oraKeyword INITIAL_RETRY_TIMEOUT MAX_OPEN_CONNECTIONS +syn keyword oraKeyword MESSAGE_POOL_START_SIZE NIS META_MAP +syn keyword oraKeyword PASSWORD PREFERRED_SERVERS REQUEST_RETRIES +syn keyword oraKeyword INTERNAL_ENCRYPT_PASSWORD INTERNAL_USE +syn keyword oraKeyword NO_INITIAL_SERVER NOCONFIRM +syn keyword oraKeyword SERVER_PASSWORD TRACE_UNIQUE MY_WALLET +syn keyword oraKeyword LOCATION DIRECTORY METHOD METHOD_DATA +syn keyword oraKeyword SQLNET_ADDRESS +syn keyword oraKeyword AUTHENTICATION_SERVICES +syn keyword oraKeyword AUTHENTICATION_KERBEROS5_SERVICE +syn keyword oraKeyword AUTHENTICATION_GSSAPI_SERVICE +syn keyword oraKeyword CLIENT_REGISTRATION +syn keyword oraKeyword CRYPTO_CHECKSUM_CLIENT CRYPTO_CHECKSUM_SERVER +syn keyword oraKeyword CRYPTO_CHECKSUM_TYPES_CLIENT CRYPTO_CHECKSUM_TYPES_SERVER +syn keyword oraKeyword CRYPTO_SEED +syn keyword oraKeyword ENCRYPTION_CLIENT ENCRYPTION_SERVER +syn keyword oraKeyword ENCRYPTION_TYPES_CLIENT ENCRYPTION_TYPES_SERVER +syn keyword oraKeyword EXPIRE_TIME +syn keyword oraKeyword IDENTIX_FINGERPRINT_DATABASE IDENTIX_FINGERPRINT_DATABASE_USER +syn keyword oraKeyword IDENTIX_FINGERPRINT_DATABASE_PASSWORD IDENTIX_FINGERPRINT_METHOD +syn keyword oraKeyword KERBEROS5_CC_NAME KERBEROS5_CLOCKSKEW KERBEROS5_CONF +syn keyword oraKeyword KERBEROS5_KEYTAB KERBEROS5_REALMS +syn keyword oraKeyword RADIUS_ALTERNATE RADIUS_ALTERNATE_PORT RADIUS_ALTERNATE_RETRIES +syn keyword oraKeyword RADIUS_AUTHENTICATION_TIMEOUT RADIUS_AUTHENTICATION +syn keyword oraKeyword RADIUS_AUTHENTICATION_INTERFACE RADIUS_AUTHENTICATION_PORT +syn keyword oraKeyword RADIUS_AUTHENTICATION_RETRIES RADIUS_AUTHENTICATION_TIMEOUT +syn keyword oraKeyword RADIUS_CHALLENGE_RESPONSE RADIUS_SECRET RADIUS_SEND_ACCOUNTING +syn keyword oraKeyword SSL_CLIENT_AUTHENTICATION SSL_CIPHER_SUITES SSL_VERSION +syn keyword oraKeyword TRACE_DIRECTORY_CLIENT TRACE_DIRECTORY_SERVER +syn keyword oraKeyword TRACE_FILE_CLIENT TRACE_FILE_SERVER +syn keyword oraKeyword TRACE_LEVEL_CLIENT TRACE_LEVEL_SERVER +syn keyword oraKeyword TRACE_UNIQUE_CLIENT +syn keyword oraKeyword USE_CMAN USE_DEDICATED_SERVER +syn keyword oraValue user admin support +syn keyword oraValue accept accepted reject rejected requested required +syn keyword oraValue md5 rc4_40 rc4_56 rc4_128 des des_40 +syn keyword oraValue tnsnames onames hostname dce nis novell +syn keyword oraValue file oracle +syn keyword oraValue oss +syn keyword oraValue beq nds nts kerberos5 securid cybersafe identix dcegssapi radius +syn keyword oraValue undetermined + +"tnsnames.ora +syn keyword oraKeywordGroup CONNECT_DATA FAILOVER_MODE +syn keyword oraKeyword FAILOVER LOAD_BALANCE SOURCE_ROUTE TYPE_OF_SERVICE +syn keyword oraKeyword BACKUP TYPE METHOD GLOBAL_NAME HS +syn keyword oraKeyword INSTANCE_NAME RDB_DATABASE SDU SERVER +syn keyword oraKeyword SERVICE_NAME SERVICE_NAMES SID +syn keyword oraKeyword HANDLER_NAME EXTPROC_CONNECTION_DATA +syn keyword oraValue session select basic preconnect dedicated shared + +"listener.ora +syn keyword oraKeywordGroup SID_LIST SID_DESC PRESPAWN_LIST PRESPAWN_DESC +syn match oraKeywordGroup "SID_LIST_\w*" +syn keyword oraKeyword PROTOCOL_STACK PRESENTATION SESSION +syn keyword oraKeyword GLOBAL_DBNAME ORACLE_HOME PROGRAM SID_NAME +syn keyword oraKeyword PRESPAWN_MAX POOL_SIZE TIMEOUT +syn match oraKeyword "CONNECT_TIMEOUT_\w*" +syn match oraKeyword "LOG_DIRECTORY_\w*" +syn match oraKeyword "LOG_FILE_\w*" +syn match oraKeyword "PASSWORDS_\w*" +syn match oraKeyword "STARTUP_WAIT_TIME_\w*" +syn match oraKeyword "STARTUP_WAITTIME_\w*" +syn match oraKeyword "TRACE_DIRECTORY_\w*" +syn match oraKeyword "TRACE_FILE_\w*" +syn match oraKeyword "TRACE_LEVEL_\w*" +syn match oraKeyword "USE_PLUG_AND_PLAY_\w*" +syn keyword oraValue ttc giop ns raw + +"names.ora +syn keyword oraKeywordGroup ADDRESSES ADMIN_REGION +syn keyword oraKeywordGroup DEFAULT_FORWARDERS FORWARDER_LIST FORWARDER +syn keyword oraKeywordGroup DOMAIN_HINTS HINT_DESC HINT_LIST +syn keyword oraKeywordGroup DOMAINS DOMAIN_LIST DOMAIN +syn keyword oraKeywordPref NAMES +syn keyword oraKeyword EXPIRE REFRESH REGION RETRY USERID VERSION +syn keyword oraKeyword AUTHORITY_REQUIRED CONNECT_TIMEOUT +syn keyword oraKeyword AUTO_REFRESH_EXPIRE AUTO_REFRESH_RETRY +syn keyword oraKeyword CACHE_CHECKPOINT_FILE CACHE_CHECKPOINT_INTERVAL +syn keyword oraKeyword CONFIG_CHECKPOINT_FILE DEFAULT_FORWARDERS_ONLY +syn keyword oraKeyword HINT FORWARDING_AVAILABLE FORWARDING_DESIRED +syn keyword oraKeyword KEEP_DB_OPEN +syn keyword oraKeyword LOG_DIRECTORY LOG_FILE LOG_STATS_INTERVAL LOG_UNIQUE +syn keyword oraKeyword MAX_OPEN_CONNECTIONS MAX_REFORWARDS +syn keyword oraKeyword MESSAGE_POOL_START_SIZE +syn keyword oraKeyword NO_MODIFY_REQUESTS NO_REGION_DATABASE +syn keyword oraKeyword PASSWORD REGION_CHECKPOINT_FILE +syn keyword oraKeyword RESET_STATS_INTERVAL SAVE_CONFIG_ON_STOP +syn keyword oraKeyword SERVER_NAME TRACE_FUNC TRACE_UNIQUE + +"cman.ora +syn keyword oraKeywordGroup CMAN CMAN_ADMIN CMAN_PROFILE PARAMETER_LIST +syn keyword oraKeywordGroup CMAN_RULES RULES_LIST RULE +syn keyword oraKeyword ANSWER_TIMEOUT AUTHENTICATION_LEVEL LOG_LEVEL +syn keyword oraKeyword MAX_FREELIST_BUFFERS MAXIMUM_CONNECT_DATA MAXIMUM_RELAYS +syn keyword oraKeyword RELAY_STATISTICS SHOW_TNS_INFO TRACING +syn keyword oraKeyword USE_ASYNC_CALL SRC DST SRV ACT + +"protocol.ora +syn match oraKeyword "\w*\.EXCLUDED_NODES" +syn match oraKeyword "\w*\.INVITED_NODES" +syn match oraKeyword "\w*\.VALIDNODE_CHECKING" +syn keyword oraKeyword TCP NODELAY + + + + +"--------------------------------------- +"init.ora + +"common values +syn keyword oraValue nested_loops merge hash unlimited + +"init params +syn keyword oraKeyword O7_DICTIONARY_ACCESSIBILITY ALWAYS_ANTI_JOIN ALWAYS_SEMI_JOIN +syn keyword oraKeyword AQ_TM_PROCESSES ARCH_IO_SLAVES AUDIT_FILE_DEST AUDIT_TRAIL +syn keyword oraKeyword BACKGROUND_CORE_DUMP BACKGROUND_DUMP_DEST +syn keyword oraKeyword BACKUP_TAPE_IO_SLAVES BITMAP_MERGE_AREA_SIZE +syn keyword oraKeyword BLANK_TRIMMING BUFFER_POOL_KEEP BUFFER_POOL_RECYCLE +syn keyword oraKeyword COMMIT_POINT_STRENGTH COMPATIBLE CONTROL_FILE_RECORD_KEEP_TIME +syn keyword oraKeyword CONTROL_FILES CORE_DUMP_DEST CPU_COUNT +syn keyword oraKeyword CREATE_BITMAP_AREA_SIZE CURSOR_SPACE_FOR_TIME +syn keyword oraKeyword DB_BLOCK_BUFFERS DB_BLOCK_CHECKING DB_BLOCK_CHECKSUM +syn keyword oraKeyword DB_BLOCK_LRU_LATCHES DB_BLOCK_MAX_DIRTY_TARGET +syn keyword oraKeyword DB_BLOCK_SIZE DB_DOMAIN +syn keyword oraKeyword DB_FILE_DIRECT_IO_COUNT DB_FILE_MULTIBLOCK_READ_COUNT +syn keyword oraKeyword DB_FILE_NAME_CONVERT DB_FILE_SIMULTANEOUS_WRITES +syn keyword oraKeyword DB_FILES DB_NAME DB_WRITER_PROCESSES +syn keyword oraKeyword DBLINK_ENCRYPT_LOGIN DBWR_IO_SLAVES +syn keyword oraKeyword DELAYED_LOGGING_BLOCK_CLEANOUTS DISCRETE_TRANSACTIONS_ENABLED +syn keyword oraKeyword DISK_ASYNCH_IO DISTRIBUTED_TRANSACTIONS +syn keyword oraKeyword DML_LOCKS ENQUEUE_RESOURCES ENT_DOMAIN_NAME EVENT +syn keyword oraKeyword FAST_START_IO_TARGET FAST_START_PARALLEL_ROLLBACK +syn keyword oraKeyword FIXED_DATE FREEZE_DB_FOR_FAST_INSTANCE_RECOVERY +syn keyword oraKeyword GC_DEFER_TIME GC_FILES_TO_LOCKS GC_RELEASABLE_LOCKS GC_ROLLBACK_LOCKS +syn keyword oraKeyword GLOBAL_NAMES HASH_AREA_SIZE +syn keyword oraKeyword HASH_JOIN_ENABLED HASH_MULTIBLOCK_IO_COUNT +syn keyword oraKeyword HI_SHARED_MEMORY_ADDRESS HS_AUTOREGISTER +syn keyword oraKeyword IFILE +syn keyword oraKeyword INSTANCE_GROUPS INSTANCE_NAME INSTANCE_NUMBER +syn keyword oraKeyword JAVA_POOL_SIZE JOB_QUEUE_INTERVAL JOB_QUEUE_PROCESSES LARGE_POOL_SIZE +syn keyword oraKeyword LICENSE_MAX_SESSIONS LICENSE_MAX_USERS LICENSE_SESSIONS_WARNING +syn keyword oraKeyword LM_LOCKS LM_PROCS LM_RESS +syn keyword oraKeyword LOCAL_LISTENER LOCK_NAME_SPACE LOCK_SGA LOCK_SGA_AREAS +syn keyword oraKeyword LOG_ARCHIVE_BUFFER_SIZE LOG_ARCHIVE_BUFFERS LOG_ARCHIVE_DEST +syn match oraKeyword "LOG_ARCHIVE_DEST_\(1\|2\|3\|4\|5\)" +syn match oraKeyword "LOG_ARCHIVE_DEST_STATE_\(1\|2\|3\|4\|5\)" +syn keyword oraKeyword LOG_ARCHIVE_DUPLEX_DEST LOG_ARCHIVE_FORMAT LOG_ARCHIVE_MAX_PROCESSES +syn keyword oraKeyword LOG_ARCHIVE_MIN_SUCCEED_DEST LOG_ARCHIVE_START +syn keyword oraKeyword LOG_BUFFER LOG_CHECKPOINT_INTERVAL LOG_CHECKPOINT_TIMEOUT +syn keyword oraKeyword LOG_CHECKPOINTS_TO_ALERT LOG_FILE_NAME_CONVERT +syn keyword oraKeyword MAX_COMMIT_PROPAGATION_DELAY MAX_DUMP_FILE_SIZE +syn keyword oraKeyword MAX_ENABLED_ROLES MAX_ROLLBACK_SEGMENTS +syn keyword oraKeyword MTS_DISPATCHERS MTS_MAX_DISPATCHERS MTS_MAX_SERVERS MTS_SERVERS +syn keyword oraKeyword NLS_CALENDAR NLS_COMP NLS_CURRENCY NLS_DATE_FORMAT +syn keyword oraKeyword NLS_DATE_LANGUAGE NLS_DUAL_CURRENCY NLS_ISO_CURRENCY NLS_LANGUAGE +syn keyword oraKeyword NLS_NUMERIC_CHARACTERS NLS_SORT NLS_TERRITORY +syn keyword oraKeyword OBJECT_CACHE_MAX_SIZE_PERCENT OBJECT_CACHE_OPTIMAL_SIZE +syn keyword oraKeyword OPEN_CURSORS OPEN_LINKS OPEN_LINKS_PER_INSTANCE +syn keyword oraKeyword OPS_ADMINISTRATION_GROUP +syn keyword oraKeyword OPTIMIZER_FEATURES_ENABLE OPTIMIZER_INDEX_CACHING +syn keyword oraKeyword OPTIMIZER_INDEX_COST_ADJ OPTIMIZER_MAX_PERMUTATIONS +syn keyword oraKeyword OPTIMIZER_MODE OPTIMIZER_PERCENT_PARALLEL +syn keyword oraKeyword OPTIMIZER_SEARCH_LIMIT +syn keyword oraKeyword ORACLE_TRACE_COLLECTION_NAME ORACLE_TRACE_COLLECTION_PATH +syn keyword oraKeyword ORACLE_TRACE_COLLECTION_SIZE ORACLE_TRACE_ENABLE +syn keyword oraKeyword ORACLE_TRACE_FACILITY_NAME ORACLE_TRACE_FACILITY_PATH +syn keyword oraKeyword OS_AUTHENT_PREFIX OS_ROLES +syn keyword oraKeyword PARALLEL_ADAPTIVE_MULTI_USER PARALLEL_AUTOMATIC_TUNING +syn keyword oraKeyword PARALLEL_BROADCAST_ENABLED PARALLEL_EXECUTION_MESSAGE_SIZE +syn keyword oraKeyword PARALLEL_INSTANCE_GROUP PARALLEL_MAX_SERVERS +syn keyword oraKeyword PARALLEL_MIN_PERCENT PARALLEL_MIN_SERVERS +syn keyword oraKeyword PARALLEL_SERVER PARALLEL_SERVER_INSTANCES PARALLEL_THREADS_PER_CPU +syn keyword oraKeyword PARTITION_VIEW_ENABLED PLSQL_V2_COMPATIBILITY +syn keyword oraKeyword PRE_PAGE_SGA PROCESSES +syn keyword oraKeyword QUERY_REWRITE_ENABLED QUERY_REWRITE_INTEGRITY +syn keyword oraKeyword RDBMS_SERVER_DN READ_ONLY_OPEN_DELAYED RECOVERY_PARALLELISM +syn keyword oraKeyword REMOTE_DEPENDENCIES_MODE REMOTE_LOGIN_PASSWORDFILE +syn keyword oraKeyword REMOTE_OS_AUTHENT REMOTE_OS_ROLES +syn keyword oraKeyword REPLICATION_DEPENDENCY_TRACKING +syn keyword oraKeyword RESOURCE_LIMIT RESOURCE_MANAGER_PLAN +syn keyword oraKeyword ROLLBACK_SEGMENTS ROW_LOCKING SERIAL _REUSE SERVICE_NAMES +syn keyword oraKeyword SESSION_CACHED_CURSORS SESSION_MAX_OPEN_FILES SESSIONS +syn keyword oraKeyword SHADOW_CORE_DUMP +syn keyword oraKeyword SHARED_MEMORY_ADDRESS SHARED_POOL_RESERVED_SIZE SHARED_POOL_SIZE +syn keyword oraKeyword SORT_AREA_RETAINED_SIZE SORT_AREA_SIZE SORT_MULTIBLOCK_READ_COUNT +syn keyword oraKeyword SQL92_SECURITY SQL_TRACE STANDBY_ARCHIVE_DEST +syn keyword oraKeyword STAR_TRANSFORMATION_ENABLED TAPE_ASYNCH_IO THREAD +syn keyword oraKeyword TIMED_OS_STATISTICS TIMED_STATISTICS +syn keyword oraKeyword TRANSACTION_AUDITING TRANSACTIONS TRANSACTIONS_PER_ROLLBACK_SEGMENT +syn keyword oraKeyword USE_INDIRECT_DATA_BUFFERS USER_DUMP_DEST +syn keyword oraKeyword UTL_FILE_DIR +syn keyword oraKeywordObs ALLOW_PARTIAL_SN_RESULTS B_TREE_BITMAP_PLANS +syn keyword oraKeywordObs BACKUP_DISK_IO_SLAVES CACHE_SIZE_THRESHOLD +syn keyword oraKeywordObs CCF_IO_SIZE CLEANUP_ROLLBACK_ENTRIES +syn keyword oraKeywordObs CLOSE_CACHED_OPEN_CURSORS COMPATIBLE_NO_RECOVERY +syn keyword oraKeywordObs COMPLEX_VIEW_MERGING +syn keyword oraKeywordObs DB_BLOCK_CHECKPOINT_BATCH DB_BLOCK_LRU_EXTENDED_STATISTICS +syn keyword oraKeywordObs DB_BLOCK_LRU_STATISTICS +syn keyword oraKeywordObs DISTRIBUTED_LOCK_TIMEOUT DISTRIBUTED_RECOVERY_CONNECTION_HOLD_TIME +syn keyword oraKeywordObs FAST_FULL_SCAN_ENABLED GC_LATCHES GC_LCK_PROCS +syn keyword oraKeywordObs LARGE_POOL_MIN_ALLOC LGWR_IO_SLAVES +syn keyword oraKeywordObs LOG_BLOCK_CHECKSUM LOG_FILES +syn keyword oraKeywordObs LOG_SIMULTANEOUS_COPIES LOG_SMALL_ENTRY_MAX_SIZE +syn keyword oraKeywordObs MAX_TRANSACTION_BRANCHES +syn keyword oraKeywordObs MTS_LISTENER_ADDRESS MTS_MULTIPLE_LISTENERS +syn keyword oraKeywordObs MTS_RATE_LOG_SIZE MTS_RATE_SCALE MTS_SERVICE +syn keyword oraKeywordObs OGMS_HOME OPS_ADMIN_GROUP +syn keyword oraKeywordObs PARALLEL_DEFAULT_MAX_INSTANCES PARALLEL_MIN_MESSAGE_POOL +syn keyword oraKeywordObs PARALLEL_SERVER_IDLE_TIME PARALLEL_TRANSACTION_RESOURCE_TIMEOUT +syn keyword oraKeywordObs PUSH_JOIN_PREDICATE REDUCE_ALARM ROW_CACHE_CURSORS +syn keyword oraKeywordObs SEQUENCE_CACHE_ENTRIES SEQUENCE_CACHE_HASH_BUCKETS +syn keyword oraKeywordObs SHARED_POOL_RESERVED_MIN_ALLOC +syn keyword oraKeywordObs SORT_DIRECT_WRITES SORT_READ_FAC SORT_SPACEMAP_SIZE +syn keyword oraKeywordObs SORT_WRITE_BUFFER_SIZE SORT_WRITE_BUFFERS +syn keyword oraKeywordObs SPIN_COUNT TEMPORARY_TABLE_LOCKS USE_ISM +syn keyword oraValue db os full partial mandatory optional reopen enable defer +syn keyword oraValue always default intent disable dml plsql temp_disable +syn match oravalue "Arabic Hijrah" +syn match oravalue "English Hijrah" +syn match oravalue "Gregorian" +syn match oravalue "Japanese Imperial" +syn match oravalue "Persian" +syn match oravalue "ROC Official" +syn match oravalue "Thai Buddha" +syn match oravalue "8.0.0" +syn match oravalue "8.0.3" +syn match oravalue "8.0.4" +syn match oravalue "8.1.3" +syn match oraModifier "archived log" +syn match oraModifier "backup corruption" +syn match oraModifier "backup datafile" +syn match oraModifier "backup piece " +syn match oraModifier "backup redo log" +syn match oraModifier "backup set" +syn match oraModifier "copy corruption" +syn match oraModifier "datafile copy" +syn match oraModifier "deleted object" +syn match oraModifier "loghistory" +syn match oraModifier "offline range" + +"undocumented init params +"up to 7.2 (inclusive) +syn keyword oraKeywordUndObs _latch_spin_count _trace_instance_termination +syn keyword oraKeywordUndObs _wakeup_timeout _lgwr_async_write +"7.3 +syn keyword oraKeywordUndObs _standby_lock_space_name _enable_dba_locking +"8.0.5 +syn keyword oraKeywordUnd _NUMA_instance_mapping _NUMA_pool_size +syn keyword oraKeywordUnd _advanced_dss_features _affinity_on _all_shared_dblinks +syn keyword oraKeywordUnd _allocate_creation_order _allow_resetlogs_corruption +syn keyword oraKeywordUnd _always_star_transformation _bump_highwater_mark_count +syn keyword oraKeywordUnd _column_elimination_off _controlfile_enqueue_timeout +syn keyword oraKeywordUnd _corrupt_blocks_on_stuck_recovery _corrupted_rollback_segments +syn keyword oraKeywordUnd _cr_deadtime _cursor_db_buffers_pinned +syn keyword oraKeywordUnd _db_block_cache_clone _db_block_cache_map _db_block_cache_protect +syn keyword oraKeywordUnd _db_block_hash_buckets _db_block_hi_priority_batch_size +syn keyword oraKeywordUnd _db_block_max_cr_dba _db_block_max_scan_cnt +syn keyword oraKeywordUnd _db_block_med_priority_batch_size _db_block_no_idle_writes +syn keyword oraKeywordUnd _db_block_write_batch _db_handles _db_handles_cached +syn keyword oraKeywordUnd _db_large_dirty_queue _db_no_mount_lock +syn keyword oraKeywordUnd _db_writer_histogram_statistics _db_writer_scan_depth +syn keyword oraKeywordUnd _db_writer_scan_depth_decrement _db_writer_scan_depth_increment +syn keyword oraKeywordUnd _disable_incremental_checkpoints +syn keyword oraKeywordUnd _disable_latch_free_SCN_writes_via_32cas +syn keyword oraKeywordUnd _disable_latch_free_SCN_writes_via_64cas +syn keyword oraKeywordUnd _disable_logging _disable_ntlog_events +syn keyword oraKeywordUnd _dss_cache_flush _dynamic_stats_threshold +syn keyword oraKeywordUnd _enable_cscn_caching _enable_default_affinity +syn keyword oraKeywordUnd _enqueue_debug_multi_instance _enqueue_hash +syn keyword oraKeywordUnd _enqueue_hash_chain_latches _enqueue_locks +syn keyword oraKeywordUnd _fifth_spare_parameter _first_spare_parameter _fourth_spare_parameter +syn keyword oraKeywordUnd _gc_class_locks _groupby_nopushdown_cut_ratio +syn keyword oraKeywordUnd _idl_conventional_index_maintenance _ignore_failed_escalates +syn keyword oraKeywordUnd _init_sql_file +syn keyword oraKeywordUnd _io_slaves_disabled _ioslave_batch_count _ioslave_issue_count +syn keyword oraKeywordUnd _kgl_bucket_count _kgl_latch_count _kgl_multi_instance_invalidation +syn keyword oraKeywordUnd _kgl_multi_instance_lock _kgl_multi_instance_pin +syn keyword oraKeywordUnd _latch_miss_stat_sid _latch_recovery_alignment _latch_wait_posting +syn keyword oraKeywordUnd _lm_ast_option _lm_direct_sends _lm_dlmd_procs _lm_domains _lm_groups +syn keyword oraKeywordUnd _lm_non_fault_tolerant _lm_send_buffers _lm_statistics _lm_xids +syn keyword oraKeywordUnd _log_blocks_during_backup _log_buffers_debug _log_checkpoint_recovery_check +syn keyword oraKeywordUnd _log_debug_multi_instance _log_entry_prebuild_threshold _log_io_size +syn keyword oraKeywordUnd _log_space_errors +syn keyword oraKeywordUnd _max_exponential_sleep _max_sleep_holding_latch +syn keyword oraKeywordUnd _messages _minimum_giga_scn _mts_load_constants _nested_loop_fudge +syn keyword oraKeywordUnd _no_objects _no_or_expansion +syn keyword oraKeywordUnd _number_cached_attributes _offline_rollback_segments _open_files_limit +syn keyword oraKeywordUnd _optimizer_undo_changes +syn keyword oraKeywordUnd _oracle_trace_events _oracle_trace_facility_version +syn keyword oraKeywordUnd _ordered_nested_loop _parallel_server_sleep_time +syn keyword oraKeywordUnd _passwordfile_enqueue_timeout _pdml_slaves_diff_part +syn keyword oraKeywordUnd _plsql_dump_buffer_events _predicate_elimination_enabled +syn keyword oraKeywordUnd _project_view_columns +syn keyword oraKeywordUnd _px_broadcast_fudge_factor _px_broadcast_trace _px_dop_limit_degree +syn keyword oraKeywordUnd _px_dop_limit_threshold _px_kxfr_granule_allocation _px_kxib_tracing +syn keyword oraKeywordUnd _release_insert_threshold _reuse_index_loop +syn keyword oraKeywordUnd _rollback_segment_count _rollback_segment_initial +syn keyword oraKeywordUnd _row_cache_buffer_size _row_cache_instance_locks +syn keyword oraKeywordUnd _save_escalates _scn_scheme +syn keyword oraKeywordUnd _second_spare_parameter _session_idle_bit_latches +syn keyword oraKeywordUnd _shared_session_sort_fetch_buffer _single_process +syn keyword oraKeywordUnd _small_table_threshold _sql_connect_capability_override +syn keyword oraKeywordUnd _sql_connect_capability_table +syn keyword oraKeywordUnd _test_param_1 _test_param_2 _test_param_3 +syn keyword oraKeywordUnd _third_spare_parameter _tq_dump_period +syn keyword oraKeywordUnd _trace_archive_dest _trace_archive_start _trace_block_size +syn keyword oraKeywordUnd _trace_buffers_per_process _trace_enabled _trace_events +syn keyword oraKeywordUnd _trace_file_size _trace_files_public _trace_flushing _trace_write_batch_size +syn keyword oraKeywordUnd _upconvert_from_ast _use_vector_post _wait_for_sync _walk_insert_threshold +"dunno which version; may be 8.1.x, may be obsoleted +syn keyword oraKeywordUndObs _arch_io_slaves _average_dirties_half_life _b_tree_bitmap_plans +syn keyword oraKeywordUndObs _backup_disk_io_slaves _backup_io_pool_size +syn keyword oraKeywordUndObs _cleanup_rollback_entries _close_cached_open_cursors +syn keyword oraKeywordUndObs _compatible_no_recovery _complex_view_merging +syn keyword oraKeywordUndObs _cpu_to_io _cr_server +syn keyword oraKeywordUndObs _db_aging_cool_count _db_aging_freeze_cr _db_aging_hot_criteria +syn keyword oraKeywordUndObs _db_aging_stay_count _db_aging_touch_time +syn keyword oraKeywordUndObs _db_percent_hot_default _db_percent_hot_keep _db_percent_hot_recycle +syn keyword oraKeywordUndObs _db_writer_chunk_writes _db_writer_max_writes +syn keyword oraKeywordUndObs _dbwr_async_io _dbwr_tracing +syn keyword oraKeywordUndObs _defer_multiple_waiters _discrete_transaction_enabled +syn keyword oraKeywordUndObs _distributed_lock_timeout _distributed_recovery _distribited_recovery_ +syn keyword oraKeywordUndObs _domain_index_batch_size _domain_index_dml_batch_size +syn keyword oraKeywordUndObs _enable_NUMA_optimization _enable_block_level_transaction_recovery +syn keyword oraKeywordUndObs _enable_list_io _enable_multiple_sampling +syn keyword oraKeywordUndObs _fairness_treshold _fast_full_scan_enabled _foreground_locks +syn keyword oraKeywordUndObs _full_pwise_join_enabled _gc_latches _gc_lck_procs +syn keyword oraKeywordUndObs _high_server_treshold _index_prefetch_factor _kcl_debug +syn keyword oraKeywordUndObs _kkfi_trace _large_pool_min_alloc _lazy_freelist_close _left_nested_loops_random +syn keyword oraKeywordUndObs _lgwr_async_io _lgwr_io_slaves _lock_sga_areas +syn keyword oraKeywordUndObs _log_archive_buffer_size _log_archive_buffers _log_simultaneous_copies +syn keyword oraKeywordUndObs _low_server_treshold _max_transaction_branches +syn keyword oraKeywordUndObs _mts_rate_log_size _mts_rate_scale +syn keyword oraKeywordUndObs _mview_cost_rewrite _mview_rewrite_2 +syn keyword oraKeywordUndObs _ncmb_readahead_enabled _ncmb_readahead_tracing +syn keyword oraKeywordUndObs _ogms_home +syn keyword oraKeywordUndObs _parallel_adaptive_max_users _parallel_default_max_instances +syn keyword oraKeywordUndObs _parallel_execution_message_align _parallel_fake_class_pct +syn keyword oraKeywordUndObs _parallel_load_bal_unit _parallel_load_balancing +syn keyword oraKeywordUndObs _parallel_min_message_pool _parallel_recovery_stopat +syn keyword oraKeywordUndObs _parallel_server_idle_time _parallelism_cost_fudge_factor +syn keyword oraKeywordUndObs _partial_pwise_join_enabled _pdml_separate_gim _push_join_predicate +syn keyword oraKeywordUndObs _px_granule_size _px_index_sampling _px_load_publish_interval +syn keyword oraKeywordUndObs _px_max_granules_per_slave _px_min_granules_per_slave _px_no_stealing +syn keyword oraKeywordUndObs _row_cache_cursors _serial_direct_read _shared_pool_reserved_min_alloc +syn keyword oraKeywordUndObs _sort_space_for_write_buffers _spin_count _system_trig_enabled +syn keyword oraKeywordUndObs _trace_buffer_flushes _trace_cr_buffer_creates _trace_multi_block_reads +syn keyword oraKeywordUndObs _transaction_recovery_servers _use_ism _yield_check_interval + + +syn cluster oraAll add=oraKeyword,oraKeywordGroup,oraKeywordPref,oraKeywordObs,oraKeywordUnd,oraKeywordUndObs +syn cluster oraAll add=oraValue,oraModifier,oraString,oraSpecial,oraComment + +"============================================================================== +" highlighting + +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_ora_syn_inits") + + if version < 508 + let did_ora_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink oraKeyword Statement "usual keywords + HiLink oraKeywordGroup Type "keywords which group other keywords + HiLink oraKeywordPref oraKeywordGroup "keywords which act as prefixes + HiLink oraKeywordObs Todo "obsolete keywords + HiLink oraKeywordUnd PreProc "undocumented keywords + HiLink oraKeywordUndObs oraKeywordObs "undocumented obsolete keywords + HiLink oraValue Identifier "values, like true or false + HiLink oraModifier oraValue "modifies values + HiLink oraString String "strings + + HiLink oraSpecial Special "special characters + HiLink oraError Error "errors + HiLink oraParenError oraError "errors caused by mismatching parantheses + + HiLink oraComment Comment "comments + + delcommand HiLink +endif + + + +let b:current_syntax = "ora" + +if main_syntax == 'ora' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/runtime/syntax/papp.vim b/runtime/syntax/papp.vim new file mode 100644 index 000000000..0d84d80d9 --- /dev/null +++ b/runtime/syntax/papp.vim @@ -0,0 +1,92 @@ +" Vim syntax file for the "papp" file format (_p_erl _app_lication) +" +" Language: papp +" Maintainer: Marc Lehmann <pcg@goof.com> +" Last Change: 2003 May 11 +" Filenames: *.papp *.pxml *.pxsl +" URL: http://papp.plan9.de/ + +" You can set the "papp_include_html" variable so that html will be +" rendered as such inside phtml sections (in case you actually put html +" there - papp does not require that). Also, rendering html tends to keep +" the clutter high on the screen - mixing three languages is difficult +" enough(!). PS: it is also slow. + +" pod is, btw, allowed everywhere, which is actually wrong :( + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" source is basically xml, with included html (this is common) and perl bits +if version < 600 + so <sfile>:p:h/xml.vim +else + runtime! syntax/xml.vim +endif +unlet b:current_syntax + +if exists("papp_include_html") + if version < 600 + syn include @PAppHtml <sfile>:p:h/html.vim + else + syn include @PAppHtml syntax/html.vim + endif + unlet b:current_syntax +endif + +if version < 600 + syn include @PAppPerl <sfile>:p:h/perl.vim +else + syn include @PAppPerl syntax/perl.vim +endif + +if v:version >= 600 + syn cluster xmlFoldCluster add=papp_perl,papp_xperl,papp_phtml,papp_pxml,papp_perlPOD +endif + +" preprocessor commands +syn region papp_prep matchgroup=papp_prep start="^#\s*\(if\|elsif\)" end="$" keepend contains=@perlExpr contained +syn match papp_prep /^#\s*\(else\|endif\|??\).*$/ contained +" translation entries +syn region papp_gettext start=/__"/ end=/"/ contained contains=@papp_perlInterpDQ +syn cluster PAppHtml add=papp_gettext,papp_prep + +" add special, paired xperl, perl and phtml tags +syn region papp_perl matchgroup=xmlTag start="<perl>" end="</perl>" contains=papp_CDATAp,@PAppPerl keepend +syn region papp_xperl matchgroup=xmlTag start="<xperl>" end="</xperl>" contains=papp_CDATAp,@PAppPerl keepend +syn region papp_phtml matchgroup=xmlTag start="<phtml>" end="</phtml>" contains=papp_CDATAh,papp_ph_perl,papp_ph_html,papp_ph_hint,@PAppHtml keepend +syn region papp_pxml matchgroup=xmlTag start="<pxml>" end="</pxml>" contains=papp_CDATAx,papp_ph_perl,papp_ph_xml,papp_ph_xint keepend +syn region papp_perlPOD start="^=[a-z]" end="^=cut" contains=@Pod,perlTodo keepend + +" cdata sections +syn region papp_CDATAp matchgroup=xmlCdataDecl start="<!\[CDATA\[" end="\]\]>" contains=@PAppPerl contained keepend +syn region papp_CDATAh matchgroup=xmlCdataDecl start="<!\[CDATA\[" end="\]\]>" contains=papp_ph_perl,papp_ph_html,papp_ph_hint,@PAppHtml contained keepend +syn region papp_CDATAx matchgroup=xmlCdataDecl start="<!\[CDATA\[" end="\]\]>" contains=papp_ph_perl,papp_ph_xml,papp_ph_xint contained keepend + +syn region papp_ph_perl matchgroup=Delimiter start="<[:?]" end="[:?]>"me=e-2 nextgroup=papp_ph_html contains=@PAppPerl contained keepend +syn region papp_ph_html matchgroup=Delimiter start=":>" end="<[:?]"me=e-2 nextgroup=papp_ph_perl contains=@PAppHtml contained keepend +syn region papp_ph_hint matchgroup=Delimiter start="?>" end="<[:?]"me=e-2 nextgroup=papp_ph_perl contains=@perlInterpDQ,@PAppHtml contained keepend +syn region papp_ph_xml matchgroup=Delimiter start=":>" end="<[:?]"me=e-2 nextgroup=papp_ph_perl contains= contained keepend +syn region papp_ph_xint matchgroup=Delimiter start="?>" end="<[:?]"me=e-2 nextgroup=papp_ph_perl contains=@perlInterpDQ contained keepend + +" synchronization is horrors! +syn sync clear +syn sync match pappSync grouphere papp_CDATAh "</\(perl\|xperl\|phtml\|macro\|module\)>" +syn sync match pappSync grouphere papp_CDATAh "^# *\(if\|elsif\|else\|endif\)" +syn sync match pappSync grouphere papp_CDATAh "</\(tr\|td\|table\|hr\|h1\|h2\|h3\)>" +syn sync match pappSync grouphere NONE "</\=\(module\|state\|macro\)>" + +syn sync maxlines=300 +syn sync minlines=5 + +" The default highlighting. + +hi def link papp_prep preCondit +hi def link papp_gettext String + +let b:current_syntax = "papp" diff --git a/runtime/syntax/pascal.vim b/runtime/syntax/pascal.vim new file mode 100644 index 000000000..bba198f72 --- /dev/null +++ b/runtime/syntax/pascal.vim @@ -0,0 +1,357 @@ +" Vim syntax file +" Language: Pascal +" Version: 2.7 +" Last Change: 2003 May 11 +" Maintainer: Xavier Crégut <xavier.cregut@enseeiht.fr> +" Previous Maintainer: Mario Eusebio <bio@dq.fct.unl.pt> + +" Contributors: Tim Chase <tchase@csc.com>, Stas Grabois <stsi@vtrails.com>, +" Mazen NEIFER <mazen.neifer.2001@supaero.fr>, +" Klaus Hast <Klaus.Hast@arcor.net> + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + +syn case ignore +syn sync lines=250 + +syn keyword pascalBoolean true false +syn keyword pascalConditional if else then +syn keyword pascalConstant nil maxint +syn keyword pascalLabel case goto label +syn keyword pascalOperator and div downto in mod not of or packed with +syn keyword pascalRepeat do for do repeat while to until +syn keyword pascalStatement procedure function +syn keyword pascalStatement program begin end const var type +syn keyword pascalStruct record +syn keyword pascalType array boolean char integer file pointer real set +syn keyword pascalType string text variant + + +syn keyword pascalTodo contained TODO + + +" String +if !exists("pascal_one_line_string") + syn region pascalString matchgroup=pascalString start=+'+ end=+'+ contains=pascalStringEscape + if exists("pascal_gpc") + syn region pascalString matchgroup=pascalString start=+"+ end=+"+ contains=pascalStringEscapeGPC + else + syn region pascalStringError matchgroup=pascalStringError start=+"+ end=+"+ contains=pascalStringEscape + endif +else + "wrong strings + syn region pascalStringError matchgroup=pascalStringError start=+'+ end=+'+ end=+$+ contains=pascalStringEscape + if exists("pascal_gpc") + syn region pascalStringError matchgroup=pascalStringError start=+"+ end=+"+ end=+$+ contains=pascalStringEscapeGPC + else + syn region pascalStringError matchgroup=pascalStringError start=+"+ end=+"+ end=+$+ contains=pascalStringEscape + endif + + "right strings + syn region pascalString matchgroup=pascalString start=+'+ end=+'+ oneline contains=pascalStringEscape + " To see the start and end of strings: + " syn region pascalString matchgroup=pascalStringError start=+'+ end=+'+ oneline contains=pascalStringEscape + if exists("pascal_gpc") + syn region pascalString matchgroup=pascalString start=+"+ end=+"+ oneline contains=pascalStringEscapeGPC + else + syn region pascalStringError matchgroup=pascalStringError start=+"+ end=+"+ oneline contains=pascalStringEscape + endif +end +syn match pascalStringEscape contained "''" +syn match pascalStringEscapeGPC contained '""' + + +" syn match pascalIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" + + +if exists("pascal_symbol_operator") + syn match pascalSymbolOperator "[+\-/*=]" + syn match pascalSymbolOperator "[<>]=\=" + syn match pascalSymbolOperator "<>" + syn match pascalSymbolOperator ":=" + syn match pascalSymbolOperator "[()]" + syn match pascalSymbolOperator "\.\." + syn match pascalSymbolOperator "[\^.]" + syn match pascalMatrixDelimiter "[][]" + "if you prefer you can highlight the range + "syn match pascalMatrixDelimiter "[\d\+\.\.\d\+]" +endif + +syn match pascalNumber "-\=\<\d\+\>" +syn match pascalFloat "-\=\<\d\+\.\d\+\>" +syn match pascalFloat "-\=\<\d\+\.\d\+[eE]-\=\d\+\>" +syn match pascalHexNumber "\$[0-9a-fA-F]\+\>" + +if exists("pascal_no_tabs") + syn match pascalShowTab "\t" +endif + +syn region pascalComment start="(\*" end="\*)" contains=pascalTodo +syn region pascalComment start="{" end="}" contains=pascalTodo + + +if !exists("pascal_no_functions") + " array functions + syn keyword pascalFunction pack unpack + + " memory function + syn keyword pascalFunction Dispose New + + " math functions + syn keyword pascalFunction Abs Arctan Cos Exp Ln Sin Sqr Sqrt + + " file functions + syn keyword pascalFunction Eof Eoln Write Writeln + syn keyword pascalPredefined Input Output + + if exists("pascal_traditional") + " These functions do not seem to be defined in Turbo Pascal + syn keyword pascalFunction Get Page Put + endif + + " ordinal functions + syn keyword pascalFunction Odd Pred Succ + + " transfert functions + syn keyword pascalFunction Chr Ord Round Trunc +endif + + +if !exists("pascal_traditional") + + syn keyword pascalStatement constructor destructor implementation inherited + syn keyword pascalStatement interface unit uses + syn keyword pascalModifier absolute assembler external far forward inline + syn keyword pascalModifier interrupt near virtual + syn keyword pascalAcces private public + syn keyword pascalStruct object + syn keyword pascalOperator shl shr xor + + syn region pascalPreProc start="(\*\$" end="\*)" contains=pascalTodo + syn region pascalPreProc start="{\$" end="}" + + syn region pascalAsm matchgroup=pascalAsmKey start="\<asm\>" end="\<end\>" contains=pascalComment,pascalPreProc + + syn keyword pascalType ShortInt LongInt Byte Word + syn keyword pascalType ByteBool WordBool LongBool + syn keyword pascalType Cardinal LongWord + syn keyword pascalType Single Double Extended Comp + syn keyword pascalType PChar + + + if !exists ("pascal_fpc") + syn keyword pascalPredefined Result + endif + + if exists("pascal_fpc") + syn region pascalComment start="//" end="$" + syn keyword pascalStatement fail otherwise operator + syn keyword pascalDirective popstack + syn keyword pascalPredefined self + syn keyword pascalType ShortString AnsiString WideString + endif + + if exists("pascal_gpc") + syn keyword pascalType SmallInt + syn keyword pascalType AnsiChar + syn keyword pascalType PAnsiChar + endif + + if exists("pascal_delphi") + syn region pascalComment start="//" end="$" contains=pascalTodo + syn keyword pascalType SmallInt Int64 + syn keyword pascalType Real48 Currency + syn keyword pascalType AnsiChar WideChar + syn keyword pascalType ShortString AnsiString WideString + syn keyword pascalType PAnsiChar PWideChar + syn match pascalFloat "-\=\<\d\+\.\d\+[dD]-\=\d\+\>" + syn match pascalStringEscape contained "#[12][0-9]\=[0-9]\=" + syn keyword pascalStruct class dispinterface + syn keyword pascalException try except raise at on finally + syn keyword pascalStatement out + syn keyword pascalStatement library package + syn keyword pascalStatement initialization finalization uses exports + syn keyword pascalStatement property out resourcestring threadvar + syn keyword pascalModifier contains + syn keyword pascalModifier overridden reintroduce abstract + syn keyword pascalModifier override export dynamic name message + syn keyword pascalModifier dispid index stored default nodefault readonly + syn keyword pascalModifier writeonly implements overload requires resident + syn keyword pascalAcces protected published automated + syn keyword pascalDirective register pascal cvar cdecl stdcall safecall + syn keyword pascalOperator as is + endif + + if exists("pascal_no_functions") + "syn keyword pascalModifier read write + "may confuse with Read and Write functions. Not easy to handle. + else + " control flow functions + syn keyword pascalFunction Break Continue Exit Halt RunError + + " ordinal functions + syn keyword pascalFunction Dec Inc High Low + + " math functions + syn keyword pascalFunction Frac Int Pi + + " string functions + syn keyword pascalFunction Concat Copy Delete Insert Length Pos Str Val + + " memory function + syn keyword pascalFunction FreeMem GetMem MaxAvail MemAvail + + " pointer and address functions + syn keyword pascalFunction Addr Assigned CSeg DSeg Ofs Ptr Seg SPtr SSeg + + " misc functions + syn keyword pascalFunction Exclude FillChar Hi Include Lo Move ParamCount + syn keyword pascalFunction ParamStr Random Randomize SizeOf Swap TypeOf + syn keyword pascalFunction UpCase + + " predefined variables + syn keyword pascalPredefined ErrorAddr ExitCode ExitProc FileMode FreeList + syn keyword pascalPredefined FreeZero HeapEnd HeapError HeapOrg HeapPtr + syn keyword pascalPredefined InOutRes OvrCodeList OvrDebugPtr OvrDosHandle + syn keyword pascalPredefined OvrEmsHandle OvrHeapEnd OvrHeapOrg OvrHeapPtr + syn keyword pascalPredefined OvrHeapSize OvrLoadList PrefixSeg RandSeed + syn keyword pascalPredefined SaveInt00 SaveInt02 SaveInt1B SaveInt21 + syn keyword pascalPredefined SaveInt23 SaveInt24 SaveInt34 SaveInt35 + syn keyword pascalPredefined SaveInt36 SaveInt37 SaveInt38 SaveInt39 + syn keyword pascalPredefined SaveInt3A SaveInt3B SaveInt3C SaveInt3D + syn keyword pascalPredefined SaveInt3E SaveInt3F SaveInt75 SegA000 SegB000 + syn keyword pascalPredefined SegB800 SelectorInc StackLimit Test8087 + + " file functions + syn keyword pascalFunction Append Assign BlockRead BlockWrite ChDir Close + syn keyword pascalFunction Erase FilePos FileSize Flush GetDir IOResult + syn keyword pascalFunction MkDir Read Readln Rename Reset Rewrite RmDir + syn keyword pascalFunction Seek SeekEof SeekEoln SetTextBuf Truncate + + " crt unit + syn keyword pascalFunction AssignCrt ClrEol ClrScr Delay DelLine GotoXY + syn keyword pascalFunction HighVideo InsLine KeyPressed LowVideo NormVideo + syn keyword pascalFunction NoSound ReadKey Sound TextBackground TextColor + syn keyword pascalFunction TextMode WhereX WhereY Window + syn keyword pascalPredefined CheckBreak CheckEOF CheckSnow DirectVideo + syn keyword pascalPredefined LastMode TextAttr WindMin WindMax + syn keyword pascalFunction BigCursor CursorOff CursorOn + syn keyword pascalConstant Black Blue Green Cyan Red Magenta Brown + syn keyword pascalConstant LightGray DarkGray LightBlue LightGreen + syn keyword pascalConstant LightCyan LightRed LightMagenta Yellow White + syn keyword pascalConstant Blink ScreenWidth ScreenHeight bw40 + syn keyword pascalConstant co40 bw80 co80 mono + syn keyword pascalPredefined TextChar + + " DOS unit + syn keyword pascalFunction AddDisk DiskFree DiskSize DosExitCode DosVersion + syn keyword pascalFunction EnvCount EnvStr Exec Expand FindClose FindFirst + syn keyword pascalFunction FindNext FSearch FSplit GetCBreak GetDate + syn keyword pascalFunction GetEnv GetFAttr GetFTime GetIntVec GetTime + syn keyword pascalFunction GetVerify Intr Keep MSDos PackTime SetCBreak + syn keyword pascalFunction SetDate SetFAttr SetFTime SetIntVec SetTime + syn keyword pascalFunction SetVerify SwapVectors UnPackTime + syn keyword pascalConstant FCarry FParity FAuxiliary FZero FSign FOverflow + syn keyword pascalConstant Hidden Sysfile VolumeId Directory Archive + syn keyword pascalConstant AnyFile fmClosed fmInput fmOutput fmInout + syn keyword pascalConstant TextRecNameLength TextRecBufSize + syn keyword pascalType ComStr PathStr DirStr NameStr ExtStr SearchRec + syn keyword pascalType FileRec TextBuf TextRec Registers DateTime + syn keyword pascalPredefined DosError + + "Graph Unit + syn keyword pascalFunction Arc Bar Bar3D Circle ClearDevice ClearViewPort + syn keyword pascalFunction CloseGraph DetectGraph DrawPoly Ellipse + syn keyword pascalFunction FillEllipse FillPoly FloodFill GetArcCoords + syn keyword pascalFunction GetAspectRatio GetBkColor GetColor + syn keyword pascalFunction GetDefaultPalette GetDriverName GetFillPattern + syn keyword pascalFunction GetFillSettings GetGraphMode GetImage + syn keyword pascalFunction GetLineSettings GetMaxColor GetMaxMode GetMaxX + syn keyword pascalFunction GetMaxY GetModeName GetModeRange GetPalette + syn keyword pascalFunction GetPaletteSize GetPixel GetTextSettings + syn keyword pascalFunction GetViewSettings GetX GetY GraphDefaults + syn keyword pascalFunction GraphErrorMsg GraphResult ImageSize InitGraph + syn keyword pascalFunction InstallUserDriver InstallUserFont Line LineRel + syn keyword pascalFunction LineTo MoveRel MoveTo OutText OutTextXY + syn keyword pascalFunction PieSlice PutImage PutPixel Rectangle + syn keyword pascalFunction RegisterBGIDriver RegisterBGIFont + syn keyword pascalFunction RestoreCRTMode Sector SetActivePage + syn keyword pascalFunction SetAllPallette SetAspectRatio SetBkColor + syn keyword pascalFunction SetColor SetFillPattern SetFillStyle + syn keyword pascalFunction SetGraphBufSize SetGraphMode SetLineStyle + syn keyword pascalFunction SetPalette SetRGBPalette SetTextJustify + syn keyword pascalFunction SetTextStyle SetUserCharSize SetViewPort + syn keyword pascalFunction SetVisualPage SetWriteMode TextHeight TextWidth + syn keyword pascalType ArcCoordsType FillPatternType FillSettingsType + syn keyword pascalType LineSettingsType PaletteType PointType + syn keyword pascalType TextSettingsType ViewPortType + + " string functions + syn keyword pascalFunction StrAlloc StrBufSize StrCat StrComp StrCopy + syn keyword pascalFunction StrDispose StrECopy StrEnd StrFmt StrIComp + syn keyword pascalFunction StrLCat StrLComp StrLCopy StrLen StrLFmt + syn keyword pascalFunction StrLIComp StrLower StrMove StrNew StrPas + syn keyword pascalFunction StrPCopy StrPLCopy StrPos StrRScan StrScan + syn keyword pascalFunction StrUpper + endif + +endif + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_pascal_syn_inits") + if version < 508 + let did_pascal_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink pascalAcces pascalStatement + HiLink pascalBoolean Boolean + HiLink pascalComment Comment + HiLink pascalConditional Conditional + HiLink pascalConstant Constant + HiLink pascalDelimiter Identifier + HiLink pascalDirective pascalStatement + HiLink pascalException Exception + HiLink pascalFloat Float + HiLink pascalFunction Function + HiLink pascalLabel Label + HiLink pascalMatrixDelimiter Identifier + HiLink pascalModifier Type + HiLink pascalNumber Number + HiLink pascalOperator Operator + HiLink pascalPredefined pascalStatement + HiLink pascalPreProc PreProc + HiLink pascalRepeat Repeat + HiLink pascalStatement Statement + HiLink pascalString String + HiLink pascalStringEscape Special + HiLink pascalStringEscapeGPC Special + HiLink pascalStringError Error + HiLink pascalStruct pascalStatement + HiLink pascalSymbolOperator pascalOperator + HiLink pascalTodo Todo + HiLink pascalType Type + HiLink pascalUnclassified pascalStatement + " HiLink pascalAsm Assembler + HiLink pascalError Error + HiLink pascalAsmKey pascalStatement + HiLink pascalShowTab Error + + delcommand HiLink +endif + + +let b:current_syntax = "pascal" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/pcap.vim b/runtime/syntax/pcap.vim new file mode 100644 index 000000000..17d0d42c0 --- /dev/null +++ b/runtime/syntax/pcap.vim @@ -0,0 +1,65 @@ +" Vim syntax file +" Config file: printcap +" Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int> (defunct) +" Modified by Bram +" Last Change: 2003 May 11 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +"define keywords +if version < 600 + set isk=@,46-57,_,-,#,=,192-255 +else + setlocal isk=@,46-57,_,-,#,=,192-255 +endif + +"first all the bad guys +syn match pcapBad '^.\+$' "define any line as bad +syn match pcapBadword '\k\+' contained "define any sequence of keywords as bad +syn match pcapBadword ':' contained "define any single : as bad +syn match pcapBadword '\\' contained "define any single \ as bad +"then the good boys +" Boolean keywords +syn match pcapKeyword contained ':\(fo\|hl\|ic\|rs\|rw\|sb\|sc\|sf\|sh\)' +" Numeric Keywords +syn match pcapKeyword contained ':\(br\|du\|fc\|fs\|mx\|pc\|pl\|pw\|px\|py\|xc\|xs\)#\d\+' +" String Keywords +syn match pcapKeyword contained ':\(af\|cf\|df\|ff\|gf\|if\|lf\|lo\|lp\|nd\|nf\|of\|rf\|rg\|rm\|rp\|sd\|st\|tf\|tr\|vf\)=\k*' +" allow continuation +syn match pcapEnd ':\\$' contained +" +syn match pcapDefineLast '^\s.\+$' contains=pcapBadword,pcapKeyword +syn match pcapDefine '^\s.\+$' contains=pcapBadword,pcapKeyword,pcapEnd +syn match pcapHeader '^\k[^|]\+\(|\k[^|]\+\)*:\\$' +syn match pcapComment "#.*$" + +syn sync minlines=50 + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_pcap_syntax_inits") + if version < 508 + let did_pcap_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink pcapBad WarningMsg + HiLink pcapBadword WarningMsg + HiLink pcapComment Comment + + delcommand HiLink +endif + +let b:current_syntax = "pcap" + +" vim: ts=8 diff --git a/runtime/syntax/pccts.vim b/runtime/syntax/pccts.vim new file mode 100644 index 000000000..ef5268117 --- /dev/null +++ b/runtime/syntax/pccts.vim @@ -0,0 +1,106 @@ +" Vim syntax file +" Language: PCCTS +" Maintainer: Scott Bigham <dsb@cs.duke.edu> +" Last Change: 10 Aug 1999 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the C++ syntax to start with +if version < 600 + syn include @cppTopLevel <sfile>:p:h/cpp.vim +else + syn include @cppTopLevel syntax/cpp.vim +endif + +syn region pcctsAction matchgroup=pcctsDelim start="<<" end=">>?\=" contains=@cppTopLevel,pcctsRuleRef + +syn region pcctsArgBlock matchgroup=pcctsDelim start="\(>\s*\)\=\[" end="\]" contains=@cppTopLevel,pcctsRuleRef + +syn region pcctsString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=pcctsSpecialChar +syn match pcctsSpecialChar "\\\\\|\\\"" contained + +syn region pcctsComment start="/\*" end="\*/" contains=cTodo +syn match pcctsComment "//.*$" contains=cTodo + +syn region pcctsDirective start="^\s*#header\s\+<<" end=">>" contains=pcctsAction keepend +syn match pcctsDirective "^\s*#parser\>.*$" contains=pcctsString,pcctsComment +syn match pcctsDirective "^\s*#tokdefs\>.*$" contains=pcctsString,pcctsComment +syn match pcctsDirective "^\s*#token\>.*$" contains=pcctsString,pcctsAction,pcctsTokenName,pcctsComment +syn region pcctsDirective start="^\s*#tokclass\s\+[A-Z]\i*\s\+{" end="}" contains=pcctsString,pcctsTokenName +syn match pcctsDirective "^\s*#lexclass\>.*$" contains=pcctsTokenName +syn region pcctsDirective start="^\s*#errclass\s\+[^{]\+\s\+{" end="}" contains=pcctsString,pcctsTokenName +syn match pcctsDirective "^\s*#pred\>.*$" contains=pcctsTokenName,pcctsAction + +syn cluster pcctsInRule contains=pcctsString,pcctsRuleName,pcctsTokenName,pcctsAction,pcctsArgBlock,pcctsSubRule,pcctsLabel,pcctsComment + +syn region pcctsRule start="\<[a-z][A-Za-z0-9_]*\>\(\s*\[[^]]*\]\)\=\(\s*>\s*\[[^]]*\]\)\=\s*:" end=";" contains=@pcctsInRule + +syn region pcctsSubRule matchgroup=pcctsDelim start="(" end=")\(+\|\*\|?\(\s*=>\)\=\)\=" contains=@pcctsInRule contained +syn region pcctsSubRule matchgroup=pcctsDelim start="{" end="}" contains=@pcctsInRule contained + +syn match pcctsRuleName "\<[a-z]\i*\>" contained +syn match pcctsTokenName "\<[A-Z]\i*\>" contained + +syn match pcctsLabel "\<\I\i*:\I\i*" contained contains=pcctsLabelHack,pcctsRuleName,pcctsTokenName +syn match pcctsLabel "\<\I\i*:\"\([^\\]\|\\.\)*\"" contained contains=pcctsLabelHack,pcctsString +syn match pcctsLabelHack "\<\I\i*:" contained + +syn match pcctsRuleRef "\$\I\i*\>" contained +syn match pcctsRuleRef "\$\d\+\(\.\d\+\)\>" contained + +syn keyword pcctsClass class nextgroup=pcctsClassName skipwhite +syn match pcctsClassName "\<\I\i*\>" contained nextgroup=pcctsClassBlock skipwhite skipnl +syn region pcctsClassBlock start="{" end="}" contained contains=pcctsRule,pcctsComment,pcctsDirective,pcctsAction,pcctsException,pcctsExceptionHandler + +syn keyword pcctsException exception nextgroup=pcctsExceptionRuleRef skipwhite +syn match pcctsExceptionRuleRef "\[\I\i*\]" contained contains=pcctsExceptionID +syn match pcctsExceptionID "\I\i*" contained +syn keyword pcctsExceptionHandler catch default +syn keyword pcctsExceptionHandler NoViableAlt NoSemViableAlt +syn keyword pcctsExceptionHandler MismatchedToken + +syn sync clear +syn sync match pcctsSyncAction grouphere pcctsAction "<<" +syn sync match pcctsSyncAction "<<\([^>]\|>[^>]\)*>>" +syn sync match pcctsSyncRule grouphere pcctsRule "\<[a-z][A-Za-z0-9_]*\>\s*\[[^]]*\]\s*:" +syn sync match pcctsSyncRule grouphere pcctsRule "\<[a-z][A-Za-z0-9_]*\>\(\s*\[[^]]*\]\)\=\s*>\s*\[[^]]*\]\s*:" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_pccts_syntax_inits") + if version < 508 + let did_pccts_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink pcctsDelim Special + HiLink pcctsTokenName Identifier + HiLink pcctsRuleName Statement + HiLink pcctsLabelHack Label + HiLink pcctsDirective PreProc + HiLink pcctsString String + HiLink pcctsComment Comment + HiLink pcctsClass Statement + HiLink pcctsClassName Identifier + HiLink pcctsException Statement + HiLink pcctsExceptionHandler Keyword + HiLink pcctsExceptionRuleRef pcctsDelim + HiLink pcctsExceptionID Identifier + HiLink pcctsRuleRef Identifier + HiLink pcctsSpecialChar SpecialChar + + delcommand HiLink +endif + +let b:current_syntax = "pccts" + +" vim: ts=8 diff --git a/runtime/syntax/perl.vim b/runtime/syntax/perl.vim new file mode 100644 index 000000000..438872918 --- /dev/null +++ b/runtime/syntax/perl.vim @@ -0,0 +1,556 @@ +" Vim syntax file +" Language: Perl +" Maintainer: Nick Hibma <n_hibma@van-laarhoven.org> +" Last Change: 2004 May 16 +" Location: http://www.van-laarhoven.org/vim/syntax/perl.vim +" +" Please download most recent version first before mailing +" any comments. +" See also the file perl.vim.regression.pl to check whether your +" modifications work in the most odd cases +" http://www.van-laarhoven.org/vim/syntax/perl.vim.regression.pl +" +" Original version: Sonia Heimann <niania@netsurf.org> +" Thanks to many people for their contribution. + +" The following parameters are available for tuning the +" perl syntax highlighting, with defaults given: +" +" unlet perl_include_pod +" unlet perl_want_scope_in_variables +" unlet perl_extended_vars +" unlet perl_string_as_statement +" unlet perl_no_sync_on_sub +" unlet perl_no_sync_on_global_var +" let perl_sync_dist = 100 +" unlet perl_fold +" unlet perl_fold_blocks + +" 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 + +" Unset perl_fold if it set but vim doesn't support it. +if version < 600 && exists("perl_fold") + unlet perl_fold +endif + + +" POD starts with ^=<word> and ends with ^=cut + +if exists("perl_include_pod") + " Include a while extra syntax file + syn include @Pod syntax/pod.vim + unlet b:current_syntax + if exists("perl_fold") + syn region perlPOD start="^=[a-z]" end="^=cut" contains=@Pod,perlTodo keepend fold + syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend fold + else + syn region perlPOD start="^=[a-z]" end="^=cut" contains=@Pod,perlTodo keepend + syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend + endif +else + " Use only the bare minimum of rules + if exists("perl_fold") + syn region perlPOD start="^=[a-z]" end="^=cut" fold + else + syn region perlPOD start="^=[a-z]" end="^=cut" + endif +endif + + +" All keywords +" +if exists("perl_fold") && exists("perl_fold_blocks") + syn match perlConditional "\<if\>" + syn match perlConditional "\<elsif\>" + syn match perlConditional "\<unless\>" + syn match perlConditional "\<else\>" nextgroup=perlElseIfError skipwhite skipnl skipempty +else + syn keyword perlConditional if elsif unless + syn keyword perlConditional else nextgroup=perlElseIfError skipwhite skipnl skipempty +endif +syn keyword perlConditional switch eq ne gt lt ge le cmp not and or xor err +if exists("perl_fold") && exists("perl_fold_blocks") + syn match perlRepeat "\<while\>" + syn match perlRepeat "\<for\>" + syn match perlRepeat "\<foreach\>" + syn match perlRepeat "\<do\>" + syn match perlRepeat "\<until\>" + syn match perlRepeat "\<continue\>" +else + syn keyword perlRepeat while for foreach do until continue +endif +syn keyword perlOperator defined undef and or not bless ref +if exists("perl_fold") + " if BEGIN/END is a keyword the perlBEGINENDFold does not work + syn match perlControl "\<BEGIN\>" contained + syn match perlControl "\<END\>" contained +else + syn keyword perlControl BEGIN END +endif + +syn keyword perlStatementStorage my local our +syn keyword perlStatementControl goto return last next redo +syn keyword perlStatementScalar chomp chop chr crypt index lc lcfirst length ord pack reverse rindex sprintf substr uc ucfirst +syn keyword perlStatementRegexp pos quotemeta split study +syn keyword perlStatementNumeric abs atan2 cos exp hex int log oct rand sin sqrt srand +syn keyword perlStatementList splice unshift shift push pop split join reverse grep map sort unpack +syn keyword perlStatementHash each exists keys values tie tied untie +syn keyword perlStatementIOfunc carp confess croak dbmclose dbmopen die syscall +syn keyword perlStatementFiledesc binmode close closedir eof fileno getc lstat print printf readdir readline readpipe rewinddir select stat tell telldir write nextgroup=perlFiledescStatementNocomma skipwhite +syn keyword perlStatementFiledesc fcntl flock ioctl open opendir read seek seekdir sysopen sysread sysseek syswrite truncate nextgroup=perlFiledescStatementComma skipwhite +syn keyword perlStatementVector pack vec +syn keyword perlStatementFiles chdir chmod chown chroot glob link mkdir readlink rename rmdir symlink umask unlink utime +syn match perlStatementFiles "-[rwxoRWXOezsfdlpSbctugkTBMAC]\>" +syn keyword perlStatementFlow caller die dump eval exit wantarray +syn keyword perlStatementInclude require +syn match perlStatementInclude "\(use\|no\)\s\+\(integer\>\|strict\>\|lib\>\|sigtrap\>\|subs\>\|vars\>\|warnings\>\|utf8\>\|byte\>\)\=" +syn keyword perlStatementScope import +syn keyword perlStatementProc alarm exec fork getpgrp getppid getpriority kill pipe setpgrp setpriority sleep system times wait waitpid +syn keyword perlStatementSocket accept bind connect getpeername getsockname getsockopt listen recv send setsockopt shutdown socket socketpair +syn keyword perlStatementIPC msgctl msgget msgrcv msgsnd semctl semget semop shmctl shmget shmread shmwrite +syn keyword perlStatementNetwork endhostent endnetent endprotoent endservent gethostbyaddr gethostbyname gethostent getnetbyaddr getnetbyname getnetent getprotobyname getprotobynumber getprotoent getservbyname getservbyport getservent sethostent setnetent setprotoent setservent +syn keyword perlStatementPword getpwuid getpwnam getpwent setpwent endpwent getgrent getgrgid getlogin getgrnam setgrent endgrent +syn keyword perlStatementTime gmtime localtime time times + +syn keyword perlStatementMisc warn formline reset scalar delete prototype lock +syn keyword perlStatementNew new + +syn keyword perlTodo TODO TBD FIXME XXX contained + +" Perl Identifiers. +" +" Should be cleaned up to better handle identifiers in particular situations +" (in hash keys for example) +" +" Plain identifiers: $foo, @foo, $#foo, %foo, &foo and dereferences $$foo, @$foo, etc. +" We do not process complex things such as @{${"foo"}}. Too complicated, and +" too slow. And what is after the -> is *not* considered as part of the +" variable - there again, too complicated and too slow. + +" Special variables first ($^A, ...) and ($|, $', ...) +syn match perlVarPlain "$^[ADEFHILMOPSTWX]\=" +syn match perlVarPlain "$[\\\"\[\]'&`+*.,;=%~!?@$<>(-]" +syn match perlVarPlain "$\(0\|[1-9][0-9]*\)" +" Same as above, but avoids confusion in $::foo (equivalent to $main::foo) +syn match perlVarPlain "$:[^:]" +" These variables are not recognized within matches. +syn match perlVarNotInMatches "$[|)]" +" This variable is not recognized within matches delimited by m//. +syn match perlVarSlash "$/" + +" And plain identifiers +syn match perlPackageRef "\(\h\w*\)\=\(::\|'\)\I"me=e-1 contained + +" To highlight packages in variables as a scope reference - i.e. in $pack::var, +" pack:: is a scope, just set "perl_want_scope_in_variables" +" If you *want* complex things like @{${"foo"}} to be processed, +" just set the variable "perl_extended_vars"... + +" FIXME value between {} should be marked as string. is treated as such by Perl. +" At the moment it is marked as something greyish instead of read. Probably todo +" with transparency. Or maybe we should handle the bare word in that case. or make it into + +if exists("perl_want_scope_in_variables") + syn match perlVarPlain "\\\=\([@%$]\|\$#\)\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod + syn match perlFunctionName "\\\=&\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember +else + syn match perlVarPlain "\\\=\([@%$]\|\$#\)\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod + syn match perlFunctionName "\\\=&\$*\(\I\i*\)\=\(\(::\|'\)\I\i*\)*\>" nextgroup=perlVarMember,perlVarSimpleMember +endif + +if exists("perl_extended_vars") + syn cluster perlExpr contains=perlStatementScalar,perlStatementRegexp,perlStatementNumeric,perlStatementList,perlStatementHash,perlStatementFiles,perlStatementTime,perlStatementMisc,perlVarPlain,perlVarNotInMatches,perlVarSlash,perlVarBlock,perlShellCommand,perlFloat,perlNumber,perlStringUnexpanded,perlString,perlQQ + syn region perlVarBlock matchgroup=perlVarPlain start="\($#\|[@%$]\)\$*{" skip="\\}" end="}" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember + syn region perlVarBlock matchgroup=perlVarPlain start="&\$*{" skip="\\}" end="}" contains=@perlExpr + syn match perlVarPlain "\\\=\(\$#\|[@%&$]\)\$*{\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember + syn region perlVarMember matchgroup=perlVarPlain start="\(->\)\={" skip="\\}" end="}" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember + syn match perlVarSimpleMember "\(->\)\={\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember contains=perlVarSimpleMemberName contained + syn match perlVarSimpleMemberName "\I\i*" contained + syn region perlVarMember matchgroup=perlVarPlain start="\(->\)\=\[" skip="\\]" end="]" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember + syn match perlMethod "\(->\)\I\i*" contained +endif + +" File Descriptors +syn match perlFiledescRead "[<]\h\w\+[>]" + +syn match perlFiledescStatementComma "(\=\s*\u\w*\s*,"me=e-1 transparent contained contains=perlFiledescStatement +syn match perlFiledescStatementNocomma "(\=\s*\u\w*\s*[^, \t]"me=e-1 transparent contained contains=perlFiledescStatement + +syn match perlFiledescStatement "\u\w*" contained + +" Special characters in strings and matches +syn match perlSpecialString "\\\(\d\+\|[xX]\x\+\|c\u\|.\)" contained +syn match perlSpecialStringU "\\['\\]" contained +syn match perlSpecialMatch "{\d\(,\d\)\=}" contained +syn match perlSpecialMatch "\[\(\]\|-\)\=[^\[\]]*\(\[\|\-\)\=\]" contained +syn match perlSpecialMatch "[+*()?.]" contained +syn match perlSpecialMatch "(?[#:=!]" contained +syn match perlSpecialMatch "(?[imsx]\+)" contained +" FIXME the line below does not work. It should mark end of line and +" begin of line as perlSpecial. +" syn match perlSpecialBEOM "^\^\|\$$" contained + +" Possible errors +" +" Highlight lines with only whitespace (only in blank delimited here documents) as errors +syn match perlNotEmptyLine "^\s\+$" contained +" Highlight '} else if (...) {', it should be '} else { if (...) { ' or +" '} elsif (...) {'. +"syn keyword perlElseIfError if contained + +" Variable interpolation +" +" These items are interpolated inside "" strings and similar constructs. +syn cluster perlInterpDQ contains=perlSpecialString,perlVarPlain,perlVarNotInMatches,perlVarSlash,perlVarBlock +" These items are interpolated inside '' strings and similar constructs. +syn cluster perlInterpSQ contains=perlSpecialStringU +" These items are interpolated inside m// matches and s/// substitutions. +syn cluster perlInterpSlash contains=perlSpecialString,perlSpecialMatch,perlVarPlain,perlVarBlock,perlSpecialBEOM +" These items are interpolated inside m## matches and s### substitutions. +syn cluster perlInterpMatch contains=@perlInterpSlash,perlVarSlash + +" Shell commands +syn region perlShellCommand matchgroup=perlMatchStartEnd start="`" end="`" contains=@perlInterpDQ + +" Constants +" +" Numbers +syn match perlNumber "[-+]\=\(\<\d[[:digit:]_]*L\=\>\|0[xX]\x[[:xdigit:]_]*\>\)" +syn match perlFloat "[-+]\=\<\d[[:digit:]_]*[eE][\-+]\=\d\+" +syn match perlFloat "[-+]\=\<\d[[:digit:]_]*\.[[:digit:]_]*\([eE][\-+]\=\d\+\)\=" +syn match perlFloat "[-+]\=\<\.[[:digit:]_]\+\([eE][\-+]\=\d\+\)\=" + + +" Simple version of searches and matches +" caters for m//, m##, m{} and m[] (and the !/ variant) +syn region perlMatch matchgroup=perlMatchStartEnd start=+[m!]/+ end=+/[cgimosx]*+ contains=@perlInterpSlash +syn region perlMatch matchgroup=perlMatchStartEnd start=+[m!]#+ end=+#[cgimosx]*+ contains=@perlInterpMatch +syn region perlMatch matchgroup=perlMatchStartEnd start=+[m!]{+ end=+}[cgimosx]*+ contains=@perlInterpMatch +syn region perlMatch matchgroup=perlMatchStartEnd start=+[m!]\[+ end=+\][cgimosx]*+ contains=@perlInterpMatch + +" A special case for m!!x which allows for comments and extra whitespace in the pattern +syn region perlMatch matchgroup=perlMatchStartEnd start=+[m!]!+ end=+![cgimosx]*+ contains=@perlInterpSlash,perlComment + +" Below some hacks to recognise the // variant. This is virtually impossible to catch in all +" cases as the / is used in so many other ways, but these should be the most obvious ones. +"syn region perlMatch matchgroup=perlMatchStartEnd start=+^split /+lc=5 start=+[^$@%]\<split /+lc=6 start=+^if /+lc=2 start=+[^$@%]if /+lc=3 start=+[!=]\~\s*/+lc=2 start=+[(~]/+lc=1 start=+\.\./+lc=2 start=+\s/[^= \t0-9$@%]+lc=1,me=e-1,rs=e-1 start=+^/+ skip=+\\/+ end=+/[cgimosx]*+ contains=@perlInterpSlash +syn region perlMatch matchgroup=perlMatchStartEnd start=+^split /+lc=5 start=+[^$@%]\<split /+lc=6 start=+^while /+lc=5 start=+[^$@%]while /+lc=6 start=+^if /+lc=2 start=+[^$@%]if /+lc=3 start=+[!=]\~\s*/+lc=2 start=+[(~]/+lc=1 start=+\.\./+lc=2 start=+\s/[^= \t0-9$@%]+lc=1,me=e-1,rs=e-1 start=+^/+ skip=+\\/+ end=+/[cgimosx]*+ contains=@perlInterpSlash + + +" Substitutions +" caters for s///, s### and s[][] +" perlMatch is the first part, perlSubstitution* is the substitution part +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<s'+ end=+'+me=e-1 contains=@perlInterpSQ nextgroup=perlSubstitutionSQ +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<s"+ end=+"+me=e-1 contains=@perlInterpMatch nextgroup=perlSubstitutionDQ +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<s/+ end=+/+me=e-1 contains=@perlInterpSlash nextgroup=perlSubstitutionSlash +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<s#+ end=+#+me=e-1 contains=@perlInterpMatch nextgroup=perlSubstitutionHash +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<s\[+ end=+\]+ contains=@perlInterpMatch nextgroup=perlSubstitutionBracket skipwhite skipempty skipnl +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<s{+ end=+}+ contains=@perlInterpMatch nextgroup=perlSubstitutionCurly skipwhite skipempty skipnl +syn region perlSubstitutionSQ matchgroup=perlMatchStartEnd start=+'+ end=+'[ecgimosx]*+ contained contains=@perlInterpSQ +syn region perlSubstitutionDQ matchgroup=perlMatchStartEnd start=+"+ end=+"[ecgimosx]*+ contained contains=@perlInterpDQ +syn region perlSubstitutionSlash matchgroup=perlMatchStartEnd start=+/+ end=+/[ecgimosx]*+ contained contains=@perlInterpDQ +syn region perlSubstitutionHash matchgroup=perlMatchStartEnd start=+#+ end=+#[ecgimosx]*+ contained contains=@perlInterpDQ +syn region perlSubstitutionBracket matchgroup=perlMatchStartEnd start=+\[+ end=+\][ecgimosx]*+ contained contains=@perlInterpDQ +syn region perlSubstitutionCurly matchgroup=perlMatchStartEnd start=+{+ end=+}[ecgimosx]*+ contained contains=@perlInterpDQ + +" A special case for m!!x which allows for comments and extra whitespace in the pattern +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<s!+ end=+!+me=e-1 contains=@perlInterpSlash,perlComment nextgroup=perlSubstitutionPling +syn region perlSubstitutionPling matchgroup=perlMatchStartEnd start=+!+ end=+![ecgimosx]*+ contained contains=@perlInterpDQ + +" Substitutions +" caters for tr///, tr### and tr[][] +" perlMatch is the first part, perlTranslation* is the second, translator part. +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\(tr\|y\)'+ end=+'+me=e-1 contains=@perlInterpSQ nextgroup=perlTranslationSQ +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\(tr\|y\)"+ end=+"+me=e-1 contains=@perlInterpSQ nextgroup=perlTranslationDQ +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\(tr\|y\)/+ end=+/+me=e-1 contains=@perlInterpSQ nextgroup=perlTranslationSlash +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\(tr\|y\)#+ end=+#+me=e-1 contains=@perlInterpSQ nextgroup=perlTranslationHash +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\(tr\|y\)\[+ end=+\]+ contains=@perlInterpSQ nextgroup=perlTranslationBracket skipwhite skipempty skipnl +syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\(tr\|y\){+ end=+}+ contains=@perlInterpSQ nextgroup=perlTranslationCurly skipwhite skipempty skipnl +syn region perlTranslationSQ matchgroup=perlMatchStartEnd start=+'+ end=+'[cds]*+ contained +syn region perlTranslationDQ matchgroup=perlMatchStartEnd start=+"+ end=+"[cds]*+ contained +syn region perlTranslationSlash matchgroup=perlMatchStartEnd start=+/+ end=+/[cds]*+ contained +syn region perlTranslationHash matchgroup=perlMatchStartEnd start=+#+ end=+#[cds]*+ contained +syn region perlTranslationBracket matchgroup=perlMatchStartEnd start=+\[+ end=+\][cds]*+ contained +syn region perlTranslationCurly matchgroup=perlMatchStartEnd start=+{+ end=+}[cds]*+ contained + + +" The => operator forces a bareword to the left of it to be interpreted as +" a string +syn match perlString "\<\I\i*\s*=>"me=e-2 + +" Strings and q, qq, qw and qr expressions + +" Brackets in qq() +syn region perlBrackets start=+(+ end=+)+ contained transparent contains=perlBrackets,@perlStringSQ + +syn region perlStringUnexpanded matchgroup=perlStringStartEnd start="'" end="'" contains=@perlInterpSQ +syn region perlString matchgroup=perlStringStartEnd start=+"+ end=+"+ contains=@perlInterpDQ +syn region perlQQ matchgroup=perlStringStartEnd start=+\<q#+ end=+#+ contains=@perlInterpSQ +syn region perlQQ matchgroup=perlStringStartEnd start=+\<q|+ end=+|+ contains=@perlInterpSQ +syn region perlQQ matchgroup=perlStringStartEnd start=+\<q(+ end=+)+ contains=@perlInterpSQ,perlBrackets +syn region perlQQ matchgroup=perlStringStartEnd start=+\<q{+ end=+}+ contains=@perlInterpSQ +syn region perlQQ matchgroup=perlStringStartEnd start=+\<q/+ end=+/+ contains=@perlInterpSQ +syn region perlQQ matchgroup=perlStringStartEnd start=+\<q[qx]#+ end=+#+ contains=@perlInterpDQ +syn region perlQQ matchgroup=perlStringStartEnd start=+\<q[qx]|+ end=+|+ contains=@perlInterpDQ +syn region perlQQ matchgroup=perlStringStartEnd start=+\<q[qx](+ end=+)+ contains=@perlInterpDQ,perlBrackets +syn region perlQQ matchgroup=perlStringStartEnd start=+\<q[qx]{+ end=+}+ contains=@perlInterpDQ +syn region perlQQ matchgroup=perlStringStartEnd start=+\<q[qx]/+ end=+/+ contains=@perlInterpDQ +syn region perlQQ matchgroup=perlStringStartEnd start=+\<qw#+ end=+#+ contains=@perlInterpSQ +syn region perlQQ matchgroup=perlStringStartEnd start=+\<qw|+ end=+|+ contains=@perlInterpSQ +syn region perlQQ matchgroup=perlStringStartEnd start=+\<qw(+ end=+)+ contains=@perlInterpSQ,perlBrackets +syn region perlQQ matchgroup=perlStringStartEnd start=+\<qw{+ end=+}+ contains=@perlInterpSQ +syn region perlQQ matchgroup=perlStringStartEnd start=+\<qw/+ end=+/+ contains=@perlInterpSQ +syn region perlQQ matchgroup=perlStringStartEnd start=+\<qr#+ end=+#[imosx]*+ contains=@perlInterpMatch +syn region perlQQ matchgroup=perlStringStartEnd start=+\<qr|+ end=+|[imosx]*+ contains=@perlInterpMatch +syn region perlQQ matchgroup=perlStringStartEnd start=+\<qr(+ end=+)[imosx]*+ contains=@perlInterpMatch +syn region perlQQ matchgroup=perlStringStartEnd start=+\<qr{+ end=+}[imosx]*+ contains=@perlInterpMatch +syn region perlQQ matchgroup=perlStringStartEnd start=+\<qr/+ end=+/[imosx]*+ contains=@perlInterpSlash + +" Constructs such as print <<EOF [...] EOF, 'here' documents +" +if version >= 600 + " XXX Any statements after the identifier are in perlString colour (i.e. + " 'if $a' in 'print <<EOF if $a'). + if exists("perl_fold") + syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\)+ end=+^\z1$+ contains=@perlInterpDQ fold + syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z(.\{-}\)"+ end=+^\z1$+ contains=@perlInterpDQ fold + syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z(.\{-}\)'+ end=+^\z1$+ contains=@perlInterpSQ fold + syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine fold + syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,perlNotEmptyLine fold + syn region perlAutoload matchgroup=perlStringStartEnd start=+<<['"]\z(END_\(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)['"]+ end=+^\z1$+ contains=ALL fold + else + syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\)+ end=+^\z1$+ contains=@perlInterpDQ + syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z(.\{-}\)"+ end=+^\z1$+ contains=@perlInterpDQ + syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z(.\{-}\)'+ end=+^\z1$+ contains=@perlInterpSQ + syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine + syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,perlNotEmptyLine + syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\(['"]\|\)\z(END_\(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL + endif +else + syn match perlUntilEOFStart "<<EOF.*"lc=5 nextgroup=perlUntilEOFDQ skipnl transparent + syn match perlUntilEOFStart "<<\s*\"EOF\".*" nextgroup=perlUntilEOFDQ skipnl transparent + syn match perlUntilEOFStart "<<\s*'EOF'.*" nextgroup=perlUntilEOFSQ skipnl transparent + syn match perlUntilEOFStart "<<\s*\"\".*" nextgroup=perlUntilEmptyDQ skipnl transparent + syn match perlUntilEOFStart "<<\s*''.*" nextgroup=perlUntilEmptySQ skipnl transparent + syn region perlUntilEOFDQ matchgroup=perlStringStartEnd start=++ end="^EOF$" contains=@perlInterpDQ contained + syn region perlUntilEOFSQ matchgroup=perlStringStartEnd start=++ end="^EOF$" contains=@perlInterpSQ contained + syn region perlUntilEmptySQ matchgroup=perlStringStartEnd start=++ end="^$" contains=@perlInterpDQ,perlNotEmptyLine contained + syn region perlUntilEmptyDQ matchgroup=perlStringStartEnd start=++ end="^$" contains=@perlInterpSQ,perlNotEmptyLine contained + syn match perlHereIdentifier "<<EOF" + syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\(['"]\|\)\(END_\(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\(END_\(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)$+ contains=ALL +endif + + +" Class declarations +" +syn match perlPackageDecl "^\s*\<package\s\+\S\+" contains=perlStatementPackage +syn keyword perlStatementPackage package contained + +" Functions +" sub [name] [(prototype)] { +" +syn region perlFunction start="\s*\<sub\>" end="[;{]"he=e-1 contains=perlStatementSub,perlFunctionPrototype,perlFunctionPRef,perlFunctionName,perlComment +syn keyword perlStatementSub sub contained + +syn match perlFunctionPrototype "([^)]*)" contained +if exists("perl_want_scope_in_variables") + syn match perlFunctionPRef "\h\w*::" contained + syn match perlFunctionName "\h\w*[^:]" contained +else + syn match perlFunctionName "\h[[:alnum:]_:]*" contained +endif + + +" All other # are comments, except ^#! +syn match perlComment "#.*" contains=perlTodo +syn match perlSharpBang "^#!.*" + +" Formats +syn region perlFormat matchgroup=perlStatementIOFunc start="^\s*\<format\s\+\k\+\s*=\s*$"rs=s+6 end="^\s*\.\s*$" contains=perlFormatName,perlFormatField,perlVarPlain +syn match perlFormatName "format\s\+\k\+\s*="lc=7,me=e-1 contained +syn match perlFormatField "[@^][|<>~]\+\(\.\.\.\)\=" contained +syn match perlFormatField "[@^]#[#.]*" contained +syn match perlFormatField "@\*" contained +syn match perlFormatField "@[^A-Za-z_|<>~#*]"me=e-1 contained +syn match perlFormatField "@$" contained + +" __END__ and __DATA__ clauses +if exists("perl_fold") + syntax region perlDATA start="^__\(DATA\|END\)__$" skip="." end="." contains=perlPOD,@perlDATA fold +else + syntax region perlDATA start="^__\(DATA\|END\)__$" skip="." end="." contains=perlPOD,@perlDATA +endif + + +" +" Folding + +if exists("perl_fold") + syn region perlPackageFold start="^package \S\+;$" end="^1;$" end="\n\+package"me=s-1 transparent fold keepend + syn region perlSubFold start="^\z(\s*\)\<sub\>.*[^};]$" end="^\z1}\s*$" end="^\z1}\s*\#.*$" transparent fold keepend + syn region perlBEGINENDFold start="^\z(\s*\)\<\(BEGIN\|END\)\>.*[^};]$" end="^\z1}\s*$" transparent fold keepend + + if exists("perl_fold_blocks") + syn region perlIfFold start="^\z(\s*\)\(if\|unless\|for\|while\|until\)\s*(.*)\s*{\s*$" start="^\z(\s*\)foreach\s*\(\(my\|our\)\=\s*\S\+\s*\)\=(.*)\s*{\s*$" end="^\z1}\s*;\=$" transparent fold keepend + syn region perlIfFold start="^\z(\s*\)do\s*{\s*$" end="^\z1}\s*while" end="^\z1}\s*;\=$" transparent fold keepend + endif + + setlocal foldmethod=syntax + syn sync fromstart +else + " fromstart above seems to set minlines even if perl_fold is not set. + syn sync minlines=0 +endif + + +if version >= 508 || !exists("did_perl_syn_inits") + if version < 508 + let did_perl_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default highlighting. + HiLink perlSharpBang PreProc + HiLink perlControl PreProc + HiLink perlInclude Include + HiLink perlSpecial Special + HiLink perlString String + HiLink perlCharacter Character + HiLink perlNumber Number + HiLink perlFloat Float + HiLink perlType Type + HiLink perlIdentifier Identifier + HiLink perlLabel Label + HiLink perlStatement Statement + HiLink perlConditional Conditional + HiLink perlRepeat Repeat + HiLink perlOperator Operator + HiLink perlFunction Function + HiLink perlFunctionPrototype perlFunction + HiLink perlComment Comment + HiLink perlTodo Todo + if exists("perl_string_as_statement") + HiLink perlStringStartEnd perlStatement + else + HiLink perlStringStartEnd perlString + endif + HiLink perlList perlStatement + HiLink perlMisc perlStatement + HiLink perlVarPlain perlIdentifier + HiLink perlFiledescRead perlIdentifier + HiLink perlFiledescStatement perlIdentifier + HiLink perlVarSimpleMember perlIdentifier + HiLink perlVarSimpleMemberName perlString + HiLink perlVarNotInMatches perlIdentifier + HiLink perlVarSlash perlIdentifier + HiLink perlQQ perlString + if version >= 600 + HiLink perlHereDoc perlString + else + HiLink perlHereIdentifier perlStringStartEnd + HiLink perlUntilEOFDQ perlString + HiLink perlUntilEOFSQ perlString + HiLink perlUntilEmptyDQ perlString + HiLink perlUntilEmptySQ perlString + HiLink perlUntilEOF perlString + endif + HiLink perlStringUnexpanded perlString + HiLink perlSubstitutionSQ perlString + HiLink perlSubstitutionDQ perlString + HiLink perlSubstitutionSlash perlString + HiLink perlSubstitutionHash perlString + HiLink perlSubstitutionBracket perlString + HiLink perlSubstitutionCurly perlString + HiLink perlSubstitutionPling perlString + HiLink perlTranslationSlash perlString + HiLink perlTranslationHash perlString + HiLink perlTranslationBracket perlString + HiLink perlTranslationCurly perlString + HiLink perlMatch perlString + HiLink perlMatchStartEnd perlStatement + HiLink perlFormatName perlIdentifier + HiLink perlFormatField perlString + HiLink perlPackageDecl perlType + HiLink perlStorageClass perlType + HiLink perlPackageRef perlType + HiLink perlStatementPackage perlStatement + HiLink perlStatementSub perlStatement + HiLink perlStatementStorage perlStatement + HiLink perlStatementControl perlStatement + HiLink perlStatementScalar perlStatement + HiLink perlStatementRegexp perlStatement + HiLink perlStatementNumeric perlStatement + HiLink perlStatementList perlStatement + HiLink perlStatementHash perlStatement + HiLink perlStatementIOfunc perlStatement + HiLink perlStatementFiledesc perlStatement + HiLink perlStatementVector perlStatement + HiLink perlStatementFiles perlStatement + HiLink perlStatementFlow perlStatement + HiLink perlStatementScope perlStatement + HiLink perlStatementInclude perlStatement + HiLink perlStatementProc perlStatement + HiLink perlStatementSocket perlStatement + HiLink perlStatementIPC perlStatement + HiLink perlStatementNetwork perlStatement + HiLink perlStatementPword perlStatement + HiLink perlStatementTime perlStatement + HiLink perlStatementMisc perlStatement + HiLink perlStatementNew perlStatement + HiLink perlFunctionName perlIdentifier + HiLink perlMethod perlIdentifier + HiLink perlFunctionPRef perlType + HiLink perlPOD perlComment + HiLink perlShellCommand perlString + HiLink perlSpecialAscii perlSpecial + HiLink perlSpecialDollar perlSpecial + HiLink perlSpecialString perlSpecial + HiLink perlSpecialStringU perlSpecial + HiLink perlSpecialMatch perlSpecial + HiLink perlSpecialBEOM perlSpecial + HiLink perlDATA perlComment + + HiLink perlBrackets Error + + " Possible errors + HiLink perlNotEmptyLine Error + HiLink perlElseIfError Error + + delcommand HiLink +endif + +" Syncing to speed up processing +" +if !exists("perl_no_sync_on_sub") + syn sync match perlSync grouphere NONE "^\s*\<package\s" + syn sync match perlSync grouphere perlFunction "^\s*\<sub\s" + syn sync match perlSync grouphere NONE "^}" +endif + +if !exists("perl_no_sync_on_global_var") + syn sync match perlSync grouphere NONE "^$\I[[:alnum:]_:]+\s*=\s*{" + syn sync match perlSync grouphere NONE "^[@%]\I[[:alnum:]_:]+\s*=\s*(" +endif + +if exists("perl_sync_dist") + execute "syn sync maxlines=" . perl_sync_dist +else + syn sync maxlines=100 +endif + +syn sync match perlSyncPOD grouphere perlPOD "^=pod" +syn sync match perlSyncPOD grouphere perlPOD "^=head" +syn sync match perlSyncPOD grouphere perlPOD "^=item" +syn sync match perlSyncPOD grouphere NONE "^=cut" + +let b:current_syntax = "perl" + +" vim: ts=8 diff --git a/runtime/syntax/pf.vim b/runtime/syntax/pf.vim new file mode 100644 index 000000000..394cfb3e4 --- /dev/null +++ b/runtime/syntax/pf.vim @@ -0,0 +1,75 @@ +" pf syntax file +" Language: OpenBSD packet filter configuration (pf.conf) +" Maintainer: Camiel Dobbelaar <cd@sentia.nl> +" Last Change: 2003 May 27 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +setlocal foldmethod=syntax +syn sync fromstart + +syn cluster pfNotLS contains=pfComment,pfTodo,pfVarAssign +syn keyword pfCmd altq anchor antispoof binat nat pass +syn keyword pfCmd queue rdr scrub table set +syn keyword pfService auth bgp domain finger ftp http https ident +syn keyword pfService imap irc isakmp kerberos mail nameserver nfs +syn keyword pfService nntp ntp pop3 portmap pptp rpcbind rsync smtp +syn keyword pfService snmp snmptrap socks ssh sunrpc syslog telnet +syn keyword pfService tftp www +syn keyword pfTodo TODO XXX contained +syn keyword pfWildAddr all any +syn match pfCmd /block\s/ +syn match pfComment /#.*$/ contains=pfTodo +syn match pfCont /\\$/ +syn match pfErrClose /}/ +syn match pfIPv4 /\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ +syn match pfIPv6 /[a-fA-F0-9:]*::[a-fA-F0-9:.]*/ +syn match pfIPv6 /[a-fA-F0-9:]\+:[a-fA-F0-9:]\+:[a-fA-F0-9:.]\+/ +syn match pfNetmask /\/\d\+/ +syn match pfNum /[a-zA-Z0-9_:.]\@<!\d\+[a-zA-Z0-9_:.]\@!/ +syn match pfTable /<\s*[a-zA-Z][a-zA-Z0-9_]*\s*>/ +syn match pfVar /$[a-zA-Z][a-zA-Z0-9_]*/ +syn match pfVarAssign /^\s*[a-zA-Z][a-zA-Z0-9_]*\s*=/me=e-1 +syn region pfFold1 start=/^#\{1}>/ end=/^#\{1,3}>/me=s-1 transparent fold +syn region pfFold2 start=/^#\{2}>/ end=/^#\{2,3}>/me=s-1 transparent fold +syn region pfFold3 start=/^#\{3}>/ end=/^#\{3}>/me=s-1 transparent fold +syn region pfList start=/{/ end=/}/ transparent contains=ALLBUT,pfErrClose,@pfNotLS +syn region pfString start=/"/ end=/"/ transparent contains=ALLBUT,pfString,@pfNotLS +syn region pfString start=/'/ end=/'/ transparent contains=ALLBUT,pfString,@pfNotLS + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_c_syn_inits") + if version < 508 + let did_c_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink pfCmd Statement + HiLink pfComment Comment + HiLink pfCont Statement + HiLink pfErrClose Error + HiLink pfIPv4 Type + HiLink pfIPv6 Type + HiLink pfNetmask Constant + HiLink pfNum Constant + HiLink pfService Constant + HiLink pfTable Identifier + HiLink pfTodo Todo + HiLink pfVar Identifier + HiLink pfVarAssign Identifier + HiLink pfWildAddr Type + + delcommand HiLink +endif + +let b:current_syntax = "pf" diff --git a/runtime/syntax/pfmain.vim b/runtime/syntax/pfmain.vim new file mode 100644 index 000000000..0c36d7f33 --- /dev/null +++ b/runtime/syntax/pfmain.vim @@ -0,0 +1,858 @@ +" Vim syntax file +" Language: Postfix main.cf configuration +" Maintainer: KELEMEN Peter <Peter dot Kelemen at cern dot ch> +" Last Change: 2004 Jun 01 +" Version: 0.12 +" URL: http://cern.ch/fuji/vim/syntax/pfmain.vim +" Comment: Based on Postfix 2.1.1 defaults. (+TLS) + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if version >= 600 + setlocal iskeyword=@,48-57,_,- +else + set iskeyword=@,48-57,_,- +endif + +syntax case match +syntax sync minlines=1 + +syntax keyword pfmainConf 2bounce_notice_recipient +syntax keyword pfmainConf access_map_reject_code +syntax keyword pfmainConf address_verify_default_transport +syntax keyword pfmainConf address_verify_local_transport +syntax keyword pfmainConf address_verify_map +syntax keyword pfmainConf address_verify_negative_cache +syntax keyword pfmainConf address_verify_negative_expire_time +syntax keyword pfmainConf address_verify_negative_refresh_time +syntax keyword pfmainConf address_verify_poll_count +syntax keyword pfmainConf address_verify_poll_delay +syntax keyword pfmainConf address_verify_positive_expire_time +syntax keyword pfmainConf address_verify_positive_refresh_time +syntax keyword pfmainConf address_verify_relay_transport +syntax keyword pfmainConf address_verify_relayhost +syntax keyword pfmainConf address_verify_sender +syntax keyword pfmainConf address_verify_service_name +syntax keyword pfmainConf address_verify_transport_maps +syntax keyword pfmainConf address_verify_virtual_transport +syntax keyword pfmainConf alias_database +syntax keyword pfmainConf alias_maps +syntax keyword pfmainConf allow_mail_to_commands +syntax keyword pfmainConf allow_mail_to_files +syntax keyword pfmainConf allow_min_user +syntax keyword pfmainConf allow_percent_hack +syntax keyword pfmainConf allow_untrusted_routing +syntax keyword pfmainConf alternate_config_directories +syntax keyword pfmainConf always_bcc +syntax keyword pfmainConf append_at_myorigin +syntax keyword pfmainConf append_dot_mydomain +syntax keyword pfmainConf application_event_drain_time +syntax keyword pfmainConf backwards_bounce_logfile_compatibility +syntax keyword pfmainConf berkeley_db_create_buffer_size +syntax keyword pfmainConf berkeley_db_read_buffer_size +syntax keyword pfmainConf best_mx_transport +syntax keyword pfmainConf biff +syntax keyword pfmainConf body_checks +syntax keyword pfmainConf body_checks_size_limit +syntax keyword pfmainConf bounce_notice_recipient +syntax keyword pfmainConf bounce_queue_lifetime +syntax keyword pfmainConf bounce_service_name +syntax keyword pfmainConf bounce_size_limit +syntax keyword pfmainConf broken_sasl_auth_clients +syntax keyword pfmainConf canonical_maps +syntax keyword pfmainConf cleanup_service_name +syntax keyword pfmainConf command_directory +syntax keyword pfmainConf command_expansion_filter +syntax keyword pfmainConf command_time_limit +syntax keyword pfmainConf config_directory +syntax keyword pfmainConf content_filter +syntax keyword pfmainConf daemon_directory +syntax keyword pfmainConf daemon_timeout +syntax keyword pfmainConf debug_peer_level +syntax keyword pfmainConf debug_peer_list +syntax keyword pfmainConf default_database_type +syntax keyword pfmainConf default_delivery_slot_cost +syntax keyword pfmainConf default_delivery_slot_discount +syntax keyword pfmainConf default_delivery_slot_loan +syntax keyword pfmainConf default_destination_concurrency_limit +syntax keyword pfmainConf default_destination_recipient_limit +syntax keyword pfmainConf default_extra_recipient_limit +syntax keyword pfmainConf default_minimum_delivery_slots +syntax keyword pfmainConf default_privs +syntax keyword pfmainConf default_process_limit +syntax keyword pfmainConf default_rbl_reply +syntax keyword pfmainConf default_recipient_limit +syntax keyword pfmainConf default_transport +syntax keyword pfmainConf default_verp_delimiters +syntax keyword pfmainConf defer_code +syntax keyword pfmainConf defer_service_name +syntax keyword pfmainConf defer_transports +syntax keyword pfmainConf delay_notice_recipient +syntax keyword pfmainConf delay_warning_time +syntax keyword pfmainConf deliver_lock_attempts +syntax keyword pfmainConf deliver_lock_delay +syntax keyword pfmainConf disable_dns_lookups +syntax keyword pfmainConf disable_mime_input_processing +syntax keyword pfmainConf disable_mime_output_conversion +syntax keyword pfmainConf disable_verp_bounces +syntax keyword pfmainConf disable_vrfy_command +syntax keyword pfmainConf dont_remove +syntax keyword pfmainConf double_bounce_sender +syntax keyword pfmainConf duplicate_filter_limit +syntax keyword pfmainConf empty_address_recipient +syntax keyword pfmainConf enable_errors_to +syntax keyword pfmainConf enable_original_recipient +syntax keyword pfmainConf error_notice_recipient +syntax keyword pfmainConf error_service_name +syntax keyword pfmainConf expand_owner_alias +syntax keyword pfmainConf export_environment +syntax keyword pfmainConf fallback_relay +syntax keyword pfmainConf fallback_transport +syntax keyword pfmainConf fast_flush_domains +syntax keyword pfmainConf fast_flush_purge_time +syntax keyword pfmainConf fast_flush_refresh_time +syntax keyword pfmainConf fault_injection_code +syntax keyword pfmainConf flush_service_name +syntax keyword pfmainConf fork_attempts +syntax keyword pfmainConf fork_delay +syntax keyword pfmainConf forward_expansion_filter +syntax keyword pfmainConf forward_path +syntax keyword pfmainConf hash_queue_depth +syntax keyword pfmainConf hash_queue_names +syntax keyword pfmainConf header_address_token_limit +syntax keyword pfmainConf header_checks +syntax keyword pfmainConf header_size_limit +syntax keyword pfmainConf helpful_warnings +syntax keyword pfmainConf home_mailbox +syntax keyword pfmainConf hopcount_limit +syntax keyword pfmainConf html_directory +syntax keyword pfmainConf ignore_mx_lookup_error +syntax keyword pfmainConf import_environment +syntax keyword pfmainConf in_flow_delay +syntax keyword pfmainConf inet_interfaces +syntax keyword pfmainConf initial_destination_concurrency +syntax keyword pfmainConf invalid_hostname_reject_code +syntax keyword pfmainConf ipc_idle +syntax keyword pfmainConf ipc_timeout +syntax keyword pfmainConf ipc_ttl +syntax keyword pfmainConf line_length_limit +syntax keyword pfmainConf lmtp_cache_connection +syntax keyword pfmainConf lmtp_connect_timeout +syntax keyword pfmainConf lmtp_data_done_timeout +syntax keyword pfmainConf lmtp_data_init_timeout +syntax keyword pfmainConf lmtp_data_xfer_timeout +syntax keyword pfmainConf lmtp_destination_concurrency_limit +syntax keyword pfmainConf lmtp_destination_recipient_limit +syntax keyword pfmainConf lmtp_lhlo_timeout +syntax keyword pfmainConf lmtp_mail_timeout +syntax keyword pfmainConf lmtp_quit_timeout +syntax keyword pfmainConf lmtp_rcpt_timeout +syntax keyword pfmainConf lmtp_rset_timeout +syntax keyword pfmainConf lmtp_sasl_auth_enable +syntax keyword pfmainConf lmtp_sasl_password_maps +syntax keyword pfmainConf lmtp_sasl_security_options +syntax keyword pfmainConf lmtp_send_xforward_command +syntax keyword pfmainConf lmtp_skip_quit_response +syntax keyword pfmainConf lmtp_tcp_port +syntax keyword pfmainConf lmtp_xforward_timeout +syntax keyword pfmainConf local_command_shell +syntax keyword pfmainConf local_destination_concurrency_limit +syntax keyword pfmainConf local_destination_recipient_limit +syntax keyword pfmainConf local_recipient_maps +syntax keyword pfmainConf local_transport +syntax keyword pfmainConf luser_relay +syntax keyword pfmainConf mail_name +syntax keyword pfmainConf mail_owner +syntax keyword pfmainConf mail_release_date +syntax keyword pfmainConf mail_spool_directory +syntax keyword pfmainConf mail_version +syntax keyword pfmainConf mailbox_command +syntax keyword pfmainConf mailbox_command_maps +syntax keyword pfmainConf mailbox_delivery_lock +syntax keyword pfmainConf mailbox_size_limit +syntax keyword pfmainConf mailbox_transport +syntax keyword pfmainConf mailq_path +syntax keyword pfmainConf manpage_directory +syntax keyword pfmainConf maps_rbl_domains +syntax keyword pfmainConf maps_rbl_reject_code +syntax keyword pfmainConf masquerade_classes +syntax keyword pfmainConf masquerade_domains +syntax keyword pfmainConf masquerade_exceptions +syntax keyword pfmainConf max_idle +syntax keyword pfmainConf max_use +syntax keyword pfmainConf maximal_backoff_time +syntax keyword pfmainConf maximal_queue_lifetime +syntax keyword pfmainConf message_size_limit +syntax keyword pfmainConf mime_boundary_length_limit +syntax keyword pfmainConf mime_header_checks +syntax keyword pfmainConf mime_nesting_limit +syntax keyword pfmainConf minimal_backoff_time +syntax keyword pfmainConf multi_recipient_bounce_reject_code +syntax keyword pfmainConf mydestination +syntax keyword pfmainConf mydomain +syntax keyword pfmainConf myhostname +syntax keyword pfmainConf mynetworks +syntax keyword pfmainConf mynetworks_style +syntax keyword pfmainConf myorigin +syntax keyword pfmainConf nested_header_checks +syntax keyword pfmainConf newaliases_path +syntax keyword pfmainConf non_fqdn_reject_code +syntax keyword pfmainConf notify_classes +syntax keyword pfmainConf owner_request_special +syntax keyword pfmainConf parent_domain_matches_subdomains +syntax keyword pfmainConf permit_mx_backup_networks +syntax keyword pfmainConf pickup_service_name +syntax keyword pfmainConf prepend_delivered_header +syntax keyword pfmainConf process_id_directory +syntax keyword pfmainConf propagate_unmatched_extensions +syntax keyword pfmainConf proxy_interfaces +syntax keyword pfmainConf proxy_read_maps +syntax keyword pfmainConf qmgr_clog_warn_time +syntax keyword pfmainConf qmgr_fudge_factor +syntax keyword pfmainConf qmgr_message_active_limit +syntax keyword pfmainConf qmgr_message_recipient_limit +syntax keyword pfmainConf qmgr_message_recipient_minimum +syntax keyword pfmainConf qmqpd_authorized_clients +syntax keyword pfmainConf qmqpd_error_delay +syntax keyword pfmainConf qmqpd_timeout +syntax keyword pfmainConf queue_directory +syntax keyword pfmainConf queue_file_attribute_count_limit +syntax keyword pfmainConf queue_minfree +syntax keyword pfmainConf queue_run_delay +syntax keyword pfmainConf queue_service_name +syntax keyword pfmainConf rbl_reply_maps +syntax keyword pfmainConf readme_directory +syntax keyword pfmainConf receive_override_options +syntax keyword pfmainConf recipient_bcc_maps +syntax keyword pfmainConf recipient_canonical_maps +syntax keyword pfmainConf recipient_delimiter +syntax keyword pfmainConf reject_code +syntax keyword pfmainConf relay_clientcerts +syntax keyword pfmainConf relay_destination_concurrency_limit +syntax keyword pfmainConf relay_destination_recipient_limit +syntax keyword pfmainConf relay_domains +syntax keyword pfmainConf relay_domains_reject_code +syntax keyword pfmainConf relay_recipient_maps +syntax keyword pfmainConf relay_transport +syntax keyword pfmainConf relayhost +syntax keyword pfmainConf relocated_maps +syntax keyword pfmainConf require_home_directory +syntax keyword pfmainConf resolve_dequoted_address +syntax keyword pfmainConf resolve_null_domain +syntax keyword pfmainConf rewrite_service_name +syntax keyword pfmainConf sample_directory +syntax keyword pfmainConf sender_based_routing +syntax keyword pfmainConf sender_bcc_maps +syntax keyword pfmainConf sender_canonical_maps +syntax keyword pfmainConf sendmail_path +syntax keyword pfmainConf service_throttle_time +syntax keyword pfmainConf setgid_group +syntax keyword pfmainConf show_user_unknown_table_name +syntax keyword pfmainConf showq_service_name +syntax keyword pfmainConf smtp_always_send_ehlo +syntax keyword pfmainConf smtp_bind_address +syntax keyword pfmainConf smtp_connect_timeout +syntax keyword pfmainConf smtp_data_done_timeout +syntax keyword pfmainConf smtp_data_init_timeout +syntax keyword pfmainConf smtp_data_xfer_timeout +syntax keyword pfmainConf smtp_defer_if_no_mx_address_found +syntax keyword pfmainConf smtp_destination_concurrency_limit +syntax keyword pfmainConf smtp_destination_recipient_limit +syntax keyword pfmainConf smtp_enforce_tls +syntax keyword pfmainConf smtp_helo_name +syntax keyword pfmainConf smtp_helo_timeout +syntax keyword pfmainConf smtp_host_lookup +syntax keyword pfmainConf smtp_line_length_limit +syntax keyword pfmainConf smtp_mail_timeout +syntax keyword pfmainConf smtp_mx_address_limit +syntax keyword pfmainConf smtp_mx_session_limit +syntax keyword pfmainConf smtp_never_send_ehlo +syntax keyword pfmainConf smtp_pix_workaround_delay_time +syntax keyword pfmainConf smtp_pix_workaround_threshold_time +syntax keyword pfmainConf smtp_quit_timeout +syntax keyword pfmainConf smtp_quote_rfc821_envelope +syntax keyword pfmainConf smtp_randomize_addresses +syntax keyword pfmainConf smtp_rcpt_timeout +syntax keyword pfmainConf smtp_rset_timeout +syntax keyword pfmainConf smtp_sasl_auth_enable +syntax keyword pfmainConf smtp_sasl_password_maps +syntax keyword pfmainConf smtp_sasl_security_options +syntax keyword pfmainConf smtp_sasl_tls_security_options +syntax keyword pfmainConf smtp_sasl_tls_verified_security_options +syntax keyword pfmainConf smtp_send_xforward_command +syntax keyword pfmainConf smtp_skip_5xx_greeting +syntax keyword pfmainConf smtp_skip_quit_response +syntax keyword pfmainConf smtp_starttls_timeout +syntax keyword pfmainConf smtp_tls_CAfile +syntax keyword pfmainConf smtp_tls_CApath +syntax keyword pfmainConf smtp_tls_cert_file +syntax keyword pfmainConf smtp_tls_cipherlist +syntax keyword pfmainConf smtp_tls_dcert_file +syntax keyword pfmainConf smtp_tls_dkey_file +syntax keyword pfmainConf smtp_tls_enforce_peername +syntax keyword pfmainConf smtp_tls_key_file +syntax keyword pfmainConf smtp_tls_loglevel +syntax keyword pfmainConf smtp_tls_note_starttls_offer +syntax keyword pfmainConf smtp_tls_per_site +syntax keyword pfmainConf smtp_tls_scert_verifydepth +syntax keyword pfmainConf smtp_tls_session_cache_database +syntax keyword pfmainConf smtp_tls_session_cache_timeout +syntax keyword pfmainConf smtp_use_tls +syntax keyword pfmainConf smtp_xforward_timeout +syntax keyword pfmainConf smtpd_authorized_verp_clients +syntax keyword pfmainConf smtpd_authorized_xclient_hosts +syntax keyword pfmainConf smtpd_authorized_xforward_hosts +syntax keyword pfmainConf smtpd_banner +syntax keyword pfmainConf smtpd_client_connection_count_limit +syntax keyword pfmainConf smtpd_client_connection_limit_exceptions +syntax keyword pfmainConf smtpd_client_connection_rate_limit +syntax keyword pfmainConf smtpd_client_restrictions +syntax keyword pfmainConf smtpd_data_restrictions +syntax keyword pfmainConf smtpd_delay_reject +syntax keyword pfmainConf smtpd_enforce_tls +syntax keyword pfmainConf smtpd_error_sleep_time +syntax keyword pfmainConf smtpd_etrn_restrictions +syntax keyword pfmainConf smtpd_expansion_filter +syntax keyword pfmainConf smtpd_hard_error_limit +syntax keyword pfmainConf smtpd_helo_required +syntax keyword pfmainConf smtpd_helo_restrictions +syntax keyword pfmainConf smtpd_history_flush_threshold +syntax keyword pfmainConf smtpd_junk_command_limit +syntax keyword pfmainConf smtpd_noop_commands +syntax keyword pfmainConf smtpd_null_access_lookup_key +syntax keyword pfmainConf smtpd_policy_service_max_idle +syntax keyword pfmainConf smtpd_policy_service_max_ttl +syntax keyword pfmainConf smtpd_policy_service_timeout +syntax keyword pfmainConf smtpd_proxy_ehlo +syntax keyword pfmainConf smtpd_proxy_filter +syntax keyword pfmainConf smtpd_proxy_timeout +syntax keyword pfmainConf smtpd_recipient_limit +syntax keyword pfmainConf smtpd_recipient_overshoot_limit +syntax keyword pfmainConf smtpd_recipient_restrictions +syntax keyword pfmainConf smtpd_reject_unlisted_recipient +syntax keyword pfmainConf smtpd_reject_unlisted_sender +syntax keyword pfmainConf smtpd_restriction_classes +syntax keyword pfmainConf smtpd_sasl_application_name +syntax keyword pfmainConf smtpd_sasl_auth_enable +syntax keyword pfmainConf smtpd_sasl_exceptions_networks +syntax keyword pfmainConf smtpd_sasl_local_domain +syntax keyword pfmainConf smtpd_sasl_security_options +syntax keyword pfmainConf smtpd_sasl_tls_security_options +syntax keyword pfmainConf smtpd_sender_login_maps +syntax keyword pfmainConf smtpd_sender_restrictions +syntax keyword pfmainConf smtpd_soft_error_limit +syntax keyword pfmainConf smtpd_starttls_timeout +syntax keyword pfmainConf smtpd_timeout +syntax keyword pfmainConf smtpd_tls_CAfile +syntax keyword pfmainConf smtpd_tls_CApath +syntax keyword pfmainConf smtpd_tls_ask_ccert +syntax keyword pfmainConf smtpd_tls_auth_only +syntax keyword pfmainConf smtpd_tls_ccert_verifydepth +syntax keyword pfmainConf smtpd_tls_cert_file +syntax keyword pfmainConf smtpd_tls_cipherlist +syntax keyword pfmainConf smtpd_tls_dcert_file +syntax keyword pfmainConf smtpd_tls_dh1024_param_file +syntax keyword pfmainConf smtpd_tls_dh512_param_file +syntax keyword pfmainConf smtpd_tls_dkey_file +syntax keyword pfmainConf smtpd_tls_key_file +syntax keyword pfmainConf smtpd_tls_loglevel +syntax keyword pfmainConf smtpd_tls_received_header +syntax keyword pfmainConf smtpd_tls_req_ccert +syntax keyword pfmainConf smtpd_tls_session_cache_database +syntax keyword pfmainConf smtpd_tls_session_cache_timeout +syntax keyword pfmainConf smtpd_tls_wrappermode +syntax keyword pfmainConf smtpd_use_tls +syntax keyword pfmainConf soft_bounce +syntax keyword pfmainConf stale_lock_time +syntax keyword pfmainConf strict_7bit_headers +syntax keyword pfmainConf strict_8bitmime +syntax keyword pfmainConf strict_8bitmime_body +syntax keyword pfmainConf strict_mime_encoding_domain +syntax keyword pfmainConf strict_rfc821_envelopes +syntax keyword pfmainConf sun_mailtool_compatibility +syntax keyword pfmainConf swap_bangpath +syntax keyword pfmainConf syslog_facility +syntax keyword pfmainConf syslog_name +syntax keyword pfmainConf tls_daemon_random_bytes +syntax keyword pfmainConf tls_daemon_random_source +syntax keyword pfmainConf tls_random_bytes +syntax keyword pfmainConf tls_random_exchange_name +syntax keyword pfmainConf tls_random_prng_update_period +syntax keyword pfmainConf tls_random_reseed_period +syntax keyword pfmainConf tls_random_source +syntax keyword pfmainConf trace_service_name +syntax keyword pfmainConf transport_maps +syntax keyword pfmainConf transport_retry_time +syntax keyword pfmainConf trigger_timeout +syntax keyword pfmainConf undisclosed_recipients_header +syntax keyword pfmainConf unknown_address_reject_code +syntax keyword pfmainConf unknown_client_reject_code +syntax keyword pfmainConf unknown_hostname_reject_code +syntax keyword pfmainConf unknown_local_recipient_reject_code +syntax keyword pfmainConf unknown_relay_recipient_reject_code +syntax keyword pfmainConf unknown_virtual_alias_reject_code +syntax keyword pfmainConf unknown_virtual_mailbox_reject_code +syntax keyword pfmainConf unverified_recipient_reject_code +syntax keyword pfmainConf unverified_sender_reject_code +syntax keyword pfmainConf verp_delimiter_filter +syntax keyword pfmainConf virtual_alias_domains +syntax keyword pfmainConf virtual_alias_expansion_limit +syntax keyword pfmainConf virtual_alias_maps +syntax keyword pfmainConf virtual_alias_recursion_limit +syntax keyword pfmainConf virtual_destination_concurrency_limit +syntax keyword pfmainConf virtual_destination_recipient_limit +syntax keyword pfmainConf virtual_gid_maps +syntax keyword pfmainConf virtual_mailbox_base +syntax keyword pfmainConf virtual_mailbox_domains +syntax keyword pfmainConf virtual_mailbox_limit +syntax keyword pfmainConf virtual_mailbox_lock +syntax keyword pfmainConf virtual_mailbox_maps +syntax keyword pfmainConf virtual_minimum_uid +syntax keyword pfmainConf virtual_transport +syntax keyword pfmainConf virtual_uid_maps +syntax match pfmainRef "$\<2bounce_notice_recipient\>" +syntax match pfmainRef "$\<access_map_reject_code\>" +syntax match pfmainRef "$\<address_verify_default_transport\>" +syntax match pfmainRef "$\<address_verify_local_transport\>" +syntax match pfmainRef "$\<address_verify_map\>" +syntax match pfmainRef "$\<address_verify_negative_cache\>" +syntax match pfmainRef "$\<address_verify_negative_expire_time\>" +syntax match pfmainRef "$\<address_verify_negative_refresh_time\>" +syntax match pfmainRef "$\<address_verify_poll_count\>" +syntax match pfmainRef "$\<address_verify_poll_delay\>" +syntax match pfmainRef "$\<address_verify_positive_expire_time\>" +syntax match pfmainRef "$\<address_verify_positive_refresh_time\>" +syntax match pfmainRef "$\<address_verify_relay_transport\>" +syntax match pfmainRef "$\<address_verify_relayhost\>" +syntax match pfmainRef "$\<address_verify_sender\>" +syntax match pfmainRef "$\<address_verify_service_name\>" +syntax match pfmainRef "$\<address_verify_transport_maps\>" +syntax match pfmainRef "$\<address_verify_virtual_transport\>" +syntax match pfmainRef "$\<alias_database\>" +syntax match pfmainRef "$\<alias_maps\>" +syntax match pfmainRef "$\<allow_mail_to_commands\>" +syntax match pfmainRef "$\<allow_mail_to_files\>" +syntax match pfmainRef "$\<allow_min_user\>" +syntax match pfmainRef "$\<allow_percent_hack\>" +syntax match pfmainRef "$\<allow_untrusted_routing\>" +syntax match pfmainRef "$\<alternate_config_directories\>" +syntax match pfmainRef "$\<always_bcc\>" +syntax match pfmainRef "$\<append_at_myorigin\>" +syntax match pfmainRef "$\<append_dot_mydomain\>" +syntax match pfmainRef "$\<application_event_drain_time\>" +syntax match pfmainRef "$\<backwards_bounce_logfile_compatibility\>" +syntax match pfmainRef "$\<berkeley_db_create_buffer_size\>" +syntax match pfmainRef "$\<berkeley_db_read_buffer_size\>" +syntax match pfmainRef "$\<best_mx_transport\>" +syntax match pfmainRef "$\<biff\>" +syntax match pfmainRef "$\<body_checks\>" +syntax match pfmainRef "$\<body_checks_size_limit\>" +syntax match pfmainRef "$\<bounce_notice_recipient\>" +syntax match pfmainRef "$\<bounce_queue_lifetime\>" +syntax match pfmainRef "$\<bounce_service_name\>" +syntax match pfmainRef "$\<bounce_size_limit\>" +syntax match pfmainRef "$\<broken_sasl_auth_clients\>" +syntax match pfmainRef "$\<canonical_maps\>" +syntax match pfmainRef "$\<cleanup_service_name\>" +syntax match pfmainRef "$\<command_directory\>" +syntax match pfmainRef "$\<command_expansion_filter\>" +syntax match pfmainRef "$\<command_time_limit\>" +syntax match pfmainRef "$\<config_directory\>" +syntax match pfmainRef "$\<content_filter\>" +syntax match pfmainRef "$\<daemon_directory\>" +syntax match pfmainRef "$\<daemon_timeout\>" +syntax match pfmainRef "$\<debug_peer_level\>" +syntax match pfmainRef "$\<debug_peer_list\>" +syntax match pfmainRef "$\<default_database_type\>" +syntax match pfmainRef "$\<default_delivery_slot_cost\>" +syntax match pfmainRef "$\<default_delivery_slot_discount\>" +syntax match pfmainRef "$\<default_delivery_slot_loan\>" +syntax match pfmainRef "$\<default_destination_concurrency_limit\>" +syntax match pfmainRef "$\<default_destination_recipient_limit\>" +syntax match pfmainRef "$\<default_extra_recipient_limit\>" +syntax match pfmainRef "$\<default_minimum_delivery_slots\>" +syntax match pfmainRef "$\<default_privs\>" +syntax match pfmainRef "$\<default_process_limit\>" +syntax match pfmainRef "$\<default_rbl_reply\>" +syntax match pfmainRef "$\<default_recipient_limit\>" +syntax match pfmainRef "$\<default_transport\>" +syntax match pfmainRef "$\<default_verp_delimiters\>" +syntax match pfmainRef "$\<defer_code\>" +syntax match pfmainRef "$\<defer_service_name\>" +syntax match pfmainRef "$\<defer_transports\>" +syntax match pfmainRef "$\<delay_notice_recipient\>" +syntax match pfmainRef "$\<delay_warning_time\>" +syntax match pfmainRef "$\<deliver_lock_attempts\>" +syntax match pfmainRef "$\<deliver_lock_delay\>" +syntax match pfmainRef "$\<disable_dns_lookups\>" +syntax match pfmainRef "$\<disable_mime_input_processing\>" +syntax match pfmainRef "$\<disable_mime_output_conversion\>" +syntax match pfmainRef "$\<disable_verp_bounces\>" +syntax match pfmainRef "$\<disable_vrfy_command\>" +syntax match pfmainRef "$\<dont_remove\>" +syntax match pfmainRef "$\<double_bounce_sender\>" +syntax match pfmainRef "$\<duplicate_filter_limit\>" +syntax match pfmainRef "$\<empty_address_recipient\>" +syntax match pfmainRef "$\<enable_errors_to\>" +syntax match pfmainRef "$\<enable_original_recipient\>" +syntax match pfmainRef "$\<error_notice_recipient\>" +syntax match pfmainRef "$\<error_service_name\>" +syntax match pfmainRef "$\<expand_owner_alias\>" +syntax match pfmainRef "$\<export_environment\>" +syntax match pfmainRef "$\<fallback_relay\>" +syntax match pfmainRef "$\<fallback_transport\>" +syntax match pfmainRef "$\<fast_flush_domains\>" +syntax match pfmainRef "$\<fast_flush_purge_time\>" +syntax match pfmainRef "$\<fast_flush_refresh_time\>" +syntax match pfmainRef "$\<fault_injection_code\>" +syntax match pfmainRef "$\<flush_service_name\>" +syntax match pfmainRef "$\<fork_attempts\>" +syntax match pfmainRef "$\<fork_delay\>" +syntax match pfmainRef "$\<forward_expansion_filter\>" +syntax match pfmainRef "$\<forward_path\>" +syntax match pfmainRef "$\<hash_queue_depth\>" +syntax match pfmainRef "$\<hash_queue_names\>" +syntax match pfmainRef "$\<header_address_token_limit\>" +syntax match pfmainRef "$\<header_checks\>" +syntax match pfmainRef "$\<header_size_limit\>" +syntax match pfmainRef "$\<helpful_warnings\>" +syntax match pfmainRef "$\<home_mailbox\>" +syntax match pfmainRef "$\<hopcount_limit\>" +syntax match pfmainRef "$\<html_directory\>" +syntax match pfmainRef "$\<ignore_mx_lookup_error\>" +syntax match pfmainRef "$\<import_environment\>" +syntax match pfmainRef "$\<in_flow_delay\>" +syntax match pfmainRef "$\<inet_interfaces\>" +syntax match pfmainRef "$\<initial_destination_concurrency\>" +syntax match pfmainRef "$\<invalid_hostname_reject_code\>" +syntax match pfmainRef "$\<ipc_idle\>" +syntax match pfmainRef "$\<ipc_timeout\>" +syntax match pfmainRef "$\<ipc_ttl\>" +syntax match pfmainRef "$\<line_length_limit\>" +syntax match pfmainRef "$\<lmtp_cache_connection\>" +syntax match pfmainRef "$\<lmtp_connect_timeout\>" +syntax match pfmainRef "$\<lmtp_data_done_timeout\>" +syntax match pfmainRef "$\<lmtp_data_init_timeout\>" +syntax match pfmainRef "$\<lmtp_data_xfer_timeout\>" +syntax match pfmainRef "$\<lmtp_destination_concurrency_limit\>" +syntax match pfmainRef "$\<lmtp_destination_recipient_limit\>" +syntax match pfmainRef "$\<lmtp_lhlo_timeout\>" +syntax match pfmainRef "$\<lmtp_mail_timeout\>" +syntax match pfmainRef "$\<lmtp_quit_timeout\>" +syntax match pfmainRef "$\<lmtp_rcpt_timeout\>" +syntax match pfmainRef "$\<lmtp_rset_timeout\>" +syntax match pfmainRef "$\<lmtp_sasl_auth_enable\>" +syntax match pfmainRef "$\<lmtp_sasl_password_maps\>" +syntax match pfmainRef "$\<lmtp_sasl_security_options\>" +syntax match pfmainRef "$\<lmtp_send_xforward_command\>" +syntax match pfmainRef "$\<lmtp_skip_quit_response\>" +syntax match pfmainRef "$\<lmtp_tcp_port\>" +syntax match pfmainRef "$\<lmtp_xforward_timeout\>" +syntax match pfmainRef "$\<local_command_shell\>" +syntax match pfmainRef "$\<local_destination_concurrency_limit\>" +syntax match pfmainRef "$\<local_destination_recipient_limit\>" +syntax match pfmainRef "$\<local_recipient_maps\>" +syntax match pfmainRef "$\<local_transport\>" +syntax match pfmainRef "$\<luser_relay\>" +syntax match pfmainRef "$\<mail_name\>" +syntax match pfmainRef "$\<mail_owner\>" +syntax match pfmainRef "$\<mail_release_date\>" +syntax match pfmainRef "$\<mail_spool_directory\>" +syntax match pfmainRef "$\<mail_version\>" +syntax match pfmainRef "$\<mailbox_command\>" +syntax match pfmainRef "$\<mailbox_command_maps\>" +syntax match pfmainRef "$\<mailbox_delivery_lock\>" +syntax match pfmainRef "$\<mailbox_size_limit\>" +syntax match pfmainRef "$\<mailbox_transport\>" +syntax match pfmainRef "$\<mailq_path\>" +syntax match pfmainRef "$\<manpage_directory\>" +syntax match pfmainRef "$\<maps_rbl_domains\>" +syntax match pfmainRef "$\<maps_rbl_reject_code\>" +syntax match pfmainRef "$\<masquerade_classes\>" +syntax match pfmainRef "$\<masquerade_domains\>" +syntax match pfmainRef "$\<masquerade_exceptions\>" +syntax match pfmainRef "$\<max_idle\>" +syntax match pfmainRef "$\<max_use\>" +syntax match pfmainRef "$\<maximal_backoff_time\>" +syntax match pfmainRef "$\<maximal_queue_lifetime\>" +syntax match pfmainRef "$\<message_size_limit\>" +syntax match pfmainRef "$\<mime_boundary_length_limit\>" +syntax match pfmainRef "$\<mime_header_checks\>" +syntax match pfmainRef "$\<mime_nesting_limit\>" +syntax match pfmainRef "$\<minimal_backoff_time\>" +syntax match pfmainRef "$\<multi_recipient_bounce_reject_code\>" +syntax match pfmainRef "$\<mydestination\>" +syntax match pfmainRef "$\<mydomain\>" +syntax match pfmainRef "$\<myhostname\>" +syntax match pfmainRef "$\<mynetworks\>" +syntax match pfmainRef "$\<mynetworks_style\>" +syntax match pfmainRef "$\<myorigin\>" +syntax match pfmainRef "$\<nested_header_checks\>" +syntax match pfmainRef "$\<newaliases_path\>" +syntax match pfmainRef "$\<non_fqdn_reject_code\>" +syntax match pfmainRef "$\<notify_classes\>" +syntax match pfmainRef "$\<owner_request_special\>" +syntax match pfmainRef "$\<parent_domain_matches_subdomains\>" +syntax match pfmainRef "$\<permit_mx_backup_networks\>" +syntax match pfmainRef "$\<pickup_service_name\>" +syntax match pfmainRef "$\<prepend_delivered_header\>" +syntax match pfmainRef "$\<process_id_directory\>" +syntax match pfmainRef "$\<propagate_unmatched_extensions\>" +syntax match pfmainRef "$\<proxy_interfaces\>" +syntax match pfmainRef "$\<proxy_read_maps\>" +syntax match pfmainRef "$\<qmgr_clog_warn_time\>" +syntax match pfmainRef "$\<qmgr_fudge_factor\>" +syntax match pfmainRef "$\<qmgr_message_active_limit\>" +syntax match pfmainRef "$\<qmgr_message_recipient_limit\>" +syntax match pfmainRef "$\<qmgr_message_recipient_minimum\>" +syntax match pfmainRef "$\<qmqpd_authorized_clients\>" +syntax match pfmainRef "$\<qmqpd_error_delay\>" +syntax match pfmainRef "$\<qmqpd_timeout\>" +syntax match pfmainRef "$\<queue_directory\>" +syntax match pfmainRef "$\<queue_file_attribute_count_limit\>" +syntax match pfmainRef "$\<queue_minfree\>" +syntax match pfmainRef "$\<queue_run_delay\>" +syntax match pfmainRef "$\<queue_service_name\>" +syntax match pfmainRef "$\<rbl_reply_maps\>" +syntax match pfmainRef "$\<readme_directory\>" +syntax match pfmainRef "$\<receive_override_options\>" +syntax match pfmainRef "$\<recipient_bcc_maps\>" +syntax match pfmainRef "$\<recipient_canonical_maps\>" +syntax match pfmainRef "$\<recipient_delimiter\>" +syntax match pfmainRef "$\<reject_code\>" +syntax match pfmainRef "$\<relay_clientcerts\>" +syntax match pfmainRef "$\<relay_destination_concurrency_limit\>" +syntax match pfmainRef "$\<relay_destination_recipient_limit\>" +syntax match pfmainRef "$\<relay_domains\>" +syntax match pfmainRef "$\<relay_domains_reject_code\>" +syntax match pfmainRef "$\<relay_recipient_maps\>" +syntax match pfmainRef "$\<relay_transport\>" +syntax match pfmainRef "$\<relayhost\>" +syntax match pfmainRef "$\<relocated_maps\>" +syntax match pfmainRef "$\<require_home_directory\>" +syntax match pfmainRef "$\<resolve_dequoted_address\>" +syntax match pfmainRef "$\<resolve_null_domain\>" +syntax match pfmainRef "$\<rewrite_service_name\>" +syntax match pfmainRef "$\<sample_directory\>" +syntax match pfmainRef "$\<sender_based_routing\>" +syntax match pfmainRef "$\<sender_bcc_maps\>" +syntax match pfmainRef "$\<sender_canonical_maps\>" +syntax match pfmainRef "$\<sendmail_path\>" +syntax match pfmainRef "$\<service_throttle_time\>" +syntax match pfmainRef "$\<setgid_group\>" +syntax match pfmainRef "$\<show_user_unknown_table_name\>" +syntax match pfmainRef "$\<showq_service_name\>" +syntax match pfmainRef "$\<smtp_always_send_ehlo\>" +syntax match pfmainRef "$\<smtp_bind_address\>" +syntax match pfmainRef "$\<smtp_connect_timeout\>" +syntax match pfmainRef "$\<smtp_data_done_timeout\>" +syntax match pfmainRef "$\<smtp_data_init_timeout\>" +syntax match pfmainRef "$\<smtp_data_xfer_timeout\>" +syntax match pfmainRef "$\<smtp_defer_if_no_mx_address_found\>" +syntax match pfmainRef "$\<smtp_destination_concurrency_limit\>" +syntax match pfmainRef "$\<smtp_destination_recipient_limit\>" +syntax match pfmainRef "$\<smtp_enforce_tls\>" +syntax match pfmainRef "$\<smtp_helo_name\>" +syntax match pfmainRef "$\<smtp_helo_timeout\>" +syntax match pfmainRef "$\<smtp_host_lookup\>" +syntax match pfmainRef "$\<smtp_line_length_limit\>" +syntax match pfmainRef "$\<smtp_mail_timeout\>" +syntax match pfmainRef "$\<smtp_mx_address_limit\>" +syntax match pfmainRef "$\<smtp_mx_session_limit\>" +syntax match pfmainRef "$\<smtp_never_send_ehlo\>" +syntax match pfmainRef "$\<smtp_pix_workaround_delay_time\>" +syntax match pfmainRef "$\<smtp_pix_workaround_threshold_time\>" +syntax match pfmainRef "$\<smtp_quit_timeout\>" +syntax match pfmainRef "$\<smtp_quote_rfc821_envelope\>" +syntax match pfmainRef "$\<smtp_randomize_addresses\>" +syntax match pfmainRef "$\<smtp_rcpt_timeout\>" +syntax match pfmainRef "$\<smtp_rset_timeout\>" +syntax match pfmainRef "$\<smtp_sasl_auth_enable\>" +syntax match pfmainRef "$\<smtp_sasl_password_maps\>" +syntax match pfmainRef "$\<smtp_sasl_security_options\>" +syntax match pfmainRef "$\<smtp_sasl_tls_security_options\>" +syntax match pfmainRef "$\<smtp_sasl_tls_verified_security_options\>" +syntax match pfmainRef "$\<smtp_send_xforward_command\>" +syntax match pfmainRef "$\<smtp_skip_5xx_greeting\>" +syntax match pfmainRef "$\<smtp_skip_quit_response\>" +syntax match pfmainRef "$\<smtp_starttls_timeout\>" +syntax match pfmainRef "$\<smtp_tls_CAfile\>" +syntax match pfmainRef "$\<smtp_tls_CApath\>" +syntax match pfmainRef "$\<smtp_tls_cert_file\>" +syntax match pfmainRef "$\<smtp_tls_cipherlist\>" +syntax match pfmainRef "$\<smtp_tls_dcert_file\>" +syntax match pfmainRef "$\<smtp_tls_dkey_file\>" +syntax match pfmainRef "$\<smtp_tls_enforce_peername\>" +syntax match pfmainRef "$\<smtp_tls_key_file\>" +syntax match pfmainRef "$\<smtp_tls_loglevel\>" +syntax match pfmainRef "$\<smtp_tls_note_starttls_offer\>" +syntax match pfmainRef "$\<smtp_tls_per_site\>" +syntax match pfmainRef "$\<smtp_tls_scert_verifydepth\>" +syntax match pfmainRef "$\<smtp_tls_session_cache_database\>" +syntax match pfmainRef "$\<smtp_tls_session_cache_timeout\>" +syntax match pfmainRef "$\<smtp_use_tls\>" +syntax match pfmainRef "$\<smtp_xforward_timeout\>" +syntax match pfmainRef "$\<smtpd_authorized_verp_clients\>" +syntax match pfmainRef "$\<smtpd_authorized_xclient_hosts\>" +syntax match pfmainRef "$\<smtpd_authorized_xforward_hosts\>" +syntax match pfmainRef "$\<smtpd_banner\>" +syntax match pfmainRef "$\<smtpd_client_connection_count_limit\>" +syntax match pfmainRef "$\<smtpd_client_connection_limit_exceptions\>" +syntax match pfmainRef "$\<smtpd_client_connection_rate_limit\>" +syntax match pfmainRef "$\<smtpd_client_restrictions\>" +syntax match pfmainRef "$\<smtpd_data_restrictions\>" +syntax match pfmainRef "$\<smtpd_delay_reject\>" +syntax match pfmainRef "$\<smtpd_enforce_tls\>" +syntax match pfmainRef "$\<smtpd_error_sleep_time\>" +syntax match pfmainRef "$\<smtpd_etrn_restrictions\>" +syntax match pfmainRef "$\<smtpd_expansion_filter\>" +syntax match pfmainRef "$\<smtpd_hard_error_limit\>" +syntax match pfmainRef "$\<smtpd_helo_required\>" +syntax match pfmainRef "$\<smtpd_helo_restrictions\>" +syntax match pfmainRef "$\<smtpd_history_flush_threshold\>" +syntax match pfmainRef "$\<smtpd_junk_command_limit\>" +syntax match pfmainRef "$\<smtpd_noop_commands\>" +syntax match pfmainRef "$\<smtpd_null_access_lookup_key\>" +syntax match pfmainRef "$\<smtpd_policy_service_max_idle\>" +syntax match pfmainRef "$\<smtpd_policy_service_max_ttl\>" +syntax match pfmainRef "$\<smtpd_policy_service_timeout\>" +syntax match pfmainRef "$\<smtpd_proxy_ehlo\>" +syntax match pfmainRef "$\<smtpd_proxy_filter\>" +syntax match pfmainRef "$\<smtpd_proxy_timeout\>" +syntax match pfmainRef "$\<smtpd_recipient_limit\>" +syntax match pfmainRef "$\<smtpd_recipient_overshoot_limit\>" +syntax match pfmainRef "$\<smtpd_recipient_restrictions\>" +syntax match pfmainRef "$\<smtpd_reject_unlisted_recipient\>" +syntax match pfmainRef "$\<smtpd_reject_unlisted_sender\>" +syntax match pfmainRef "$\<smtpd_restriction_classes\>" +syntax match pfmainRef "$\<smtpd_sasl_application_name\>" +syntax match pfmainRef "$\<smtpd_sasl_auth_enable\>" +syntax match pfmainRef "$\<smtpd_sasl_exceptions_networks\>" +syntax match pfmainRef "$\<smtpd_sasl_local_domain\>" +syntax match pfmainRef "$\<smtpd_sasl_security_options\>" +syntax match pfmainRef "$\<smtpd_sasl_tls_security_options\>" +syntax match pfmainRef "$\<smtpd_sender_login_maps\>" +syntax match pfmainRef "$\<smtpd_sender_restrictions\>" +syntax match pfmainRef "$\<smtpd_soft_error_limit\>" +syntax match pfmainRef "$\<smtpd_starttls_timeout\>" +syntax match pfmainRef "$\<smtpd_timeout\>" +syntax match pfmainRef "$\<smtpd_tls_CAfile\>" +syntax match pfmainRef "$\<smtpd_tls_CApath\>" +syntax match pfmainRef "$\<smtpd_tls_ask_ccert\>" +syntax match pfmainRef "$\<smtpd_tls_auth_only\>" +syntax match pfmainRef "$\<smtpd_tls_ccert_verifydepth\>" +syntax match pfmainRef "$\<smtpd_tls_cert_file\>" +syntax match pfmainRef "$\<smtpd_tls_cipherlist\>" +syntax match pfmainRef "$\<smtpd_tls_dcert_file\>" +syntax match pfmainRef "$\<smtpd_tls_dh1024_param_file\>" +syntax match pfmainRef "$\<smtpd_tls_dh512_param_file\>" +syntax match pfmainRef "$\<smtpd_tls_dkey_file\>" +syntax match pfmainRef "$\<smtpd_tls_key_file\>" +syntax match pfmainRef "$\<smtpd_tls_loglevel\>" +syntax match pfmainRef "$\<smtpd_tls_received_header\>" +syntax match pfmainRef "$\<smtpd_tls_req_ccert\>" +syntax match pfmainRef "$\<smtpd_tls_session_cache_database\>" +syntax match pfmainRef "$\<smtpd_tls_session_cache_timeout\>" +syntax match pfmainRef "$\<smtpd_tls_wrappermode\>" +syntax match pfmainRef "$\<smtpd_use_tls\>" +syntax match pfmainRef "$\<soft_bounce\>" +syntax match pfmainRef "$\<stale_lock_time\>" +syntax match pfmainRef "$\<strict_7bit_headers\>" +syntax match pfmainRef "$\<strict_8bitmime\>" +syntax match pfmainRef "$\<strict_8bitmime_body\>" +syntax match pfmainRef "$\<strict_mime_encoding_domain\>" +syntax match pfmainRef "$\<strict_rfc821_envelopes\>" +syntax match pfmainRef "$\<sun_mailtool_compatibility\>" +syntax match pfmainRef "$\<swap_bangpath\>" +syntax match pfmainRef "$\<syslog_facility\>" +syntax match pfmainRef "$\<syslog_name\>" +syntax match pfmainRef "$\<tls_daemon_random_bytes\>" +syntax match pfmainRef "$\<tls_daemon_random_source\>" +syntax match pfmainRef "$\<tls_random_bytes\>" +syntax match pfmainRef "$\<tls_random_exchange_name\>" +syntax match pfmainRef "$\<tls_random_prng_update_period\>" +syntax match pfmainRef "$\<tls_random_reseed_period\>" +syntax match pfmainRef "$\<tls_random_source\>" +syntax match pfmainRef "$\<trace_service_name\>" +syntax match pfmainRef "$\<transport_maps\>" +syntax match pfmainRef "$\<transport_retry_time\>" +syntax match pfmainRef "$\<trigger_timeout\>" +syntax match pfmainRef "$\<undisclosed_recipients_header\>" +syntax match pfmainRef "$\<unknown_address_reject_code\>" +syntax match pfmainRef "$\<unknown_client_reject_code\>" +syntax match pfmainRef "$\<unknown_hostname_reject_code\>" +syntax match pfmainRef "$\<unknown_local_recipient_reject_code\>" +syntax match pfmainRef "$\<unknown_relay_recipient_reject_code\>" +syntax match pfmainRef "$\<unknown_virtual_alias_reject_code\>" +syntax match pfmainRef "$\<unknown_virtual_mailbox_reject_code\>" +syntax match pfmainRef "$\<unverified_recipient_reject_code\>" +syntax match pfmainRef "$\<unverified_sender_reject_code\>" +syntax match pfmainRef "$\<verp_delimiter_filter\>" +syntax match pfmainRef "$\<virtual_alias_domains\>" +syntax match pfmainRef "$\<virtual_alias_expansion_limit\>" +syntax match pfmainRef "$\<virtual_alias_maps\>" +syntax match pfmainRef "$\<virtual_alias_recursion_limit\>" +syntax match pfmainRef "$\<virtual_destination_concurrency_limit\>" +syntax match pfmainRef "$\<virtual_destination_recipient_limit\>" +syntax match pfmainRef "$\<virtual_gid_maps\>" +syntax match pfmainRef "$\<virtual_mailbox_base\>" +syntax match pfmainRef "$\<virtual_mailbox_domains\>" +syntax match pfmainRef "$\<virtual_mailbox_limit\>" +syntax match pfmainRef "$\<virtual_mailbox_lock\>" +syntax match pfmainRef "$\<virtual_mailbox_maps\>" +syntax match pfmainRef "$\<virtual_minimum_uid\>" +syntax match pfmainRef "$\<virtual_transport\>" +syntax match pfmainRef "$\<virtual_uid_maps\>" + +syntax keyword pfmainDictDB hash btree dbm +syntax keyword pfmainDictRE regexp pcre +syntax keyword pfmainDictEXT ldap environ nis netinfo +syntax keyword pfmainQueue active bounce corrupt defer deferred +syntax keyword pfmainQueue flush incoming saved +syntax keyword pfmainTransport smtp lmtp unix local error +syntax keyword pfmainLock fcntl flock dotlock +syntax keyword pfmainAnswer yes no + +syntax match pfmainComment "#.*$" +syntax match pfmainNumber "\<\d\+\>" +syntax match pfmainTime "\<\d\+[hmsd]\>" +syntax match pfmainIP "\<\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\>" +syntax match pfmainVariable "\$\w\+" contains=pfmainRef ",pfmainRefTLS + +if version >= 508 || !exists("pfmain_syntax_init") + if version < 508 + let pfmain_syntax_init = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink pfmainComment Comment + HiLink pfmainConf Keyword + HiLink pfmainNumber Number + HiLink pfmainTime Number + HiLink pfmainIP Number + HiLink pfmainDictDB Type + HiLink pfmainDictRE Type + HiLink pfmainDictEXT Type + HiLink pfmainQueue Constant + HiLink pfmainTransport Constant + HiLink pfmainLock Constant + HiLink pfmainAnswer Constant + HiLink pfmainRef Macro + + " HiLink pfmainConfTLS Special + " HiLink pfmainRefTLS Macro + + HiLink pfmainVariable Error + + delcommand HiLink +endif + +let b:current_syntax = "pfmain" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/php.vim b/runtime/syntax/php.vim new file mode 100644 index 000000000..b94a271de --- /dev/null +++ b/runtime/syntax/php.vim @@ -0,0 +1,513 @@ +" Vim syntax file +" Language: php PHP 3/4/5 +" Maintainer: Lutz Eymers <ixtab@polzin.com> +" URL: http://www.isp.de/data/php.vim +" Last Change: 2004 Feb 04 +" +" Options php_sql_query = 1 for SQL syntax highlighting inside strings +" php_htmlInStrings = 1 for HTML syntax highlighting inside strings +" php_baselib = 1 for highlighting baselib functions +" php_asp_tags = 1 for highlighting ASP-style short tags +" php_parent_error_close = 1 for highlighting parent error ] or ) +" php_parent_error_open = 1 for skipping an php end tag, if there exists an open ( or [ without a closing one +" php_oldStyle = 1 for using old colorstyle +" php_noShortTags = 1 don't sync <? ?> as php +" php_folding = 1 for folding classes and functions +" php_folding = 2 for folding all { } regions +" php_sync_method = x +" x=-1 to sync by search ( default ) +" x>0 to sync at least x lines backwards +" x=0 to sync from start + +" Note +" Setting php_folding=1 will match a closing } by comparing the indent +" before the class or function keyword with the indent of a matching }. +" Setting php_folding=2 will match all of pairs of {,} ( see known +" bugs ii ) + +" Known bugs +" setting php_parent_error_close on and php_parent_error_open off +" has these two leaks: +" i) An closing ) or ] inside a string match to the last open ( or [ +" before the string, when the the closing ) or ] is on the same line +" where the string started. In this case a following ) or ] after +" the string would be highlighted as an error, what is incorrect. +" ii) Same problem if you are setting php_folding = 2 with a closing +" } inside an string on the first line of this string. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'php' +endif + +if version < 600 + unlet! php_folding + if exists("php_sync_method") && !php_sync_method + let php_sync_method=-1 + endif + so <sfile>:p:h/html.vim +else + runtime syntax/html.vim + unlet b:current_syntax +endif + +" accept old options +if !exists("php_sync_method") + if exists("php_minlines") + let php_sync_method=php_minlines + else + let php_sync_method=-1 + endif +endif + +if exists("php_parentError") && !exists("php_parent_error_open") && !exists("php_parent_error_close") + let php_parent_error_close=1 + let php_parent_error_open=1 +endif + +syn cluster htmlPreproc add=phpRegion,phpRegionAsp,phpRegionSc + +if version < 600 + syn include @sqlTop <sfile>:p:h/sql.vim +else + syn include @sqlTop syntax/sql.vim +endif +syn sync clear +unlet b:current_syntax +syn cluster sqlTop remove=sqlString,sqlComment +if exists( "php_sql_query") + syn cluster phpAddStrings contains=@sqlTop +endif + +if exists( "php_htmlInStrings") + syn cluster phpAddStrings add=@htmlTop +endif + +syn case match + +" Env Variables +syn keyword phpEnvVar GATEWAY_INTERFACE SERVER_NAME SERVER_SOFTWARE SERVER_PROTOCOL REQUEST_METHOD QUERY_STRING DOCUMENT_ROOT HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ENCODING HTTP_ACCEPT_LANGUAGE HTTP_CONNECTION HTTP_HOST HTTP_REFERER HTTP_USER_AGENT REMOTE_ADDR REMOTE_PORT SCRIPT_FILENAME SERVER_ADMIN SERVER_PORT SERVER_SIGNATURE PATH_TRANSLATED SCRIPT_NAME REQUEST_URI contained + +" Internal Variables +syn keyword phpIntVar GLOBALS PHP_ERRMSG PHP_SELF HTTP_GET_VARS HTTP_POST_VARS HTTP_COOKIE_VARS HTTP_POST_FILES HTTP_ENV_VARS HTTP_SERVER_VARS HTTP_SESSION_VARS HTTP_RAW_POST_DATA HTTP_STATE_VARS _GET _POST _COOKIE _FILES _SERVER _ENV _SERVER _REQUEST _SESSION contained + +" Constants +syn keyword phpCoreConstant PHP_VERSION PHP_OS DEFAULT_INCLUDE_PATH PEAR_INSTALL_DIR PEAR_EXTENSION_DIR PHP_EXTENSION_DIR PHP_BINDIR PHP_LIBDIR PHP_DATADIR PHP_SYSCONFDIR PHP_LOCALSTATEDIR PHP_CONFIG_FILE_PATH PHP_OUTPUT_HANDLER_START PHP_OUTPUT_HANDLER_CONT PHP_OUTPUT_HANDLER_END E_ERROR E_WARNING E_PARSE E_NOTICE E_CORE_ERROR E_CORE_WARNING E_COMPILE_ERROR E_COMPILE_WARNING E_USER_ERROR E_USER_WARNING E_USER_NOTICE E_ALL contained + +syn case ignore + +syn keyword phpConstant __LINE__ __FILE__ __FUNCTION__ __METHOD__ __CLASS__ contained + + +" Function and Methods ripped from php_manual_de.tar.gz Jan 2003 +syn keyword phpFunctions apache_child_terminate apache_get_modules apache_get_version apache_getenv apache_lookup_uri apache_note apache_request_headers apache_response_headers apache_setenv ascii2ebcdic ebcdic2ascii getallheaders virtual contained +syn keyword phpFunctions array_change_key_case array_chunk array_combine array_count_values array_diff_assoc array_diff_uassoc array_diff array_fill array_filter array_flip array_intersect_assoc array_intersect array_key_exists array_keys array_map array_merge_recursive array_merge array_multisort array_pad array_pop array_push array_rand array_reduce array_reverse array_search array_shift array_slice array_splice array_sum array_udiff_assoc array_udiff_uassoc array_udiff array_unique array_unshift array_values array_walk array arsort asort compact count current each end extract in_array key krsort ksort list natcasesort natsort next pos prev range reset rsort shuffle sizeof sort uasort uksort usort contained +syn keyword phpFunctions aspell_check aspell_new aspell_suggest contained +syn keyword phpFunctions bcadd bccomp bcdiv bcmod bcmul bcpow bcpowmod bcscale bcsqrt bcsub contained +syn keyword phpFunctions bzclose bzcompress bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite contained +syn keyword phpFunctions cal_days_in_month cal_from_jd cal_info cal_to_jd easter_date easter_days frenchtojd gregoriantojd jddayofweek jdmonthname jdtofrench jdtogregorian jdtojewish jdtojulian jdtounix jewishtojd juliantojd unixtojd contained +syn keyword phpFunctions ccvs_add ccvs_auth ccvs_command ccvs_count ccvs_delete ccvs_done ccvs_init ccvs_lookup ccvs_new ccvs_report ccvs_return ccvs_reverse ccvs_sale ccvs_status ccvs_textvalue ccvs_void contained +syn keyword phpFunctions call_user_method_array call_user_method class_exists get_class_methods get_class_vars get_class get_declared_classes get_object_vars get_parent_class is_a is_subclass_of method_exists contained +syn keyword phpFunctions com VARIANT com_addref com_get com_invoke com_isenum com_load_typelib com_load com_propget com_propput com_propset com_release com_set contained +syn keyword phpFunctions cpdf_add_annotation cpdf_add_outline cpdf_arc cpdf_begin_text cpdf_circle cpdf_clip cpdf_close cpdf_closepath_fill_stroke cpdf_closepath_stroke cpdf_closepath cpdf_continue_text cpdf_curveto cpdf_end_text cpdf_fill_stroke cpdf_fill cpdf_finalize_page cpdf_finalize cpdf_global_set_document_limits cpdf_import_jpeg cpdf_lineto cpdf_moveto cpdf_newpath cpdf_open cpdf_output_buffer cpdf_page_init cpdf_place_inline_image cpdf_rect cpdf_restore cpdf_rlineto cpdf_rmoveto cpdf_rotate_text cpdf_rotate cpdf_save_to_file cpdf_save cpdf_scale cpdf_set_action_url cpdf_set_char_spacing cpdf_set_creator cpdf_set_current_page cpdf_set_font_directories cpdf_set_font_map_file cpdf_set_font cpdf_set_horiz_scaling cpdf_set_keywords cpdf_set_leading cpdf_set_page_animation cpdf_set_subject cpdf_set_text_matrix cpdf_set_text_pos cpdf_set_text_rendering cpdf_set_text_rise cpdf_set_title cpdf_set_viewer_preferences cpdf_set_word_spacing cpdf_setdash cpdf_setflat cpdf_setgray_fill cpdf_setgray_stroke cpdf_setgray cpdf_setlinecap cpdf_setlinejoin cpdf_setlinewidth cpdf_setmiterlimit cpdf_setrgbcolor_fill cpdf_setrgbcolor_stroke cpdf_setrgbcolor cpdf_show_xy cpdf_show cpdf_stringwidth cpdf_stroke cpdf_text cpdf_translate contained +syn keyword phpFunctions crack_check crack_closedict crack_getlastmessage crack_opendict contained +syn keyword phpFunctions ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_graph ctype_lower ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit contained +syn keyword phpFunctions curl_close curl_errno curl_error curl_exec curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_setopt curl_version contained +syn keyword phpFunctions cybercash_base64_decode cybercash_base64_encode cybercash_decr cybercash_encr contained +syn keyword phpFunctions cyrus_authenticate cyrus_bind cyrus_close cyrus_connect cyrus_query cyrus_unbind contained +syn keyword phpFunctions checkdate date getdate gettimeofday gmdate gmmktime gmstrftime localtime microtime mktime strftime strtotime time contained +syn keyword phpFunctions dba_close dba_delete dba_exists dba_fetch dba_firstkey dba_handlers dba_insert dba_key_split dba_list dba_nextkey dba_open dba_optimize dba_popen dba_replace dba_sync contained +syn keyword phpFunctions dbase_add_record dbase_close dbase_create dbase_delete_record dbase_get_header_info dbase_get_record_with_names dbase_get_record dbase_numfields dbase_numrecords dbase_open dbase_pack dbase_replace_record contained +syn keyword phpFunctions dblist dbmclose dbmdelete dbmexists dbmfetch dbmfirstkey dbminsert dbmnextkey dbmopen dbmreplace contained +syn keyword phpFunctions dbplus_add dbplus_aql dbplus_chdir dbplus_close dbplus_curr dbplus_errcode dbplus_errno dbplus_find dbplus_first dbplus_flush dbplus_freealllocks dbplus_freelock dbplus_freerlocks dbplus_getlock dbplus_getunique dbplus_info dbplus_last dbplus_lockrel dbplus_next dbplus_open dbplus_prev dbplus_rchperm dbplus_rcreate dbplus_rcrtexact dbplus_rcrtlike dbplus_resolve dbplus_restorepos dbplus_rkeys dbplus_ropen dbplus_rquery dbplus_rrename dbplus_rsecindex dbplus_runlink dbplus_rzap dbplus_savepos dbplus_setindex dbplus_setindexbynumber dbplus_sql dbplus_tcl dbplus_tremove dbplus_undo dbplus_undoprepare dbplus_unlockrel dbplus_unselect dbplus_update dbplus_xlockrel dbplus_xunlockrel contained +syn keyword phpFunctions dbx_close dbx_compare dbx_connect dbx_error dbx_escape_string dbx_fetch_row dbx_query dbx_sort contained +syn keyword phpFunctions dio_close dio_fcntl dio_open dio_read dio_seek dio_stat dio_tcsetattr dio_truncate dio_write contained +syn keyword phpFunctions chdir chroot dir closedir getcwd opendir readdir rewinddir scandir contained +syn keyword phpFunctions domxml_new_doc domxml_open_file domxml_open_mem domxml_version domxml_xmltree domxml_xslt_stylesheet_doc domxml_xslt_stylesheet_file domxml_xslt_stylesheet xpath_eval_expression xpath_eval xpath_new_context xptr_eval xptr_new_context contained +syn keyword phpMethods name specified value create_attribute create_cdata_section create_comment create_element_ns create_element create_entity_reference create_processing_instruction create_text_node doctype document_element dump_file dump_mem get_element_by_id get_elements_by_tagname html_dump_mem xinclude entities internal_subset name notations public_id system_id get_attribute_node get_attribute get_elements_by_tagname has_attribute remove_attribute set_attribute tagname add_namespace append_child append_sibling attributes child_nodes clone_node dump_node first_child get_content has_attributes has_child_nodes insert_before is_blank_node last_child next_sibling node_name node_type node_value owner_document parent_node prefix previous_sibling remove_child replace_child replace_node set_content set_name set_namespace unlink_node data target process result_dump_file result_dump_mem contained +syn keyword phpFunctions dotnet_load contained +syn keyword phpFunctions debug_backtrace debug_print_backtrace error_log error_reporting restore_error_handler set_error_handler trigger_error user_error contained +syn keyword phpFunctions escapeshellarg escapeshellcmd exec passthru proc_close proc_get_status proc_nice proc_open proc_terminate shell_exec system contained +syn keyword phpFunctions fam_cancel_monitor fam_close fam_monitor_collection fam_monitor_directory fam_monitor_file fam_next_event fam_open fam_pending fam_resume_monitor fam_suspend_monitor contained +syn keyword phpFunctions fbsql_affected_rows fbsql_autocommit fbsql_change_user fbsql_close fbsql_commit fbsql_connect fbsql_create_blob fbsql_create_clob fbsql_create_db fbsql_data_seek fbsql_database_password fbsql_database fbsql_db_query fbsql_db_status fbsql_drop_db fbsql_errno fbsql_error fbsql_fetch_array fbsql_fetch_assoc fbsql_fetch_field fbsql_fetch_lengths fbsql_fetch_object fbsql_fetch_row fbsql_field_flags fbsql_field_len fbsql_field_name fbsql_field_seek fbsql_field_table fbsql_field_type fbsql_free_result fbsql_get_autostart_info fbsql_hostname fbsql_insert_id fbsql_list_dbs fbsql_list_fields fbsql_list_tables fbsql_next_result fbsql_num_fields fbsql_num_rows fbsql_password fbsql_pconnect fbsql_query fbsql_read_blob fbsql_read_clob fbsql_result fbsql_rollback fbsql_select_db fbsql_set_lob_mode fbsql_set_transaction fbsql_start_db fbsql_stop_db fbsql_tablename fbsql_username fbsql_warnings contained +syn keyword phpFunctions fdf_add_doc_javascript fdf_add_template fdf_close fdf_create fdf_enum_values fdf_errno fdf_error fdf_get_ap fdf_get_attachment fdf_get_encoding fdf_get_file fdf_get_flags fdf_get_opt fdf_get_status fdf_get_value fdf_get_version fdf_header fdf_next_field_name fdf_open_string fdf_open fdf_remove_item fdf_save_string fdf_save fdf_set_ap fdf_set_encoding fdf_set_file fdf_set_flags fdf_set_javascript_action fdf_set_opt fdf_set_status fdf_set_submit_form_action fdf_set_target_frame fdf_set_value fdf_set_version contained +syn keyword phpFunctions filepro_fieldcount filepro_fieldname filepro_fieldtype filepro_fieldwidth filepro_retrieve filepro_rowcount filepro contained +syn keyword phpFunctions basename chgrp chmod chown clearstatcache copy delete dirname disk_free_space disk_total_space diskfreespace fclose feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents file fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype flock fnmatch fopen fpassthru fputs fread fscanf fseek fstat ftell ftruncate fwrite glob is_dir is_executable is_file is_link is_readable is_uploaded_file is_writable is_writeable link linkinfo lstat mkdir move_uploaded_file parse_ini_file pathinfo pclose popen readfile readlink realpath rename rewind rmdir set_file_buffer stat symlink tempnam tmpfile touch umask unlink contained +syn keyword phpFunctions fribidi_log2vis contained +syn keyword phpFunctions ftp_alloc ftp_cdup ftp_chdir ftp_chmod ftp_close ftp_connect ftp_delete ftp_exec ftp_fget ftp_fput ftp_get_option ftp_get ftp_login ftp_mdtm ftp_mkdir ftp_nb_continue ftp_nb_fget ftp_nb_fput ftp_nb_get ftp_nb_put ftp_nlist ftp_pasv ftp_put ftp_pwd ftp_quit ftp_raw ftp_rawlist ftp_rename ftp_rmdir ftp_set_option ftp_site ftp_size ftp_ssl_connect ftp_systype contained +syn keyword phpFunctions call_user_func_array call_user_func create_function func_get_arg func_get_args func_num_args function_exists get_defined_functions register_shutdown_function register_tick_function unregister_tick_function contained +syn keyword phpFunctions bind_textdomain_codeset bindtextdomain dcgettext dcngettext dgettext dngettext gettext ngettext textdomain contained +syn keyword phpFunctions gmp_abs gmp_add gmp_and gmp_clrbit gmp_cmp gmp_com gmp_div_q gmp_div_qr gmp_div_r gmp_div gmp_divexact gmp_fact gmp_gcd gmp_gcdext gmp_hamdist gmp_init gmp_intval gmp_invert gmp_jacobi gmp_legendre gmp_mod gmp_mul gmp_neg gmp_or gmp_perfect_square gmp_popcount gmp_pow gmp_powm gmp_prob_prime gmp_random gmp_scan0 gmp_scan1 gmp_setbit gmp_sign gmp_sqrt gmp_sqrtrem gmp_sqrtrm gmp_strval gmp_sub gmp_xor contained +syn keyword phpFunctions header headers_list headers_sent setcookie contained +syn keyword phpFunctions hw_api_attribute hwapi_hgcsp hw_api_content hw_api_object contained +syn keyword phpMethods key langdepvalue value values checkin checkout children mimetype read content copy dbstat dcstat dstanchors dstofsrcanchors count reason find ftstat hwstat identify info insert insertanchor insertcollection insertdocument link lock move assign attreditable count insert remove title value object objectbyanchor parents description type remove replace setcommitedversion srcanchors srcsofdst unlock user userlist contained +syn keyword phpFunctions hw_Array2Objrec hw_changeobject hw_Children hw_ChildrenObj hw_Close hw_Connect hw_connection_info hw_cp hw_Deleteobject hw_DocByAnchor hw_DocByAnchorObj hw_Document_Attributes hw_Document_BodyTag hw_Document_Content hw_Document_SetContent hw_Document_Size hw_dummy hw_EditText hw_Error hw_ErrorMsg hw_Free_Document hw_GetAnchors hw_GetAnchorsObj hw_GetAndLock hw_GetChildColl hw_GetChildCollObj hw_GetChildDocColl hw_GetChildDocCollObj hw_GetObject hw_GetObjectByQuery hw_GetObjectByQueryColl hw_GetObjectByQueryCollObj hw_GetObjectByQueryObj hw_GetParents hw_GetParentsObj hw_getrellink hw_GetRemote hw_getremotechildren hw_GetSrcByDestObj hw_GetText hw_getusername hw_Identify hw_InCollections hw_Info hw_InsColl hw_InsDoc hw_insertanchors hw_InsertDocument hw_InsertObject hw_mapid hw_Modifyobject hw_mv hw_New_Document hw_objrec2array hw_Output_Document hw_pConnect hw_PipeDocument hw_Root hw_setlinkroot hw_stat hw_Unlock hw_Who contained +syn keyword phpFunctions ibase_add_user ibase_affected_rows ibase_blob_add ibase_blob_cancel ibase_blob_close ibase_blob_create ibase_blob_echo ibase_blob_get ibase_blob_import ibase_blob_info ibase_blob_open ibase_close ibase_commit_ret ibase_commit ibase_connect ibase_delete_user ibase_drop_db ibase_errcode ibase_errmsg ibase_execute ibase_fetch_assoc ibase_fetch_object ibase_fetch_row ibase_field_info ibase_free_event_handler ibase_free_query ibase_free_result ibase_gen_id ibase_modify_user ibase_name_result ibase_num_fields ibase_num_params ibase_param_info ibase_pconnect ibase_prepare ibase_query ibase_rollback_ret ibase_rollback ibase_set_event_handler ibase_timefmt ibase_trans ibase_wait_event contained +syn keyword phpFunctions iconv_get_encoding iconv_mime_decode_headers iconv_mime_decode iconv_mime_encode iconv_set_encoding iconv_strlen iconv_strpos iconv_strrpos iconv_substr iconv ob_iconv_handler contained +syn keyword phpFunctions ifx_affected_rows ifx_blobinfile_mode ifx_byteasvarchar ifx_close ifx_connect ifx_copy_blob ifx_create_blob ifx_create_char ifx_do ifx_error ifx_errormsg ifx_fetch_row ifx_fieldproperties ifx_fieldtypes ifx_free_blob ifx_free_char ifx_free_result ifx_get_blob ifx_get_char ifx_getsqlca ifx_htmltbl_result ifx_nullformat ifx_num_fields ifx_num_rows ifx_pconnect ifx_prepare ifx_query ifx_textasvarchar ifx_update_blob ifx_update_char ifxus_close_slob ifxus_create_slob ifxus_free_slob ifxus_open_slob ifxus_read_slob ifxus_seek_slob ifxus_tell_slob ifxus_write_slob contained +syn keyword phpFunctions exif_imagetype exif_read_data exif_thumbnail gd_info getimagesize image_type_to_mime_type image2wbmp imagealphablending imageantialias imagearc imagechar imagecharup imagecolorallocate imagecolorallocatealpha imagecolorat imagecolorclosest imagecolorclosestalpha imagecolorclosesthwb imagecolordeallocate imagecolorexact imagecolorexactalpha imagecolormatch imagecolorresolve imagecolorresolvealpha imagecolorset imagecolorsforindex imagecolorstotal imagecolortransparent imagecopy imagecopymerge imagecopymergegray imagecopyresampled imagecopyresized imagecreate imagecreatefromgd2 imagecreatefromgd2part imagecreatefromgd imagecreatefromgif imagecreatefromjpeg imagecreatefrompng imagecreatefromstring imagecreatefromwbmp imagecreatefromxbm imagecreatefromxpm imagecreatetruecolor imagedashedline imagedestroy imageellipse imagefill imagefilledarc imagefilledellipse imagefilledpolygon imagefilledrectangle imagefilltoborder imagefontheight imagefontwidth imageftbbox imagefttext imagegammacorrect imagegd2 imagegd imagegif imageinterlace imageistruecolor imagejpeg imageline imageloadfont imagepalettecopy imagepng imagepolygon imagepsbbox imagepscopyfont imagepsencodefont imagepsextendfont imagepsfreefont imagepsloadfont imagepsslantfont imagepstext imagerectangle imagerotate imagesavealpha imagesetbrush imagesetpixel imagesetstyle imagesetthickness imagesettile imagestring imagestringup imagesx imagesy imagetruecolortopalette imagettfbbox imagettftext imagetypes imagewbmp iptcembed iptcparse jpeg2wbmp png2wbmp read_exif_data contained +syn keyword phpFunctions imap_8bit imap_alerts imap_append imap_base64 imap_binary imap_body imap_bodystruct imap_check imap_clearflag_full imap_close imap_createmailbox imap_delete imap_deletemailbox imap_errors imap_expunge imap_fetch_overview imap_fetchbody imap_fetchheader imap_fetchstructure imap_get_quota imap_get_quotaroot imap_getacl imap_getmailboxes imap_getsubscribed imap_header imap_headerinfo imap_headers imap_last_error imap_list imap_listmailbox imap_listscan imap_listsubscribed imap_lsub imap_mail_compose imap_mail_copy imap_mail_move imap_mail imap_mailboxmsginfo imap_mime_header_decode imap_msgno imap_num_msg imap_num_recent imap_open imap_ping imap_qprint imap_renamemailbox imap_reopen imap_rfc822_parse_adrlist imap_rfc822_parse_headers imap_rfc822_write_address imap_scanmailbox imap_search imap_set_quota imap_setacl imap_setflag_full imap_sort imap_status imap_subscribe imap_thread imap_timeout imap_uid imap_undelete imap_unsubscribe imap_utf7_decode imap_utf7_encode imap_utf8 contained +syn keyword phpFunctions assert_options assert dl extension_loaded get_cfg_var get_current_user get_defined_constants get_extension_funcs get_include_path get_included_files get_loaded_extensions get_magic_quotes_gpc get_magic_quotes_runtime get_required_files getenv getlastmod getmygid getmyinode getmypid getmyuid getopt getrusage ini_alter ini_get_all ini_get ini_restore ini_set main memory_get_usage php_ini_scanned_files php_logo_guid php_sapi_name php_uname phpcredits phpinfo phpversion putenv restore_include_path set_include_path set_magic_quotes_runtime set_time_limit version_compare zend_logo_guid zend_version contained +syn keyword phpFunctions ingres_autocommit ingres_close ingres_commit ingres_connect ingres_fetch_array ingres_fetch_object ingres_fetch_row ingres_field_length ingres_field_name ingres_field_nullable ingres_field_precision ingres_field_scale ingres_field_type ingres_num_fields ingres_num_rows ingres_pconnect ingres_query ingres_rollback contained +syn keyword phpFunctions ircg_channel_mode ircg_disconnect ircg_fetch_error_msg ircg_get_username ircg_html_encode ircg_ignore_add ircg_ignore_del ircg_is_conn_alive ircg_join ircg_kick ircg_lookup_format_messages ircg_msg ircg_nick ircg_nickname_escape ircg_nickname_unescape ircg_notice ircg_part ircg_pconnect ircg_register_format_messages ircg_set_current ircg_set_file ircg_set_on_die ircg_topic ircg_whois contained +syn keyword phpFunctions java_last_exception_clear java_last_exception_get contained +syn keyword phpFunctions ldap_8859_to_t61 ldap_add ldap_bind ldap_close ldap_compare ldap_connect ldap_count_entries ldap_delete ldap_dn2ufn ldap_err2str ldap_errno ldap_error ldap_explode_dn ldap_first_attribute ldap_first_entry ldap_first_reference ldap_free_result ldap_get_attributes ldap_get_dn ldap_get_entries ldap_get_option ldap_get_values_len ldap_get_values ldap_list ldap_mod_add ldap_mod_del ldap_mod_replace ldap_modify ldap_next_attribute ldap_next_entry ldap_next_reference ldap_parse_reference ldap_parse_result ldap_read ldap_rename ldap_search ldap_set_option ldap_set_rebind_proc ldap_sort ldap_start_tls ldap_t61_to_8859 ldap_unbind contained +syn keyword phpFunctions lzf_compress lzf_decompress lzf_optimized_for contained +syn keyword phpFunctions ezmlm_hash mail contained +syn keyword phpFunctions mailparse_determine_best_xfer_encoding mailparse_msg_create mailparse_msg_extract_part_file mailparse_msg_extract_part mailparse_msg_free mailparse_msg_get_part_data mailparse_msg_get_part mailparse_msg_get_structure mailparse_msg_parse_file mailparse_msg_parse mailparse_rfc822_parse_addresses mailparse_stream_encode mailparse_uudecode_all contained +syn keyword phpFunctions abs acos acosh asin asinh atan2 atan atanh base_convert bindec ceil cos cosh decbin dechex decoct deg2rad exp expm1 floor fmod getrandmax hexdec hypot is_finite is_infinite is_nan lcg_value log10 log1p log max min mt_getrandmax mt_rand mt_srand octdec pi pow rad2deg rand round sin sinh sqrt srand tan tanh contained +syn keyword phpFunctions mb_convert_case mb_convert_encoding mb_convert_kana mb_convert_variables mb_decode_mimeheader mb_decode_numericentity mb_detect_encoding mb_detect_order mb_encode_mimeheader mb_encode_numericentity mb_ereg_match mb_ereg_replace mb_ereg_search_getpos mb_ereg_search_getregs mb_ereg_search_init mb_ereg_search_pos mb_ereg_search_regs mb_ereg_search_setpos mb_ereg_search mb_ereg mb_eregi_replace mb_eregi mb_get_info mb_http_input mb_http_output mb_internal_encoding mb_language mb_output_handler mb_parse_str mb_preferred_mime_name mb_regex_encoding mb_regex_set_options mb_send_mail mb_split mb_strcut mb_strimwidth mb_strlen mb_strpos mb_strrpos mb_strtolower mb_strtoupper mb_strwidth mb_substitute_character mb_substr_count mb_substr contained +syn keyword phpFunctions mcal_append_event mcal_close mcal_create_calendar mcal_date_compare mcal_date_valid mcal_day_of_week mcal_day_of_year mcal_days_in_month mcal_delete_calendar mcal_delete_event mcal_event_add_attribute mcal_event_init mcal_event_set_alarm mcal_event_set_category mcal_event_set_class mcal_event_set_description mcal_event_set_end mcal_event_set_recur_daily mcal_event_set_recur_monthly_mday mcal_event_set_recur_monthly_wday mcal_event_set_recur_none mcal_event_set_recur_weekly mcal_event_set_recur_yearly mcal_event_set_start mcal_event_set_title mcal_expunge mcal_fetch_current_stream_event mcal_fetch_event mcal_is_leap_year mcal_list_alarms mcal_list_events mcal_next_recurrence mcal_open mcal_popen mcal_rename_calendar mcal_reopen mcal_snooze mcal_store_event mcal_time_valid mcal_week_of_year contained +syn keyword phpFunctions mcrypt_cbc mcrypt_cfb mcrypt_create_iv mcrypt_decrypt mcrypt_ecb mcrypt_enc_get_algorithms_name mcrypt_enc_get_block_size mcrypt_enc_get_iv_size mcrypt_enc_get_key_size mcrypt_enc_get_modes_name mcrypt_enc_get_supported_key_sizes mcrypt_enc_is_block_algorithm_mode mcrypt_enc_is_block_algorithm mcrypt_enc_is_block_mode mcrypt_enc_self_test mcrypt_encrypt mcrypt_generic_deinit mcrypt_generic_end mcrypt_generic_init mcrypt_generic mcrypt_get_block_size mcrypt_get_cipher_name mcrypt_get_iv_size mcrypt_get_key_size mcrypt_list_algorithms mcrypt_list_modes mcrypt_module_close mcrypt_module_get_algo_block_size mcrypt_module_get_algo_key_size mcrypt_module_get_supported_key_sizes mcrypt_module_is_block_algorithm_mode mcrypt_module_is_block_algorithm mcrypt_module_is_block_mode mcrypt_module_open mcrypt_module_self_test mcrypt_ofb mdecrypt_generic contained +syn keyword phpFunctions mcve_adduser mcve_adduserarg mcve_bt mcve_checkstatus mcve_chkpwd mcve_chngpwd mcve_completeauthorizations mcve_connect mcve_connectionerror mcve_deleteresponse mcve_deletetrans mcve_deleteusersetup mcve_deluser mcve_destroyconn mcve_destroyengine mcve_disableuser mcve_edituser mcve_enableuser mcve_force mcve_getcell mcve_getcellbynum mcve_getcommadelimited mcve_getheader mcve_getuserarg mcve_getuserparam mcve_gft mcve_gl mcve_gut mcve_initconn mcve_initengine mcve_initusersetup mcve_iscommadelimited mcve_liststats mcve_listusers mcve_maxconntimeout mcve_monitor mcve_numcolumns mcve_numrows mcve_override mcve_parsecommadelimited mcve_ping mcve_preauth mcve_preauthcompletion mcve_qc mcve_responseparam mcve_return mcve_returncode mcve_returnstatus mcve_sale mcve_setblocking mcve_setdropfile mcve_setip mcve_setssl_files mcve_setssl mcve_settimeout mcve_settle mcve_text_avs mcve_text_code mcve_text_cv mcve_transactionauth mcve_transactionavs mcve_transactionbatch mcve_transactioncv mcve_transactionid mcve_transactionitem mcve_transactionssent mcve_transactiontext mcve_transinqueue mcve_transnew mcve_transparam mcve_transsend mcve_ub mcve_uwait mcve_verifyconnection mcve_verifysslcert mcve_void contained +syn keyword phpFunctions mhash_count mhash_get_block_size mhash_get_hash_name mhash_keygen_s2k mhash contained +syn keyword phpFunctions mime_content_type contained +syn keyword phpFunctions ming_setcubicthreshold ming_setscale ming_useswfversion SWFAction SWFBitmap swfbutton_keypress SWFbutton SWFDisplayItem SWFFill SWFFont SWFGradient SWFMorph SWFMovie SWFShape SWFSprite SWFText SWFTextField contained +syn keyword phpMethods getHeight getWidth addAction addShape setAction setdown setHit setOver setUp addColor move moveTo multColor remove Rotate rotateTo scale scaleTo setDepth setName setRatio skewX skewXTo skewY skewYTo moveTo rotateTo scaleTo skewXTo skewYTo getwidth addEntry getshape1 getshape2 add nextframe output remove save setbackground setdimension setframes setrate streammp3 addFill drawCurve drawCurveTo drawLine drawLineTo movePen movePenTo setLeftFill setLine setRightFill add nextframe remove setframes addString getWidth moveTo setColor setFont setHeight setSpacing addstring align setbounds setcolor setFont setHeight setindentation setLeftMargin setLineSpacing setMargins setname setrightMargin contained +syn keyword phpFunctions connection_aborted connection_status connection_timeout constant define defined die eval exit get_browser highlight_file highlight_string ignore_user_abort pack show_source sleep uniqid unpack usleep contained +syn keyword phpFunctions udm_add_search_limit udm_alloc_agent udm_api_version udm_cat_list udm_cat_path udm_check_charset udm_check_stored udm_clear_search_limits udm_close_stored udm_crc32 udm_errno udm_error udm_find udm_free_agent udm_free_ispell_data udm_free_res udm_get_doc_count udm_get_res_field udm_get_res_param udm_load_ispell_data udm_open_stored udm_set_agent_param contained +syn keyword phpFunctions msession_connect msession_count msession_create msession_destroy msession_disconnect msession_find msession_get_array msession_get msession_getdata msession_inc msession_list msession_listvar msession_lock msession_plugin msession_randstr msession_set_array msession_set msession_setdata msession_timeout msession_uniq msession_unlock contained +syn keyword phpFunctions msql_affected_rows msql_close msql_connect msql_create_db msql_createdb msql_data_seek msql_dbname msql_drop_db msql_dropdb msql_error msql_fetch_array msql_fetch_field msql_fetch_object msql_fetch_row msql_field_seek msql_fieldflags msql_fieldlen msql_fieldname msql_fieldtable msql_fieldtype msql_free_result msql_freeresult msql_list_dbs msql_list_fields msql_list_tables msql_listdbs msql_listfields msql_listtables msql_num_fields msql_num_rows msql_numfields msql_numrows msql_pconnect msql_query msql_regcase msql_result msql_select_db msql_selectdb msql_tablename msql contained +syn keyword phpFunctions mssql_bind mssql_close mssql_connect mssql_data_seek mssql_execute mssql_fetch_array mssql_fetch_assoc mssql_fetch_batch mssql_fetch_field mssql_fetch_object mssql_fetch_row mssql_field_length mssql_field_name mssql_field_seek mssql_field_type mssql_free_result mssql_free_statement mssql_get_last_message mssql_guid_string mssql_init mssql_min_error_severity mssql_min_message_severity mssql_next_result mssql_num_fields mssql_num_rows mssql_pconnect mssql_query mssql_result mssql_rows_affected mssql_select_db contained +syn keyword phpFunctions muscat_close muscat_get muscat_give muscat_setup_net muscat_setup contained +syn keyword phpFunctions mysql_affected_rows mysql_change_user mysql_client_encoding mysql_close mysql_connect mysql_create_db mysql_data_seek mysql_db_name mysql_db_query mysql_drop_db mysql_errno mysql_error mysql_escape_string mysql_fetch_array mysql_fetch_assoc mysql_fetch_field mysql_fetch_lengths mysql_fetch_object mysql_fetch_row mysql_field_flags mysql_field_len mysql_field_name mysql_field_seek mysql_field_table mysql_field_type mysql_free_result mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql_insert_id mysql_list_dbs mysql_list_fields mysql_list_processes mysql_list_tables mysql_num_fields mysql_num_rows mysql_pconnect mysql_ping mysql_query mysql_real_escape_string mysql_result mysql_select_db mysql_stat mysql_tablename mysql_thread_id mysql_unbuffered_query contained +syn keyword phpFunctions mysqli_affected_rows mysqli_autocommit mysqli_bind_param mysqli_bind_result mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect mysqli_data_seek mysqli_debug mysqli_disable_reads_from_master mysqli_disable_rpl_parse mysqli_dump_debug_info mysqli_enable_reads_from_master mysqli_enable_rpl_parse mysqli_errno mysqli_error mysqli_execute mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_fetch mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_client_info mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_master_query mysqli_num_fields mysqli_num_rows mysqli_options mysqli_param_count mysqli_ping mysqli_prepare_result mysqli_prepare mysqli_profiler mysqli_query mysqli_read_query_result mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reload mysqli_rollback mysqli_rpl_parse_enabled mysqli_rpl_probe mysqli_rpl_query_type mysqli_select_db mysqli_send_long_data mysqli_send_query mysqli_slave_query mysqli_ssl_set mysqli_stat mysqli_stmt_affected_rows mysqli_stmt_close mysqli_stmt_errno mysqli_stmt_error mysqli_stmt_store_result mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count contained +syn keyword phpFunctions ncurses_addch ncurses_addchnstr ncurses_addchstr ncurses_addnstr ncurses_addstr ncurses_assume_default_colors ncurses_attroff ncurses_attron ncurses_attrset ncurses_baudrate ncurses_beep ncurses_bkgd ncurses_bkgdset ncurses_border ncurses_bottom_panel ncurses_can_change_color ncurses_cbreak ncurses_clear ncurses_clrtobot ncurses_clrtoeol ncurses_color_content ncurses_color_set ncurses_curs_set ncurses_def_prog_mode ncurses_def_shell_mode ncurses_define_key ncurses_del_panel ncurses_delay_output ncurses_delch ncurses_deleteln ncurses_delwin ncurses_doupdate ncurses_echo ncurses_echochar ncurses_end ncurses_erase ncurses_erasechar ncurses_filter ncurses_flash ncurses_flushinp ncurses_getch ncurses_getmaxyx ncurses_getmouse ncurses_getyx ncurses_halfdelay ncurses_has_colors ncurses_has_ic ncurses_has_il ncurses_has_key ncurses_hide_panel ncurses_hline ncurses_inch ncurses_init_color ncurses_init_pair ncurses_init ncurses_insch ncurses_insdelln ncurses_insertln ncurses_insstr ncurses_instr ncurses_isendwin ncurses_keyok ncurses_keypad ncurses_killchar ncurses_longname ncurses_meta ncurses_mouse_trafo ncurses_mouseinterval ncurses_mousemask ncurses_move_panel ncurses_move ncurses_mvaddch ncurses_mvaddchnstr ncurses_mvaddchstr ncurses_mvaddnstr ncurses_mvaddstr ncurses_mvcur ncurses_mvdelch ncurses_mvgetch ncurses_mvhline ncurses_mvinch ncurses_mvvline ncurses_mvwaddstr ncurses_napms ncurses_new_panel ncurses_newpad ncurses_newwin ncurses_nl ncurses_nocbreak ncurses_noecho ncurses_nonl ncurses_noqiflush ncurses_noraw ncurses_pair_content ncurses_panel_above ncurses_panel_below ncurses_panel_window ncurses_pnoutrefresh ncurses_prefresh ncurses_putp ncurses_qiflush ncurses_raw ncurses_refresh ncurses_replace_panel ncurses_reset_prog_mode ncurses_reset_shell_mode ncurses_resetty ncurses_savetty ncurses_scr_dump ncurses_scr_init ncurses_scr_restore ncurses_scr_set ncurses_scrl ncurses_show_panel ncurses_slk_attr ncurses_slk_attroff ncurses_slk_attron ncurses_slk_attrset ncurses_slk_clear ncurses_slk_color ncurses_slk_init ncurses_slk_noutrefresh ncurses_slk_refresh ncurses_slk_restore ncurses_slk_set ncurses_slk_touch ncurses_standend ncurses_standout ncurses_start_color ncurses_termattrs ncurses_termname ncurses_timeout ncurses_top_panel ncurses_typeahead ncurses_ungetch ncurses_ungetmouse ncurses_update_panels ncurses_use_default_colors ncurses_use_env ncurses_use_extended_names ncurses_vidattr ncurses_vline ncurses_waddch ncurses_waddstr ncurses_wattroff ncurses_wattron ncurses_wattrset ncurses_wborder ncurses_wclear ncurses_wcolor_set ncurses_werase ncurses_wgetch ncurses_whline ncurses_wmouse_trafo ncurses_wmove ncurses_wnoutrefresh ncurses_wrefresh ncurses_wstandend ncurses_wstandout ncurses_wvline contained +syn keyword phpFunctions checkdnsrr closelog debugger_off debugger_on define_syslog_variables dns_check_record dns_get_mx dns_get_record fsockopen gethostbyaddr gethostbyname gethostbynamel getmxrr getprotobyname getprotobynumber getservbyname getservbyport ip2long long2ip openlog pfsockopen socket_get_status socket_set_blocking socket_set_timeout syslog contained +syn keyword phpFunctions yp_all yp_cat yp_err_string yp_errno yp_first yp_get_default_domain yp_master yp_match yp_next yp_order contained +syn keyword phpFunctions notes_body notes_copy_db notes_create_db notes_create_note notes_drop_db notes_find_note notes_header_info notes_list_msgs notes_mark_read notes_mark_unread notes_nav_create notes_search notes_unread notes_version contained +syn keyword phpFunctions nsapi_request_headers nsapi_response_headers nsapi_virtual contained +syn keyword phpFunctions aggregate_info aggregate_methods_by_list aggregate_methods_by_regexp aggregate_methods aggregate_properties_by_list aggregate_properties_by_regexp aggregate_properties aggregate aggregation_info deaggregate contained +syn keyword phpFunctions ocibindbyname ocicancel ocicloselob ocicollappend ocicollassign ocicollassignelem ocicollgetelem ocicollmax ocicollsize ocicolltrim ocicolumnisnull ocicolumnname ocicolumnprecision ocicolumnscale ocicolumnsize ocicolumntype ocicolumntyperaw ocicommit ocidefinebyname ocierror ociexecute ocifetch ocifetchinto ocifetchstatement ocifreecollection ocifreecursor ocifreedesc ocifreestatement ociinternaldebug ociloadlob ocilogoff ocilogon ocinewcollection ocinewcursor ocinewdescriptor ocinlogon ocinumcols ociparse ociplogon ociresult ocirollback ocirowcount ocisavelob ocisavelobfile ociserverversion ocisetprefetch ocistatementtype ociwritelobtofile ociwritetemporarylob contained +syn keyword phpFunctions odbc_autocommit odbc_binmode odbc_close_all odbc_close odbc_columnprivileges odbc_columns odbc_commit odbc_connect odbc_cursor odbc_data_source odbc_do odbc_error odbc_errormsg odbc_exec odbc_execute odbc_fetch_array odbc_fetch_into odbc_fetch_object odbc_fetch_row odbc_field_len odbc_field_name odbc_field_num odbc_field_precision odbc_field_scale odbc_field_type odbc_foreignkeys odbc_free_result odbc_gettypeinfo odbc_longreadlen odbc_next_result odbc_num_fields odbc_num_rows odbc_pconnect odbc_prepare odbc_primarykeys odbc_procedurecolumns odbc_procedures odbc_result_all odbc_result odbc_rollback odbc_setoption odbc_specialcolumns odbc_statistics odbc_tableprivileges odbc_tables contained +syn keyword phpFunctions openssl_csr_export_to_file openssl_csr_export openssl_csr_new openssl_csr_sign openssl_error_string openssl_free_key openssl_get_privatekey openssl_get_publickey openssl_open openssl_pkcs7_decrypt openssl_pkcs7_encrypt openssl_pkcs7_sign openssl_pkcs7_verify openssl_pkey_export_to_file openssl_pkey_export openssl_pkey_get_private openssl_pkey_get_public openssl_pkey_new openssl_private_decrypt openssl_private_encrypt openssl_public_decrypt openssl_public_encrypt openssl_seal openssl_sign openssl_verify openssl_x509_check_private_key openssl_x509_checkpurpose openssl_x509_export_to_file openssl_x509_export openssl_x509_free openssl_x509_parse openssl_x509_read contained +syn keyword phpFunctions ora_bind ora_close ora_columnname ora_columnsize ora_columntype ora_commit ora_commitoff ora_commiton ora_do ora_error ora_errorcode ora_exec ora_fetch_into ora_fetch ora_getcolumn ora_logoff ora_logon ora_numcols ora_numrows ora_open ora_parse ora_plogon ora_rollback contained +syn keyword phpFunctions flush ob_clean ob_end_clean ob_end_flush ob_flush ob_get_clean ob_get_contents ob_get_flush ob_get_length ob_get_level ob_get_status ob_gzhandler ob_implicit_flush ob_list_handlers ob_start output_add_rewrite_var output_reset_rewrite_vars contained +syn keyword phpFunctions overload contained +syn keyword phpFunctions ovrimos_close ovrimos_commit ovrimos_connect ovrimos_cursor ovrimos_exec ovrimos_execute ovrimos_fetch_into ovrimos_fetch_row ovrimos_field_len ovrimos_field_name ovrimos_field_num ovrimos_field_type ovrimos_free_result ovrimos_longreadlen ovrimos_num_fields ovrimos_num_rows ovrimos_prepare ovrimos_result_all ovrimos_result ovrimos_rollback contained +syn keyword phpFunctions pcntl_exec pcntl_fork pcntl_signal pcntl_waitpid pcntl_wexitstatus pcntl_wifexited pcntl_wifsignaled pcntl_wifstopped pcntl_wstopsig pcntl_wtermsig contained +syn keyword phpFunctions preg_grep preg_match_all preg_match preg_quote preg_replace_callback preg_replace preg_split contained +syn keyword phpFunctions pdf_add_annotation pdf_add_bookmark pdf_add_launchlink pdf_add_locallink pdf_add_note pdf_add_outline pdf_add_pdflink pdf_add_thumbnail pdf_add_weblink pdf_arc pdf_arcn pdf_attach_file pdf_begin_page pdf_begin_pattern pdf_begin_template pdf_circle pdf_clip pdf_close_image pdf_close_pdi_page pdf_close_pdi pdf_close pdf_closepath_fill_stroke pdf_closepath_stroke pdf_closepath pdf_concat pdf_continue_text pdf_curveto pdf_delete pdf_end_page pdf_end_pattern pdf_end_template pdf_endpath pdf_fill_stroke pdf_fill pdf_findfont pdf_get_buffer pdf_get_font pdf_get_fontname pdf_get_fontsize pdf_get_image_height pdf_get_image_width pdf_get_majorversion pdf_get_minorversion pdf_get_parameter pdf_get_pdi_parameter pdf_get_pdi_value pdf_get_value pdf_initgraphics pdf_lineto pdf_makespotcolor pdf_moveto pdf_new pdf_open_CCITT pdf_open_file pdf_open_gif pdf_open_image_file pdf_open_image pdf_open_jpeg pdf_open_memory_image pdf_open_pdi_page pdf_open_pdi pdf_open_png pdf_open_tiff pdf_open pdf_place_image pdf_place_pdi_page pdf_rect pdf_restore pdf_rotate pdf_save pdf_scale pdf_set_border_color pdf_set_border_dash pdf_set_border_style pdf_set_char_spacing pdf_set_duration pdf_set_font pdf_set_horiz_scaling pdf_set_info_author pdf_set_info_creator pdf_set_info_keywords pdf_set_info_subject pdf_set_info_title pdf_set_info pdf_set_leading pdf_set_parameter pdf_set_text_matrix pdf_set_text_pos pdf_set_text_rendering pdf_set_text_rise pdf_set_value pdf_set_word_spacing pdf_setcolor pdf_setdash pdf_setflat pdf_setfont pdf_setgray_fill pdf_setgray_stroke pdf_setgray pdf_setlinecap pdf_setlinejoin pdf_setlinewidth pdf_setmatrix pdf_setmiterlimit pdf_setpolydash pdf_setrgbcolor_fill pdf_setrgbcolor_stroke pdf_setrgbcolor pdf_show_boxed pdf_show_xy pdf_show pdf_skew pdf_stringwidth pdf_stroke pdf_translate contained +syn keyword phpFunctions pfpro_cleanup pfpro_init pfpro_process_raw pfpro_process pfpro_version contained +syn keyword phpFunctions pg_affected_rows pg_cancel_query pg_client_encoding pg_close pg_connect pg_connection_busy pg_connection_reset pg_connection_status pg_convert pg_copy_from pg_copy_to pg_dbname pg_delete pg_end_copy pg_escape_bytea pg_escape_string pg_fetch_all pg_fetch_array pg_fetch_assoc pg_fetch_object pg_fetch_result pg_fetch_row pg_field_is_null pg_field_name pg_field_num pg_field_prtlen pg_field_size pg_field_type pg_free_result pg_get_notify pg_get_pid pg_get_result pg_host pg_insert pg_last_error pg_last_notice pg_last_oid pg_lo_close pg_lo_create pg_lo_export pg_lo_import pg_lo_open pg_lo_read_all pg_lo_read pg_lo_seek pg_lo_tell pg_lo_unlink pg_lo_write pg_meta_data pg_num_fields pg_num_rows pg_options pg_pconnect pg_ping pg_port pg_put_line pg_query pg_result_error pg_result_seek pg_result_status pg_select pg_send_query pg_set_client_encoding pg_trace pg_tty pg_unescape_bytea pg_untrace pg_update contained +syn keyword phpFunctions posix_ctermid posix_get_last_error posix_getcwd posix_getegid posix_geteuid posix_getgid posix_getgrgid posix_getgrnam posix_getgroups posix_getlogin posix_getpgid posix_getpgrp posix_getpid posix_getppid posix_getpwnam posix_getpwuid posix_getrlimit posix_getsid posix_getuid posix_isatty posix_kill posix_mkfifo posix_setegid posix_seteuid posix_setgid posix_setpgid posix_setsid posix_setuid posix_strerror posix_times posix_ttyname posix_uname contained +syn keyword phpFunctions printer_abort printer_close printer_create_brush printer_create_dc printer_create_font printer_create_pen printer_delete_brush printer_delete_dc printer_delete_font printer_delete_pen printer_draw_bmp printer_draw_chord printer_draw_elipse printer_draw_line printer_draw_pie printer_draw_rectangle printer_draw_roundrect printer_draw_text printer_end_doc printer_end_page printer_get_option printer_list printer_logical_fontheight printer_open printer_select_brush printer_select_font printer_select_pen printer_set_option printer_start_doc printer_start_page printer_write contained +syn keyword phpFunctions pspell_add_to_personal pspell_add_to_session pspell_check pspell_clear_session pspell_config_create pspell_config_ignore pspell_config_mode pspell_config_personal pspell_config_repl pspell_config_runtogether pspell_config_save_repl pspell_new_config pspell_new_personal pspell_new pspell_save_wordlist pspell_store_replacement pspell_suggest contained +syn keyword phpFunctions qdom_error qdom_tree contained +syn keyword phpFunctions readline_add_history readline_clear_history readline_completion_function readline_info readline_list_history readline_read_history readline_write_history readline contained +syn keyword phpFunctions recode_file recode_string recode contained +syn keyword phpFunctions ereg_replace ereg eregi_replace eregi split spliti sql_regcase contained +syn keyword phpFunctions ftok msg_get_queue msg_receive msg_remove_queue msg_send msg_set_queue msg_stat_queue sem_acquire sem_get sem_release sem_remove shm_attach shm_detach shm_get_var shm_put_var shm_remove_var shm_remove contained +syn keyword phpFunctions sesam_affected_rows sesam_commit sesam_connect sesam_diagnostic sesam_disconnect sesam_errormsg sesam_execimm sesam_fetch_array sesam_fetch_result sesam_fetch_row sesam_field_array sesam_field_name sesam_free_result sesam_num_fields sesam_query sesam_rollback sesam_seek_row sesam_settransaction contained +syn keyword phpFunctions session_cache_expire session_cache_limiter session_decode session_destroy session_encode session_get_cookie_params session_id session_is_registered session_module_name session_name session_regenerate_id session_register session_save_path session_set_cookie_params session_set_save_handler session_start session_unregister session_unset session_write_close contained +syn keyword phpFunctions shmop_close shmop_delete shmop_open shmop_read shmop_size shmop_write contained +syn keyword phpFunctions snmp_get_quick_print snmp_set_quick_print snmpget snmprealwalk snmpset snmpwalk snmpwalkoid contained +syn keyword phpFunctions socket_accept socket_bind socket_clear_error socket_close socket_connect socket_create_listen socket_create_pair socket_create socket_get_option socket_getpeername socket_getsockname socket_iovec_add socket_iovec_alloc socket_iovec_delete socket_iovec_fetch socket_iovec_free socket_iovec_set socket_last_error socket_listen socket_read socket_readv socket_recv socket_recvfrom socket_recvmsg socket_select socket_send socket_sendmsg socket_sendto socket_set_block socket_set_nonblock socket_set_option socket_shutdown socket_strerror socket_write socket_writev contained +syn keyword phpFunctions sqlite_array_query sqlite_busy_timeout sqlite_changes sqlite_close sqlite_column sqlite_create_aggregate sqlite_create_function sqlite_current sqlite_error_string sqlite_escape_string sqlite_fetch_array sqlite_fetch_single sqlite_fetch_string sqlite_field_name sqlite_has_more sqlite_last_error sqlite_last_insert_rowid sqlite_libencoding sqlite_libversion sqlite_next sqlite_num_fields sqlite_num_rows sqlite_open sqlite_popen sqlite_query sqlite_rewind sqlite_seek sqlite_udf_decode_binary sqlite_udf_encode_binary sqlite_unbuffered_query contained +syn keyword phpFunctions stream_context_create stream_context_get_options stream_context_set_option stream_context_set_params stream_copy_to_stream stream_filter_append stream_filter_prepend stream_filter_register stream_get_contents stream_get_filters stream_get_line stream_get_meta_data stream_get_transports stream_get_wrappers stream_register_wrapper stream_select stream_set_blocking stream_set_timeout stream_set_write_buffer stream_socket_accept stream_socket_client stream_socket_get_name stream_socket_recvfrom stream_socket_sendto stream_socket_server stream_wrapper_register contained +syn keyword phpFunctions addcslashes addslashes bin2hex chop chr chunk_split convert_cyr_string count_chars crc32 crypt echo explode fprintf get_html_translation_table hebrev hebrevc html_entity_decode htmlentities htmlspecialchars implode join levenshtein localeconv ltrim md5_file md5 metaphone money_format nl_langinfo nl2br number_format ord parse_str print printf quoted_printable_decode quotemeta rtrim setlocale sha1_file sha1 similar_text soundex sprintf sscanf str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split str_word_count strcasecmp strchr strcmp strcoll strcspn strip_tags stripcslashes stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpos strrchr strrev strripos strrpos strspn strstr strtok strtolower strtoupper strtr substr_compare substr_count substr_replace substr trim ucfirst ucwords vprintf vsprintf wordwrap contained +syn keyword phpFunctions swf_actiongeturl swf_actiongotoframe swf_actiongotolabel swf_actionnextframe swf_actionplay swf_actionprevframe swf_actionsettarget swf_actionstop swf_actiontogglequality swf_actionwaitforframe swf_addbuttonrecord swf_addcolor swf_closefile swf_definebitmap swf_definefont swf_defineline swf_definepoly swf_definerect swf_definetext swf_endbutton swf_enddoaction swf_endshape swf_endsymbol swf_fontsize swf_fontslant swf_fonttracking swf_getbitmapinfo swf_getfontinfo swf_getframe swf_labelframe swf_lookat swf_modifyobject swf_mulcolor swf_nextid swf_oncondition swf_openfile swf_ortho2 swf_ortho swf_perspective swf_placeobject swf_polarview swf_popmatrix swf_posround swf_pushmatrix swf_removeobject swf_rotate swf_scale swf_setfont swf_setframe swf_shapearc swf_shapecurveto3 swf_shapecurveto swf_shapefillbitmapclip swf_shapefillbitmaptile swf_shapefilloff swf_shapefillsolid swf_shapelinesolid swf_shapelineto swf_shapemoveto swf_showframe swf_startbutton swf_startdoaction swf_startshape swf_startsymbol swf_textwidth swf_translate swf_viewport contained +syn keyword phpFunctions sybase_affected_rows sybase_close sybase_connect sybase_data_seek sybase_deadlock_retry_count sybase_fetch_array sybase_fetch_assoc sybase_fetch_field sybase_fetch_object sybase_fetch_row sybase_field_seek sybase_free_result sybase_get_last_message sybase_min_client_severity sybase_min_error_severity sybase_min_message_severity sybase_min_server_severity sybase_num_fields sybase_num_rows sybase_pconnect sybase_query sybase_result sybase_select_db sybase_set_message_handler sybase_unbuffered_query contained +syn keyword phpFunctions tidy_access_count tidy_clean_repair tidy_config_count tidy_diagnose tidy_error_count tidy_get_body tidy_get_config tidy_get_error_buffer tidy_get_head tidy_get_html_ver tidy_get_html tidy_get_output tidy_get_release tidy_get_root tidy_get_status tidy_getopt tidy_is_xhtml tidy_load_config tidy_parse_file tidy_parse_string tidy_repair_file tidy_repair_string tidy_reset_config tidy_save_config tidy_set_encoding tidy_setopt tidy_warning_count contained +syn keyword phpMethods attributes children get_attr get_nodes has_children has_siblings is_asp is_comment is_html is_jsp is_jste is_text is_xhtml is_xml next prev tidy_node contained +syn keyword phpFunctions token_get_all token_name contained +syn keyword phpFunctions base64_decode base64_encode get_meta_tags http_build_query parse_url rawurldecode rawurlencode urldecode urlencode contained +syn keyword phpFunctions doubleval empty floatval get_defined_vars get_resource_type gettype import_request_variables intval is_array is_bool is_callable is_double is_float is_int is_integer is_long is_null is_numeric is_object is_real is_resource is_scalar is_string isset print_r serialize settype strval unserialize unset var_dump var_export contained +syn keyword phpFunctions vpopmail_add_alias_domain_ex vpopmail_add_alias_domain vpopmail_add_domain_ex vpopmail_add_domain vpopmail_add_user vpopmail_alias_add vpopmail_alias_del_domain vpopmail_alias_del vpopmail_alias_get_all vpopmail_alias_get vpopmail_auth_user vpopmail_del_domain_ex vpopmail_del_domain vpopmail_del_user vpopmail_error vpopmail_passwd vpopmail_set_user_quota contained +syn keyword phpFunctions w32api_deftype w32api_init_dtype w32api_invoke_function w32api_register_function w32api_set_call_method contained +syn keyword phpFunctions wddx_add_vars wddx_deserialize wddx_packet_end wddx_packet_start wddx_serialize_value wddx_serialize_vars contained +syn keyword phpFunctions utf8_decode utf8_encode xml_error_string xml_get_current_byte_index xml_get_current_column_number xml_get_current_line_number xml_get_error_code xml_parse_into_struct xml_parse xml_parser_create_ns xml_parser_create xml_parser_free xml_parser_get_option xml_parser_set_option xml_set_character_data_handler xml_set_default_handler xml_set_element_handler xml_set_end_namespace_decl_handler xml_set_external_entity_ref_handler xml_set_notation_decl_handler xml_set_object xml_set_processing_instruction_handler xml_set_start_namespace_decl_handler xml_set_unparsed_entity_decl_handler contained +syn keyword phpFunctions xmlrpc_decode_request xmlrpc_decode xmlrpc_encode_request xmlrpc_encode xmlrpc_get_type xmlrpc_parse_method_descriptions xmlrpc_server_add_introspection_data xmlrpc_server_call_method xmlrpc_server_create xmlrpc_server_destroy xmlrpc_server_register_introspection_callback xmlrpc_server_register_method xmlrpc_set_type contained +syn keyword phpFunctions xslt_create xslt_errno xslt_error xslt_free xslt_output_process xslt_set_base xslt_set_encoding xslt_set_error_handler xslt_set_log xslt_set_sax_handler xslt_set_sax_handlers xslt_set_scheme_handler xslt_set_scheme_handlers contained +syn keyword phpFunctions yaz_addinfo yaz_ccl_conf yaz_ccl_parse yaz_close yaz_connect yaz_database yaz_element yaz_errno yaz_error yaz_es_result yaz_get_option yaz_hits yaz_itemorder yaz_present yaz_range yaz_record yaz_scan_result yaz_scan yaz_schema yaz_search yaz_set_option yaz_sort yaz_syntax yaz_wait contained +syn keyword phpFunctions zip_close zip_entry_close zip_entry_compressedsize zip_entry_compressionmethod zip_entry_filesize zip_entry_name zip_entry_open zip_entry_read zip_open zip_read contained +syn keyword phpFunctions gzclose gzcompress gzdeflate gzencode gzeof gzfile gzgetc gzgets gzgetss gzinflate gzopen gzpassthru gzputs gzread gzrewind gzseek gztell gzuncompress gzwrite readgzfile zlib_get_coding_type contained + +if exists( "php_baselib" ) + syn keyword phpMethods query next_record num_rows affected_rows nf f p np num_fields haltmsg seek link_id query_id metadata table_names nextid connect halt free register unregister is_registered delete url purl self_url pself_url hidden_session add_query padd_query reimport_get_vars reimport_post_vars reimport_cookie_vars set_container set_tokenname release_token put_headers get_id get_id put_id freeze thaw gc reimport_any_vars start url purl login_if is_authenticated auth_preauth auth_loginform auth_validatelogin auth_refreshlogin auth_registerform auth_doregister start check have_perm permsum perm_invalid contained + syn keyword phpFunctions page_open page_close sess_load sess_save contained +endif + +" Conditional +syn keyword phpConditional declare else enddeclare endswitch elseif endif if switch contained + +" Repeat +syn keyword phpRepeat as do endfor endforeach endwhile for foreach while contained + +" Repeat +syn keyword phpLabel case default switch contained + +" Statement +syn keyword phpStatement return break continue exit contained + +" Keyword +syn keyword phpKeyword var const contained + +" Type +syn keyword phpType bool[ean] int[eger] real double float string array object NULL contained + +" Structure +syn keyword phpStructure extends implements instanceof parent self contained + +" Operator +syn match phpOperator "[-=+%^&|*!.~?:]" contained display +syn match phpOperator "[-+*/%^&|.]=" contained display +syn match phpOperator "/[^*/]"me=e-1 contained display +syn match phpOperator "\$" contained display +syn match phpOperator "&&\|\<and\>" contained display +syn match phpOperator "||\|\<x\=or\>" contained display +syn match phpRelation "[!=<>]=" contained display +syn match phpRelation "[<>]" contained display +syn match phpMemberSelector "->" contained display +syn match phpVarSelector "\$" contained display + +" Identifier +syn match phpIdentifier "$\h\w*" contained contains=phpEnvVar,phpIntVar,phpVarSelector display +syn match phpIdentifierSimply "${\h\w*}" contains=phpOperator,phpParent contained display +syn region phpIdentifierComplex matchgroup=phpParent start="{\$"rs=e-1 end="}" contains=phpIdentifier,phpMemberSelector,phpVarSelector,phpIdentifierComplexP contained extend +syn region phpIdentifierComplexP matchgroup=phpParent start="\[" end="]" contains=@phpClInside contained + +" Methoden +syn match phpMethodsVar "->\h\w*" contained contains=phpMethods,phpMemberSelector display + +" Include +syn keyword phpInclude include require include_once require_once contained + +" Define +syn keyword phpDefine new contained + +" Boolean +syn keyword phpBoolean true false contained + +" Number +syn match phpNumber "-\=\<\d\+\>" contained display +syn match phpNumber "\<0x\x\{1,8}\>" contained display + +" Float +syn match phpFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained display + +" SpecialChar +syn match phpSpecialChar "\\[abcfnrtyv\\]" contained display +syn match phpSpecialChar "\\\d\{3}" contained contains=phpOctalError display +syn match phpSpecialChar "\\x\x\{2}" contained display + +" Error +syn match phpOctalError "[89]" contained display +if exists("php_parent_error_close") + syn match phpParentError "[)\]}]" contained display +endif + +" Todo +syn keyword phpTodo todo fixme xxx contained + +" Comment +if exists("php_parent_error_open") + syn region phpComment start="/\*" end="\*/" contained contains=phpTodo +else + syn region phpComment start="/\*" end="\*/" contained contains=phpTodo extend +endif +if version >= 600 + syn match phpComment "#.\{-}\(?>\|$\)\@=" contained contains=phpTodo + syn match phpComment "//.\{-}\(?>\|$\)\@=" contained contains=phpTodo +else + syn match phpComment "#.\{-}$" contained contains=phpTodo + syn match phpComment "#.\{-}?>"me=e-2 contained contains=phpTodo + syn match phpComment "//.\{-}$" contained contains=phpTodo + syn match phpComment "//.\{-}?>"me=e-2 contained contains=phpTodo +endif + +" String +if exists("php_parent_error_open") + syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained keepend + syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings contained keepend +else + syn region phpStringDouble matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpIdentifier,phpSpecialChar,phpIdentifierSimply,phpIdentifierComplex contained extend keepend + syn region phpStringSingle matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings contained keepend extend +endif + +" HereDoc +if version >= 600 + syn case match + syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\I\i*\)$" end="^\z1\(;\=$\)\@=" contained contains=phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend +" including HTML,JavaScript,SQL even if not enabled via options + syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend + syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend + syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpSpecialChar,phpMethodsVar keepend extend + syn case ignore +endif + +" Parent +if exists("php_parent_error_close") || exists("php_parent_error_open") + syn match phpParent "[{}]" contained + syn region phpParent matchgroup=Delimiter start="(" end=")" contained contains=@phpClInside transparent + syn region phpParent matchgroup=Delimiter start="\[" end="\]" contained contains=@phpClInside transparent + if !exists("php_parent_error_close") + syn match phpParent "[\])]" contained + endif +else + syn match phpParent "[({[\]})]" contained +endif + +syn cluster phpClConst contains=phpFunctions,phpIdentifier,phpConditional,phpRepeat,phpStatement,phpOperator,phpRelation,phpStringSingle,phpStringDouble,phpNumber,phpFloat,phpKeyword,phpType,phpBoolean,phpStructure,phpMethodsVar,phpConstant,phpCoreConstant,phpException +syn cluster phpClInside contains=@phpClConst,phpComment,phpLabel,phpParent,phpParentError,phpInclude,phpHereDoc +syn cluster phpClFunction contains=@phpClInside,phpDefine,phpParentError,phpStorageClass +syn cluster phpClTop contains=@phpClFunction,phpFoldFunction,phpFoldClass,phpFoldInterface,phpFoldTry,phpFoldCatch + +" Php Region +if exists("php_parent_error_open") + if exists("php_noShortTags") + syn region phpRegion matchgroup=Delimiter start="<?php" end="?>" contains=@phpClTop + else + syn region phpRegion matchgroup=Delimiter start="<?\(php\)\=" end="?>" contains=@phpClTop + endif + syn region phpRegionSc matchgroup=Delimiter start=+<script language="php">+ end=+</script>+ contains=@phpClTop + if exists("php_asp_tags") + syn region phpRegionAsp matchgroup=Delimiter start="<%\(=\)\=" end="%>" contains=@phpClTop + endif +else + if exists("php_noShortTags") + syn region phpRegion matchgroup=Delimiter start="<?php" end="?>" contains=@phpClTop keepend + else + syn region phpRegion matchgroup=Delimiter start="<?\(php\)\=" end="?>" contains=@phpClTop keepend + endif + syn region phpRegionSc matchgroup=Delimiter start=+<script language="php">+ end=+</script>+ contains=@phpClTop keepend + if exists("php_asp_tags") + syn region phpRegionAsp matchgroup=Delimiter start="<%\(=\)\=" end="%>" contains=@phpClTop keepend + endif +endif + +" Fold +if exists("php_folding") && php_folding==1 +" match one line constructs here and skip them at folding + syn keyword phpSCKeyword abstract final private protected public static contained + syn keyword phpFCKeyword function contained + syn keyword phpStorageClass global contained + syn match phpDefine "\(\s\|^\)\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\(\s\+.*[;}]\)\@=" contained contains=phpSCKeyword + syn match phpStructure "\(\s\|^\)\(abstract\s\+\|final\s\+\)*class\(\s\+.*}\)\@=" contained + syn match phpStructure "\(\s\|^\)interface\(\s\+.*}\)\@=" contained + syn match phpException "\(\s\|^\)try\(\s\+.*}\)\@=" contained + syn match phpException "\(\s\|^\)catch\(\s\+.*}\)\@=" contained + + set foldmethod=syntax + syn region phpFoldHtmlInside matchgroup=Delimiter start="?>" end="<?\(php\)\=" contained transparent contains=@htmlTop + syn region phpFoldFunction matchgroup=Storageclass start="^\z(\s*\)\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\s\([^};]*$\)\@="rs=e-9 matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldHtmlInside,phpFCKeyword contained transparent fold extend + syn region phpFoldFunction matchgroup=Define start="^function\s\([^};]*$\)\@=" matchgroup=Delimiter end="^}" contains=@phpClFunction,phpFoldHtmlInside contained transparent fold extend + syn region phpFoldClass matchgroup=Structure start="^\z(\s*\)\(abstract\s\+\|final\s\+\)*class\s\+\([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldFunction,phpSCKeyword contained transparent fold extend + syn region phpFoldInterface matchgroup=Structure start="^\z(\s*\)interface\s\+\([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldFunction contained transparent fold extend + syn region phpFoldCatch matchgroup=Exception start="^\z(\s*\)catch\s\+\([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldFunction contained transparent fold extend + syn region phpFoldTry matchgroup=Exception start="^\z(\s*\)try\s\+\([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldFunction contained transparent fold extend +elseif exists("php_folding") && php_folding==2 + syn keyword phpDefine function contained + syn keyword phpStructure abstract class interface contained + syn keyword phpException catch throw try contained + syn keyword phpStorageClass final global private protected public static contained + + set foldmethod=syntax + syn region phpFoldHtmlInside matchgroup=Delimiter start="?>" end="<?\(php\)\=" contained transparent contains=@htmlTop + syn region phpParent matchgroup=Delimiter start="{" end="}" contained contains=@phpClFunction,phpFoldHtmlInside transparent fold +else + syn keyword phpDefine function contained + syn keyword phpStructure abstract class interface contained + syn keyword phpException catch throw try contained + syn keyword phpStorageClass final global private protected public static contained +endif + + +" Sync +if php_sync_method==-1 + if exists("php_noShortTags") + syn sync match phpRegionSync grouphere phpRegion "^\s*<?php\s*$" + else + syn sync match phpRegionSync grouphere phpRegion "^\s*<?\(php\)\=\s*$" + endif + syn sync match phpRegionSync grouphere phpRegionSc +^\s*<script language="php">\s*$+ + if exists("php_asp_tags") + syn sync match phpRegionSync grouphere phpRegionAsp "^\s*<%\(=\)\=\s*$" + endif + syn sync match phpRegionSync grouphere NONE "^\s*?>\s*$" + syn sync match phpRegionSync grouphere NONE "^\s*%>\s*$" + syn sync match phpRegionSync grouphere phpRegion "function\s.*(.*\$" + "syn sync match phpRegionSync grouphere NONE "/\i*>\s*$" +elseif php_sync_method>0 + exec "syn sync minlines=" . php_sync_method +else + exec "syn sync fromstart" +endif + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_php_syn_inits") + if version < 508 + let did_php_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink phpConstant Constant + HiLink phpCoreConstant Constant + HiLink phpComment Comment + HiLink phpException Exception + HiLink phpBoolean Boolean + HiLink phpStorageClass StorageClass + HiLink phpSCKeyword StorageClass + HiLink phpFCKeyword Define + HiLink phpStructure Structure + HiLink phpStringSingle String + HiLink phpStringDouble String + HiLink phpNumber Number + HiLink phpFloat Float + HiLink phpMethods Function + HiLink phpFunctions Function + HiLink phpBaselib Function + HiLink phpRepeat Repeat + HiLink phpConditional Conditional + HiLink phpLabel Label + HiLink phpStatement Statement + HiLink phpKeyword Statement + HiLink phpType Type + HiLink phpInclude Include + HiLink phpDefine Define + HiLink phpSpecialChar SpecialChar + HiLink phpParent Delimiter + HiLink phpIdentifierConst Delimiter + HiLink phpParentError Error + HiLink phpOctalError Error + HiLink phpTodo Todo + HiLink phpMemberSelector Structure + if exists("php_oldStyle") + hi phpIntVar guifg=Red ctermfg=DarkRed + hi phpEnvVar guifg=Red ctermfg=DarkRed + hi phpOperator guifg=SeaGreen ctermfg=DarkGreen + hi phpVarSelector guifg=SeaGreen ctermfg=DarkGreen + hi phpRelation guifg=SeaGreen ctermfg=DarkGreen + hi phpIdentifier guifg=DarkGray ctermfg=Brown + hi phpIdentifierSimply guifg=DarkGray ctermfg=Brown + else + HiLink phpIntVar Identifier + HiLink phpEnvVar Identifier + HiLink phpOperator Operator + HiLink phpVarSelector Operator + HiLink phpRelation Operator + HiLink phpIdentifier Identifier + HiLink phpIdentifierSimply Identifier + endif + + delcommand HiLink +endif + +let b:current_syntax = "php" + +if main_syntax == 'php' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/runtime/syntax/phtml.vim b/runtime/syntax/phtml.vim new file mode 100644 index 000000000..2ff6dd95c --- /dev/null +++ b/runtime/syntax/phtml.vim @@ -0,0 +1,244 @@ +" Vim syntax file +" Language: phtml PHP 2.0 +" Maintainer: Lutz Eymers <ixtab@polzin.com> +" URL: http://www.isp.de/data/phtml.vim +" Email: Subject: send syntax_vim.tgz +" Last change: 2003 May 11 +" +" Options phtml_sql_query = 1 for SQL syntax highligthing inside strings +" phtml_minlines = x to sync at least x lines backwards + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'phtml' +endif + +if version < 600 + so <sfile>:p:h/html.vim +else + runtime! syntax/html.vim + unlet b:current_syntax +endif + +syn cluster htmlPreproc add=phtmlRegionInsideHtmlTags + +if exists( "phtml_sql_query") + if phtml_sql_query == 1 + syn include @phtmlSql <sfile>:p:h/sql.vim + unlet b:current_syntax + endif +endif +syn cluster phtmlSql remove=sqlString,sqlComment + +syn case match + +" Env Variables +syn keyword phtmlEnvVar SERVER_SOFTWARE SERVER_NAME SERVER_URL GATEWAY_INTERFACE contained +syn keyword phtmlEnvVar SERVER_PROTOCOL SERVER_PORT REQUEST_METHOD PATH_INFO contained +syn keyword phtmlEnvVar PATH_TRANSLATED SCRIPT_NAME QUERY_STRING REMOTE_HOST contained +syn keyword phtmlEnvVar REMOTE_ADDR AUTH_TYPE REMOTE_USER CONTEN_TYPE contained +syn keyword phtmlEnvVar CONTENT_LENGTH HTTPS HTTPS_KEYSIZE HTTPS_SECRETKEYSIZE contained +syn keyword phtmlEnvVar HTTP_ACCECT HTTP_USER_AGENT HTTP_IF_MODIFIED_SINCE contained +syn keyword phtmlEnvVar HTTP_FROM HTTP_REFERER contained +syn keyword phtmlEnvVar PHP_SELF contained + +syn case ignore + +" Internal Variables +syn keyword phtmlIntVar phperrmsg php_self contained + +" Comment +syn region phtmlComment start="/\*" end="\*/" contained contains=phtmlTodo + +" Function names +syn keyword phtmlFunctions Abs Ada_Close Ada_Connect Ada_Exec Ada_FetchRow contained +syn keyword phtmlFunctions Ada_FieldName Ada_FieldNum Ada_FieldType contained +syn keyword phtmlFunctions Ada_FreeResult Ada_NumFields Ada_NumRows Ada_Result contained +syn keyword phtmlFunctions Ada_ResultAll AddSlashes ASort BinDec Ceil ChDir contained +syn keyword phtmlFunctions AdaGrp ChMod ChOwn Chop Chr ClearStack ClearStatCache contained +syn keyword phtmlFunctions closeDir CloseLog Cos Count Crypt Date dbList contained +syn keyword phtmlFunctions dbmClose dbmDelete dbmExists dbmFetch dbmFirstKey contained +syn keyword phtmlFunctions dbmInsert dbmNextKey dbmOpen dbmReplace DecBin DecHex contained +syn keyword phtmlFunctions DecOct doubleval Echo End ereg eregi ereg_replace contained +syn keyword phtmlFunctions eregi_replace EscapeShellCmd Eval Exec Exit Exp contained +syn keyword phtmlFunctions fclose feof fgets fgetss File fileAtime fileCtime contained +syn keyword phtmlFunctions fileGroup fileInode fileMtime fileOwner filePerms contained +syn keyword phtmlFunctions fileSize fileType Floor Flush fopen fputs FPassThru contained +syn keyword phtmlFunctions fseek fsockopen ftell getAccDir GetEnv getHostByName contained +syn keyword phtmlFunctions getHostByAddr GetImageSize getLastAcess contained +syn keyword phtmlFunctions getLastbrowser getLastEmail getLastHost getLastMod contained +syn keyword phtmlFunctions getLastref getLogDir getMyInode getMyPid getMyUid contained +syn keyword phtmlFunctions getRandMax getStartLogging getToday getTotal GetType contained +syn keyword phtmlFunctions gmDate Header HexDec HtmlSpecialChars ImageArc contained +syn keyword phtmlFunctions ImageChar ImageCharUp IamgeColorAllocate contained +syn keyword phtmlFunctions ImageColorTransparent ImageCopyResized ImageCreate contained +syn keyword phtmlFunctions ImageCreateFromGif ImageDestroy ImageFill contained +syn keyword phtmlFunctions ImageFilledPolygon ImageFilledRectangle contained +syn keyword phtmlFunctions ImageFillToBorder ImageGif ImageInterlace ImageLine contained +syn keyword phtmlFunctions ImagePolygon ImageRectangle ImageSetPixel contained +syn keyword phtmlFunctions ImageString ImageStringUp ImageSX ImageSY Include contained +syn keyword phtmlFunctions InitSyslog intval IsSet Key Link LinkInfo Log Log10 contained +syn keyword phtmlFunctions LosAs Mail Max Md5 mi_Close mi_Connect mi_DBname contained +syn keyword phtmlFunctions mi_Exec mi_FieldName mi_FieldNum mi_NumFields contained +syn keyword phtmlFunctions mi_NumRows mi_Result Microtime Min MkDir MkTime msql contained +syn keyword phtmlFunctions msql_connect msql_CreateDB msql_dbName msql_DropDB contained +syn keyword phtmlFunctions msqlFieldFlags msql_FieldLen msql_FieldName contained +syn keyword phtmlFunctions msql_FieldType msql_FreeResult msql_ListDBs contained +syn keyword phtmlFunctions msql_Listfields msql_ListTables msql_NumFields contained +syn keyword phtmlFunctions msql_NumRows msql_RegCase msql_Result msql_TableName contained +syn keyword phtmlFunctions mysql mysql_affected_rows mysql_close mysql_connect contained +syn keyword phtmlFunctions mysql_CreateDB mysql_dbName mysqlDropDB contained +syn keyword phtmlFunctions mysql_FieldFlags mysql_FieldLen mysql_FieldName contained +syn keyword phtmlFunctions mysql_FieldType mysql_FreeResult mysql_insert_id contained +syn keyword phtmlFunctions mysql_listDBs mysql_Listfields mysql_ListTables contained +syn keyword phtmlFunctions mysql_NumFields mysql_NumRows mysql_Result contained +syn keyword phtmlFunctions mysql_TableName Next OctDec openDir OpenLog contained +syn keyword phtmlFunctions Ora_Bind Ora_Close Ora_Commit Ora_CommitOff contained +syn keyword phtmlFunctions Ora_CommitOn Ora_Exec Ora_Fetch Ora_GetColumn contained +syn keyword phtmlFunctions Ora_Logoff Ora_Logon Ora_Parse Ora_Rollback Ord contained +syn keyword phtmlFunctions Parse_str PassThru pclose pg_Close pg_Connect contained +syn keyword phtmlFunctions pg_DBname pg_ErrorMessage pg_Exec pg_FieldName contained +syn keyword phtmlFunctions pg_FieldPrtLen pg_FieldNum pg_FieldSize contained +syn keyword phtmlFunctions pg_FieldType pg_FreeResult pg_GetLastOid pg_Host contained +syn keyword phtmlFunctions pg_NumFields pg_NumRows pg_Options pg_Port contained +syn keyword phtmlFunctions pg_Result pg_tty phpInfo phpVersion popen pos pow contained +syn keyword phtmlFunctions Prev PutEnv QuoteMeta Rand readDir ReadFile ReadLink contained +syn keyword phtmlFunctions reg_Match reg_replace reg_Search Rename Reset return contained +syn keyword phtmlFunctions rewind rewindDir RmDir rSort SetCookie SetErrorReporting contained +syn keyword phtmlFunctions SetLogging SetShowInfo SetType shl shr Sin Sleep contained +syn keyword phtmlFunctions Solid_Close Solid_Connect Solid_Exec Solid_FetchRow contained +syn keyword phtmlFunctions Solid_FieldName Solid_FieldNum Solid_FreeResult contained +syn keyword phtmlFunctions Solid_NumFields Solid_NumRows Solid_Result Sort contained +syn keyword phtmlFunctions Spundtex Sprintf Sqrt Srand strchr strtr contained +syn keyword phtmlFunctions StripSlashes strlen strchr strstr strtok strtolower contained +syn keyword phtmlFunctions strtoupper strval substr sybSQL_CheckConnect contained +syn keyword phtmlFunctions sybSQL_DBUSE sybSQL_Connect sybSQL_Exit contained +syn keyword phtmlFunctions sybSQL_Fieldname sybSQL_GetField sybSQL_IsRow contained +syn keyword phtmlFunctions sybSQL_NextRow sybSQL_NumFields sybSQL_NumRows contained +syn keyword phtmlFunctions sybSQL_Query sybSQL_Result sybSQL_Result sybSQL_Seek contained +syn keyword phtmlFunctions Symlink syslog System Tan TempNam Time Umask UniqId contained +syn keyword phtmlFunctions Unlink Unset UrlDecode UrlEncode USleep Virtual contained +syn keyword phtmlFunctions SecureVar contained + +" Conditional +syn keyword phtmlConditional if else elseif endif switch endswitch contained + +" Repeat +syn keyword phtmlRepeat while endwhile contained + +" Repeat +syn keyword phtmlLabel case default contained + +" Statement +syn keyword phtmlStatement break return continue exit contained + +" Operator +syn match phtmlOperator "[-=+%^&|*!]" contained +syn match phtmlOperator "[-+*/%^&|]=" contained +syn match phtmlOperator "/[^*]"me=e-1 contained +syn match phtmlOperator "\$" contained +syn match phtmlRelation "&&" contained +syn match phtmlRelation "||" contained +syn match phtmlRelation "[!=<>]=" contained +syn match phtmlRelation "[<>]" contained + +" Identifier +syn match phtmlIdentifier "$\h\w*" contained contains=phtmlEnvVar,phtmlIntVar,phtmlOperator + + +" Include +syn keyword phtmlInclude include contained + +" Definesag +syn keyword phtmlDefine Function contained + +" String +syn region phtmlString keepend matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=phtmlIdentifier,phtmlSpecialChar,@phtmlSql contained + +" Number +syn match phtmlNumber "-\=\<\d\+\>" contained + +" Float +syn match phtmlFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained + +" SpecialChar +syn match phtmlSpecialChar "\\[abcfnrtyv\\]" contained +syn match phtmlSpecialChar "\\\d\{3}" contained contains=phtmlOctalError +syn match phtmlSpecialChar "\\x[0-9a-fA-F]\{2}" contained + +syn match phtmlOctalError "[89]" contained + + +syn match phtmlParentError "[)}\]]" contained + +" Todo +syn keyword phtmlTodo TODO Todo todo contained + +" Parents +syn cluster phtmlInside contains=phtmlComment,phtmlFunctions,phtmlIdentifier,phtmlConditional,phtmlRepeat,phtmlLabel,phtmlStatement,phtmlOperator,phtmlRelation,phtmlString,phtmlNumber,phtmlFloat,phtmlSpecialChar,phtmlParent,phtmlParentError,phtmlInclude + +syn cluster phtmlTop contains=@phtmlInside,phtmlInclude,phtmlDefine,phtmlParentError,phtmlTodo +syn region phtmlParent matchgroup=Delimiter start="(" end=")" contained contains=@phtmlInside +syn region phtmlParent matchgroup=Delimiter start="{" end="}" contained contains=@phtmlInside +syn region phtmlParent matchgroup=Delimiter start="\[" end="\]" contained contains=@phtmlInside + +syn region phtmlRegion keepend matchgroup=Delimiter start="<?" skip=+(.*>.*)\|".\{-}>.\{-}"\|/\*.\{-}>.\{-}\*/+ end=">" contains=@phtmlTop +syn region phtmlRegionInsideHtmlTags keepend matchgroup=Delimiter start="<?" skip=+(.*>.*)\|/\*.\{-}>.\{-}\*/+ end=">" contains=@phtmlTop contained + +" sync +if exists("phtml_minlines") + exec "syn sync minlines=" . phtml_minlines +else + syn sync minlines=100 +endif + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_phtml_syn_inits") + if version < 508 + let did_phtml_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink phtmlComment Comment + HiLink phtmlString String + HiLink phtmlNumber Number + HiLink phtmlFloat Float + HiLink phtmlIdentifier Identifier + HiLink phtmlIntVar Identifier + HiLink phtmlEnvVar Identifier + HiLink phtmlFunctions Function + HiLink phtmlRepeat Repeat + HiLink phtmlConditional Conditional + HiLink phtmlLabel Label + HiLink phtmlStatement Statement + HiLink phtmlType Type + HiLink phtmlInclude Include + HiLink phtmlDefine Define + HiLink phtmlSpecialChar SpecialChar + HiLink phtmlParentError Error + HiLink phtmlOctalError Error + HiLink phtmlTodo Todo + HiLink phtmlOperator Operator + HiLink phtmlRelation Operator + + delcommand HiLink +endif + +let b:current_syntax = "phtml" + +if main_syntax == 'phtml' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/runtime/syntax/pic.vim b/runtime/syntax/pic.vim new file mode 100644 index 000000000..adc964ea9 --- /dev/null +++ b/runtime/syntax/pic.vim @@ -0,0 +1,127 @@ +" Vim syntax file +" Language: PIC16F84 Assembler (Microchip's microcontroller) +" Maintainer: Aleksandar Veselinovic <aleksa@cs.cmu.com> +" Last Change: 2003 May 11 +" URL: http://galeb.etf.bg.ac.yu/~alexa/vim/syntax/pic.vim +" Revision: 1.01 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case match +syn keyword picTodo NOTE TODO XXX contained + +syn case ignore + +syn match picIdentifier "[a-z_$][a-z0-9_$]*" +syn match picLabel "^[A-Z_$][A-Z0-9_$]*" +syn match picLabel "^[A-Z_$][A-Z0-9_$]*:"me=e-1 + +syn match picASCII "A\='.'" +syn match picBinary "B'[0-1]\+'" +syn match picDecimal "D'\d\+'" +syn match picDecimal "\d\+" +syn match picHexadecimal "0x\x\+" +syn match picHexadecimal "H'\x\+'" +syn match picHexadecimal "[0-9]\x*h" +syn match picOctal "O'[0-7]\o*'" + + +syn match picComment ";.*" contains=picTodo + +syn region picString start=+"+ end=+"+ + +syn keyword picRegister INDF TMR0 PCL STATUS FSR PORTA PORTB +syn keyword picRegister EEDATA EEADR PCLATH INTCON INDF OPTION_REG PCL +syn keyword picRegister FSR TRISA TRISB EECON1 EECON2 INTCON OPTION + + +" Register --- bits + +" STATUS +syn keyword picRegisterPart IRP RP1 RP0 TO PD Z DC C + +" PORTA +syn keyword picRegisterPart T0CKI +syn match picRegisterPart "RA[0-4]" + +" PORTB +syn keyword picRegisterPart INT +syn match picRegisterPart "RB[0-7]" + +" INTCON +syn keyword picRegisterPart GIE EEIE T0IE INTE RBIE T0IF INTF RBIF + +" OPTION +syn keyword picRegisterPart RBPU INTEDG T0CS T0SE PSA PS2 PS1 PS0 + +" EECON2 +syn keyword picRegisterPart EEIF WRERR WREN WR RD + +" INTCON +syn keyword picRegisterPart GIE EEIE T0IE INTE RBIE T0IF INTF RBIF + + +" OpCodes... +syn keyword picOpcode ADDWF ANDWF CLRF CLRW COMF DECF DECFSZ INCF INCFSZ +syn keyword picOpcode IORWF MOVF MOVWF NOP RLF RRF SUBWF SWAPF XORWF +syn keyword picOpcode BCF BSF BTFSC BTFSS +syn keyword picOpcode ADDLW ANDLW CALL CLRWDT GOTO IORLW MOVLW RETFIE +syn keyword picOpcode RETLW RETURN SLEEP SUBLW XORLW +syn keyword picOpcode GOTO + + +" Directives +syn keyword picDirective __BADRAM BANKISEL BANKSEL CBLOCK CODE __CONFIG +syn keyword picDirective CONSTANT DATA DB DE DT DW ELSE END ENDC +syn keyword picDirective ENDIF ENDM ENDW EQU ERROR ERRORLEVEL EXITM EXPAND +syn keyword picDirective EXTERN FILL GLOBAL IDATA __IDLOCS IF IFDEF IFNDEF +syn keyword picDirective INCLUDE LIST LOCAL MACRO __MAXRAM MESSG NOEXPAND +syn keyword picDirective NOLIST ORG PAGE PAGESEL PROCESSOR RADIX RES SET +syn keyword picDirective SPACE SUBTITLE TITLE UDATA UDATA_OVR UDATA_SHR +syn keyword picDirective VARIABLE WHILE INCLUDE +syn match picDirective "#\=UNDEFINE" +syn match picDirective "#\=INCLUDE" +syn match picDirective "#\=DEFINE" + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_pic16f84_syntax_inits") + if version < 508 + let did_pic16f84_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink picTodo Todo + HiLink picComment Comment + HiLink picDirective Statement + HiLink picLabel Label + HiLink picString String + + "HiLink picOpcode Keyword + "HiLink picRegister Structure + "HiLink picRegisterPart Special + + HiLink picASCII String + HiLink picBinary Number + HiLink picDecimal Number + HiLink picHexadecimal Number + HiLink picOctal Number + + HiLink picIdentifier Identifier + + delcommand HiLink +endif + +let b:current_syntax = "pic" + +" vim: ts=8 diff --git a/runtime/syntax/pike.vim b/runtime/syntax/pike.vim new file mode 100644 index 000000000..efbafd5d8 --- /dev/null +++ b/runtime/syntax/pike.vim @@ -0,0 +1,155 @@ +" Vim syntax file +" Language: Pike +" Maintainer: Francesco Chemolli <kinkie@kame.usr.dsi.unimi.it> +" Last Change: 2001 May 10 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" A bunch of useful C keywords +syn keyword pikeStatement goto break return continue +syn keyword pikeLabel case default +syn keyword pikeConditional if else switch +syn keyword pikeRepeat while for foreach do +syn keyword pikeStatement gauge destruct lambda inherit import typeof +syn keyword pikeException catch +syn keyword pikeType inline nomask private protected public static + + +syn keyword pikeTodo contained TODO FIXME XXX + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match pikeSpecial contained "\\[0-7][0-7][0-7]\=\|\\." +syn region pikeString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=pikeSpecial +syn match pikeCharacter "'[^\\]'" +syn match pikeSpecialCharacter "'\\.'" +syn match pikeSpecialCharacter "'\\[0-7][0-7]'" +syn match pikeSpecialCharacter "'\\[0-7][0-7][0-7]'" + +" Compound data types +syn region pikeCompoundType start='({' contains=pikeString,pikeCompoundType,pikeNumber,pikeFloat end='})' +syn region pikeCompoundType start='(\[' contains=pikeString,pikeCompoundType,pikeNumber,pikeFloat end='\])' +syn region pikeCompoundType start='(<' contains=pikeString,pikeCompoundType,pikeNumber,pikeFloat end='>)' + +"catch errors caused by wrong parenthesis +syn region pikeParen transparent start='([^{[<(]' end=')' contains=ALLBUT,pikeParenError,pikeIncluded,pikeSpecial,pikeTodo,pikeUserLabel,pikeBitField +syn match pikeParenError ")" +syn match pikeInParen contained "[^(][{}][^)]" + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match pikeNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" +"floating point number, with dot, optional exponent +syn match pikeFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, starting with a dot, optional exponent +syn match pikeFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match pikeFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" +"hex number +syn match pikeNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>" +"syn match pikeIdentifier "\<[a-z_][a-z0-9_]*\>" +syn case match +" flag an octal number with wrong digits +syn match pikeOctalError "\<0[0-7]*[89]" + +if exists("c_comment_strings") + " A comment can contain pikeString, pikeCharacter and pikeNumber. + " But a "*/" inside a pikeString in a pikeComment DOES end the comment! So we + " need to use a special type of pikeString: pikeCommentString, which also ends on + " "*/", and sees a "*" at the start of the line as comment again. + " Unfortunately this doesn't very well work for // type of comments :-( + syntax match pikeCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region pikeCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=pikeSpecial,pikeCommentSkip + syntax region pikeComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=pikeSpecial + syntax region pikeComment start="/\*" end="\*/" contains=pikeTodo,pikeCommentString,pikeCharacter,pikeNumber,pikeFloat + syntax match pikeComment "//.*" contains=pikeTodo,pikeComment2String,pikeCharacter,pikeNumber + syntax match pikeComment "#\!.*" contains=pikeTodo,pikeComment2String,pikeCharacter,pikeNumber +else + syn region pikeComment start="/\*" end="\*/" contains=pikeTodo + syn match pikeComment "//.*" contains=pikeTodo + syn match pikeComment "#!.*" contains=pikeTodo +endif +syntax match pikeCommentError "\*/" + +syn keyword pikeOperator sizeof +syn keyword pikeType int string void float mapping array multiset mixed +syn keyword pikeType program object function + +syn region pikePreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=pikeComment,pikeString,pikeCharacter,pikeNumber,pikeCommentError +syn region pikeIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match pikeIncluded contained "<[^>]*>" +syn match pikeInclude "^\s*#\s*include\>\s*["<]" contains=pikeIncluded +"syn match pikeLineSkip "\\$" +syn region pikeDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,pikePreCondit,pikeIncluded,pikeInclude,pikeDefine,pikeInParen +syn region pikePreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,pikePreCondit,pikeIncluded,pikeInclude,pikeDefine,pikeInParen + +" Highlight User Labels +syn region pikeMulti transparent start='?' end=':' contains=ALLBUT,pikeIncluded,pikeSpecial,pikeTodo,pikeUserLabel,pikeBitField +" Avoid matching foo::bar() in C++ by requiring that the next char is not ':' +syn match pikeUserLabel "^\s*\I\i*\s*:$" +syn match pikeUserLabel ";\s*\I\i*\s*:$"ms=s+1 +syn match pikeUserLabel "^\s*\I\i*\s*:[^:]"me=e-1 +syn match pikeUserLabel ";\s*\I\i*\s*:[^:]"ms=s+1,me=e-1 + +" Avoid recognizing most bitfields as labels +syn match pikeBitField "^\s*\I\i*\s*:\s*[1-9]"me=e-1 +syn match pikeBitField ";\s*\I\i*\s*:\s*[1-9]"me=e-1 + +syn sync ccomment pikeComment minlines=10 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_pike_syntax_inits") + if version < 508 + let did_pike_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink pikeLabel Label + HiLink pikeUserLabel Label + HiLink pikeConditional Conditional + HiLink pikeRepeat Repeat + HiLink pikeCharacter Character + HiLink pikeSpecialCharacter pikeSpecial + HiLink pikeNumber Number + HiLink pikeFloat Float + HiLink pikeOctalError pikeError + HiLink pikeParenError pikeError + HiLink pikeInParen pikeError + HiLink pikeCommentError pikeError + HiLink pikeOperator Operator + HiLink pikeInclude Include + HiLink pikePreProc PreProc + HiLink pikeDefine Macro + HiLink pikeIncluded pikeString + HiLink pikeError Error + HiLink pikeStatement Statement + HiLink pikePreCondit PreCondit + HiLink pikeType Type + HiLink pikeCommentError pikeError + HiLink pikeCommentString pikeString + HiLink pikeComment2String pikeString + HiLink pikeCommentSkip pikeComment + HiLink pikeString String + HiLink pikeComment Comment + HiLink pikeSpecial SpecialChar + HiLink pikeTodo Todo + HiLink pikeException pikeStatement + HiLink pikeCompoundType Constant + "HiLink pikeIdentifier Identifier + + delcommand HiLink +endif + +let b:current_syntax = "pike" + +" vim: ts=8 diff --git a/runtime/syntax/pilrc.vim b/runtime/syntax/pilrc.vim new file mode 100644 index 000000000..86d561158 --- /dev/null +++ b/runtime/syntax/pilrc.vim @@ -0,0 +1,148 @@ +" Vim syntax file +" Language: pilrc - a resource compiler for Palm OS development +" Maintainer: Brian Schau <brian@schau.com> +" Last change: 2003 May 11 +" Available on: http://www.schau.com/pilrcvim/pilrc.vim + +" Remove any old syntax +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" Notes: TRANSPARENT, FONT and FONT ID are defined in the specials +" section below. Beware of the order of the specials! +" Look in the syntax.txt and usr_27.txt files in vim\vim{version}\doc +" directory for regexps etc. + +" Keywords - basic +syn keyword pilrcKeyword ALERT APPLICATION APPLICATIONICONNAME AREA +syn keyword pilrcKeyword BITMAP BITMAPCOLOR BITMAPCOLOR16 BITMAPCOLOR16K +syn keyword pilrcKeyword BITMAPFAMILY BITMAPFAMILYEX BITMAPFAMILYSPECIAL +syn keyword pilrcKeyword BITMAPGREY BITMAPGREY16 BITMAPSCREENFAMILY +syn keyword pilrcKeyword BOOTSCREENFAMILY BUTTON BUTTONS BYTELIST +syn keyword pilrcKeyword CATEGORIES CHECKBOX COUNTRYLOCALISATION +syn keyword pilrcKeyword DATA +syn keyword pilrcKeyword FEATURE FIELD FONTINDEX FORM FORMBITMAP +syn keyword pilrcKeyword GADGET GENERATEHEADER +syn keyword pilrcKeyword GRAFFITIINPUTAREA GRAFFITISTATEINDICATOR +syn keyword pilrcKeyword HEX +syn keyword pilrcKeyword ICON ICONFAMILY ICONFAMILYEX INTEGER +syn keyword pilrcKeyword KEYBOARD +syn keyword pilrcKeyword LABEL LAUNCHERCATEGORY LIST LONGWORDLIST +syn keyword pilrcKeyword MENU MENUITEM MESSAGE MIDI +syn keyword pilrcKeyword PALETTETABLE POPUPLIST POPUPTRIGGER +syn keyword pilrcKeyword PULLDOWN PUSHBUTTON +syn keyword pilrcKeyword REPEATBUTTON RESETAUTOID +syn keyword pilrcKeyword SCROLLBAR SELECTORTRIGGER SLIDER SMALLICON +syn keyword pilrcKeyword SMALLICONFAMILY SMALLICONFAMILYEX STRING STRINGTABLE +syn keyword pilrcKeyword TABLE TITLE TRANSLATION TRAP +syn keyword pilrcKeyword VERSION +syn keyword pilrcKeyword WORDLIST + +" Types +syn keyword pilrcType AT AUTOSHIFT +syn keyword pilrcType BACKGROUNDID BITMAPID BOLDFRAME BPP +syn keyword pilrcType CHECKED COLORTABLE COLUMNS COLUMNWIDTHS COMPRESS +syn keyword pilrcType COMPRESSBEST COMPRESSPACKBITS COMPRESSRLE COMPRESSSCANLINE +syn keyword pilrcType CONFIRMATION COUNTRY CREATOR CURRENCYDECIMALPLACES +syn keyword pilrcType CURRENCYNAME CURRENCYSYMBOL CURRENCYUNIQUESYMBOL +syn keyword pilrcType DATEFORMAT DAYLIGHTSAVINGS DEFAULTBTNID DEFAULTBUTTON +syn keyword pilrcType DENSITY DISABLED DYNAMICSIZE +syn keyword pilrcType EDITABLE ENTRY ERROR EXTENDED +syn keyword pilrcType FEEDBACK FILE FONTID FORCECOMPRESS FRAME +syn keyword pilrcType GRAFFITI GRAPHICAL GROUP +syn keyword pilrcType HASSCROLLBAR HELPID +syn keyword pilrcType ID INDEX INFORMATION +syn keyword pilrcType KEYDOWNCHR KEYDOWNKEYCODE KEYDOWNMODIFIERS +syn keyword pilrcType LANGUAGE LEFTALIGN LEFTANCHOR LONGDATEFORMAT +syn keyword pilrcType MAX MAXCHARS MEASUREMENTSYSTEM MENUID MIN LOCALE +syn keyword pilrcType MINUTESWESTOFGMT MODAL MULTIPLELINES +syn keyword pilrcType NAME NOCOLORTABLE NOCOMPRESS NOFRAME NONEDITABLE +syn keyword pilrcType NONEXTENDED NONUSABLE NOSAVEBEHIND NUMBER NUMBERFORMAT +syn keyword pilrcType NUMERIC +syn keyword pilrcType PAGESIZE +syn keyword pilrcType RECTFRAME RIGHTALIGN RIGHTANCHOR ROWS +syn keyword pilrcType SAVEBEHIND SEARCH SCREEN SELECTEDBITMAPID SINGLELINE +syn keyword pilrcType THUMBID TRANSPARENTINDEX TIMEFORMAT +syn keyword pilrcType UNDERLINED USABLE +syn keyword pilrcType VALUE VERTICAL VISIBLEITEMS +syn keyword pilrcType WARNING WEEKSTARTDAY + +" Country +syn keyword pilrcCountry Australia Austria Belgium Brazil Canada Denmark +syn keyword pilrcCountry Finland France Germany HongKong Iceland Indian +syn keyword pilrcCountry Indonesia Ireland Italy Japan Korea Luxembourg Malaysia +syn keyword pilrcCountry Mexico Netherlands NewZealand Norway Philippines +syn keyword pilrcCountry RepChina Singapore Spain Sweden Switzerland Thailand +syn keyword pilrcCountry Taiwan UnitedKingdom UnitedStates + +" Language +syn keyword pilrcLanguage English French German Italian Japanese Spanish + +" String +syn match pilrcString "\"[^"]*\"" + +" Number +syn match pilrcNumber "\<0x\x\+\>" +syn match pilrcNumber "\<\d\+\>" + +" Comment +syn region pilrcComment start="/\*" end="\*/" +syn region pilrcComment start="//" end="$" + +" Constants +syn keyword pilrcConstant AUTO AUTOID BOTTOM CENTER PREVBOTTOM PREVHEIGHT +syn keyword pilrcConstant PREVLEFT PREVRIGHT PREVTOP PREVWIDTH RIGHT +syn keyword pilrcConstant SEPARATOR + +" Identifier +syn match pilrcIdentifier "\<\h\w*\>" + +" Specials +syn match pilrcType "\<FONT\>" +syn match pilrcKeyword "\<FONT\>\s*\<ID\>" +syn match pilrcType "\<TRANSPARENT\>" + +" Function +syn keyword pilrcFunction BEGIN END + +" Include +syn match pilrcInclude "\#include" +syn match pilrcInclude "\#define" +syn keyword pilrcInclude equ +syn keyword pilrcInclude package +syn region pilrcInclude start="public class" end="}" + +syn sync ccomment pilrcComment + +if version >= 508 || !exists("did_pilrc_syntax_inits") + if version < 508 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + let did_pilrc_syntax_inits = 1 + + " The default methods for highlighting + HiLink pilrcKeyword Statement + HiLink pilrcType Type + HiLink pilrcError Error + HiLink pilrcCountry SpecialChar + HiLink pilrcLanguage SpecialChar + HiLink pilrcString SpecialChar + HiLink pilrcNumber Number + HiLink pilrcComment Comment + HiLink pilrcConstant Constant + HiLink pilrcFunction Function + HiLink pilrcInclude SpecialChar + HiLink pilrcIdentifier Number + + delcommand HiLink +endif + +let b:current_syntax = "pilrc" diff --git a/runtime/syntax/pine.vim b/runtime/syntax/pine.vim new file mode 100644 index 000000000..749535e1a --- /dev/null +++ b/runtime/syntax/pine.vim @@ -0,0 +1,372 @@ +" Vim syntax file +" Language: Pine (email program) run commands +" Maintainer: David Pascoe <pascoedj@spamcop.net> +" Last Change: Thu Feb 27 10:18:48 WST 2003, update for pine 4.53 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if version >= 600 + setlocal iskeyword=@,48-57,_,128-167,224-235,-, +else + set iskeyword=@,48-57,_,128-167,224-235,-, +endif + +syn keyword pineConfig addrbook-sort-rule +syn keyword pineConfig address-book +syn keyword pineConfig addressbook-formats +syn keyword pineConfig alt-addresses +syn keyword pineConfig bugs-additional-data +syn keyword pineConfig bugs-address +syn keyword pineConfig bugs-fullname +syn keyword pineConfig character-set +syn keyword pineConfig color-style +syn keyword pineConfig compose-mime +syn keyword pineConfig composer-wrap-column +syn keyword pineConfig current-indexline-style +syn keyword pineConfig cursor-style +syn keyword pineConfig customized-hdrs +syn keyword pineConfig debug-memory +syn keyword pineConfig default-composer-hdrs +syn keyword pineConfig default-fcc +syn keyword pineConfig default-saved-msg-folder +syn keyword pineConfig disable-these-authenticators +syn keyword pineConfig disable-these-drivers +syn keyword pineConfig display-filters +syn keyword pineConfig download-command +syn keyword pineConfig download-command-prefix +syn keyword pineConfig editor +syn keyword pineConfig elm-style-save +syn keyword pineConfig empty-header-message +syn keyword pineConfig fcc-name-rule +syn keyword pineConfig feature-level +syn keyword pineConfig feature-list +syn keyword pineConfig file-directory +syn keyword pineConfig folder-collections +syn keyword pineConfig folder-extension +syn keyword pineConfig folder-sort-rule +syn keyword pineConfig font-char-set +syn keyword pineConfig font-name +syn keyword pineConfig font-size +syn keyword pineConfig font-style +syn keyword pineConfig forced-abook-entry +syn keyword pineConfig form-letter-folder +syn keyword pineConfig global-address-book +syn keyword pineConfig goto-default-rule +syn keyword pineConfig header-in-reply +syn keyword pineConfig image-viewer +syn keyword pineConfig inbox-path +syn keyword pineConfig incoming-archive-folders +syn keyword pineConfig incoming-folders +syn keyword pineConfig incoming-startup-rule +syn keyword pineConfig index-answered-background-color +syn keyword pineConfig index-answered-foreground-color +syn keyword pineConfig index-deleted-background-color +syn keyword pineConfig index-deleted-foreground-color +syn keyword pineConfig index-format +syn keyword pineConfig index-important-background-color +syn keyword pineConfig index-important-foreground-color +syn keyword pineConfig index-new-background-color +syn keyword pineConfig index-new-foreground-color +syn keyword pineConfig index-recent-background-color +syn keyword pineConfig index-recent-foreground-color +syn keyword pineConfig index-to-me-background-color +syn keyword pineConfig index-to-me-foreground-color +syn keyword pineConfig index-unseen-background-color +syn keyword pineConfig index-unseen-foreground-color +syn keyword pineConfig initial-keystroke-list +syn keyword pineConfig kblock-passwd-count +syn keyword pineConfig keylabel-background-color +syn keyword pineConfig keylabel-foreground-color +syn keyword pineConfig keyname-background-color +syn keyword pineConfig keyname-foreground-color +syn keyword pineConfig last-time-prune-questioned +syn keyword pineConfig last-version-used +syn keyword pineConfig ldap-servers +syn keyword pineConfig literal-signature +syn keyword pineConfig local-address +syn keyword pineConfig local-fullname +syn keyword pineConfig mail-check-interval +syn keyword pineConfig mail-directory +syn keyword pineConfig mailcap-search-path +syn keyword pineConfig mimetype-search-path +syn keyword pineConfig new-version-threshold +syn keyword pineConfig news-active-file-path +syn keyword pineConfig news-collections +syn keyword pineConfig news-spool-directory +syn keyword pineConfig newsrc-path +syn keyword pineConfig nntp-server +syn keyword pineConfig normal-background-color +syn keyword pineConfig normal-foreground-color +syn keyword pineConfig old-style-reply +syn keyword pineConfig operating-dir +syn keyword pineConfig patterns +syn keyword pineConfig patterns-filters +syn keyword pineConfig patterns-filters2 +syn keyword pineConfig patterns-indexcolors +syn keyword pineConfig patterns-other +syn keyword pineConfig patterns-roles +syn keyword pineConfig patterns-scores +syn keyword pineConfig patterns-scores2 +syn keyword pineConfig personal-name +syn keyword pineConfig personal-print-category +syn keyword pineConfig personal-print-command +syn keyword pineConfig postponed-folder +syn keyword pineConfig print-font-char-set +syn keyword pineConfig print-font-name +syn keyword pineConfig print-font-size +syn keyword pineConfig print-font-style +syn keyword pineConfig printer +syn keyword pineConfig prompt-background-color +syn keyword pineConfig prompt-foreground-color +syn keyword pineConfig pruned-folders +syn keyword pineConfig pruning-rule +syn keyword pineConfig quote1-background-color +syn keyword pineConfig quote1-foreground-color +syn keyword pineConfig quote2-background-color +syn keyword pineConfig quote2-foreground-color +syn keyword pineConfig quote3-background-color +syn keyword pineConfig quote3-foreground-color +syn keyword pineConfig read-message-folder +syn keyword pineConfig remote-abook-history +syn keyword pineConfig remote-abook-metafile +syn keyword pineConfig remote-abook-validity +syn keyword pineConfig reply-indent-string +syn keyword pineConfig reply-leadin +syn keyword pineConfig reverse-background-color +syn keyword pineConfig reverse-foreground-color +syn keyword pineConfig rsh-command +syn keyword pineConfig rsh-open-timeout +syn keyword pineConfig rsh-path +syn keyword pineConfig save-by-sender +syn keyword pineConfig saved-msg-name-rule +syn keyword pineConfig scroll-margin +syn keyword pineConfig selectable-item-background-color +syn keyword pineConfig selectable-item-foreground-color +syn keyword pineConfig sending-filters +syn keyword pineConfig sendmail-path +syn keyword pineConfig show-all-characters +syn keyword pineConfig signature-file +syn keyword pineConfig smtp-server +syn keyword pineConfig sort-key +syn keyword pineConfig speller +syn keyword pineConfig ssh-command +syn keyword pineConfig ssh-open-timeout +syn keyword pineConfig ssh-path +syn keyword pineConfig standard-printer +syn keyword pineConfig status-background-color +syn keyword pineConfig status-foreground-color +syn keyword pineConfig status-message-delay +syn keyword pineConfig suggest-address +syn keyword pineConfig suggest-fullname +syn keyword pineConfig tcp-open-timeout +syn keyword pineConfig tcp-query-timeout +syn keyword pineConfig tcp-read-warning-timeout +syn keyword pineConfig tcp-write-warning-timeout +syn keyword pineConfig threading-display-style +syn keyword pineConfig threading-expanded-character +syn keyword pineConfig threading-index-style +syn keyword pineConfig threading-indicator-character +syn keyword pineConfig threading-lastreply-character +syn keyword pineConfig title-background-color +syn keyword pineConfig title-foreground-color +syn keyword pineConfig titlebar-color-style +syn keyword pineConfig upload-command +syn keyword pineConfig upload-command-prefix +syn keyword pineConfig url-viewers +syn keyword pineConfig use-only-domain-name +syn keyword pineConfig user-domain +syn keyword pineConfig user-id +syn keyword pineConfig user-id +syn keyword pineConfig user-input-timeout +syn keyword pineConfig viewer-hdr-colors +syn keyword pineConfig viewer-hdrs +syn keyword pineConfig viewer-overlap +syn keyword pineConfig window-position + +syn keyword pineOption allow-changing-from +syn keyword pineOption allow-talk +syn keyword pineOption alternate-compose-menu +syn keyword pineOption assume-slow-link +syn keyword pineOption auto-move-read-msgs +syn keyword pineOption auto-open-next-unread +syn keyword pineOption auto-unzoom-after-apply +syn keyword pineOption auto-zoom-after-select +syn keyword pineOption cache-remote-pinerc +syn keyword pineOption check-newmail-when-quitting +syn keyword pineOption combined-addrbook-display +syn keyword pineOption combined-folder-display +syn keyword pineOption combined-subdirectory-display +syn keyword pineOption compose-cut-from-cursor +syn keyword pineOption compose-maps-delete-key-to-ctrl-d +syn keyword pineOption compose-rejects-unqualified-addrs +syn keyword pineOption compose-send-offers-first-filter +syn keyword pineOption compose-sets-newsgroup-without-confirm +syn keyword pineOption confirm-role-even-for-default +syn keyword pineOption continue-tab-without-confirm +syn keyword pineOption delete-skips-deleted +syn keyword pineOption disable-2022-jp-conversions +syn keyword pineOption disable-busy-alarm +syn keyword pineOption disable-charset-conversions +syn keyword pineOption disable-config-cmd +syn keyword pineOption disable-keyboard-lock-cmd +syn keyword pineOption disable-keymenu +syn keyword pineOption disable-password-caching +syn keyword pineOption disable-password-cmd +syn keyword pineOption disable-pipes-in-sigs +syn keyword pineOption disable-pipes-in-templates +syn keyword pineOption disable-roles-setup-cmd +syn keyword pineOption disable-roles-sig-edit +syn keyword pineOption disable-roles-template-edit +syn keyword pineOption disable-sender +syn keyword pineOption disable-shared-namespaces +syn keyword pineOption disable-signature-edit-cmd +syn keyword pineOption disable-take-last-comma-first +syn keyword pineOption enable-8bit-esmtp-negotiation +syn keyword pineOption enable-8bit-nntp-posting +syn keyword pineOption enable-aggregate-command-set +syn keyword pineOption enable-alternate-editor-cmd +syn keyword pineOption enable-alternate-editor-implicitly +syn keyword pineOption enable-arrow-navigation +syn keyword pineOption enable-arrow-navigation-relaxed +syn keyword pineOption enable-background-sending +syn keyword pineOption enable-bounce-cmd +syn keyword pineOption enable-cruise-mode +syn keyword pineOption enable-cruise-mode-delete +syn keyword pineOption enable-delivery-status-notification +syn keyword pineOption enable-dot-files +syn keyword pineOption enable-dot-folders +syn keyword pineOption enable-exit-via-lessthan-command +syn keyword pineOption enable-fast-recent-test +syn keyword pineOption enable-flag-cmd +syn keyword pineOption enable-flag-screen-implicitly +syn keyword pineOption enable-full-header-and-text +syn keyword pineOption enable-full-header-cmd +syn keyword pineOption enable-goto-in-file-browser +syn keyword pineOption enable-incoming-folders +syn keyword pineOption enable-jump-shortcut +syn keyword pineOption enable-lame-list-mode +syn keyword pineOption enable-mail-check-cue +syn keyword pineOption enable-mailcap-param-substitution +syn keyword pineOption enable-mouse-in-xterm +syn keyword pineOption enable-msg-view-addresses +syn keyword pineOption enable-msg-view-attachments +syn keyword pineOption enable-msg-view-forced-arrows +syn keyword pineOption enable-msg-view-urls +syn keyword pineOption enable-msg-view-web-hostnames +syn keyword pineOption enable-newmail-in-xterm-icon +syn keyword pineOption enable-partial-match-lists +syn keyword pineOption enable-print-via-y-command +syn keyword pineOption enable-reply-indent-string-editing +syn keyword pineOption enable-rules-under-take +syn keyword pineOption enable-search-and-replace +syn keyword pineOption enable-sigdashes +syn keyword pineOption enable-suspend +syn keyword pineOption enable-tab-completion +syn keyword pineOption enable-take-export +syn keyword pineOption enable-tray-icon +syn keyword pineOption enable-unix-pipe-cmd +syn keyword pineOption enable-verbose-smtp-posting +syn keyword pineOption expanded-view-of-addressbooks +syn keyword pineOption expanded-view-of-distribution-lists +syn keyword pineOption expanded-view-of-folders +syn keyword pineOption expose-hidden-config +syn keyword pineOption expunge-only-manually +syn keyword pineOption expunge-without-confirm +syn keyword pineOption expunge-without-confirm-everywhere +syn keyword pineOption fcc-on-bounce +syn keyword pineOption fcc-only-without-confirm +syn keyword pineOption fcc-without-attachments +syn keyword pineOption include-attachments-in-reply +syn keyword pineOption include-header-in-reply +syn keyword pineOption include-text-in-reply +syn keyword pineOption ldap-result-to-addrbook-add +syn keyword pineOption mark-fcc-seen +syn keyword pineOption mark-for-cc +syn keyword pineOption news-approximates-new-status +syn keyword pineOption news-deletes-across-groups +syn keyword pineOption news-offers-catchup-on-close +syn keyword pineOption news-post-without-validation +syn keyword pineOption news-read-in-newsrc-order +syn keyword pineOption next-thread-without-confirm +syn keyword pineOption old-growth +syn keyword pineOption pass-control-characters-as-is +syn keyword pineOption prefer-plain-text +syn keyword pineOption preserve-start-stop-characters +syn keyword pineOption print-formfeed-between-messages +syn keyword pineOption print-includes-from-line +syn keyword pineOption print-index-enabled +syn keyword pineOption print-offers-custom-cmd-prompt +syn keyword pineOption quell-attachment-extra-prompt +syn keyword pineOption quell-berkeley-format-timezone +syn keyword pineOption quell-content-id +syn keyword pineOption quell-dead-letter-on-cancel +syn keyword pineOption quell-empty-directories +syn keyword pineOption quell-extra-post-prompt +syn keyword pineOption quell-folder-internal-msg +syn keyword pineOption quell-imap-envelope-update +syn keyword pineOption quell-lock-failure-warnings +syn keyword pineOption quell-maildomain-warning +syn keyword pineOption quell-news-envelope-update +syn keyword pineOption quell-partial-fetching +syn keyword pineOption quell-ssl-largeblocks +syn keyword pineOption quell-status-message-beeping +syn keyword pineOption quell-timezone-comment-when-sending +syn keyword pineOption quell-user-lookup-in-passwd-file +syn keyword pineOption quit-without-confirm +syn keyword pineOption reply-always-uses-reply-to +syn keyword pineOption save-aggregates-copy-sequence +syn keyword pineOption save-will-advance +syn keyword pineOption save-will-not-delete +syn keyword pineOption save-will-quote-leading-froms +syn keyword pineOption scramble-message-id +syn keyword pineOption select-without-confirm +syn keyword pineOption selectable-item-nobold +syn keyword pineOption separate-folder-and-directory-entries +syn keyword pineOption show-cursor +syn keyword pineOption show-plain-text-internally +syn keyword pineOption show-selected-in-boldface +syn keyword pineOption signature-at-bottom +syn keyword pineOption single-column-folder-list +syn keyword pineOption slash-collapses-entire-thread +syn keyword pineOption spell-check-before-sending +syn keyword pineOption store-window-position-in-config +syn keyword pineOption strip-from-sigdashes-on-reply +syn keyword pineOption tab-visits-next-new-message-only +syn keyword pineOption termdef-takes-precedence +syn keyword pineOption thread-index-shows-important-color +syn keyword pineOption try-alternative-authentication-driver-first +syn keyword pineOption unselect-will-not-advance +syn keyword pineOption use-current-dir +syn keyword pineOption use-function-keys +syn keyword pineOption use-sender-not-x-sender +syn keyword pineOption use-subshell-for-suspend +syn keyword pineOption vertical-folder-list + +syn match pineComment "^#.*$" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_pine_syn_inits") + if version < 508 + let did_pine_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink pineConfig Type + HiLink pineComment Comment + HiLink pineOption Macro + delcommand HiLink +endif + +let b:current_syntax = "pine" + +" vim: ts=8 diff --git a/runtime/syntax/pinfo.vim b/runtime/syntax/pinfo.vim new file mode 100644 index 000000000..aaef71289 --- /dev/null +++ b/runtime/syntax/pinfo.vim @@ -0,0 +1,134 @@ +" Vim syntax file +" Language: pinfo(1) configuration file +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/ +" Latest Revision: 2004-05-22 +" arch-tag: da2cfa1c-0350-45dc-b2d2-2bf3915bd0a2 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Set iskeyword since we need `-' (and potentially others) in keywords. +" For version 5.x: Set it globally +" For version 6.x: Set it locally +if version >= 600 + command -nargs=1 SetIsk setlocal iskeyword=<args> +else + command -nargs=1 SetIsk set iskeyword=<args> +endif +SetIsk @,48-57,_,- +delcommand SetIsk + +" Ignore Case +syn case ignore + +" Todo +syn keyword pinfoTodo contained FIXME TODO XXX NOTE + +" Comments +syn region pinfoComment start='^#' end='$' contains=pinfoTodo + +" Keywords +syn keyword pinfoOptions MANUAL CUT-MAN-HEADERS CUT-EMPTY-MAN-LINES +syn keyword pinfoOptions RAW-FILENAME APROPOS DONT-HANDLE-WITHOUT-TAG-TABLE +syn keyword pinfoOptions HTTPVIEWER FTPVIEWER MAILEDITOR PRINTUTILITY +syn keyword pinfoOptions MANLINKS INFOPATH MAN-OPTIONS STDERR-REDIRECTION +syn keyword pinfoOptions LONG-MANUAL-LINKS FILTER-0xB7 QUIT-CONFIRMATION +syn keyword pinfoOptions QUIT-CONFIRM-DEFAULT CLEAR-SCREEN-AT-EXIT +syn keyword pinfoOptions CALL-READLINE-HISTORY HIGHLIGHTREGEXP SAFE-USER +syn keyword pinfoOptions SAFE-GROUP + +" Colors +syn keyword pinfoColors COL_NORMAL COL_TOPLINE COL_BOTTOMLINE COL_MENU +syn keyword pinfoColors COL_MENUSELECTED COL_NOTE COL_NOTESELECTED COL_URL +syn keyword pinfoColors COL_URLSELECTED COL_INFOHIGHLIGHT COL_MANUALBOLD +syn keyword pinfoColors COL_MANUALITALIC +syn keyword pinfoColorDefault COLOR_DEFAULT +syn keyword pinfoColorBold BOLD +syn keyword pinfoColorNoBold NO_BOLD +syn keyword pinfoColorBlink BLINK +syn keyword pinfoColorNoBlink NO_BLINK +syn keyword pinfoColorBlack COLOR_BLACK +syn keyword pinfoColorRed COLOR_RED +syn keyword pinfoColorGreen COLOR_GREEN +syn keyword pinfoColorYellow COLOR_YELLOW +syn keyword pinfoColorBlue COLOR_BLUE +syn keyword pinfoColorMagenta COLOR_MAGENTA +syn keyword pinfoColorCyan COLOR_CYAN +syn keyword pinfoColorWhite COLOR_WHITE + +" Keybindings +syn keyword pinfoKeys KEY_TOTALSEARCH_1 KEY_TOTALSEARCH_2 KEY_SEARCH_1 +syn keyword pinfoKeys KEY_SEARCH_2 KEY_SEARCH_AGAIN_1 KEY_SEARCH_AGAIN_2 +syn keyword pinfoKeys KEY_GOTO_1 KEY_GOTO_2 KEY_PREVNODE_1 KEY_PREVNODE_2 +syn keyword pinfoKeys KEY_NEXTNODE_1 KEY_NEXTNODE_2 KEY_UP_1 KEY_UP_2 +syn keyword pinfoKeys KEY_END_1 KEY_END_2 KEY_PGDN_1 KEY_PGDN_2 +syn keyword pinfoKeys KEY_PGDN_AUTO_1 KEY_PGDN_AUTO_2 KEY_HOME_1 KEY_HOME_2 +syn keyword pinfoKeys KEY_PGUP_1 KEY_PGUP_2 KEY_PGUP_AUTO_1 KEY_PGUP_AUTO_2 +syn keyword pinfoKeys KEY_DOWN_1 KEY_DOWN_2 KEY_TOP_1 KEY_TOP_2 KEY_BACK_1 +syn keyword pinfoKeys KEY_BACK_2 KEY_FOLLOWLINK_1 KEY_FOLLOWLINK_2 +syn keyword pinfoKeys KEY_REFRESH_1 KEY_REFRESH_2 KEY_SHELLFEED_1 +syn keyword pinfoKeys KEY_SHELLFEED_2 KEY_QUIT_1 KEY_QUIT_2 KEY_GOLINE_1 +syn keyword pinfoKeys KEY_GOLINE_2 KEY_PRINT_1 KEY_PRINT_2 +syn keyword pinfoKeys KEY_DIRPAGE_1 KEY_DIRPAGE_2 + +" Special Keys +syn keyword pinfoSpecialKeys KEY_BREAK KEY_DOWN KEY_UP KEY_LEFT KEY_RIGHT +syn keyword pinfoSpecialKeys KEY_DOWN KEY_HOME KEY_BACKSPACE KEY_NPAGE +syn keyword pinfoSpecialKeys KEY_PPAGE KEY_END KEY_IC KEY_DC +syn region pinfoSpecialKeys matchgroup=pinfoSpecialKeys transparent start=+KEY_\%(F\|CTRL\|ALT\)(+ end=+)+ +syn region pinfoSimpleKey matchgroup=pinfoSimpleKey start=+'+ skip=+\\'+ end=+'+ contains=pinfoSimpleKeyEscape +syn match pinfoSimpleKeyEscape +\\[\\nt']+ +syn match pinfoKeycode '\<\d\+\>' + +" Constants +syn keyword pinfoConstants TRUE FALSE YES NO + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_pinfo_syn_inits") + if version < 508 + let did_pinfo_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + command -nargs=+ HiDef hi <args> + else + command -nargs=+ HiLink hi def link <args> + command -nargs=+ HiDef hi def <args> + endif + + HiLink pinfoTodo Todo + HiLink pinfoComment Comment + HiLink pinfoOptions Keyword + HiLink pinfoColors Keyword + HiLink pinfoColorDefault Normal + HiDef pinfoColorBold cterm=bold + HiDef pinfoColorNoBold cterm=none + " we can't access the blink attribute from Vim atm + HiDef pinfoColorBlink cterm=inverse + HiDef pinfoColorNoBlink cterm=none + HiDef pinfoColorBlack ctermfg=Black guifg=Black + HiDef pinfoColorRed ctermfg=DarkRed guifg=DarkRed + HiDef pinfoColorGreen ctermfg=DarkGreen guifg=DarkGreen + HiDef pinfoColorYellow ctermfg=DarkYellow guifg=DarkYellow + HiDef pinfoColorBlue ctermfg=DarkBlue guifg=DarkBlue + HiDef pinfoColorMagenta ctermfg=DarkMagenta guifg=DarkMagenta + HiDef pinfoColorCyan ctermfg=DarkCyan guifg=DarkCyan + HiDef pinfoColorWhite ctermfg=LightGray guifg=LightGray + HiLink pinfoKeys Keyword + HiLink pinfoSpecialKeys SpecialChar + HiLink pinfoSimpleKey String + HiLink pinfoSimpleKeyEscape SpecialChar + HiLink pinfoKeycode Number + HiLink pinfoConstants Constant + + delcommand HiLink + delcommand HiDef +endif + +let b:current_syntax = "pinfo" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/plm.vim b/runtime/syntax/plm.vim new file mode 100644 index 000000000..bf7c32fd1 --- /dev/null +++ b/runtime/syntax/plm.vim @@ -0,0 +1,147 @@ +" Vim syntax file +" Language: PL/M +" Maintainer: Philippe Coulonges <cphil@cphil.net> +" Last change: 2003 May 11 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" PL/M is a case insensitive language +syn case ignore + +syn keyword plmTodo contained TODO FIXME XXX + +" String +syn region plmString start=+'+ end=+'+ + +syn match plmOperator "[@=\+\-\*\/\<\>]" + +syn match plmIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" + +syn match plmDelimiter "[();,]" + +syn region plmPreProc start="^\s*\$\s*" skip="\\$" end="$" + +" FIXME : No Number support for floats, as I'm working on an embedded +" project that doesn't use any. +syn match plmNumber "-\=\<\d\+\>" +syn match plmNumber "\<[0-9a-fA-F]*[hH]*\>" + +" If you don't like tabs +"syn match plmShowTab "\t" +"syn match plmShowTabc "\t" + +"when wanted, highlight trailing white space +if exists("c_space_errors") + syn match plmSpaceError "\s*$" + syn match plmSpaceError " \+\t"me=e-1 +endif + +" + " Use the same control variable as C language for I believe + " users will want the same behavior +if exists("c_comment_strings") + " FIXME : don't work fine with c_comment_strings set, + " which I don't care as I don't use + + " A comment can contain plmString, plmCharacter and plmNumber. + " But a "*/" inside a plmString in a plmComment DOES end the comment! So we + " need to use a special type of plmString: plmCommentString, which also ends on + " "*/", and sees a "*" at the start of the line as comment again. + syntax match plmCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region plmCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=plmSpecial,plmCommentSkip + syntax region plmComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=plmSpecial + syntax region plmComment start="/\*" end="\*/" contains=plmTodo,plmCommentString,plmCharacter,plmNumber,plmFloat,plmSpaceError + syntax match plmComment "//.*" contains=plmTodo,plmComment2String,plmCharacter,plmNumber,plmSpaceError +else + syn region plmComment start="/\*" end="\*/" contains=plmTodo,plmSpaceError + syn match plmComment "//.*" contains=plmTodo,plmSpaceError +endif + +syntax match plmCommentError "\*/" + +syn keyword plmReserved ADDRESS AND AT BASED BY BYTE CALL CASE +syn keyword plmReserved DATA DECLARE DISABLE DO DWORD +syn keyword plmReserved ELSE ENABLE END EOF EXTERNAL +syn keyword plmReserved GO GOTO HALT IF INITIAL INTEGER INTERRUPT +syn keyword plmReserved LABEL LITERALLY MINUS MOD NOT OR +syn keyword plmReserved PLUS POINTER PROCEDURE PUBLIC +syn keyword plmReserved REAL REENTRANT RETURN SELECTOR STRUCTURE +syn keyword plmReserved THEN TO WHILE WORD XOR +syn keyword plm386Reserved CHARINT HWORD LONGINT OFFSET QWORD SHORTINT + +syn keyword plmBuiltIn ABS ADJUSTRPL BLOCKINPUT BLOCKINWORD BLOCKOUTPUT +syn keyword plmBuiltIn BLOCKOUTWORD BUILPTR CARRY CAUSEINTERRUPT CMPB +syn keyword plmBuiltIn CMPW DEC DOUBLE FINDB FINDRB FINDRW FINDW FIX +syn keyword plmBuiltIn FLAGS FLOAT GETREALERROR HIGH IABS INITREALMATHUNIT +syn keyword plmBuiltIn INPUT INT INWORD LAST LOCKSET LENGTH LOW MOVB MOVE +syn keyword plmBuiltIn MOVRB MOVRW MOVW NIL OUTPUT OUTWORD RESTOREREALSTATUS +syn keyword plmBuiltIn ROL ROR SAL SAVEREALSTATUS SCL SCR SELECTOROF SETB +syn keyword plmBuiltIn SETREALMODE SETW SHL SHR SIGN SIGNED SIZE SKIPB +syn keyword plmBuiltIn SKIPRB SKIPRW SKIPW STACKBASE STACKPTR TIME SIZE +syn keyword plmBuiltIn UNSIGN XLAT ZERO +syn keyword plm386BuiltIn INTERRUPT SETINTERRUPT +syn keyword plm286BuiltIn CLEARTASKSWITCHEDFLAG GETACCESSRIGHTS +syn keyword plm286BuiltIn GETSEGMENTLIMIT LOCALTABLE MACHINESTATUS +syn keyword plm286BuiltIn OFFSETOF PARITY RESTOREGLOBALTABLE +syn keyword plm286BuiltIn RESTOREINTERRUPTTABLE SAVEGLOBALTABLE +syn keyword plm286BuiltIn SAVEINTERRUPTTABLE SEGMENTREADABLE +syn keyword plm286BuiltIn SEGMENTWRITABLE TASKREGISTER WAITFORINTERRUPT +syn keyword plm386BuiltIn CONTROLREGISTER DEBUGREGISTER FINDHW +syn keyword plm386BuiltIn FINDRHW INHWORD MOVBIT MOVRBIT MOVHW MOVRHW +syn keyword plm386BuiltIn OUTHWORD SCANBIT SCANRBIT SETHW SHLD SHRD +syn keyword plm386BuiltIn SKIPHW SKIPRHW TESTREGISTER +syn keyword plm386w16BuiltIn BLOCKINDWORD BLOCKOUTDWORD CMPD FINDD +syn keyword plm386w16BuiltIn FINDRD INDWORD MOVD MOVRD OUTDWORD +syn keyword plm386w16BuiltIn SETD SKIPD SKIPRD + +syn sync lines=50 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_plm_syntax_inits") + if version < 508 + let did_plm_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later +" HiLink plmLabel Label +" HiLink plmConditional Conditional +" HiLink plmRepeat Repeat + HiLink plmTodo Todo + HiLink plmNumber Number + HiLink plmOperator Operator + HiLink plmDelimiter Operator + "HiLink plmShowTab Error + "HiLink plmShowTabc Error + HiLink plmIdentifier Identifier + HiLink plmBuiltIn Statement + HiLink plm286BuiltIn Statement + HiLink plm386BuiltIn Statement + HiLink plm386w16BuiltIn Statement + HiLink plmReserved Statement + HiLink plm386Reserved Statement + HiLink plmPreProc PreProc + HiLink plmCommentError plmError + HiLink plmCommentString plmString + HiLink plmComment2String plmString + HiLink plmCommentSkip plmComment + HiLink plmString String + HiLink plmComment Comment + + delcommand HiLink +endif + +let b:current_syntax = "plm" + +" vim: ts=8 sw=2 + diff --git a/runtime/syntax/plp.vim b/runtime/syntax/plp.vim new file mode 100644 index 000000000..f59702d3b --- /dev/null +++ b/runtime/syntax/plp.vim @@ -0,0 +1,45 @@ +" Vim syntax file +" Language: PLP (Perl in HTML) +" Maintainer: Juerd <juerd@juerd.nl> +" Last Change: 2003 Apr 25 +" Cloned From: aspperl.vim + +" Add to filetype.vim the following line (without quote sign): +" au BufNewFile,BufRead *.plp setf plp + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'perlscript' +endif + +if version < 600 + so <sfile>:p:h/html.vim + syn include @PLPperl <sfile>:p:h/perl.vim +else + runtime! syntax/html.vim + unlet b:current_syntax + syn include @PLPperl syntax/perl.vim +endif + +syn cluster htmlPreproc add=PLPperlblock + +syn keyword perlControl PLP_END +syn keyword perlStatementInclude include Include +syn keyword perlStatementFiles ReadFile WriteFile Counter +syn keyword perlStatementScalar Entity AutoURL DecodeURI EncodeURI + +syn cluster PLPperlcode contains=perlStatement.*,perlFunction,perlOperator,perlVarPlain,perlVarNotInMatches,perlShellCommand,perlFloat,perlNumber,perlStringUnexpanded,perlString,perlQQ,perlControl,perlConditional,perlRepeat,perlComment,perlPOD,perlHereDoc,perlPackageDecl,perlElseIfError,perlFiledescRead,perlMatch + +syn region PLPperlblock keepend matchgroup=Delimiter start=+<:=\=+ end=+:>+ transparent contains=@PLPperlcode + +syn region PLPinclude keepend matchgroup=Delimiter start=+<(+ end=+)>+ + +let b:current_syntax = "plp" + diff --git a/runtime/syntax/plsql.vim b/runtime/syntax/plsql.vim new file mode 100644 index 000000000..6e513660f --- /dev/null +++ b/runtime/syntax/plsql.vim @@ -0,0 +1,277 @@ +" Vim syntax file +" Language: Oracle Procedureal SQL (PL/SQL) +" Maintainer: Jeff Lanzarotta (jefflanzarotta at yahoo dot com) +" Original Maintainer: C. Laurence Gonsalves (clgonsal@kami.com) +" URL: http://lanzarotta.tripod.com/vim/syntax/plsql.vim.zip +" Last Change: September 18, 2002 +" History: Geoff Evans & Bill Pribyl (bill at plnet dot org) +" Added 9i keywords. +" Austin Ziegler (austin at halostatue dot ca) +" Added 8i+ features. +" +" For version 5.x, clear all syntax items. +" For version 6.x, quit when a syntax file was already loaded. +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Todo. +syn keyword plsqlTodo TODO FIXME XXX DEBUG NOTE +syn cluster plsqlCommentGroup contains=plsqlTodo + +syn case ignore + +syn match plsqlGarbage "[^ \t()]" +syn match plsqlIdentifier "[a-z][a-z0-9$_#]*" +syn match plsqlHostIdentifier ":[a-z][a-z0-9$_#]*" + +" When wanted, highlight the trailing whitespace. +if exists("c_space_errors") + if !exists("c_no_trail_space_error") + syn match plsqlSpaceError "\s\+$" + endif + + if !exists("c_no_tab_space_error") + syn match plsqlSpaceError " \+\t"me=e-1 + endif +endif + +" Symbols. +syn match plsqlSymbol "\(;\|,\|\.\)" + +" Operators. +syn match plsqlOperator "\(+\|-\|\*\|/\|=\|<\|>\|@\|\*\*\|!=\|\~=\)" +syn match plsqlOperator "\(^=\|<=\|>=\|:=\|=>\|\.\.\|||\|<<\|>>\|\"\)" + +" Some of Oracle's SQL keywords. +syn keyword plsqlSQLKeyword ABORT ACCESS ACCESSED ADD AFTER ALL ALTER AND ANY +syn keyword plsqlSQLKeyword AS ASC ATTRIBUTE AUDIT AUTHORIZATION AVG BASE_TABLE +syn keyword plsqlSQLKeyword BEFORE BETWEEN BY CASCADE CAST CHECK CLUSTER +syn keyword plsqlSQLKeyword CLUSTERS COLAUTH COLUMN COMMENT COMPRESS CONNECT +syn keyword plsqlSQLKeyword CONSTRAINT CRASH CREATE CURRENT DATA DATABASE +syn keyword plsqlSQLKeyword DATA_BASE DBA DEFAULT DELAY DELETE DESC DISTINCT +syn keyword plsqlSQLKeyword DROP DUAL ELSE EXCLUSIVE EXISTS EXTENDS EXTRACT +syn keyword plsqlSQLKeyword FILE FORCE FOREIGN FROM GRANT GROUP HAVING HEAP +syn keyword plsqlSQLKeyword IDENTIFIED IDENTIFIER IMMEDIATE IN INCLUDING +syn keyword plsqlSQLKeyword INCREMENT INDEX INDEXES INITIAL INSERT INSTEAD +syn keyword plsqlSQLKeyword INTERSECT INTO INVALIDATE IS ISOLATION KEY LIBRARY +syn keyword plsqlSQLKeyword LIKE LOCK MAXEXTENTS MINUS MODE MODIFY MULTISET +syn keyword plsqlSQLKeyword NESTED NOAUDIT NOCOMPRESS NOT NOWAIT OF OFF OFFLINE +syn keyword plsqlSQLKeyword ON ONLINE OPERATOR OPTION OR ORDER ORGANIZATION +syn keyword plsqlSQLKeyword PCTFREE PRIMARY PRIOR PRIVATE PRIVILEGES PUBLIC +syn keyword plsqlSQLKeyword QUOTA RELEASE RENAME REPLACE RESOURCE REVOKE ROLLBACK +syn keyword plsqlSQLKeyword ROW ROWLABEL ROWS SCHEMA SELECT SEPARATE SESSION SET +syn keyword plsqlSQLKeyword SHARE SIZE SPACE START STORE SUCCESSFUL SYNONYM +syn keyword plsqlSQLKeyword SYSDATE TABLE TABLES TABLESPACE TEMPORARY TO TREAT +syn keyword plsqlSQLKeyword TRIGGER TRUNCATE UID UNION UNIQUE UNLIMITED UPDATE +syn keyword plsqlSQLKeyword USE USER VALIDATE VALUES VIEW WHENEVER WHERE WITH + +" PL/SQL's own keywords. +syn keyword plsqlKeyword AGENT AND ANY ARRAY ASSIGN AS AT AUTHID BEGIN BODY BY +syn keyword plsqlKeyword BULK C CASE CHAR_BASE CHARSETFORM CHARSETID CLOSE +syn keyword plsqlKeyword COLLECT CONSTANT CONSTRUCTOR CONTEXT CURRVAL DECLARE +syn keyword plsqlKeyword DVOID EXCEPTION EXCEPTION_INIT EXECUTE EXIT FETCH +syn keyword plsqlKeyword FINAL FUNCTION GOTO HASH IMMEDIATE IN INDICATOR +syn keyword plsqlKeyword INSTANTIABLE IS JAVA LANGUAGE LIBRARY MAP MAXLEN +syn keyword plsqlKeyword MEMBER NAME NEW NOCOPY NUMBER_BASE OBJECT OCICOLL +syn keyword plsqlKeyword OCIDATE OCIDATETIME OCILOBLOCATOR OCINUMBER OCIRAW +syn keyword plsqlKeyword OCISTRING OF OPAQUE OPEN OR ORDER OTHERS OUT +syn keyword plsqlKeyword OVERRIDING PACKAGE PARALLEL_ENABLE PARAMETERS +syn keyword plsqlKeyword PARTITION PIPELINED PRAGMA PROCEDURE RAISE RANGE REF +syn keyword plsqlKeyword RESULT RETURN REVERSE ROWTYPE SB1 SELF SHORT SIZE_T +syn keyword plsqlKeyword SQL SQLCODE SQLERRM STATIC STRUCT SUBTYPE TDO THEN +syn keyword plsqlKeyword TABLE TIMEZONE_ABBR TIMEZONE_HOUR TIMEZONE_MINUTE +syn keyword plsqlKeyword TIMEZONE_REGION TYPE UNDER UNSIGNED USING VARIANCE +syn keyword plsqlKeyword VARRAY VARYING WHEN WRITE +syn match plsqlKeyword "\<END\>" +syn match plsqlKeyword "\.COUNT\>"hs=s+1 +syn match plsqlKeyword "\.EXISTS\>"hs=s+1 +syn match plsqlKeyword "\.FIRST\>"hs=s+1 +syn match plsqlKeyword "\.LAST\>"hs=s+1 +syn match plsqlKeyword "\.DELETE\>"hs=s+1 +syn match plsqlKeyword "\.PREV\>"hs=s+1 +syn match plsqlKeyword "\.NEXT\>"hs=s+1 + +" PL/SQL functions. +syn keyword plsqlFunction ABS ACOS ADD_MONTHS ASCII ASCIISTR ASIN ATAN ATAN2 +syn keyword plsqlFunction BFILENAME BITAND CEIL CHARTOROWID CHR COALESCE +syn keyword plsqlFunction COMMIT COMMIT_CM COMPOSE CONCAT CONVERT COS COSH +syn keyword plsqlFunction COUNT CUBE CURRENT_DATE CURRENT_TIME CURRENT_TIMESTAMP +syn keyword plsqlFunction DBTIMEZONE DECODE DECOMPOSE DEREF DUMP EMPTY_BLOB +syn keyword plsqlFunction EMPTY_CLOB EXISTS EXP FLOOR FROM_TZ GETBND GLB +syn keyword plsqlFunction GREATEST GREATEST_LB GROUPING HEXTORAW INITCAP +syn keyword plsqlFunction INSTR INSTR2 INSTR4 INSTRB INSTRC ISNCHAR LAST_DAY +syn keyword plsqlFunction LEAST LEAST_UB LENGTH LENGTH2 LENGTH4 LENGTHB LENGTHC +syn keyword plsqlFunction LN LOCALTIME LOCALTIMESTAMP LOG LOWER LPAD +syn keyword plsqlFunction LTRIM LUB MAKE_REF MAX MIN MOD MONTHS_BETWEEN +syn keyword plsqlFunction NCHARTOROWID NCHR NEW_TIME NEXT_DAY NHEXTORAW +syn keyword plsqlFunction NLS_CHARSET_DECL_LEN NLS_CHARSET_ID NLS_CHARSET_NAME +syn keyword plsqlFunction NLS_INITCAP NLS_LOWER NLSSORT NLS_UPPER NULLFN NULLIF +syn keyword plsqlFunction NUMTODSINTERVAL NUMTOYMINTERVAL NVL POWER +syn keyword plsqlFunction RAISE_APPLICATION_ERROR RAWTOHEX RAWTONHEX REF +syn keyword plsqlFunction REFTOHEX REPLACE ROLLBACK_NR ROLLBACK_SV ROLLUP ROUND +syn keyword plsqlFunction ROWIDTOCHAR ROWIDTONCHAR ROWLABEL RPAD RTRIM +syn keyword plsqlFunction SAVEPOINT SESSIONTIMEZONE SETBND SET_TRANSACTION_USE +syn keyword plsqlFunction SIGN SIN SINH SOUNDEX SQLCODE SQLERRM SQRT STDDEV +syn keyword plsqlFunction SUBSTR SUBSTR2 SUBSTR4 SUBSTRB SUBSTRC SUM +syn keyword plsqlFunction SYS_AT_TIME_ZONE SYS_CONTEXT SYSDATE SYS_EXTRACT_UTC +syn keyword plsqlFunction SYS_GUID SYS_LITERALTODATE SYS_LITERALTODSINTERVAL +syn keyword plsqlFunction SYS_LITERALTOTIME SYS_LITERALTOTIMESTAMP +syn keyword plsqlFunction SYS_LITERALTOTZTIME SYS_LITERALTOTZTIMESTAMP +syn keyword plsqlFunction SYS_LITERALTOYMINTERVAL SYS_OVER__DD SYS_OVER__DI +syn keyword plsqlFunction SYS_OVER__ID SYS_OVER_IID SYS_OVER_IIT +syn keyword plsqlFunction SYS_OVER__IT SYS_OVER__TI SYS_OVER__TT +syn keyword plsqlFunction SYSTIMESTAMP TAN TANH TO_ANYLOB TO_BLOB TO_CHAR +syn keyword plsqlFunction TO_CLOB TO_DATE TO_DSINTERVAL TO_LABEL TO_MULTI_BYTE +syn keyword plsqlFunction TO_NCHAR TO_NCLOB TO_NUMBER TO_RAW TO_SINGLE_BYTE +syn keyword plsqlFunction TO_TIME TO_TIMESTAMP TO_TIMESTAMP_TZ TO_TIME_TZ +syn keyword plsqlFunction TO_YMINTERVAL TRANSLATE TREAT TRIM TRUNC TZ_OFFSET UID +syn keyword plsqlFunction UNISTR UPPER UROWID USER USERENV VALUE VARIANCE +syn keyword plsqlFunction VSIZE WORK XOR +syn match plsqlFunction "\<SYS\$LOB_REPLICATION\>" + +" PL/SQL Exceptions +syn keyword plsqlException ACCESS_INTO_NULL CASE_NOT_FOUND COLLECTION_IS_NULL +syn keyword plsqlException CURSOR_ALREADY_OPEN DUP_VAL_ON_INDEX INVALID_CURSOR +syn keyword plsqlException INVALID_NUMBER LOGIN_DENIED NO_DATA_FOUND +syn keyword plsqlException NOT_LOGGED_ON PROGRAM_ERROR ROWTYPE_MISMATCH +syn keyword plsqlException SELF_IS_NULL STORAGE_ERROR SUBSCRIPT_BEYOND_COUNT +syn keyword plsqlException SUBSCRIPT_OUTSIDE_LIMIT SYS_INVALID_ROWID +syn keyword plsqlException TIMEOUT_ON_RESOURCE TOO_MANY_ROWS VALUE_ERROR +syn keyword plsqlException ZERO_DIVIDE + +" Oracle Pseudo Colums. +syn keyword plsqlPseudo CURRVAL LEVEL NEXTVAL ROWID ROWNUM + +if exists("plsql_highlight_triggers") + syn keyword plsqlTrigger INSERTING UPDATING DELETING +endif + +" Conditionals. +syn keyword plsqlConditional ELSIF ELSE IF +syn match plsqlConditional "\<END\s\+IF\>" + +" Loops. +syn keyword plsqlRepeat FOR LOOP WHILE FORALL +syn match plsqlRepeat "\<END\s\+LOOP\>" + +" Various types of comments. +if exists("c_comment_strings") + syntax match plsqlCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region plsqlCommentString contained start=+L\="+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=plsqlCommentSkip + syntax region plsqlComment2String contained start=+L\="+ skip=+\\\\\|\\"+ end=+"+ end="$" + syntax region plsqlCommentL start="--" skip="\\$" end="$" keepend contains=@plsqlCommentGroup,plsqlComment2String,plsqlCharLiteral,plsqlBooleanLiteral,plsqlNumbersCom,plsqlSpaceError + syntax region plsqlComment start="/\*" end="\*/" contains=@plsqlCommentGroup,plsqlComment2String,plsqlCharLiteral,plsqlBooleanLiteral,plsqlNumbersCom,plsqlSpaceError +else + syntax region plsqlCommentL start="--" skip="\\$" end="$" keepend contains=@plsqlCommentGroup,plsqlSpaceError + syntax region plsqlComment start="/\*" end="\*/" contains=@plsqlCommentGroup,plsqlSpaceError +endif + +syn sync ccomment plsqlComment +syn sync ccomment plsqlCommentL + +" To catch unterminated string literals. +syn match plsqlStringError "'.*$" + +" Various types of literals. +syn match plsqlNumbers transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=plsqlIntLiteral,plsqlFloatLiteral +syn match plsqlNumbersCom contained transparent "\<[+-]\=\d\|[+-]\=\.\d" contains=plsqlIntLiteral,plsqlFloatLiteral +syn match plsqlIntLiteral contained "[+-]\=\d\+" +syn match plsqlFloatLiteral contained "[+-]\=\d\+\.\d*" +syn match plsqlFloatLiteral contained "[+-]\=\d*\.\d*" +syn match plsqlCharLiteral "'[^']'" +syn match plsqlStringLiteral "'\([^']\|''\)*'" +syn keyword plsqlBooleanLiteral TRUE FALSE NULL + +" The built-in types. +syn keyword plsqlStorage ANYDATA ANYTYPE BFILE BINARY_INTEGER BLOB BOOLEAN +syn keyword plsqlStorage BYTE CHAR CHARACTER CLOB CURSOR DATE DAY DEC DECIMAL +syn keyword plsqlStorage DOUBLE DSINTERVAL_UNCONSTRAINED FLOAT HOUR +syn keyword plsqlStorage INT INTEGER INTERVAL LOB LONG MINUTE +syn keyword plsqlStorage MLSLABEL MONTH NATURAL NATURALN NCHAR NCHAR_CS NCLOB +syn keyword plsqlStorage NUMBER NUMERIC NVARCHAR PLS_INT PLS_INTEGER +syn keyword plsqlStorage POSITIVE POSITIVEN PRECISION RAW REAL RECORD +syn keyword plsqlStorage SECOND SIGNTYPE SMALLINT STRING SYS_REFCURSOR TABLE TIME +syn keyword plsqlStorage TIMESTAMP TIMESTAMP_UNCONSTRAINED +syn keyword plsqlStorage TIMESTAMP_TZ_UNCONSTRAINED +syn keyword plsqlStorage TIMESTAMP_LTZ_UNCONSTRAINED UROWID VARCHAR +syn keyword plsqlStorage VARCHAR2 YEAR YMINTERVAL_UNCONSTRAINED ZONE + +" A type-attribute is really a type. +syn match plsqlTypeAttribute "%\(TYPE\|ROWTYPE\)\>" + +" All other attributes. +syn match plsqlAttribute "%\(BULK_EXCEPTIONS\|BULK_ROWCOUNT\|ISOPEN\|FOUND\|NOTFOUND\|ROWCOUNT\)\>" + +" This'll catch mis-matched close-parens. +syn cluster plsqlParenGroup contains=plsqlParenError,@plsqlCommentGroup,plsqlCommentSkip,plsqlIntLiteral,plsqlFloatLiteral,plsqlNumbersCom +if exists("c_no_bracket_error") + syn region plsqlParen transparent start='(' end=')' contains=ALLBUT,@plsqlParenGroup + syn match plsqlParenError ")" + syn match plsqlErrInParen contained "[{}]" +else + syn region plsqlParen transparent start='(' end=')' contains=ALLBUT,@plsqlParenGroup,plsqlErrInBracket + syn match plsqlParenError "[\])]" + syn match plsqlErrInParen contained "[{}]" + syn region plsqlBracket transparent start='\[' end=']' contains=ALLBUT,@plsqlParenGroup,plsqlErrInParen + syn match plsqlErrInBracket contained "[);{}]" +endif + +" Syntax Synchronizing +syn sync minlines=10 maxlines=100 + +" Define the default highlighting. +" For version 5.x and earlier, only when not done already. +" For version 5.8 and later, only when an item doesn't have highlighting yet. +if version >= 508 || !exists("did_plsql_syn_inits") + if version < 508 + let did_plsql_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink plsqlAttribute Macro + HiLink plsqlBlockError Error + HiLink plsqlBooleanLiteral Boolean + HiLink plsqlCharLiteral Character + HiLink plsqlComment Comment + HiLink plsqlCommentL Comment + HiLink plsqlConditional Conditional + HiLink plsqlError Error + HiLink plsqlErrInBracket Error + HiLink plsqlErrInBlock Error + HiLink plsqlErrInParen Error + HiLink plsqlException Function + HiLink plsqlFloatLiteral Float + HiLink plsqlFunction Function + HiLink plsqlGarbage Error + HiLink plsqlHostIdentifier Label + HiLink plsqlIdentifier Normal + HiLink plsqlIntLiteral Number + HiLink plsqlOperator Operator + HiLink plsqlParen Normal + HiLink plsqlParenError Error + HiLink plsqlSpaceError Error + HiLink plsqlPseudo PreProc + HiLink plsqlKeyword Keyword + HiLink plsqlRepeat Repeat + HiLink plsqlStorage StorageClass + HiLink plsqlSQLKeyword Function + HiLink plsqlStringError Error + HiLink plsqlStringLiteral String + HiLink plsqlCommentString String + HiLink plsqlComment2String String + HiLink plsqlSymbol Normal + HiLink plsqlTrigger Function + HiLink plsqlTypeAttribute StorageClass + HiLink plsqlTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "plsql" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/po.vim b/runtime/syntax/po.vim new file mode 100644 index 000000000..6da75d630 --- /dev/null +++ b/runtime/syntax/po.vim @@ -0,0 +1,46 @@ +" Vim syntax file +" Language: po (gettext) +" Maintainer: Nam SungHyun <namsh@kldp.org> +" Last Change: 2001 Apr 26 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match poComment "^#.*$" +syn match poSources "^#:.*$" +syn match poStatement "^\(domain\|msgid\|msgstr\)" +syn match poSpecial contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" +syn match poFormat "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([diuoxXfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained +syn match poFormat "%%" contained +syn region poString start=+"+ skip=+\\\\\|\\"+ end=+"+ + \ contains=poSpecial,poFormat + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_po_syn_inits") + if version < 508 + let did_po_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink poComment Comment + HiLink poSources PreProc + HiLink poStatement Statement + HiLink poSpecial Special + HiLink poFormat poSpecial + HiLink poString String + + delcommand HiLink +endif + +let b:current_syntax = "po" + +" vim:set ts=8 sts=2 sw=2 noet: diff --git a/runtime/syntax/pod.vim b/runtime/syntax/pod.vim new file mode 100644 index 000000000..24d0c852c --- /dev/null +++ b/runtime/syntax/pod.vim @@ -0,0 +1,81 @@ +" Vim syntax file +" Language: Perl POD format +" Maintainer: Scott Bigham <dsb@cs.duke.edu> +" Last Change: 2001 May 09 + +" To add embedded POD documentation highlighting to your syntax file, add +" the commands: +" +" syn include @Pod <sfile>:p:h/pod.vim +" syn region myPOD start="^=pod" start="^=head" end="^=cut" keepend contained contains=@Pod +" +" and add myPod to the contains= list of some existing region, probably a +" comment. The "keepend" flag is needed because "=cut" is matched as a +" pattern in its own right. + + +" Remove any old syntax stuff hanging around (this is suppressed +" automatically by ":syn include" if necessary). +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" POD commands +syn match podCommand "^=head[12]" nextgroup=podCmdText +syn match podCommand "^=item" nextgroup=podCmdText +syn match podCommand "^=over" nextgroup=podOverIndent skipwhite +syn match podCommand "^=back" +syn match podCommand "^=cut" +syn match podCommand "^=pod" +syn match podCommand "^=for" nextgroup=podForKeywd skipwhite +syn match podCommand "^=begin" nextgroup=podForKeywd skipwhite +syn match podCommand "^=end" nextgroup=podForKeywd skipwhite + +" Text of a =head1, =head2 or =item command +syn match podCmdText ".*$" contained contains=podFormat + +" Indent amount of =over command +syn match podOverIndent "\d\+" contained + +" Formatter identifier keyword for =for, =begin and =end commands +syn match podForKeywd "\S\+" contained + +" An indented line, to be displayed verbatim +syn match podVerbatimLine "^\s.*$" + +" Inline textual items handled specially by POD +syn match podSpecial "\(\<\|&\)\I\i*\(::\I\i*\)*([^)]*)" +syn match podSpecial "[$@%]\I\i*\(::\I\i*\)*\>" + +" Special formatting sequences +syn region podFormat start="[IBSCLFXEZ]<" end=">" oneline contains=podFormat + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_pod_syntax_inits") + if version < 508 + let did_pod_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink podCommand Statement + HiLink podCmdText String + HiLink podOverIndent Number + HiLink podForKeywd Identifier + HiLink podFormat Identifier + HiLink podVerbatimLine PreProc + HiLink podSpecial Identifier + + delcommand HiLink +endif + +let b:current_syntax = "pod" + +" vim: ts=8 diff --git a/runtime/syntax/postscr.vim b/runtime/syntax/postscr.vim new file mode 100644 index 000000000..40dbcec5f --- /dev/null +++ b/runtime/syntax/postscr.vim @@ -0,0 +1,783 @@ +" Vim syntax file +" Language: PostScript - all Levels, selectable +" Maintainer: Mike Williams <mrw@eandem.co.uk> +" Filenames: *.ps,*.eps +" Last Change: 27th June 2002 +" URL: http://www.eandem.co.uk/mrw/vim +" +" Options Flags: +" postscr_level - language level to use for highligting (1, 2, or 3) +" postscr_display - include display PS operators +" postscr_ghostscript - include GS extensions +" postscr_fonts - highlight standard font names (a lot for PS 3) +" postscr_encodings - highlight encoding names (there are a lot) +" postscr_andornot_binary - highlight and, or, and not as binary operators (not logical) +" +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" PostScript is case sensitive +syn case match + +" Keyword characters - all 7-bit ASCII bar PS delimiters and ws +if version >= 600 + setlocal iskeyword=33-127,^(,^),^<,^>,^[,^],^{,^},^/,^% +else + set iskeyword=33-127,^(,^),^<,^>,^[,^],^{,^},^/,^% +endif + +" Yer trusty old TODO highlghter! +syn keyword postscrTodo contained TODO + +" Comment +syn match postscrComment "%.*$" contains=postscrTodo +" DSC comment start line (NB: defines DSC level, not PS level!) +syn match postscrDSCComment "^%!PS-Adobe-\d\+\.\d\+\s*.*$" +" DSC comment line (no check on possible comments - another language!) +syn match postscrDSCComment "^%%\u\+.*$" contains=@postscrString,@postscrNumber +" DSC continuation line (no check that previous line is DSC comment) +syn match postscrDSCComment "^%%+ *.*$" contains=@postscrString,@postscrNumber + +" Names +syn match postscrName "\k\+" + +" Identifiers +syn match postscrIdentifierError "/\{1,2}[[:space:]\[\]{}]"me=e-1 +syn match postscrIdentifier "/\{1,2}\k\+" contains=postscrConstant,postscrBoolean,postscrCustConstant + +" Numbers +syn case ignore +" In file hex data - usually complete lines +syn match postscrHex "^[[:xdigit:]][[:xdigit:][:space:]]*$" +"syn match postscrHex "\<\x\{2,}\>" +" Integers +syn match postscrInteger "\<[+-]\=\d\+\>" +" Radix +syn match postscrRadix "\d\+#\x\+\>" +" Reals - upper and lower case e is allowed +syn match postscrFloat "[+-]\=\d\+\.\>" +syn match postscrFloat "[+-]\=\d\+\.\d*\(e[+-]\=\d\+\)\=\>" +syn match postscrFloat "[+-]\=\.\d\+\(e[+-]\=\d\+\)\=\>" +syn match postscrFloat "[+-]\=\d\+e[+-]\=\d\+\>" +syn cluster postscrNumber contains=postscrInteger,postscrRadix,postscrFloat +syn case match + +" Escaped characters +syn match postscrSpecialChar contained "\\[nrtbf\\()]" +syn match postscrSpecialCharError contained "\\[^nrtbf\\()]"he=e-1 +" Escaped octal characters +syn match postscrSpecialChar contained "\\\o\{1,3}" + +" Strings +" ASCII strings +syn region postscrASCIIString start=+(+ end=+)+ skip=+([^)]*)+ contains=postscrSpecialChar,postscrSpecialCharError +" Hex strings +syn match postscrHexCharError contained "[^<>[:xdigit:][:space:]]" +syn region postscrHexString start=+<\($\|[^<]\)+ end=+>+ contains=postscrHexCharError +syn match postscrHexString "<>" +" ASCII85 strings +syn match postscrASCII85CharError contained "[^<>\~!-uz[:space:]]" +syn region postscrASCII85String start=+<\~+ end=+\~>+ contains=postscrASCII85CharError +syn cluster postscrString contains=postscrASCIIString,postscrHexString,postscrASCII85String + + +" Set default highlighting to level 2 - most common at the moment +if !exists("postscr_level") + let postscr_level = 2 +endif + + +" PS level 1 operators - common to all levels (well ...) + +" Stack operators +syn keyword postscrOperator pop exch dup copy index roll clear count mark cleartomark counttomark + +" Math operators +syn keyword postscrMathOperator add div idiv mod mul sub abs neg ceiling floor round truncate sqrt atan cos +syn keyword postscrMathOperator sin exp ln log rand srand rrand + +" Array operators +syn match postscrOperator "[\[\]{}]" +syn keyword postscrOperator array length get put getinterval putinterval astore aload copy +syn keyword postscrRepeat forall + +" Dictionary operators +syn keyword postscrOperator dict maxlength begin end def load store known where currentdict +syn keyword postscrOperator countdictstack dictstack cleardictstack internaldict +syn keyword postscrConstant $error systemdict userdict statusdict errordict + +" String operators +syn keyword postscrOperator string anchorsearch search token + +" Logic operators +syn keyword postscrLogicalOperator eq ne ge gt le lt and not or +if exists("postscr_andornot_binaryop") + syn keyword postscrBinaryOperator and or not +else + syn keyword postscrLogicalOperator and not or +endif +syn keyword postscrBinaryOperator xor bitshift +syn keyword postscrBoolean true false + +" PS Type names +syn keyword postscrConstant arraytype booleantype conditiontype dicttype filetype fonttype gstatetype +syn keyword postscrConstant integertype locktype marktype nametype nulltype operatortype +syn keyword postscrConstant packedarraytype realtype savetype stringtype + +" Control operators +syn keyword postscrConditional if ifelse +syn keyword postscrRepeat for repeat loop +syn keyword postscrOperator exec exit stop stopped countexecstack execstack quit +syn keyword postscrProcedure start + +" Object operators +syn keyword postscrOperator type cvlit cvx xcheck executeonly noaccess readonly rcheck wcheck cvi cvn cvr +syn keyword postscrOperator cvrs cvs + +" File operators +syn keyword postscrOperator file closefile read write readhexstring writehexstring readstring writestring +syn keyword postscrOperator bytesavailable flush flushfile resetfile status run currentfile print +syn keyword postscrOperator stack pstack readline deletefile setfileposition fileposition renamefile +syn keyword postscrRepeat filenameforall +syn keyword postscrProcedure = == + +" VM operators +syn keyword postscrOperator save restore + +" Misc operators +syn keyword postscrOperator bind null usertime executive echo realtime +syn keyword postscrConstant product revision serialnumber version +syn keyword postscrProcedure prompt + +" GState operators +syn keyword postscrOperator gsave grestore grestoreall initgraphics setlinewidth setlinecap currentgray +syn keyword postscrOperator currentlinejoin setmiterlimit currentmiterlimit setdash currentdash setgray +syn keyword postscrOperator sethsbcolor currenthsbcolor setrgbcolor currentrgbcolor currentlinewidth +syn keyword postscrOperator currentlinecap setlinejoin setcmykcolor currentcmykcolor + +" Device gstate operators +syn keyword postscrOperator setscreen currentscreen settransfer currenttransfer setflat currentflat +syn keyword postscrOperator currentblackgeneration setblackgeneration setundercolorremoval +syn keyword postscrOperator setcolorscreen currentcolorscreen setcolortransfer currentcolortransfer +syn keyword postscrOperator currentundercolorremoval + +" Matrix operators +syn keyword postscrOperator matrix initmatrix identmatrix defaultmatrix currentmatrix setmatrix translate +syn keyword postscrOperator concat concatmatrix transform dtransform itransform idtransform invertmatrix +syn keyword postscrOperator scale rotate + +" Path operators +syn keyword postscrOperator newpath currentpoint moveto rmoveto lineto rlineto arc arcn arcto curveto +syn keyword postscrOperator closepath flattenpath reversepath strokepath charpath clippath pathbbox +syn keyword postscrOperator initclip clip eoclip rcurveto +syn keyword postscrRepeat pathforall + +" Painting operators +syn keyword postscrOperator erasepage fill eofill stroke image imagemask colorimage + +" Device operators +syn keyword postscrOperator showpage copypage nulldevice + +" Character operators +syn keyword postscrProcedure findfont +syn keyword postscrConstant FontDirectory ISOLatin1Encoding StandardEncoding +syn keyword postscrOperator definefont scalefont makefont setfont currentfont show ashow +syn keyword postscrOperator stringwidth kshow setcachedevice +syn keyword postscrOperator setcharwidth widthshow awidthshow findencoding cshow rootfont setcachedevice2 + +" Interpreter operators +syn keyword postscrOperator vmstatus cachestatus setcachelimit + +" PS constants +syn keyword postscrConstant contained Gray Red Green Blue All None DeviceGray DeviceRGB + +" PS Filters +syn keyword postscrConstant contained ASCIIHexDecode ASCIIHexEncode ASCII85Decode ASCII85Encode LZWDecode +syn keyword postscrConstant contained RunLengthDecode RunLengthEncode SubFileDecode NullEncode +syn keyword postscrConstant contained GIFDecode PNGDecode LZWEncode + +" PS JPEG filter dictionary entries +syn keyword postscrConstant contained DCTEncode DCTDecode Colors HSamples VSamples QuantTables QFactor +syn keyword postscrConstant contained HuffTables ColorTransform + +" PS CCITT filter dictionary entries +syn keyword postscrConstant contained CCITTFaxEncode CCITTFaxDecode Uncompressed K EndOfLine +syn keyword postscrConstant contained Columns Rows EndOfBlock Blacks1 DamagedRowsBeforeError +syn keyword postscrConstant contained EncodedByteAlign + +" PS Form dictionary entries +syn keyword postscrConstant contained FormType XUID BBox Matrix PaintProc Implementation + +" PS Errors +syn keyword postscrProcedure handleerror +syn keyword postscrConstant contained configurationerror dictfull dictstackunderflow dictstackoverflow +syn keyword postscrConstant contained execstackoverflow interrupt invalidaccess +syn keyword postscrConstant contained invalidcontext invalidexit invalidfileaccess invalidfont +syn keyword postscrConstant contained invalidid invalidrestore ioerror limitcheck nocurrentpoint +syn keyword postscrConstant contained rangecheck stackoverflow stackunderflow syntaxerror timeout +syn keyword postscrConstant contained typecheck undefined undefinedfilename undefinedresource +syn keyword postscrConstant contained undefinedresult unmatchedmark unregistered VMerror + +if exists("postscr_fonts") +" Font names + syn keyword postscrConstant contained Symbol Times-Roman Times-Italic Times-Bold Times-BoldItalic + syn keyword postscrConstant contained Helvetica Helvetica-Oblique Helvetica-Bold Helvetica-BoldOblique + syn keyword postscrConstant contained Courier Courier-Oblique Courier-Bold Courier-BoldOblique +endif + + +if exists("postscr_display") +" Display PS only operators + syn keyword postscrOperator currentcontext fork join detach lock monitor condition wait notify yield + syn keyword postscrOperator viewclip eoviewclip rectviewclip initviewclip viewclippath deviceinfo + syn keyword postscrOperator sethalftonephase currenthalftonephase wtranslation defineusername +endif + +" PS Character encoding names +if exists("postscr_encodings") +" Common encoding names + syn keyword postscrConstant contained .notdef + +" Standard and ISO encoding names + syn keyword postscrConstant contained space exclam quotedbl numbersign dollar percent ampersand quoteright + syn keyword postscrConstant contained parenleft parenright asterisk plus comma hyphen period slash zero + syn keyword postscrConstant contained one two three four five six seven eight nine colon semicolon less + syn keyword postscrConstant contained equal greater question at + syn keyword postscrConstant contained bracketleft backslash bracketright asciicircum underscore quoteleft + syn keyword postscrConstant contained braceleft bar braceright asciitilde + syn keyword postscrConstant contained exclamdown cent sterling fraction yen florin section currency + syn keyword postscrConstant contained quotesingle quotedblleft guillemotleft guilsinglleft guilsinglright + syn keyword postscrConstant contained fi fl endash dagger daggerdbl periodcentered paragraph bullet + syn keyword postscrConstant contained quotesinglbase quotedblbase quotedblright guillemotright ellipsis + syn keyword postscrConstant contained perthousand questiondown grave acute circumflex tilde macron breve + syn keyword postscrConstant contained dotaccent dieresis ring cedilla hungarumlaut ogonek caron emdash + syn keyword postscrConstant contained AE ordfeminine Lslash Oslash OE ordmasculine ae dotlessi lslash + syn keyword postscrConstant contained oslash oe germandbls +" The following are valid names, but are used as short procedure names in generated PS! +" a b c d e f g h i j k l m n o p q r s t u v w x y z +" A B C D E F G H I J K L M N O P Q R S T U V W X Y Z + +" Symbol encoding names + syn keyword postscrConstant contained universal existential suchthat asteriskmath minus + syn keyword postscrConstant contained congruent Alpha Beta Chi Delta Epsilon Phi Gamma Eta Iota theta1 + syn keyword postscrConstant contained Kappa Lambda Mu Nu Omicron Pi Theta Rho Sigma Tau Upsilon sigma1 + syn keyword postscrConstant contained Omega Xi Psi Zeta therefore perpendicular + syn keyword postscrConstant contained radicalex alpha beta chi delta epsilon phi gamma eta iota phi1 + syn keyword postscrConstant contained kappa lambda mu nu omicron pi theta rho sigma tau upsilon omega1 + syn keyword postscrConstant contained Upsilon1 minute lessequal infinity club diamond heart spade + syn keyword postscrConstant contained arrowboth arrowleft arrowup arrowright arrowdown degree plusminus + syn keyword postscrConstant contained second greaterequal multiply proportional partialdiff divide + syn keyword postscrConstant contained notequal equivalence approxequal arrowvertex arrowhorizex + syn keyword postscrConstant contained aleph Ifraktur Rfraktur weierstrass circlemultiply circleplus + syn keyword postscrConstant contained emptyset intersection union propersuperset reflexsuperset notsubset + syn keyword postscrConstant contained propersubset reflexsubset element notelement angle gradient + syn keyword postscrConstant contained registerserif copyrightserif trademarkserif radical dotmath + syn keyword postscrConstant contained logicalnot logicaland logicalor arrowdblboth arrowdblleft arrowdblup + syn keyword postscrConstant contained arrowdblright arrowdbldown omega xi psi zeta similar carriagereturn + syn keyword postscrConstant contained lozenge angleleft registersans copyrightsans trademarksans summation + syn keyword postscrConstant contained parenlefttp parenleftex parenleftbt bracketlefttp bracketleftex + syn keyword postscrConstant contained bracketleftbt bracelefttp braceleftmid braceleftbt braceex euro + syn keyword postscrConstant contained angleright integral integraltp integralex integralbt parenrighttp + syn keyword postscrConstant contained parenrightex parenrightbt bracketrighttp bracketrightex + syn keyword postscrConstant contained bracketrightbt bracerighttp bracerightmid bracerightbt + +" ISO Latin1 encoding names + syn keyword postscrConstant contained brokenbar copyright registered twosuperior threesuperior + syn keyword postscrConstant contained onesuperior onequarter onehalf threequarters + syn keyword postscrConstant contained Agrave Aacute Acircumflex Atilde Adieresis Aring Ccedilla Egrave + syn keyword postscrConstant contained Eacute Ecircumflex Edieresis Igrave Iacute Icircumflex Idieresis + syn keyword postscrConstant contained Eth Ntilde Ograve Oacute Ocircumflex Otilde Odieresis Ugrave Uacute + syn keyword postscrConstant contained Ucircumflex Udieresis Yacute Thorn + syn keyword postscrConstant contained agrave aacute acircumflex atilde adieresis aring ccedilla egrave + syn keyword postscrConstant contained eacute ecircumflex edieresis igrave iacute icircumflex idieresis + syn keyword postscrConstant contained eth ntilde ograve oacute ocircumflex otilde odieresis ugrave uacute + syn keyword postscrConstant contained ucircumflex udieresis yacute thorn ydieresis + syn keyword postscrConstant contained zcaron exclamsmall Hungarumlautsmall dollaroldstyle dollarsuperior + syn keyword postscrConstant contained ampersandsmall Acutesmall parenleftsuperior parenrightsuperior + syn keyword postscrConstant contained twodotenleader onedotenleader zerooldstyle oneoldstyle twooldstyle + syn keyword postscrConstant contained threeoldstyle fouroldstyle fiveoldstyle sixoldstyle sevenoldstyle + syn keyword postscrConstant contained eightoldstyle nineoldstyle commasuperior + syn keyword postscrConstant contained threequartersemdash periodsuperior questionsmall asuperior bsuperior + syn keyword postscrConstant contained centsuperior dsuperior esuperior isuperior lsuperior msuperior + syn keyword postscrConstant contained nsuperior osuperior rsuperior ssuperior tsuperior ff ffi ffl + syn keyword postscrConstant contained parenleftinferior parenrightinferior Circumflexsmall hyphensuperior + syn keyword postscrConstant contained Gravesmall Asmall Bsmall Csmall Dsmall Esmall Fsmall Gsmall Hsmall + syn keyword postscrConstant contained Ismall Jsmall Ksmall Lsmall Msmall Nsmall Osmall Psmall Qsmall + syn keyword postscrConstant contained Rsmall Ssmall Tsmall Usmall Vsmall Wsmall Xsmall Ysmall Zsmall + syn keyword postscrConstant contained colonmonetary onefitted rupiah Tildesmall exclamdownsmall + syn keyword postscrConstant contained centoldstyle Lslashsmall Scaronsmall Zcaronsmall Dieresissmall + syn keyword postscrConstant contained Brevesmall Caronsmall Dotaccentsmall Macronsmall figuredash + syn keyword postscrConstant contained hypheninferior Ogoneksmall Ringsmall Cedillasmall questiondownsmall + syn keyword postscrConstant contained oneeighth threeeighths fiveeighths seveneighths onethird twothirds + syn keyword postscrConstant contained zerosuperior foursuperior fivesuperior sixsuperior sevensuperior + syn keyword postscrConstant contained eightsuperior ninesuperior zeroinferior oneinferior twoinferior + syn keyword postscrConstant contained threeinferior fourinferior fiveinferior sixinferior seveninferior + syn keyword postscrConstant contained eightinferior nineinferior centinferior dollarinferior periodinferior + syn keyword postscrConstant contained commainferior Agravesmall Aacutesmall Acircumflexsmall + syn keyword postscrConstant contained Atildesmall Adieresissmall Aringsmall AEsmall Ccedillasmall + syn keyword postscrConstant contained Egravesmall Eacutesmall Ecircumflexsmall Edieresissmall Igravesmall + syn keyword postscrConstant contained Iacutesmall Icircumflexsmall Idieresissmall Ethsmall Ntildesmall + syn keyword postscrConstant contained Ogravesmall Oacutesmall Ocircumflexsmall Otildesmall Odieresissmall + syn keyword postscrConstant contained OEsmall Oslashsmall Ugravesmall Uacutesmall Ucircumflexsmall + syn keyword postscrConstant contained Udieresissmall Yacutesmall Thornsmall Ydieresissmall Black Bold Book + syn keyword postscrConstant contained Light Medium Regular Roman Semibold + +" Sundry standard and expert encoding names + syn keyword postscrConstant contained trademark Scaron Ydieresis Zcaron scaron softhyphen overscore + syn keyword postscrConstant contained graybox Sacute Tcaron Zacute sacute tcaron zacute Aogonek Scedilla + syn keyword postscrConstant contained Zdotaccent aogonek scedilla Lcaron lcaron zdotaccent Racute Abreve + syn keyword postscrConstant contained Lacute Cacute Ccaron Eogonek Ecaron Dcaron Dcroat Nacute Ncaron + syn keyword postscrConstant contained Ohungarumlaut Rcaron Uring Uhungarumlaut Tcommaaccent racute abreve + syn keyword postscrConstant contained lacute cacute ccaron eogonek ecaron dcaron dcroat nacute ncaron + syn keyword postscrConstant contained ohungarumlaut rcaron uring uhungarumlaut tcommaaccent Gbreve + syn keyword postscrConstant contained Idotaccent gbreve blank apple +endif + + +" By default level 3 includes all level 2 operators +if postscr_level == 2 || postscr_level == 3 +" Dictionary operators + syn match postscrOperator "\(<<\|>>\)" + syn keyword postscrOperator undef + syn keyword postscrConstant globaldict shareddict + +" Device operators + syn keyword postscrOperator setpagedevice currentpagedevice + +" Path operators + syn keyword postscrOperator rectclip setbbox uappend ucache upath ustrokepath arct + +" Painting operators + syn keyword postscrOperator rectfill rectstroke ufill ueofill ustroke + +" Array operators + syn keyword postscrOperator currentpacking setpacking packedarray + +" Misc operators + syn keyword postscrOperator languagelevel + +" Insideness operators + syn keyword postscrOperator infill ineofill instroke inufill inueofill inustroke + +" GState operators + syn keyword postscrOperator gstate setgstate currentgstate setcolor + syn keyword postscrOperator setcolorspace currentcolorspace setstrokeadjust currentstrokeadjust + syn keyword postscrOperator currentcolor + +" Device gstate operators + syn keyword postscrOperator sethalftone currenthalftone setoverprint currentoverprint + syn keyword postscrOperator setcolorrendering currentcolorrendering + +" Character operators + syn keyword postscrConstant GlobalFontDirectory SharedFontDirectory + syn keyword postscrOperator glyphshow selectfont + syn keyword postscrOperator addglyph undefinefont xshow xyshow yshow + +" Pattern operators + syn keyword postscrOperator makepattern setpattern execform + +" Resource operators + syn keyword postscrOperator defineresource undefineresource findresource resourcestatus + syn keyword postscrRepeat resourceforall + +" File operators + syn keyword postscrOperator filter printobject writeobject setobjectformat currentobjectformat + +" VM operators + syn keyword postscrOperator currentshared setshared defineuserobject execuserobject undefineuserobject + syn keyword postscrOperator gcheck scheck startjob currentglobal setglobal + syn keyword postscrConstant UserObjects + +" Interpreter operators + syn keyword postscrOperator setucacheparams setvmthreshold ucachestatus setsystemparams + syn keyword postscrOperator setuserparams currentuserparams setcacheparams currentcacheparams + syn keyword postscrOperator currentdevparams setdevparams vmreclaim currentsystemparams + +" PS2 constants + syn keyword postscrConstant contained DeviceCMYK Pattern Indexed Separation Cyan Magenta Yellow Black + syn keyword postscrConstant contained CIEBasedA CIEBasedABC CIEBasedDEF CIEBasedDEFG + +" PS2 $error dictionary entries + syn keyword postscrConstant contained newerror errorname command errorinfo ostack estack dstack + syn keyword postscrConstant contained recordstacks binary + +" PS2 Category dictionary + syn keyword postscrConstant contained DefineResource UndefineResource FindResource ResourceStatus + syn keyword postscrConstant contained ResourceForAll Category InstanceType ResourceFileName + +" PS2 Category names + syn keyword postscrConstant contained Font Encoding Form Pattern ProcSet ColorSpace Halftone + syn keyword postscrConstant contained ColorRendering Filter ColorSpaceFamily Emulator IODevice + syn keyword postscrConstant contained ColorRenderingType FMapType FontType FormType HalftoneType + syn keyword postscrConstant contained ImageType PatternType Category Generic + +" PS2 pagedevice dictionary entries + syn keyword postscrConstant contained PageSize MediaColor MediaWeight MediaType InputAttributes ManualFeed + syn keyword postscrConstant contained OutputType OutputAttributes NumCopies Collate Duplex Tumble + syn keyword postscrConstant contained Separations HWResolution Margins NegativePrint MirrorPrint + syn keyword postscrConstant contained CutMedia AdvanceMedia AdvanceDistance ImagingBBox + syn keyword postscrConstant contained Policies Install BeginPage EndPage PolicyNotFound PolicyReport + syn keyword postscrConstant contained ManualSize OutputFaceUp Jog + syn keyword postscrConstant contained Bind BindDetails Booklet BookletDetails CollateDetails + syn keyword postscrConstant contained DeviceRenderingInfo ExitJamRecovery Fold FoldDetails Laminate + syn keyword postscrConstant contained ManualFeedTimeout Orientation OutputPage + syn keyword postscrConstant contained PostRenderingEnhance PostRenderingEnhanceDetails + syn keyword postscrConstant contained PreRenderingEnhance PreRenderingEnhanceDetails + syn keyword postscrConstant contained Signature SlipSheet Staple StapleDetails Trim + syn keyword postscrConstant contained ProofSet REValue PrintQuality ValuesPerColorComponent AntiAlias + +" PS2 PDL resource entries + syn keyword postscrConstant contained Selector LanguageFamily LanguageVersion + +" PS2 halftone dictionary entries + syn keyword postscrConstant contained HalftoneType HalftoneName + syn keyword postscrConstant contained AccurateScreens ActualAngle Xsquare Ysquare AccurateFrequency + syn keyword postscrConstant contained Frequency SpotFunction Angle Width Height Thresholds + syn keyword postscrConstant contained RedFrequency RedSpotFunction RedAngle RedWidth RedHeight + syn keyword postscrConstant contained GreenFrequency GreenSpotFunction GreenAngle GreenWidth GreenHeight + syn keyword postscrConstant contained BlueFrequency BlueSpotFunction BlueAngle BlueWidth BlueHeight + syn keyword postscrConstant contained GrayFrequency GrayAngle GraySpotFunction GrayWidth GrayHeight + syn keyword postscrConstant contained GrayThresholds BlueThresholds GreenThresholds RedThresholds + syn keyword postscrConstant contained TransferFunction + +" PS2 CSR dictionaries + syn keyword postscrConstant contained RangeA DecodeA MatrixA RangeABC DecodeABC MatrixABC BlackPoint + syn keyword postscrConstant contained RangeLMN DecodeLMN MatrixLMN WhitePoint RangeDEF DecodeDEF RangeHIJ + syn keyword postscrConstant contained RangeDEFG DecodeDEFG RangeHIJK Table + +" PS2 CRD dictionaries + syn keyword postscrConstant contained ColorRenderingType EncodeLMB EncodeABC RangePQR MatrixPQR + syn keyword postscrConstant contained AbsoluteColorimetric RelativeColorimetric Saturation Perceptual + syn keyword postscrConstant contained TransformPQR RenderTable + +" PS2 Pattern dictionary + syn keyword postscrConstant contained PatternType PaintType TilingType XStep YStep + +" PS2 Image dictionary + syn keyword postscrConstant contained ImageType ImageMatrix MultipleDataSources DataSource + syn keyword postscrConstant contained BitsPerComponent Decode Interpolate + +" PS2 Font dictionaries + syn keyword postscrConstant contained FontType FontMatrix FontName FontInfo LanguageLevel WMode Encoding + syn keyword postscrConstant contained UniqueID StrokeWidth Metrics Metrics2 CDevProc CharStrings Private + syn keyword postscrConstant contained FullName Notice version ItalicAngle isFixedPitch UnderlinePosition + syn keyword postscrConstant contained FMapType Encoding FDepVector PrefEnc EscChar ShiftOut ShiftIn + syn keyword postscrConstant contained WeightVector Blend $Blend CIDFontType sfnts CIDSystemInfo CodeMap + syn keyword postscrConstant contained CMap CIDFontName CIDSystemInfo UIDBase CIDDevProc CIDCount + syn keyword postscrConstant contained CIDMapOffset FDArray FDBytes GDBytes GlyphData GlyphDictionary + syn keyword postscrConstant contained SDBytes SubrMapOffset SubrCount BuildGlyph CIDMap FID MIDVector + syn keyword postscrConstant contained Ordering Registry Supplement CMapName CMapVersion UIDOffset + syn keyword postscrConstant contained SubsVector UnderlineThickness FamilyName FontBBox CurMID + syn keyword postscrConstant contained Weight + +" PS2 User paramters + syn keyword postscrConstant contained MaxFontItem MinFontCompress MaxUPathItem MaxFormItem MaxPatternItem + syn keyword postscrConstant contained MaxScreenItem MaxOpStack MaxDictStack MaxExecStack MaxLocalVM + syn keyword postscrConstant contained VMReclaim VMThreshold + +" PS2 System paramters + syn keyword postscrConstant contained SystemParamsPassword StartJobPassword BuildTime ByteOrder RealFormat + syn keyword postscrConstant contained MaxFontCache CurFontCache MaxOutlineCache CurOutlineCache + syn keyword postscrConstant contained MaxUPathCache CurUPathCache MaxFormCache CurFormCache + syn keyword postscrConstant contained MaxPatternCache CurPatternCache MaxScreenStorage CurScreenStorage + syn keyword postscrConstant contained MaxDisplayList CurDisplayList + +" PS2 LZW Filters + syn keyword postscrConstant contained Predictor + +" Paper Size operators + syn keyword postscrOperator letter lettersmall legal ledger 11x17 a4 a3 a4small b5 note + +" Paper Tray operators + syn keyword postscrOperator lettertray legaltray ledgertray a3tray a4tray b5tray 11x17tray + +" SCC compatibility operators + syn keyword postscrOperator sccbatch sccinteractive setsccbatch setsccinteractive + +" Page duplexing operators + syn keyword postscrOperator duplexmode firstside newsheet setduplexmode settumble tumble + +" Device compatability operators + syn keyword postscrOperator devdismount devformat devmount devstatus + syn keyword postscrRepeat devforall + +" Imagesetter compatability operators + syn keyword postscrOperator accuratescreens checkscreen pagemargin pageparams setaccuratescreens setpage + syn keyword postscrOperator setpagemargin setpageparams + +" Misc compatability operators + syn keyword postscrOperator appletalktype buildtime byteorder checkpassword defaulttimeouts diskonline + syn keyword postscrOperator diskstatus manualfeed manualfeedtimeout margins mirrorprint pagecount + syn keyword postscrOperator pagestackorder printername processcolors sethardwareiomode setjobtimeout + syn keyword postscrOperator setpagestockorder setprintername setresolution doprinterrors dostartpage + syn keyword postscrOperator hardwareiomode initializedisk jobname jobtimeout ramsize realformat resolution + syn keyword postscrOperator setdefaulttimeouts setdoprinterrors setdostartpage setdosysstart + syn keyword postscrOperator setuserdiskpercent softwareiomode userdiskpercent waittimeout + syn keyword postscrOperator setsoftwareiomode dosysstart emulate setmargins setmirrorprint + +endif " PS2 highlighting + +if postscr_level == 3 +" Shading operators + syn keyword postscrOperator setsmoothness currentsmoothness shfill + +" Clip operators + syn keyword postscrOperator clipsave cliprestore + +" Pagedevive operators + syn keyword postscrOperator setpage setpageparams + +" Device gstate operators + syn keyword postscrOperator findcolorrendering + +" Font operators + syn keyword postscrOperator composefont + +" PS LL3 Output device resource entries + syn keyword postscrConstant contained DeviceN TrappingDetailsType + +" PS LL3 pagdevice dictionary entries + syn keyword postscrConstant contained DeferredMediaSelection ImageShift InsertSheet LeadingEdge MaxSeparations + syn keyword postscrConstant contained MediaClass MediaPosition OutputDevice PageDeviceName PageOffset ProcessColorModel + syn keyword postscrConstant contained RollFedMedia SeparationColorNames SeparationOrder Trapping TrappingDetails + syn keyword postscrConstant contained TraySwitch UseCIEColor + syn keyword postscrConstant contained ColorantDetails ColorantName ColorantType NeutralDensity TrappingOrder + syn keyword postscrConstant contained ColorantSetName + +" PS LL3 trapping dictionary entries + syn keyword postscrConstant contained BlackColorLimit BlackDensityLimit BlackWidth ColorantZoneDetails + syn keyword postscrConstant contained SlidingTrapLimit StepLimit TrapColorScaling TrapSetName TrapWidth + syn keyword postscrConstant contained ImageResolution ImageToObjectTrapping ImageTrapPlacement + syn keyword postscrConstant contained StepLimit TrapColorScaling Enabled ImageInternalTrapping + +" PS LL3 filters and entries + syn keyword postscrConstant contained ReusableStreamDecode CloseSource CloseTarget UnitSize LowBitFirst + syn keyword postscrConstant contained FlateEncode FlateDecode DecodeParams Intent AsyncRead + +" PS LL3 halftone dictionary entries + syn keyword postscrConstant contained Height2 Width2 + +" PS LL3 function dictionary entries + syn keyword postscrConstant contained FunctionType Domain Range Order BitsPerSample Encode Size C0 C1 N + syn keyword postscrConstant contained Functions Bounds + +" PS LL3 image dictionary entries + syn keyword postscrConstant contained InterleaveType MaskDict DataDict MaskColor + +" PS LL3 Pattern and shading dictionary entries + syn keyword postscrConstant contained Shading ShadingType Background ColorSpace Coords Extend Function + syn keyword postscrConstant contained VerticesPerRow BitsPerCoordinate BitsPerFlag + +" PS LL3 image dictionary entries + syn keyword postscrConstant contained XOrigin YOrigin UnpaintedPath PixelCopy + +" PS LL3 colorrendering procedures + syn keyword postscrProcedure GetHalftoneName GetPageDeviceName GetSubstituteCRD + +" PS LL3 CIDInit procedures + syn keyword postscrProcedure beginbfchar beginbfrange begincidchar begincidrange begincmap begincodespacerange + syn keyword postscrProcedure beginnotdefchar beginnotdefrange beginrearrangedfont beginusematrix + syn keyword postscrProcedure endbfchar endbfrange endcidchar endcidrange endcmap endcodespacerange + syn keyword postscrProcedure endnotdefchar endnotdefrange endrearrangedfont endusematrix + syn keyword postscrProcedure StartData usefont usecmp + +" PS LL3 Trapping procedures + syn keyword postscrProcedure settrapparams currenttrapparams settrapzone + +" PS LL3 BitmapFontInit procedures + syn keyword postscrProcedure removeall removeglyphs + +" PS LL3 Font names + if exists("postscr_fonts") + syn keyword postscrConstant contained AlbertusMT AlbertusMT-Italic AlbertusMT-Light Apple-Chancery Apple-ChanceryCE + syn keyword postscrConstant contained AntiqueOlive-Roman AntiqueOlive-Italic AntiqueOlive-Bold AntiqueOlive-Compact + syn keyword postscrConstant contained AntiqueOliveCE-Roman AntiqueOliveCE-Italic AntiqueOliveCE-Bold AntiqueOliveCE-Compact + syn keyword postscrConstant contained ArialMT Arial-ItalicMT Arial-LightMT Arial-BoldMT Arial-BoldItalicMT + syn keyword postscrConstant contained ArialCE ArialCE-Italic ArialCE-Light ArialCE-Bold ArialCE-BoldItalic + syn keyword postscrConstant contained AvantGarde-Book AvantGarde-BookOblique AvantGarde-Demi AvantGarde-DemiOblique + syn keyword postscrConstant contained AvantGardeCE-Book AvantGardeCE-BookOblique AvantGardeCE-Demi AvantGardeCE-DemiOblique + syn keyword postscrConstant contained Bodoni Bodoni-Italic Bodoni-Bold Bodoni-BoldItalic Bodoni-Poster Bodoni-PosterCompressed + syn keyword postscrConstant contained BodoniCE BodoniCE-Italic BodoniCE-Bold BodoniCE-BoldItalic BodoniCE-Poster BodoniCE-PosterCompressed + syn keyword postscrConstant contained Bookman-Light Bookman-LightItalic Bookman-Demi Bookman-DemiItalic + syn keyword postscrConstant contained BookmanCE-Light BookmanCE-LightItalic BookmanCE-Demi BookmanCE-DemiItalic + syn keyword postscrConstant contained Carta Chicago ChicagoCE Clarendon Clarendon-Light Clarendon-Bold + syn keyword postscrConstant contained ClarendonCE ClarendonCE-Light ClarendonCE-Bold CooperBlack CooperBlack-Italic + syn keyword postscrConstant contained Copperplate-ThirtyTwoBC CopperPlate-ThirtyThreeBC Coronet-Regular CoronetCE-Regular + syn keyword postscrConstant contained CourierCE CourierCE-Oblique CourierCE-Bold CourierCE-BoldOblique + syn keyword postscrConstant contained Eurostile Eurostile-Bold Eurostile-ExtendedTwo Eurostile-BoldExtendedTwo + syn keyword postscrConstant contained Eurostile EurostileCE-Bold EurostileCE-ExtendedTwo EurostileCE-BoldExtendedTwo + syn keyword postscrConstant contained Geneva GenevaCE GillSans GillSans-Italic GillSans-Bold GillSans-BoldItalic GillSans-BoldCondensed + syn keyword postscrConstant contained GillSans-Light GillSans-LightItalic GillSans-ExtraBold + syn keyword postscrConstant contained GillSansCE-Roman GillSansCE-Italic GillSansCE-Bold GillSansCE-BoldItalic GillSansCE-BoldCondensed + syn keyword postscrConstant contained GillSansCE-Light GillSansCE-LightItalic GillSansCE-ExtraBold + syn keyword postscrConstant contained Goudy Goudy-Italic Goudy-Bold Goudy-BoldItalic Goudy-ExtraBould + syn keyword postscrConstant contained HelveticaCE HelveticaCE-Oblique HelveticaCE-Bold HelveticaCE-BoldOblique + syn keyword postscrConstant contained Helvetica-Condensed Helvetica-Condensed-Oblique Helvetica-Condensed-Bold Helvetica-Condensed-BoldObl + syn keyword postscrConstant contained HelveticaCE-Condensed HelveticaCE-Condensed-Oblique HelveticaCE-Condensed-Bold + syn keyword postscrConstant contained HelveticaCE-Condensed-BoldObl Helvetica-Narrow Helvetica-Narrow-Oblique Helvetica-Narrow-Bold + syn keyword postscrConstant contained Helvetica-Narrow-BoldOblique HelveticaCE-Narrow HelveticaCE-Narrow-Oblique HelveticaCE-Narrow-Bold + syn keyword postscrConstant contained HelveticaCE-Narrow-BoldOblique HoeflerText-Regular HoeflerText-Italic HoeflerText-Black + syn keyword postscrConstant contained HoeflerText-BlackItalic HoeflerText-Ornaments HoeflerTextCE-Regular HoeflerTextCE-Italic + syn keyword postscrConstant contained HoeflerTextCE-Black HoeflerTextCE-BlackItalic + syn keyword postscrConstant contained JoannaMT JoannaMT-Italic JoannaMT-Bold JoannaMT-BoldItalic + syn keyword postscrConstant contained JoannaMTCE JoannaMTCE-Italic JoannaMTCE-Bold JoannaMTCE-BoldItalic + syn keyword postscrConstant contained LetterGothic LetterGothic-Slanted LetterGothic-Bold LetterGothic-BoldSlanted + syn keyword postscrConstant contained LetterGothicCE LetterGothicCE-Slanted LetterGothicCE-Bold LetterGothicCE-BoldSlanted + syn keyword postscrConstant contained LubalinGraph-Book LubalinGraph-BookOblique LubalinGraph-Demi LubalinGraph-DemiOblique + syn keyword postscrConstant contained LubalinGraphCE-Book LubalinGraphCE-BookOblique LubalinGraphCE-Demi LubalinGraphCE-DemiOblique + syn keyword postscrConstant contained Marigold Monaco MonacoCE MonaLisa-Recut Oxford Symbol Tekton + syn keyword postscrConstant contained NewCennturySchlbk-Roman NewCenturySchlbk-Italic NewCenturySchlbk-Bold NewCenturySchlbk-BoldItalic + syn keyword postscrConstant contained NewCenturySchlbkCE-Roman NewCenturySchlbkCE-Italic NewCenturySchlbkCE-Bold + syn keyword postscrConstant contained NewCenturySchlbkCE-BoldItalic NewYork NewYorkCE + syn keyword postscrConstant contained Optima Optima-Italic Optima-Bold Optima-BoldItalic + syn keyword postscrConstant contained OptimaCE OptimaCE-Italic OptimaCE-Bold OptimaCE-BoldItalic + syn keyword postscrConstant contained Palatino-Roman Palatino-Italic Palatino-Bold Palatino-BoldItalic + syn keyword postscrConstant contained PalatinoCE-Roman PalatinoCE-Italic PalatinoCE-Bold PalatinoCE-BoldItalic + syn keyword postscrConstant contained StempelGaramond-Roman StempelGaramond-Italic StempelGaramond-Bold StempelGaramond-BoldItalic + syn keyword postscrConstant contained StempelGaramondCE-Roman StempelGaramondCE-Italic StempelGaramondCE-Bold StempelGaramondCE-BoldItalic + syn keyword postscrConstant contained TimesCE-Roman TimesCE-Italic TimesCE-Bold TimesCE-BoldItalic + syn keyword postscrConstant contained TimesNewRomanPSMT TimesNewRomanPS-ItalicMT TimesNewRomanPS-BoldMT TimesNewRomanPS-BoldItalicMT + syn keyword postscrConstant contained TimesNewRomanCE TimesNewRomanCE-Italic TimesNewRomanCE-Bold TimesNewRomanCE-BoldItalic + syn keyword postscrConstant contained Univers Univers-Oblique Univers-Bold Univers-BoldOblique + syn keyword postscrConstant contained UniversCE-Medium UniversCE-Oblique UniversCE-Bold UniversCE-BoldOblique + syn keyword postscrConstant contained Univers-Light Univers-LightOblique UniversCE-Light UniversCE-LightOblique + syn keyword postscrConstant contained Univers-Condensed Univers-CondensedOblique Univers-CondensedBold Univers-CondensedBoldOblique + syn keyword postscrConstant contained UniversCE-Condensed UniversCE-CondensedOblique UniversCE-CondensedBold UniversCE-CondensedBoldOblique + syn keyword postscrConstant contained Univers-Extended Univers-ExtendedObl Univers-BoldExt Univers-BoldExtObl + syn keyword postscrConstant contained UniversCE-Extended UniversCE-ExtendedObl UniversCE-BoldExt UniversCE-BoldExtObl + syn keyword postscrConstant contained Wingdings-Regular ZapfChancery-MediumItalic ZapfChanceryCE-MediumItalic ZapfDingBats + endif " Font names + +endif " PS LL3 highlighting + + +if exists("postscr_ghostscript") + " GS gstate operators + syn keyword postscrOperator .setaccuratecurves .currentaccuratecurves .setclipoutside + syn keyword postscrOperator .setdashadapt .currentdashadapt .setdefaultmatrix .setdotlength + syn keyword postscrOperator .currentdotlength .setfilladjust2 .currentfilladjust2 + syn keyword postscrOperator .currentclipoutside .setcurvejoin .currentcurvejoin + syn keyword postscrOperator .setblendmode .currentblendmode .setopacityalpha .currentopacityalpha .setshapealpha .currentshapealpha + syn keyword postscrOperator .setlimitclamp .currentlimitclamp .setoverprintmode .currentoverprintmode + + " GS path operators + syn keyword postscrOperator .dashpath .rectappend + + " GS painting operators + syn keyword postscrOperator .setrasterop .currentrasterop .setsourcetransparent + syn keyword postscrOperator .settexturetransparent .currenttexturetransparent + syn keyword postscrOperator .currentsourcetransparent + + " GS character operators + syn keyword postscrOperator .charboxpath .type1execchar %Type1BuildChar %Type1BuildGlyph + + " GS mathematical operators + syn keyword postscrMathOperator arccos arcsin + + " GS dictionary operators + syn keyword postscrOperator .dicttomark .forceput .forceundef .knownget .setmaxlength + + " GS byte and string operators + syn keyword postscrOperator .type1encrypt .type1decrypt + syn keyword postscrOperator .bytestring .namestring .stringmatch + + " GS relational operators (seem like math ones to me!) + syn keyword postscrMathOperator max min + + " GS file operators + syn keyword postscrOperator findlibfile unread writeppmfile + syn keyword postscrOperator .filename .fileposition .peekstring .unread + + " GS vm operators + syn keyword postscrOperator .forgetsave + + " GS device operators + syn keyword postscrOperator copydevice .getdevice makeimagedevice makewordimagedevice copyscanlines + syn keyword postscrOperator setdevice currentdevice getdeviceprops putdeviceprops flushpage + syn keyword postscrOperator finddevice findprotodevice .getbitsrect + + " GS misc operators + syn keyword postscrOperator getenv .makeoperator .setdebug .oserrno .oserror .execn + + " GS rendering stack operators + syn keyword postscrOperator .begintransparencygroup .discardtransparencygroup .endtransparencygroup + syn keyword postscrOperator .begintransparencymask .discardtransparencymask .endtransparencymask .inittransparencymask + syn keyword postscrOperator .settextknockout .currenttextknockout + + " GS filters + syn keyword postscrConstant contained BCPEncode BCPDecode eexecEncode eexecDecode PCXDecode + syn keyword postscrConstant contained PixelDifferenceEncode PixelDifferenceDecode + syn keyword postscrConstant contained PNGPredictorDecode TBCPEncode TBCPDecode zlibEncode + syn keyword postscrConstant contained zlibDecode PNGPredictorEncode PFBDecode + syn keyword postscrConstant contained MD5Encode + + " GS filter keys + syn keyword postscrConstant contained InitialCodeLength FirstBitLowOrder BlockData DecodedByteAlign + + " GS device parameters + syn keyword postscrConstant contained BitsPerPixel .HWMargins HWSize Name GrayValues + syn keyword postscrConstant contained ColorValues TextAlphaBits GraphicsAlphaBits BufferSpace + syn keyword postscrConstant contained OpenOutputFile PageCount BandHeight BandWidth BandBufferSpace + syn keyword postscrConstant contained ViewerPreProcess GreenValues BlueValues OutputFile + syn keyword postscrConstant contained MaxBitmap RedValues + +endif " GhostScript highlighting + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_postscr_syntax_inits") + if version < 508 + let did_postscr_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink postscrComment Comment + + HiLink postscrConstant Constant + HiLink postscrString String + HiLink postscrASCIIString postscrString + HiLink postscrHexString postscrString + HiLink postscrASCII85String postscrString + HiLink postscrNumber Number + HiLink postscrInteger postscrNumber + HiLink postscrHex postscrNumber + HiLink postscrRadix postscrNumber + HiLink postscrFloat Float + HiLink postscrBoolean Boolean + + HiLink postscrIdentifier Identifier + HiLink postscrProcedure Function + + HiLink postscrName Statement + HiLink postscrConditional Conditional + HiLink postscrRepeat Repeat + HiLink postscrOperator Operator + HiLink postscrMathOperator postscrOperator + HiLink postscrLogicalOperator postscrOperator + HiLink postscrBinaryOperator postscrOperator + + HiLink postscrDSCComment SpecialComment + HiLink postscrSpecialChar SpecialChar + + HiLink postscrTodo Todo + + HiLink postscrError Error + HiLink postscrSpecialCharError postscrError + HiLink postscrASCII85CharError postscrError + HiLink postscrHexCharError postscrError + HiLink postscrIdentifierError postscrError + + delcommand HiLink +endif + +let b:current_syntax = "postscr" + +" vim: ts=8 diff --git a/runtime/syntax/pov.vim b/runtime/syntax/pov.vim new file mode 100644 index 000000000..700bb315d --- /dev/null +++ b/runtime/syntax/pov.vim @@ -0,0 +1,144 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: PoV-Ray(tm) 3.5 Scene Description Language +" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> +" Last Change: 2003 Apr 25 +" URL: http://physics.muni.cz/~yeti/download/syntax/pov.vim +" Required Vim Version: 6.0 + +" Setup +if version >= 600 + " Quit when a syntax file was already loaded + if exists("b:current_syntax") + finish + endif +else + " Croak when an old Vim is sourcing us. + echo "Sorry, but this syntax file relies on Vim 6 features. Either upgrade Vim or use a version of " . expand("<sfile>:t:r") . " syntax file appropriate for Vim " . version/100 . "." . version %100 . "." + finish +endif + +syn case match + +" Top level stuff +syn keyword povCommands global_settings +syn keyword povObjects array atmosphere background bicubic_patch blob box camera component cone cubic cylinder disc fog height_field isosurface julia_fractal lathe light_group light_source mesh mesh2 object parametric pattern photons plane poly polygon prism quadric quartic rainbow sky_sphere smooth_triangle sor sphere sphere_sweep spline superellipsoid text torus triangle +syn keyword povCSG clipped_by composite contained_by difference intersection merge union +syn keyword povAppearance interior material media texture interior_texture texture_list +syn keyword povGlobalSettings ambient_light assumed_gamma charset hf_gray_16 irid_wavelength max_intersections max_trace_level number_of_waves radiosity noise_generator +syn keyword povTransform inverse matrix rotate scale translate transform + +" Descriptors +syn keyword povDescriptors finish normal pigment uv_mapping uv_vectors vertex_vectors +syn keyword povDescriptors adc_bailout always_sample brightness count error_bound distance_maximum gray_threshold load_file low_error_factor max_sample media minimum_reuse nearest_count normal pretrace_end pretrace_start recursion_limit save_file +syn keyword povDescriptors color colour gray rgb rgbt rgbf rgbft red green blue +syn keyword povDescriptors bump_map color_map colour_map image_map material_map pigment_map quick_color quick_colour normal_map texture_map image_pattern pigment_pattern +syn keyword povDescriptors ambient brilliance conserve_energy crand diffuse fresnel irid metallic phong phong_size refraction reflection reflection_exponent roughness specular +syn keyword povDescriptors cylinder fisheye omnimax orthographic panoramic perspective spherical ultra_wide_angle +syn keyword povDescriptors agate average brick boxed bozo bumps cells checker crackle cylindrical dents facets function gradient granite hexagon julia leopard magnet mandel marble onion planar quilted radial ripples slope spherical spiral1 spiral2 spotted tiles tiles2 toroidal waves wood wrinkles +syn keyword povDescriptors density_file +syn keyword povDescriptors area_light shadowless spotlight parallel +syn keyword povDescriptors absorption confidence density emission intervals ratio samples scattering variance +syn keyword povDescriptors distance fog_alt fog_offset fog_type turb_depth +syn keyword povDescriptors b_spline bezier_spline cubic_spline evaluate face_indices form linear_spline max_gradient natural_spline normal_indices normal_vectors quadratic_spline uv_indices +syn keyword povDescriptors target + +" Modifiers +syn keyword povModifiers caustics dispersion dispersion_samples fade_color fade_colour fade_distance fade_power ior +syn keyword povModifiers bounded_by double_illuminate hierarchy hollow no_shadow open smooth sturm threshold water_level +syn keyword povModifiers hypercomplex max_iteration precision quaternion slice +syn keyword povModifiers conic_sweep linear_sweep +syn keyword povModifiers flatness type u_steps v_steps +syn keyword povModifiers aa_level aa_threshold adaptive falloff jitter looks_like media_attenuation media_interaction method point_at radius tightness +syn keyword povModifiers angle aperture blur_samples confidence direction focal_point h_angle location look_at right sky up v_angle variance +syn keyword povModifiers all bump_size filter interpolate map_type once slope_map transmit use_alpha use_color use_colour use_index +syn keyword povModifiers black_hole agate_turb brick_size control0 control1 cubic_wave density_map flip frequency interpolate inverse lambda metric mortar octaves offset omega phase poly_wave ramp_wave repeat scallop_wave sine_wave size strength triangle_wave thickness turbulence turb_depth type warp +syn keyword povModifiers eccentricity extinction +syn keyword povModifiers arc_angle falloff_angle width +syn keyword povModifiers accuracy all_intersections altitude autostop circular collect coords cutaway_textures dist_exp expand_thresholds exponent exterior gather global_lights major_radius max_trace no_bump_scale no_image no_reflection orient orientation pass_through precompute projected_through range_divider solid spacing split_union tolerance + +" Words not marked `reserved' in documentation, but... +syn keyword povBMPType alpha gif iff jpeg pgm png pot ppm sys tga tiff contained +syn keyword povFontType ttf contained +syn keyword povDensityType df3 contained +syn keyword povCharset ascii utf8 contained + +" Math functions on floats, vectors and strings +syn keyword povFunctions abs acos acosh asc asin asinh atan atan2 atanh ceil cos cosh defined degrees dimensions dimension_size div exp file_exists floor int internal ln log max min mod pow radians rand seed select sin sinh sqrt strcmp strlen tan tanh val vdot vlength vstr vturbulence +syn keyword povFunctions min_extent max_extent trace vcross vrotate vaxis_rotate vnormalize vturbulence +syn keyword povFunctions chr concat substr str strupr strlwr +syn keyword povJuliaFunctions acosh asinh atan cosh cube pwr reciprocal sinh sqr tanh + +" Specialities +syn keyword povConsts clock clock_delta clock_on final_clock final_frame frame_number initial_clock initial_frame image_width image_height false no off on pi t true u v version x y yes z +syn match povDotItem "\.\@<=\(blue\|green\|filter\|red\|transmit\|t\|u\|v\|x\|y\|z\)\>" display + +" Comments +syn region povComment start="/\*" end="\*/" contains=povTodo,povComment +syn match povComment "//.*" contains=povTodo +syn match povCommentError "\*/" +syn sync ccomment povComment +syn sync minlines=50 +syn keyword povTodo TODO FIXME XXX NOT contained +syn cluster povPRIVATE add=povTodo + +" Language directives +syn match povConditionalDir "#\s*\(else\|end\|if\|ifdef\|ifndef\|switch\|while\)\>" +syn match povLabelDir "#\s*\(break\|case\|default\|range\)\>" +syn match povDeclareDir "#\s*\(declare\|default\|local\|macro\|undef\|version\)\>" +syn match povIncludeDir "#\s*include\>" +syn match povFileDir "#\s*\(fclose\|fopen\|read\|write\)\>" +syn match povMessageDir "#\s*\(debug\|error\|render\|statistics\|warning\)\>" +syn region povFileOpen start="#\s*fopen\>" skip=+"[^"]*"+ matchgroup=povOpenType end="\<\(read\|write\|append\)\>" contains=ALLBUT,PovParenError,PovBraceError,@PovPRIVATE transparent keepend + +" Literal strings +syn match povSpecialChar "\\\d\d\d\|\\." contained +syn region povString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=povSpecialChar oneline +syn cluster povPRIVATE add=povSpecialChar + +" Catch errors caused by wrong parenthesization +syn region povParen start='(' end=')' contains=ALLBUT,povParenError,@povPRIVATE transparent +syn match povParenError ")" +syn region povBrace start='{' end='}' contains=ALLBUT,povBraceError,@povPRIVATE transparent +syn match povBraceError "}" + +" Numbers +syn match povNumber "\(^\|\W\)\@<=[+-]\=\(\d\+\)\=\.\=\d\+\([eE][+-]\=\d\+\)\=" + +" Define the default highlighting +hi def link povComment Comment +hi def link povTodo Todo +hi def link povNumber Number +hi def link povString String +hi def link povFileOpen Constant +hi def link povConsts Constant +hi def link povDotItem Constant +hi def link povBMPType povSpecial +hi def link povCharset povSpecial +hi def link povDensityType povSpecial +hi def link povFontType povSpecial +hi def link povOpenType povSpecial +hi def link povSpecialChar povSpecial +hi def link povSpecial Special +hi def link povConditionalDir PreProc +hi def link povLabelDir PreProc +hi def link povDeclareDir Define +hi def link povIncludeDir Include +hi def link povFileDir PreProc +hi def link povMessageDir Debug +hi def link povAppearance povDescriptors +hi def link povObjects povDescriptors +hi def link povGlobalSettings povDescriptors +hi def link povDescriptors Type +hi def link povJuliaFunctions PovFunctions +hi def link povModifiers povFunctions +hi def link povFunctions Function +hi def link povCommands Operator +hi def link povTransform Operator +hi def link povCSG Operator +hi def link povParenError povError +hi def link povBraceError povError +hi def link povCommentError povError +hi def link povError Error + +let b:current_syntax = "pov" diff --git a/runtime/syntax/povini.vim b/runtime/syntax/povini.vim new file mode 100644 index 000000000..02169ea23 --- /dev/null +++ b/runtime/syntax/povini.vim @@ -0,0 +1,62 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: PoV-Ray(tm) 3.5 configuration/initialization files +" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> +" Last Change: 2002-06-01 +" URL: http://physics.muni.cz/~yeti/download/syntax/povini.vim +" Required Vim Version: 6.0 + +" Setup +if version >= 600 + " Quit when a syntax file was already loaded + if exists("b:current_syntax") + finish + endif +else + " Croak when an old Vim is sourcing us. + echo "Sorry, but this syntax file relies on Vim 6 features. Either upgrade Vim or usea version of " . expand("<sfile>:t:r") . " syntax file appropriate for Vim " . version/100 . "." . version %100 . "." + finish +endif + +syn case ignore + +" Syntax +syn match poviniInclude "^\s*[^[+-;]\S*\s*$" contains=poviniSection +syn match poviniLabel "^.\{-1,}\ze=" transparent contains=poviniKeyword nextgroup=poviniBool,poviniNumber +syn keyword poviniBool On Off True False Yes No +syn match poviniNumber "\<\d*\.\=\d\+\>" +syn keyword poviniKeyword Clock Initial_Frame Final_Frame Initial_Clock Final_Clock Subset_Start_Frame Subset_End_Frame Cyclic_Animation Field_Render Odd_Field +syn keyword poviniKeyword Width Height Start_Column Start_Row End_Column End_Row Test_Abort Test_Abort_Count Continue_Trace Create_Ini +syn keyword poviniKeyword Display Video_Mode Palette Display_Gamma Pause_When_Done Verbose Draw_Vistas Preview_Start_Size Preview_End_Size +syn keyword poviniKeyword Output_to_File Output_File_Type Output_Alpha Bits_Per_Color Output_File_Name Buffer_Output Buffer_Size +syn keyword poviniKeyword Histogram_Type Histogram_Grid_Size Histogram_Name +syn keyword poviniKeyword Input_File_Name Include_Header Library_Path Version +syn keyword poviniKeyword Debug_Console Fatal_Console Render_Console Statistic_Console Warning_Console All_Console Debug_File Fatal_File Render_File Statistic_File Warning_File All_File Warning_Level +syn keyword poviniKeyword Quality Radiosity Bounding Bounding_Threshold Light_Buffer Vista_Buffer Remove_Bounds Split_Unions Antialias Sampling_Method Antialias_Threshold Jitter Jitter_Amount Antialias_Depth +syn keyword poviniKeyword Pre_Scene_Return Pre_Frame_Return Post_Scene_Return Post_Frame_Return User_Abort_Return Fatal_Error_Return +syn match poviniShellOut "^\s*\(Pre_Scene_Command\|Pre_Frame_Command\|Post_Scene_Command\|Post_Frame_Command\|User_Abort_Command\|Fatal_Error_Command\)\>" nextgroup=poviniShellOutEq skipwhite +syn match poviniShellOutEq "=" nextgroup=poviniShellOutRHS skipwhite contained +syn match poviniShellOutRHS "[^;]\+" skipwhite contained contains=poviniShellOutSpecial +syn match poviniShellOutSpecial "%[osnkhw%]" contained +syn keyword poviniDeclare Declare +syn match poviniComment ";.*$" +syn match poviniOption "^\s*[+-]\S*" +syn match poviniIncludeLabel "^\s*Include_INI\s*=" nextgroup=poviniIncludedFile skipwhite +syn match poviniIncludedFile "[^;]\+" contains=poviniSection contained +syn region poviniSection start="\[" end="\]" + +" Define the default highlighting +hi def link poviniSection Special +hi def link poviniComment Comment +hi def link poviniDeclare poviniKeyword +hi def link poviniShellOut poviniKeyword +hi def link poviniIncludeLabel poviniKeyword +hi def link poviniKeyword Type +hi def link poviniShellOutSpecial Special +hi def link poviniIncludedFile poviniInclude +hi def link poviniInclude Include +hi def link poviniOption Keyword +hi def link poviniBool Constant +hi def link poviniNumber Number + +let b:current_syntax = "povini" diff --git a/runtime/syntax/ppd.vim b/runtime/syntax/ppd.vim new file mode 100644 index 000000000..192f70c05 --- /dev/null +++ b/runtime/syntax/ppd.vim @@ -0,0 +1,48 @@ +" Vim syntax file +" Language: PPD (PostScript printer description) file +" Maintainer: Bjoern Jacke <bjacke@suse.de> +" Last Change: 2001-10-06 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + +syn match ppdComment "^\*%.*" +syn match ppdDef "\*[a-zA-Z0-9]\+" +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:" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_ahdl_syn_inits") + if version < 508 + let did_ahdl_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + + HiLink ppdComment Comment + HiLink ppdDefine Statement + HiLink ppdUI Function + HiLink ppdUIGroup Function + HiLink ppdDef String + HiLink ppdGUIText Type + HiLink ppdContraints Special + + delcommand HiLink +endif + +let b:current_syntax = "ppd" + +" vim: ts=8 diff --git a/runtime/syntax/ppwiz.vim b/runtime/syntax/ppwiz.vim new file mode 100644 index 000000000..d3d7b3a17 --- /dev/null +++ b/runtime/syntax/ppwiz.vim @@ -0,0 +1,97 @@ +" Vim syntax file +" Language: PPWizard (preprocessor by Dennis Bareis) +" Maintainer: Stefan Schwarzer <s.schwarzer@ndh.net> +" URL: http://www.ndh.net/home/sschwarzer/download/ppwiz.vim +" Last Change: 2003 May 11 +" Filename: ppwiz.vim + +" Remove old syntax stuff +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +if !exists("ppwiz_highlight_defs") + let ppwiz_highlight_defs = 1 +endif + +if !exists("ppwiz_with_html") + let ppwiz_with_html = 1 +endif + +" comments +syn match ppwizComment "^;.*$" +syn match ppwizComment ";;.*$" +" HTML +if ppwiz_with_html > 0 + syn region ppwizHTML start="<" end=">" contains=ppwizArg,ppwizMacro + syn match ppwizHTML "\&\w\+;" +endif +" define, evaluate etc. +if ppwiz_highlight_defs == 1 + syn match ppwizDef "^\s*\#\S\+\s\+\S\+" contains=ALL + syn match ppwizDef "^\s*\#\(if\|else\|endif\)" contains=ALL + syn match ppwizDef "^\s*\#\({\|break\|continue\|}\)" contains=ALL +" elseif ppwiz_highlight_defs == 2 +" syn region ppwizDef start="^\s*\#" end="[^\\]$" end="^$" keepend contains=ALL +else + syn region ppwizDef start="^\s*\#" end="[^\\]$" end="^$" keepend contains=ppwizCont +endif +syn match ppwizError "\s.\\$" +syn match ppwizCont "\s\([+\-%]\|\)\\$" +" macros to execute +syn region ppwizMacro start="<\$" end=">" contains=@ppwizArgVal,ppwizCont +" macro arguments +syn region ppwizArg start="{" end="}" contains=ppwizEqual,ppwizString +syn match ppwizEqual "=" contained +syn match ppwizOperator "<>\|=\|<\|>" contained +" standard variables (builtin) +syn region ppwizStdVar start="<?[^?]" end=">" contains=@ppwizArgVal +" Rexx variables +syn region ppwizRexxVar start="<??" end=">" contains=@ppwizArgVal +" Constants +syn region ppwizString start=+"+ end=+"+ contained contains=ppwizMacro,ppwizArg,ppwizHTML,ppwizCont,ppwizStdVar,ppwizRexxVar +syn region ppwizString start=+'+ end=+'+ contained contains=ppwizMacro,ppwizArg,ppwizHTML,ppwizCont,ppwizStdVar,ppwizRexxVar +syn match ppwizInteger "\d\+" contained + +" Clusters +syn cluster ppwizArgVal add=ppwizString,ppwizInteger + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_ppwiz_syn_inits") + if version < 508 + let did_ppwiz_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink ppwizSpecial Special + HiLink ppwizEqual ppwizSpecial + HiLink ppwizOperator ppwizSpecial + HiLink ppwizComment Comment + HiLink ppwizDef PreProc + HiLink ppwizMacro Statement + HiLink ppwizArg Identifier + HiLink ppwizStdVar Identifier + HiLink ppwizRexxVar Identifier + HiLink ppwizString Constant + HiLink ppwizInteger Constant + HiLink ppwizCont ppwizSpecial + HiLink ppwizError Error + HiLink ppwizHTML Type + + delcommand HiLink +endif + +let b:current_syntax = "ppwiz" + +" vim: ts=4 + diff --git a/runtime/syntax/procmail.vim b/runtime/syntax/procmail.vim new file mode 100644 index 000000000..c2ffa3988 --- /dev/null +++ b/runtime/syntax/procmail.vim @@ -0,0 +1,67 @@ +" Vim syntax file +" Language: Procmail definition file +" Maintainer: Melchior FRANZ <mfranz@aon.at> +" Last Change: 2003 Aug 14 +" Author: Sonia Heimann + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match procmailComment "#.*$" contains=procmailTodo +syn keyword procmailTodo contained Todo TBD + +syn region procmailString start=+"+ skip=+\\"+ end=+"+ +syn region procmailString start=+'+ skip=+\\'+ end=+'+ + +syn region procmailVarDeclRegion start="^\s*[a-zA-Z0-9_]\+\s*="hs=e-1 skip=+\\$+ end=+$+ contains=procmailVar,procmailVarDecl,procmailString +syn match procmailVarDecl contained "^\s*[a-zA-Z0-9_]\+" +syn match procmailVar "$[a-zA-Z0-9_]\+" + +syn match procmailCondition contained "^\s*\*.*" + +syn match procmailActionFolder contained "^\s*[-_a-zA-Z0-9/]\+" +syn match procmailActionVariable contained "^\s*$[a-zA-Z_]\+" +syn region procmailActionForward start=+^\s*!+ skip=+\\$+ end=+$+ +syn region procmailActionPipe start=+^\s*|+ skip=+\\$+ end=+$+ +syn region procmailActionNested start=+^\s*{+ end=+^\s*}+ contains=procmailRecipe,procmailComment,procmailVarDeclRegion + +syn region procmailRecipe start=+^\s*:.*$+ end=+^\s*\($\|}\)+me=e-1 contains=procmailComment,procmailCondition,procmailActionFolder,procmailActionVariable,procmailActionForward,procmailActionPipe,procmailActionNested,procmailVarDeclRegion + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_procmail_syntax_inits") + if version < 508 + let did_procmail_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink procmailComment Comment + HiLink procmailTodo Todo + + HiLink procmailRecipe Statement + "HiLink procmailCondition Statement + + HiLink procmailActionFolder procmailAction + HiLink procmailActionVariable procmailAction + HiLink procmailActionForward procmailAction + HiLink procmailActionPipe procmailAction + HiLink procmailAction Function + HiLink procmailVar Identifier + HiLink procmailVarDecl Identifier + + HiLink procmailString String + + delcommand HiLink +endif + +let b:current_syntax = "procmail" + +" vim: ts=8 diff --git a/runtime/syntax/progress.vim b/runtime/syntax/progress.vim new file mode 100644 index 000000000..dd29310ad --- /dev/null +++ b/runtime/syntax/progress.vim @@ -0,0 +1,215 @@ +" Vim syntax file +" Language: Progress 4GL +" Filename extensions: *.p (collides with Pascal), +" *.i (collides with assembler) +" *.w (collides with cweb) +" Maintainer: Philip Uren <philu@computer.org> +" Contributors: Chris Ruprecht <chrup@mac.com> +" Philip Uren <philu@computer.org> +" Mikhail Kuperblum <mikhail@whasup.com> +" URL: http://www.zeta.org.au/~philu/vim/progress.vim +" Last Change: Thu May 3 08:49:47 EST 2001 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if version >= 600 + setlocal iskeyword=@,48-57,_,-,!,#,$,% +else + set iskeyword=@,48-57,_,-,!,#,$,% +endif + +syn case ignore + +" Progress Blocks of code and mismatched "end." errors. +syn match ProgressEndError "\<end\>" +syn region ProgressDoBlock transparent matchgroup=ProgressDo start="\<do\>" matchgroup=ProgressDo end="\<end\>" contains=ALLBUT,ProgressProcedure,ProgressFunction +syn region ProgressForBlock transparent matchgroup=ProgressFor start="\<for\>" matchgroup=ProgressFor end="\<end\>" contains=ALLBUT,ProgressProcedure,ProgressFunction +syn region ProgressRepeatBlock transparent matchgroup=ProgressRepeat start="\<repeat\>" matchgroup=ProgressRepeat end="\<end\>" contains=ALLBUT,ProgressProcedure,ProgressFunction +syn region ProgressCaseBlock transparent matchgroup=ProgressCase start="\<case\>" matchgroup=ProgressCase end="\<end\scase\>" contains=ALLBUT,ProgressProcedure,ProgressFunction + +" These are Progress reserved words, +" and they could go in ProgressReserved, +" but I found it more helpful to highlight them in a different color. +syn keyword ProgressConditional if else then when otherwise +syn keyword ProgressFor each where + +" Make those TODO and debugging notes stand out! +syn keyword ProgressTodo contained TODO BUG FIX +syn keyword ProgressDebug contained DEBUG +syn keyword ProgressDebug debugger + +syn keyword ProgressFunction procedure function + +syn keyword ProgressReserved accum[ulate] active-window add alias all alter ambig[uous] analyz[e] and any apply as asc[ending] assign at attr[-space] +syn keyword ProgressReserved authorization auto-ret[urn] avail[able] back[ground] before-h[ide] begins bell between blank break btos by call can-do can-find +syn keyword ProgressReserved center[ed] check chr clear clipboard col colon color col[umn] column-lab[el] col[umns] compiler connected control count-of +syn keyword ProgressReserved cpstream create ctos current current-changed current-lang[uage] current-window current_date curs[or] database dataservers +syn keyword ProgressReserved dbcodepage dbcollation dbname dbrest[rictions] dbtaskid dbtype dbvers[ion] dde deblank debug-list debugger decimals declare +syn keyword ProgressReserved def default default-noxl[ate] default-window def[ine] delete delimiter desc[ending] dict[ionary] disable discon[nect] disp +syn keyword ProgressReserved disp[lay] distinct dos down drop editing enable encode entry error-stat[us] escape etime except exclusive +syn keyword ProgressReserved exclusive[-lock] exclusive-web-us[er] exists export false fetch field field[s] file-info[rmation] fill find find-case-sensitive +syn keyword ProgressReserved find-global find-next-occurrence find-prev-occurrence find-select find-wrap-around first first-of focus font form form[at] +syn keyword ProgressReserved fram[e] frame-col frame-db frame-down frame-field frame-file frame-inde[x] frame-line frame-name frame-row frame-val[ue] +syn keyword ProgressReserved from from-c[hars] from-p[ixels] gateway[s] get-byte get-codepage[s] get-coll[ations] get-key-val[ue] getbyte global go-on +syn keyword ProgressReserved go-pend[ing] grant graphic-e[dge] group having header help hide import in index indicator input input-o[utput] insert +syn keyword ProgressReserved into is is-attr[-space] join kblabel key-code key-func[tion] key-label keycode keyfunc[tion] keylabel keys keyword label +syn keyword ProgressReserved last last-even[t] last-key last-of lastkey ldbname leave library like line-count[er] listi[ng] locked lookup machine-class +syn keyword ProgressReserved map member message message-lines mouse mpe new next next-prompt no no-attr[-space] no-error no-f[ill] no-help no-hide no-label[s] +syn keyword ProgressReserved no-lock no-map no-mes[sage] no-pause no-prefe[tch] no-undo no-val[idate] no-wait not null num-ali[ases] num-dbs num-entries +syn keyword ProgressReserved of off old on open opsys option or os-append os-command os-copy os-create-dir os-delete os-dir os-drive[s] os-error os-rename +syn keyword ProgressReserved os2 os400 output overlay page page-bot[tom] page-num[ber] page-top param[eter] pause pdbname persist[ent] pixels +syn keyword ProgressReserved preproc[ess] privileges proc-ha[ndle] proc-st[atus] process program-name Progress prompt prompt[-for] promsgs propath provers[ion] +syn keyword ProgressReserved put put-byte put-key-val[ue] putbyte query query-tuning quit r-index rcode-informatio[n] readkey recid record-len[gth] rect[angle] +syn keyword ProgressReserved release reposition retain retry return return-val[ue] revert revoke run save schema screen screen-io screen-lines +syn keyword ProgressReserved scroll sdbname search seek select self session set setuser[id] share[-lock] shared show-stat[s] skip some space status stream +syn keyword ProgressReserved stream-io string-xref system-dialog table term term[inal] text text-cursor text-seg[-growth] this-procedure time title +syn keyword ProgressReserved to today top-only trans trans[action] trigger triggers trim true underl[ine] undo unform[atted] union unique unix up update +syn keyword ProgressReserved use-index use-revvideo use-underline user user[id] using v6frame value values view view-as vms wait-for web-con[text] +syn keyword ProgressReserved window window-maxim[ized] window-minim[ized] window-normal with work-tab[le] workfile write xcode xref yes _cbit +syn keyword ProgressReserved _control _list _memory _msg _pcontrol _serial[-num] _trace + +" Strings. Handles embedded quotes. +" Note that, for some reason, Progress doesn't use the backslash, "\" +" as the escape character; it uses tilde, "~". +syn region ProgressString matchgroup=ProgressQuote start=+"+ end=+"+ skip=+\~"+ +syn region ProgressString matchgroup=ProgressQuote start=+'+ end=+'+ skip=+\~'+ + +syn match ProgressIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>()" + +" syn match ProgressDelimiter "()" + +" syn match ProgressMatrixDelimiter "[][]" + +" If you prefer you can highlight the range +"syn match ProgressMatrixDelimiter "[\d\+\.\.\d\+]" + +syn match ProgressNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" +syn match ProgressByte "\$[0-9a-fA-F]\+" + +" If you don't like tabs: +"syn match ProgressShowTab "\t" +"syn match ProgressShowTabc "\t" + +syn region ProgressComment start="/\*" end="\*/" contains=ProgressComment,ProgressTodo,ProgressDebug +syn match ProgressInclude "^[ ]*[{].*\.i[}]" + +syn match ProgressSubstitute "^[ ]*[{].*[^i][}]" +syn match ProgressPreProc "^[ ]*&.*" + +syn match ProgressOperator "[!;|)(:.><+*=-]" + +syn keyword ProgressOperator <= <> >= abs[olute] accelerator across add-first add-last advise alert-box allow-replication ansi-only anywhere append appl-alert[-boxes] application as-cursor ask-overwrite +syn keyword ProgressOperator attach[ment] auto-end-key auto-endkey auto-go auto-ind[ent] auto-resize auto-z[ap] available-formats ave[rage] avg backward[s] base-key batch[-mode] bgc[olor] binary +syn keyword ProgressOperator bind-where block-iteration-display border-bottom border-bottom-ch[ars] border-bottom-pi[xels] border-left border-left-char[s] border-left-pixe[ls] border-right border-right-cha[rs] +syn keyword ProgressOperator border-right-pix[els] border-t[op] border-t[op-chars] border-top-pixel[s] both bottom box box-select[able] browse browse-header buffer buffer-chars buffer-lines +syn keyword ProgressOperator button button[s] byte cache cache-size can-query can-set cancel-break cancel-button caps careful-paint case-sensitive cdecl char[acter] character_length charset +syn keyword ProgressOperator checked choose clear-select[ion] close code codepage codepage-convert col-of colon-align[ed] color-table column-bgc[olor] column-dcolor column-fgc[olor] column-font +syn keyword ProgressOperator column-label-bgc[olor] column-label-dcolor column-label-fgc[olor] column-label-font column-of column-pfc[olor] column-sc[rolling] combo-box command compile complete +syn keyword ProgressOperator connect constrained contents context context-pop[up] control-containe[r] c[ontrol-form] convert-to-offse[t] convert count cpcase cpcoll cpint[ernal] cplog +syn keyword ProgressOperator cpprint cprcodein cprcodeout cpterm crc-val[ue] c[reate-control] create-result-list-entry create-test-file current-column current-environm[ent] current-iteration +syn keyword ProgressOperator current-result-row current-row-modified current-value cursor-char cursor-line cursor-offset data-entry-retur[n] data-t[ype] date date-f[ormat] day db-references +syn keyword ProgressOperator dcolor dde-error dde-i[d] dde-item dde-name dde-topic debu[g] dec[imal] default-b[utton] default-extensio[n] defer-lob-fetch defined delete-char delete-current-row +syn keyword ProgressOperator delete-line delete-selected-row delete-selected-rows deselect-focused-row deselect-rows deselect-selected-row d[esign-mode] dialog-box dialog-help dir disabled display-message +syn keyword ProgressOperator display-t[ype] double drag-enabled drop-down drop-down-list dump dynamic echo edge edge[-chars] edge-p[ixels] editor empty end-key endkey entered eq error error-col[umn] +syn keyword ProgressOperator error-row event-t[ype] event[s] exclusive-id execute exp expand extended extent external extract fetch-selected-row fgc[olor] file file-name file-off[set] file-type +syn keyword ProgressOperator filename fill-in filled filters first-child first-column first-proc[edure] first-tab-i[tem] fixed-only float focused-row font-based-layout font-table force-file +syn keyword ProgressOperator fore[ground] form-input forward[s] frame-spa[cing] frame-x frame-y frequency from-cur[rent] full-height full-height-char[s] full-height-pixe[ls] full-pathn[ame] +syn keyword ProgressOperator full-width full-width[-chars] full-width-pixel[s] ge get get-blue[-value] g[et-char-property] get-double get-dynamic get-file get-float get-green[-value] +syn keyword ProgressOperator get-iteration get-license get-long get-message get-number get-pointer-value get-red[-value] get-repositioned-row get-selected-wid[get] get-short get-signature get-size +syn keyword ProgressOperator get-string get-tab-item get-text-height get-text-height-char[s] get-text-height-pixe[ls] get-text-width get-text-width-c[hars] get-text-width-pixel[s] get-unsigned-short +syn keyword ProgressOperator grayed grid-factor-horizont[al] grid-factor-vert[ical] grid-set grid-snap grid-unit-height grid-unit-height-cha[rs] grid-unit-height-pix[els] grid-unit-width grid-unit-width-char[s] +syn keyword ProgressOperator grid-unit-width-pixe[ls] grid-visible gt handle height height[-chars] height-p[ixels] help-con[text] helpfile-n[ame] hidden hint hori[zontal] hwnd image image-down +syn keyword ProgressOperator image-insensitive image-size image-size-c[hars] image-size-pixel[s] image-up immediate-display index-hint indexed-reposition info[rmation] init init[ial] initial-dir +syn keyword ProgressOperator initial-filter initiate inner inner-chars inner-lines insert-b[acktab] insert-file insert-row insert-string insert-t[ab] int[eger] internal-entries is-lead-byte +syn keyword ProgressOperator is-row-selected is-selected item items-per-row join-by-sqldb keep-frame-z-ord[er] keep-messages keep-tab-order key keyword-all label-bgc[olor] label-dc[olor] label-fgc[olor] +syn keyword ProgressOperator label-font label-pfc[olor] labels language[s] large large-to-small last-child last-tab-i[tem] last-proce[dure] lc le leading left left-align[ed] left-trim length +syn keyword ProgressOperator line list-events list-items list-query-attrs list-set-attrs list-widgets load l[oad-control] load-icon load-image load-image-down load-image-insensitive load-image-up +syn keyword ProgressOperator load-mouse-point[er] load-small-icon log logical lookahead lower lt manual-highlight margin-extra margin-height margin-height-ch[ars] margin-height-pi[xels] margin-width +syn keyword ProgressOperator margin-width-cha[rs] margin-width-pix[els] matches max max-chars max-data-guess max-height max-height[-chars] max-height-pixel[s] max-rows max-size max-val[ue] max-width +syn keyword ProgressOperator max-width[-chars] max-width-p[ixels] maximize max[imum] memory menu menu-bar menu-item menu-k[ey] menu-m[ouse] menubar message-area message-area-font message-line +syn keyword ProgressOperator min min-height min-height[-chars] min-height-pixel[s] min-size min-val[ue] min-width min-width[-chars] min-width-p[ixels] min[imum] mod modified mod[ulo] month mouse-p[ointer] +syn keyword ProgressOperator movable move-after-tab-i[tem] move-before-tab-[item] move-col[umn] move-to-b[ottom] move-to-eof move-to-t[op] multiple multiple-key multitasking-interval must-exist +syn keyword ProgressOperator name native ne new-row next-col[umn] next-sibling next-tab-ite[m] next-value no-apply no-assign no-bind-where no-box no-column-scroll[ing] no-convert no-current-value +syn keyword ProgressOperator no-debug no-drag no-echo no-index-hint no-join-by-sqldb no-lookahead no-row-markers no-scrolling no-separate-connection no-separators no-und[erline] no-word-wrap +syn keyword ProgressOperator none num-but[tons] num-col[umns] num-copies num-formats num-items num-iterations num-lines num-locked-colum[ns] num-messages num-results num-selected num-selected-rows +syn keyword ProgressOperator num-selected-widgets num-tabs num-to-retain numeric numeric-f[ormat] octet_length ok ok-cancel on-frame[-border] ordered-join ordinal orientation os-getenv outer +syn keyword ProgressOperator outer-join override owner page-size page-wid[th] paged parent partial-key pascal pathname pfc[olor] pinnable pixels-per-colum[n] pixels-per-row popup-m[enu] popup-o[nly] +syn keyword ProgressOperator position precision presel[ect] prev prev-col[umn] prev-sibling prev-tab-i[tem] primary printer-control-handle printer-setup private-d[ata] profiler Progress-s[ource] +syn keyword ProgressOperator publish put-double put-float put-long put-short put-string put-unsigned-short query-off-end question radio-buttons radio-set random raw raw-transfer read-file read-only +syn keyword ProgressOperator real recursive refresh refreshable replace replace-selection-text replication-create replication-delete replication-write request resiza[ble] resize retry-cancel +syn keyword ProgressOperator return-ins[erted] return-to-start-di[r] reverse-from right right-align[ed] right-trim round row row-ma[rkers] row-of rowid rule rule-row rule-y save-as save-file +syn keyword ProgressOperator screen-val[ue] scroll-bars scroll-delta scroll-horiz-value scroll-offset scroll-to-current-row scroll-to-i[tem] scroll-to-selected-row scroll-vert-value scrollable +syn keyword ProgressOperator scrollbar-horizo[ntal] scrollbar-vertic[al] scrolled-row-positio[n] scrolling se-check-pools se-enable-of[f] se-enable-on se-num-pools se-use-messa[ge] section select-focused-row +syn keyword ProgressOperator select-next-row select-prev-row select-repositioned-row select-row selectable selected selected-items selection-end selection-list selection-start selection-text +syn keyword ProgressOperator send sensitive separate-connection separators set-blue[-value] set-break set-cell-focus set-contents set-dynamic set-green[-value] set-leakpoint set-pointer-valu[e] +syn keyword ProgressOperator s[et-property] set-red[-value] set-repositioned-row set-selection set-size set-wait[-state] side-lab side-lab[e] side-lab[el] side-label-handl[e] side-lab[els] silent +syn keyword ProgressOperator simple single size size-c[hars] size-p[ixels] slider smallint sort source source-procedure sql sqrt start status-area status-area-font status-bar stdcall stenciled stop stoppe[d] +syn keyword ProgressOperator stored-proc[edure] string sub-ave[rage] sub-count sub-max[imum] sub-me[nu] sub-menu-help sub-min[imum] sub-total subscribe subst[itute] substr[ing] subtype sum super suppress-warning[s] +syn keyword ProgressOperator system-alert-box[es] system-help tab-position tabbable target target-procedure temp-dir[ectory] temp-table terminate text-selected three-d through thru tic-marks time-source title-bgc[olor] +syn keyword ProgressOperator title-dc[olor] title-fgc[olor] title-fo[nt] to-rowid toggle-box tool-bar top topic total trailing trunc[ate] type unbuff[ered] unique-id unload unsubscribe upper use use-dic[t-exps] +syn keyword ProgressOperator use-filename use-text v6display valid-event valid-handle validate validate-condition validate-message var[iable] vert[ical] virtual-height virtual-height-c[hars] +syn keyword ProgressOperator virtual-height-pixel[s] virtual-width virtual-width-ch[ars] virtual-width-pi[xels] visible wait warning weekday widget widget-e[nter] widget-h[andle] widget-l[eave] +syn keyword ProgressOperator widget-pool width width[-chars] width-p[ixels] window-name window-sta[te] window-sys[tem] word-wrap x-of y-of year yes-no yes-no-cancel _dcm + +syn keyword ProgressType char[acter] int[eger] format +syn keyword ProgressType var[iable] log[ical] da[te] + +syn sync lines=800 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_progress_syntax_inits") + if version < 508 + let did_progress_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later. + HiLink ProgressByte Number + HiLink ProgressCase Repeat + HiLink ProgressComment StatusLine + HiLink ProgressConditional Conditional + HiLink ProgressDebug Debug + HiLink ProgressDo Repeat + HiLink ProgressEndError Error + HiLink ProgressFor Repeat + HiLink ProgressFunction Procedure + HiLink ProgressInclude Include + HiLink ProgressLabel Label + HiLink ProgressMatrixDelimiter Identifier + HiLink ProgressModifier Type + HiLink ProgressNumber Number + HiLink ProgressOperator Function + HiLink ProgressPreProc PreProc + HiLink ProgressProcedure Procedure + HiLink ProgressQuote Delimiter + HiLink ProgressRepeat Repeat + HiLink ProgressReserved Identifier + HiLink ProgressString String + HiLink ProgressStructure Structure + HiLink ProgressSubstitute PreProc + HiLink ProgressTodo Todo + HiLink ProgressType Statement + HiLink ProgressUnclassified Statement + + " Optional highlighting + " HiLink ProgressDelimiter Identifier + " HiLink ProgressShowTab Error + " HiLink ProgressShowTabc Error + " HiLink ProgressIdentifier Identifier + + delcommand HiLink +endif + +let b:current_syntax = "progress" + +" vim: ts=4 sw=2 diff --git a/runtime/syntax/prolog.vim b/runtime/syntax/prolog.vim new file mode 100644 index 000000000..2ca1cfa44 --- /dev/null +++ b/runtime/syntax/prolog.vim @@ -0,0 +1,120 @@ +" Vim syntax file +" Language: PROLOG +" Maintainers: Ralph Becket <rwab1@cam.sri.co.uk>, +" Thomas Koehler <jean-luc@picard.franken.de> +" Last Change: 2003 May 11 +" URL: http://jeanluc-picard.de/vim/syntax/prolog.vim + +" There are two sets of highlighting in here: +" If the "prolog_highlighting_clean" variable exists, it is rather sparse. +" Otherwise you get more highlighting. + +" Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Prolog is case sensitive. +syn case match + +" Very simple highlighting for comments, clause heads and +" character codes. It respects prolog strings and atoms. + +syn region prologCComment start=+/\*+ end=+\*/+ +syn match prologComment +%.*+ + +syn keyword prologKeyword module meta_predicate multifile dynamic +syn match prologCharCode +0'\\\=.+ +syn region prologString start=+"+ skip=+\\"+ end=+"+ +syn region prologAtom start=+'+ skip=+\\'+ end=+'+ +syn region prologClauseHead start=+^[a-z][^(]*(+ skip=+\.[^ ]+ end=+:-\|\.$\|\.[ ]\|-->+ + +if !exists("prolog_highlighting_clean") + + " some keywords + " some common predicates are also highlighted as keywords + " is there a better solution? + syn keyword prologKeyword abolish current_output peek_code + syn keyword prologKeyword append current_predicate put_byte + syn keyword prologKeyword arg current_prolog_flag put_char + syn keyword prologKeyword asserta fail put_code + syn keyword prologKeyword assertz findall read + syn keyword prologKeyword at_end_of_stream float read_term + syn keyword prologKeyword atom flush_output repeat + syn keyword prologKeyword atom_chars functor retract + syn keyword prologKeyword atom_codes get_byte set_input + syn keyword prologKeyword atom_concat get_char set_output + syn keyword prologKeyword atom_length get_code set_prolog_flag + syn keyword prologKeyword atomic halt set_stream_position + syn keyword prologKeyword bagof integer setof + syn keyword prologKeyword call is stream_property + syn keyword prologKeyword catch nl sub_atom + syn keyword prologKeyword char_code nonvar throw + syn keyword prologKeyword char_conversion number true + syn keyword prologKeyword clause number_chars unify_with_occurs_check + syn keyword prologKeyword close number_codes var + syn keyword prologKeyword compound once write + syn keyword prologKeyword copy_term op write_canonical + syn keyword prologKeyword current_char_conversion open write_term + syn keyword prologKeyword current_input peek_byte writeq + syn keyword prologKeyword current_op peek_char + + syn match prologOperator "=\\=\|=:=\|\\==\|=<\|==\|>=\|\\=\|\\+\|<\|>\|=" + syn match prologAsIs "===\|\\===\|<=\|=>" + + syn match prologNumber "\<[0123456789]*\>" + syn match prologCommentError "\*/" + syn match prologSpecialCharacter ";" + syn match prologSpecialCharacter "!" + syn match prologQuestion "?-.*\." contains=prologNumber + + +endif + +syn sync ccomment maxlines=50 + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_prolog_syn_inits") + if version < 508 + let did_prolog_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default highlighting. + HiLink prologComment Comment + HiLink prologCComment Comment + HiLink prologCharCode Special + + if exists ("prolog_highlighting_clean") + + HiLink prologKeyword Statement + HiLink prologClauseHead Statement + + else + + HiLink prologKeyword Keyword + HiLink prologClauseHead Constant + HiLink prologQuestion PreProc + HiLink prologSpecialCharacter Special + HiLink prologNumber Number + HiLink prologAsIs Normal + HiLink prologCommentError Error + HiLink prologAtom String + HiLink prologString String + HiLink prologOperator Operator + + endif + + delcommand HiLink +endif + +let b:current_syntax = "prolog" + +" vim: ts=8 diff --git a/runtime/syntax/psf.vim b/runtime/syntax/psf.vim new file mode 100644 index 000000000..2b376f94c --- /dev/null +++ b/runtime/syntax/psf.vim @@ -0,0 +1,103 @@ +" Vim syntax file +" Language: Software Distributor product specification file +" (POSIX 1387.2-1995). +" Maintainer: Rex Barzee <rex_barzee@hp.com> +" Last change: 25 Apr 2001 + +if version < 600 + " Remove any old syntax stuff hanging around + syn clear +elseif exists("b:current_syntax") + finish +endif + +" Product specification files are case sensitive +syn case match + +syn keyword psfObject bundle category control_file depot distribution +syn keyword psfObject end file fileset host installed_software media +syn keyword psfObject product root subproduct vendor + +syn match psfUnquotString +[^"# ][^#]*+ contained +syn region psfQuotString start=+"+ skip=+\\"+ end=+"+ contained + +syn match psfObjTag "\<[-_+A-Z0-9a-z]\+\(\.[-_+A-Z0-9a-z]\+\)*" contained +syn match psfAttAbbrev ",\<\(fa\|fr\|[aclqrv]\)\(<\|>\|<=\|>=\|=\|==\)[^,]\+" contained +syn match psfObjTags "\<[-_+A-Z0-9a-z]\+\(\.[-_+A-Z0-9a-z]\+\)*\(\s\+\<[-_+A-Z0-9a-z]\+\(\.[-_+A-Z0-9a-z]\+\)*\)*" contained + +syn match psfNumber "\<\d\+\>" contained +syn match psfFloat "\<\d\+\>\(\.\<\d\+\>\)*" contained + +syn match psfLongDate "\<\d\d\d\d\d\d\d\d\d\d\d\d\.\d\d\>" contained + +syn keyword psfState available configured corrupt installed transient contained +syn keyword psfPState applied committed superseded contained + +syn keyword psfBoolean false true contained + + +"Some of the attributes covered by attUnquotString and attQuotString: +" architecture category_tag control_directory copyright +" create_date description directory file_permissions install_source +" install_type location machine_type mod_date number os_name os_release +" os_version pose_as_os_name pose_as_os_release readme revision +" share_link title vendor_tag +syn region psfAttUnquotString matchgroup=psfAttrib start=~^\s*[^# ]\+\s\+[^#" ]~rs=e-1 contains=psfUnquotString,psfComment end=~$~ keepend oneline + +syn region psfAttQuotString matchgroup=psfAttrib start=~^\s*[^# ]\+\s\+"~rs=e-1 contains=psfQuotString,psfComment skip=~\\"~ matchgroup=psfQuotString end=~"~ keepend + + +" These regions are defined in attempt to do syntax checking for some +" of the attributes. +syn region psfAttTag matchgroup=psfAttrib start="^\s*tag\s\+" contains=psfObjTag,psfComment end="$" keepend oneline + +syn region psfAttSpec matchgroup=psfAttrib start="^\s*\(ancestor\|applied_patches\|applied_to\|contents\|corequisites\|exrequisites\|prerequisites\|software_spec\|supersedes\|superseded_by\)\s\+" contains=psfObjTag,psfAttAbbrev,psfComment end="$" keepend + +syn region psfAttTags matchgroup=psfAttrib start="^\s*all_filesets\s\+" contains=psfObjTags,psfComment end="$" keepend + +syn region psfAttNumber matchgroup=psfAttrib start="^\s*\(compressed_size\|instance_id\|media_sequence_number\|sequence_number\|size\)\s\+" contains=psfNumber,psfComment end="$" keepend oneline + +syn region psfAttTime matchgroup=psfAttrib start="^\s*\(create_time\|ctime\|mod_time\|mtime\|timestamp\)\s\+" contains=psfNumber,psfComment end="$" keepend oneline + +syn region psfAttFloat matchgroup=psfAttrib start="^\s*\(data_model_revision\|layout_version\)\s\+" contains=psfFloat,psfComment end="$" keepend oneline + +syn region psfAttLongDate matchgroup=psfAttrib start="^\s*install_date\s\+" contains=psfLongDate,psfComment end="$" keepend oneline + +syn region psfAttState matchgroup=psfAttrib start="^\s*\(state\)\s\+" contains=psfState,psfComment end="$" keepend oneline + +syn region psfAttPState matchgroup=psfAttrib start="^\s*\(patch_state\)\s\+" contains=psfPState,psfComment end="$" keepend oneline + +syn region psfAttBoolean matchgroup=psfAttrib start="^\s*\(is_kernel\|is_locatable\|is_patch\|is_protected\|is_reboot\|is_reference\|is_secure\|is_sparse\)\s\+" contains=psfBoolean,psfComment end="$" keepend oneline + +syn match psfComment "#.*$" + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_psf_syntax_inits") + if version < 508 + let did_psf_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink psfObject Statement + HiLink psfAttrib Type + HiLink psfQuotString String + HiLink psfObjTag Identifier + HiLink psfAttAbbrev PreProc + HiLink psfObjTags Identifier + + HiLink psfComment Comment + + delcommand HiLink +endif + +" Long descriptions and copyrights confuse the syntax highlighting, so +" force vim to backup at least 100 lines before the top visible line +" looking for a sync location. +syn sync lines=100 + +let b:current_syntax = "psf" diff --git a/runtime/syntax/ptcap.vim b/runtime/syntax/ptcap.vim new file mode 100644 index 000000000..45590cf61 --- /dev/null +++ b/runtime/syntax/ptcap.vim @@ -0,0 +1,107 @@ +" Vim syntax file +" Language: printcap/termcap database +" Maintainer: Haakon Riiser <hakonrk@fys.uio.no> +" URL: http://folk.uio.no/hakonrk/vim/syntax/ptcap.vim +" Last Change: 2001 May 15 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +" Since I only highlight based on the structure of the databases, not +" specific keywords, case sensitivity isn't required +syn case ignore + +" Since everything that is not caught by the syntax patterns is assumed +" to be an error, we start parsing 20 lines up, unless something else +" is specified +if exists("ptcap_minlines") + exe "syn sync lines=".ptcap_minlines +else + syn sync lines=20 +endif + +" Highlight everything that isn't caught by the rules as errors, +" except blank lines +syn match ptcapError "^.*\S.*$" + +syn match ptcapLeadBlank "^\s\+" contained + +" `:' and `|' are delimiters for fields and names, and should not be +" highlighted. Hence, they are linked to `NONE' +syn match ptcapDelimiter "[:|]" contained + +" Escaped characters receive special highlighting +syn match ptcapEscapedChar "\\." contained +syn match ptcapEscapedChar "\^." contained +syn match ptcapEscapedChar "\\\o\{3}" contained + +" A backslash at the end of a line will suppress the newline +syn match ptcapLineCont "\\$" contained + +" A number follows the same rules as an integer in C +syn match ptcapNumber "#\(+\|-\)\=\d\+"lc=1 contained +syn match ptcapNumberError "#\d*[^[:digit:]:\\]"lc=1 contained +syn match ptcapNumber "#0x\x\{1,8}"lc=1 contained +syn match ptcapNumberError "#0x\X"me=e-1,lc=1 contained +syn match ptcapNumberError "#0x\x\{9}"lc=1 contained +syn match ptcapNumberError "#0x\x*[^[:xdigit:]:\\]"lc=1 contained + +" The `@' operator clears a flag (i.e., sets it to zero) +" The `#' operator assigns a following number to the flag +" The `=' operator assigns a string to the preceding flag +syn match ptcapOperator "[@#=]" contained + +" Some terminal capabilites have special names like `#5' and `@1', and we +" need special rules to match these properly +syn match ptcapSpecialCap "\W[#@]\d" contains=ptcapDelimiter contained + +" If editing a termcap file, an entry in the database is terminated by +" a (non-escaped) newline. Otherwise, it is terminated by a line which +" does not start with a colon (:) +if exists("b:ptcap_type") && b:ptcap_type[0] == 't' + syn region ptcapEntry start="^\s*[^[:space:]:]" end="[^\\]\(\\\\\)*$" end="^$" contains=ptcapNames,ptcapField,ptcapLeadBlank keepend +else + syn region ptcapEntry start="^\s*[^[:space:]:]"me=e-1 end="^\s*[^[:space:]:#]"me=e-1 contains=ptcapNames,ptcapField,ptcapLeadBlank,ptcapComment +endif +syn region ptcapNames start="^\s*[^[:space:]:]" skip="[^\\]\(\\\\\)*\\:" end=":"me=e-1 contains=ptcapDelimiter,ptcapEscapedChar,ptcapLineCont,ptcapLeadBlank,ptcapComment keepend contained +syn region ptcapField start=":" skip="[^\\]\(\\\\\)*\\$" end="[^\\]\(\\\\\)*:"me=e-1 end="$" contains=ptcapDelimiter,ptcapString,ptcapNumber,ptcapNumberError,ptcapOperator,ptcapLineCont,ptcapSpecialCap,ptcapLeadBlank,ptcapComment keepend contained +syn region ptcapString matchgroup=ptcapOperator start="=" skip="[^\\]\(\\\\\)*\\:" matchgroup=ptcapDelimiter end=":"me=e-1 matchgroup=NONE end="[^\\]\(\\\\\)*[^\\]$" end="^$" contains=ptcapEscapedChar,ptcapLineCont keepend contained +syn region ptcapComment start="^\s*#" end="$" contains=ptcapLeadBlank + +if version >= 508 || !exists("did_ptcap_syntax_inits") + if version < 508 + let did_ptcap_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink ptcapComment Comment + HiLink ptcapDelimiter Delimiter + " The highlighting of "ptcapEntry" should always be overridden by + " its contents, so I use Todo highlighting to indicate that there + " is work to be done with the syntax file if you can see it :-) + HiLink ptcapEntry Todo + HiLink ptcapError Error + HiLink ptcapEscapedChar SpecialChar + HiLink ptcapField Type + HiLink ptcapLeadBlank NONE + HiLink ptcapLineCont Special + HiLink ptcapNames Label + HiLink ptcapNumber NONE + HiLink ptcapNumberError Error + HiLink ptcapOperator Operator + HiLink ptcapSpecialCap Type + HiLink ptcapString NONE + + delcommand HiLink +endif + +let b:current_syntax = "ptcap" + +" vim: sts=4 sw=4 ts=8 diff --git a/runtime/syntax/purifylog.vim b/runtime/syntax/purifylog.vim new file mode 100644 index 000000000..8bcfb4b00 --- /dev/null +++ b/runtime/syntax/purifylog.vim @@ -0,0 +1,119 @@ +" Vim syntax file +" Language: purify log files +" Maintainer: Gautam H. Mudunuri <gmudunur@informatica.com> +" Last Change: 2003 May 11 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Purify header +syn match purifyLogHeader "^\*\*\*\*.*$" + +" Informational messages +syn match purifyLogFIU "^FIU:.*$" +syn match purifyLogMAF "^MAF:.*$" +syn match purifyLogMIU "^MIU:.*$" +syn match purifyLogSIG "^SIG:.*$" +syn match purifyLogWPF "^WPF:.*$" +syn match purifyLogWPM "^WPM:.*$" +syn match purifyLogWPN "^WPN:.*$" +syn match purifyLogWPR "^WPR:.*$" +syn match purifyLogWPW "^WPW:.*$" +syn match purifyLogWPX "^WPX:.*$" + +" Warning messages +syn match purifyLogABR "^ABR:.*$" +syn match purifyLogBSR "^BSR:.*$" +syn match purifyLogBSW "^BSW:.*$" +syn match purifyLogFMR "^FMR:.*$" +syn match purifyLogMLK "^MLK:.*$" +syn match purifyLogMSE "^MSE:.*$" +syn match purifyLogPAR "^PAR:.*$" +syn match purifyLogPLK "^PLK:.*$" +syn match purifyLogSBR "^SBR:.*$" +syn match purifyLogSOF "^SOF:.*$" +syn match purifyLogUMC "^UMC:.*$" +syn match purifyLogUMR "^UMR:.*$" + +" Corrupting messages +syn match purifyLogABW "^ABW:.*$" +syn match purifyLogBRK "^BRK:.*$" +syn match purifyLogFMW "^FMW:.*$" +syn match purifyLogFNH "^FNH:.*$" +syn match purifyLogFUM "^FUM:.*$" +syn match purifyLogMRE "^MRE:.*$" +syn match purifyLogSBW "^SBW:.*$" + +" Fatal messages +syn match purifyLogCOR "^COR:.*$" +syn match purifyLogNPR "^NPR:.*$" +syn match purifyLogNPW "^NPW:.*$" +syn match purifyLogZPR "^ZPR:.*$" +syn match purifyLogZPW "^ZPW:.*$" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_purifyLog_syntax_inits") + if version < 508 + let did_purifyLog_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink purifyLogFIU purifyLogInformational + HiLink purifyLogMAF purifyLogInformational + HiLink purifyLogMIU purifyLogInformational + HiLink purifyLogSIG purifyLogInformational + HiLink purifyLogWPF purifyLogInformational + HiLink purifyLogWPM purifyLogInformational + HiLink purifyLogWPN purifyLogInformational + HiLink purifyLogWPR purifyLogInformational + HiLink purifyLogWPW purifyLogInformational + HiLink purifyLogWPX purifyLogInformational + + HiLink purifyLogABR purifyLogWarning + HiLink purifyLogBSR purifyLogWarning + HiLink purifyLogBSW purifyLogWarning + HiLink purifyLogFMR purifyLogWarning + HiLink purifyLogMLK purifyLogWarning + HiLink purifyLogMSE purifyLogWarning + HiLink purifyLogPAR purifyLogWarning + HiLink purifyLogPLK purifyLogWarning + HiLink purifyLogSBR purifyLogWarning + HiLink purifyLogSOF purifyLogWarning + HiLink purifyLogUMC purifyLogWarning + HiLink purifyLogUMR purifyLogWarning + + HiLink purifyLogABW purifyLogCorrupting + HiLink purifyLogBRK purifyLogCorrupting + HiLink purifyLogFMW purifyLogCorrupting + HiLink purifyLogFNH purifyLogCorrupting + HiLink purifyLogFUM purifyLogCorrupting + HiLink purifyLogMRE purifyLogCorrupting + HiLink purifyLogSBW purifyLogCorrupting + + HiLink purifyLogCOR purifyLogFatal + HiLink purifyLogNPR purifyLogFatal + HiLink purifyLogNPW purifyLogFatal + HiLink purifyLogZPR purifyLogFatal + HiLink purifyLogZPW purifyLogFatal + + HiLink purifyLogHeader Comment + HiLink purifyLogInformational PreProc + HiLink purifyLogWarning Type + HiLink purifyLogCorrupting Error + HiLink purifyLogFatal Error + + delcommand HiLink +endif + +let b:current_syntax = "purifylog" + +" vim:ts=8 diff --git a/runtime/syntax/pyrex.vim b/runtime/syntax/pyrex.vim new file mode 100644 index 000000000..f06b2d3d7 --- /dev/null +++ b/runtime/syntax/pyrex.vim @@ -0,0 +1,67 @@ +" Vim syntax file +" Language: Pyrex +" Maintainer: Marco Barisione <marco.bari@people.it> +" URL: http://marcobari.altervista.org/pyrex_vim.html +" Last Change: 2004 May 16 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the Python syntax to start with +if version < 600 + so <sfile>:p:h/python.vim +else + runtime! syntax/python.vim + unlet b:current_syntax +endif + +" Pyrex extentions +syn keyword pyrexStatement cdef typedef ctypedef sizeof +syn keyword pyrexType int long short float double char object void +syn keyword pyrexType signed unsigned +syn keyword pyrexStructure struct union enum +syn keyword pyrexPrecondit include cimport +syn keyword pyrexAccess public private property readonly extern +" If someome wants Python's built-ins highlighted probably he +" also wants Pyrex's built-ins highlighted +if exists("python_highlight_builtins") || exists("pyrex_highlight_builtins") + syn keyword pyrexBuiltin NULL +endif + +" This deletes "from" from the keywords and re-adds it as a +" match with lower priority than pyrexForFrom +syn clear pythonPreCondit +syn keyword pythonPreCondit import +syn match pythonPreCondit "from" + +" With "for[^:]*\zsfrom" VIM does not match "for" anymore, so +" I used the slower "\@<=" form +syn match pyrexForFrom "\(for[^:]*\)\@<=from" + +" Default highlighting +if version >= 508 || !exists("did_pyrex_syntax_inits") + if version < 508 + let did_pyrex_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + HiLink pyrexStatement Statement + HiLink pyrexType Type + HiLink pyrexStructure Structure + HiLink pyrexPrecondit PreCondit + HiLink pyrexAccess pyrexStatement + if exists("python_highlight_builtins") || exists("pyrex_highlight_builtins") + HiLink pyrexBuiltin Function + endif + HiLink pyrexForFrom Statement + + delcommand HiLink +endif + +let b:current_syntax = "pyrex" diff --git a/runtime/syntax/python.vim b/runtime/syntax/python.vim new file mode 100644 index 000000000..a73dfa73e --- /dev/null +++ b/runtime/syntax/python.vim @@ -0,0 +1,171 @@ +" Vim syntax file +" Language: Python +" Maintainer: Neil Schemenauer <nas@python.ca> +" Updated: 2002-10-18 +" +" Options to control Python syntax highlighting: +" +" For highlighted numbers: +" +" let python_highlight_numbers = 1 +" +" For highlighted builtin functions: +" +" let python_highlight_builtins = 1 +" +" For highlighted standard exceptions: +" +" let python_highlight_exceptions = 1 +" +" Highlight erroneous whitespace: +" +" let python_highlight_space_errors = 1 +" +" If you want all possible Python highlighting (the same as setting the +" preceding options): +" +" let python_highlight_all = 1 +" + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + +syn keyword pythonStatement break continue del +syn keyword pythonStatement except exec finally +syn keyword pythonStatement pass print raise +syn keyword pythonStatement return try +syn keyword pythonStatement global assert +syn keyword pythonStatement lambda yield +syn keyword pythonStatement def class nextgroup=pythonFunction skipwhite +syn match pythonFunction "[a-zA-Z_][a-zA-Z0-9_]*" contained +syn keyword pythonRepeat for while +syn keyword pythonConditional if elif else +syn keyword pythonOperator and in is not or +syn keyword pythonPreCondit import from +syn match pythonComment "#.*$" contains=pythonTodo +syn keyword pythonTodo TODO FIXME XXX contained + +" strings +syn region pythonString matchgroup=Normal start=+[uU]\='+ end=+'+ skip=+\\\\\|\\'+ contains=pythonEscape +syn region pythonString matchgroup=Normal start=+[uU]\="+ end=+"+ skip=+\\\\\|\\"+ contains=pythonEscape +syn region pythonString matchgroup=Normal start=+[uU]\="""+ end=+"""+ contains=pythonEscape +syn region pythonString matchgroup=Normal start=+[uU]\='''+ end=+'''+ contains=pythonEscape +syn region pythonRawString matchgroup=Normal start=+[uU]\=[rR]'+ end=+'+ skip=+\\\\\|\\'+ +syn region pythonRawString matchgroup=Normal start=+[uU]\=[rR]"+ end=+"+ skip=+\\\\\|\\"+ +syn region pythonRawString matchgroup=Normal start=+[uU]\=[rR]"""+ end=+"""+ +syn region pythonRawString matchgroup=Normal start=+[uU]\=[rR]'''+ end=+'''+ +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 +syn match pythonEscape "\\$" + +if exists("python_highlight_all") + let python_highlight_numbers = 1 + let python_highlight_builtins = 1 + let python_highlight_exceptions = 1 + let python_highlight_space_errors = 1 +endif + +if exists("python_highlight_numbers") + " numbers (including longs and complex) + syn match pythonNumber "\<0x\x\+[Ll]\=\>" + syn match pythonNumber "\<\d\+[LljJ]\=\>" + syn match pythonNumber "\.\d\+\([eE][+-]\=\d\+\)\=[jJ]\=\>" + syn match pythonNumber "\<\d\+\.\([eE][+-]\=\d\+\)\=[jJ]\=\>" + syn match pythonNumber "\<\d\+\.\d\+\([eE][+-]\=\d\+\)\=[jJ]\=\>" +endif + +if exists("python_highlight_builtins") + " builtin functions, types and objects, not really part of the syntax + syn keyword pythonBuiltin Ellipsis None NotImplemented __import__ abs + syn keyword pythonBuiltin apply buffer callable chr classmethod cmp + syn keyword pythonBuiltin coerce compile complex delattr dict dir divmod + syn keyword pythonBuiltin eval execfile file filter float getattr globals + syn keyword pythonBuiltin hasattr hash hex id input int intern isinstance + syn keyword pythonBuiltin issubclass iter len list locals long map max + syn keyword pythonBuiltin min object oct open ord pow property range + syn keyword pythonBuiltin raw_input reduce reload repr round setattr + syn keyword pythonBuiltin slice staticmethod str super tuple type unichr + syn keyword pythonBuiltin unicode vars xrange zip +endif + +if exists("python_highlight_exceptions") + " builtin exceptions and warnings + syn keyword pythonException ArithmeticError AssertionError AttributeError + syn keyword pythonException DeprecationWarning EOFError EnvironmentError + syn keyword pythonException Exception FloatingPointError IOError + syn keyword pythonException ImportError IndentationError IndexError + syn keyword pythonException KeyError KeyboardInterrupt LookupError + syn keyword pythonException MemoryError NameError NotImplementedError + syn keyword pythonException OSError OverflowError OverflowWarning + syn keyword pythonException ReferenceError RuntimeError RuntimeWarning + syn keyword pythonException StandardError StopIteration SyntaxError + syn keyword pythonException SyntaxWarning SystemError SystemExit TabError + syn keyword pythonException TypeError UnboundLocalError UnicodeError + syn keyword pythonException UserWarning ValueError Warning WindowsError + syn keyword pythonException ZeroDivisionError +endif + +if exists("python_highlight_space_errors") + " trailing whitespace + syn match pythonSpaceError display excludenl "\S\s\+$"ms=s+1 + " mixed tabs and spaces + syn match pythonSpaceError display " \+\t" + syn match pythonSpaceError display "\t\+ " +endif + +" This is fast but code inside triple quoted strings screws it up. It +" is impossible to fix because the only way to know if you are inside a +" triple quoted string is to start from the beginning of the file. If +" you have a fast machine you can try uncommenting the "sync minlines" +" and commenting out the rest. +syn sync match pythonSync grouphere NONE "):$" +syn sync maxlines=200 +"syn sync minlines=2000 + +if version >= 508 || !exists("did_python_syn_inits") + if version <= 508 + let did_python_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + HiLink pythonStatement Statement + HiLink pythonFunction Function + HiLink pythonConditional Conditional + HiLink pythonRepeat Repeat + HiLink pythonString String + HiLink pythonRawString String + HiLink pythonEscape Special + HiLink pythonOperator Operator + HiLink pythonPreCondit PreCondit + HiLink pythonComment Comment + HiLink pythonTodo Todo + if exists("python_highlight_numbers") + HiLink pythonNumber Number + endif + if exists("python_highlight_builtins") + HiLink pythonBuiltin Function + endif + if exists("python_highlight_exceptions") + HiLink pythonException Exception + endif + if exists("python_highlight_space_errors") + HiLink pythonSpaceError Error + endif + + delcommand HiLink +endif + +let b:current_syntax = "python" + +" vim: ts=8 diff --git a/runtime/syntax/qf.vim b/runtime/syntax/qf.vim new file mode 100644 index 000000000..5c987a97b --- /dev/null +++ b/runtime/syntax/qf.vim @@ -0,0 +1,24 @@ +" Vim syntax file +" Language: Quickfix window +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last change: 2001 Jan 15 + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +" A bunch of useful C keywords +syn match qfFileName "^[^|]*" nextgroup=qfSeparator +syn match qfSeparator "|" nextgroup=qfLineNr contained +syn match qfLineNr "[^|]*" contained contains=qfError +syn match qfError "error" contained + +" The default highlighting. +hi def link qfFileName Directory +hi def link qfLineNr LineNr +hi def link qfError Error + +let b:current_syntax = "qf" + +" vim: ts=8 diff --git a/runtime/syntax/quake.vim b/runtime/syntax/quake.vim new file mode 100644 index 000000000..1ae8c71af --- /dev/null +++ b/runtime/syntax/quake.vim @@ -0,0 +1,162 @@ +" Vim syntax file +" Language: Quake[1-3] Configuration File +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/quake/ +" Latest Revision: 2004-05-22 +" arch-tag: a95793d7-cab3-4544-a78c-1cea47b5870b +" Variables: quake_is_quake1 - the syntax is to be used for quake1 configs +" quake_is_quake2 - the syntax is to be used for quake2 configs +" quake_is_quake3 - the syntax is to be used for quake3 configs + + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + +" Set iskeyword since we need `-' (and potentially others) in keywords. +" For version 5.x: Set it globally +" For version 6.x: Set it locally +if version >= 600 + command -nargs=1 SetIsk setlocal iskeyword=<args> +else + command -nargs=1 SetIsk set iskeyword=<args> +endif +SetIsk 48-57,65-90,97-122,+,-,_ +delcommand SetIsk + + +" comments +syn region quakeComment display oneline start="//" end="$" end=";" keepend contains=quakeTodo + +" todo +syn keyword quakeTodo contained TODO FIXME XXX NOTE + +" string (can contain numbers (which should be hilighted as such) +syn region quakeString display oneline start=+"+ skip=+\\"+ end=+"\|$+ contains=quakeNumbers,@quakeCommands + +" number +syn case ignore +syn match quakeNumbers display transparent "\<\d\|\.\d" contains=quakeNumber,quakeFloat,quakeOctalError,quakeOctal +syn match quakeNumber display contained "\d\+\>" +" Flag the first zero of an octal number as something special +syn match quakeOctal display contained "0\o\+\>" contains=quakeOctalZero +syn match quakeOctalZero display contained "\<0" +" floating point number, with dot +syn match quakeFloat display contained "\d\+\.\d*" +" floating point number, starting with a dot +syn match quakeFloat display contained "\.\d\+\>" +" flag an octal number with wrong digits +syn match quakeOctalError display contained "0\o*[89]\d*" +syn case match + +" commands +syn case ignore +syn cluster quakeCommands contains=quakeCommand,quake1Command,quake12Command,Quake2Command,Quake23Command,Quake3Command + +syn keyword quakeCommand +attack +back +forward +left +lookdown +lookup +syn keyword quakeCommand +mlook +movedown +moveleft +moveright +moveup +syn keyword quakeCommand +right +speed +strafe -attack -back bind +syn keyword quakeCommand bindlist centerview clear connect cvarlist dir +syn keyword quakeCommand disconnect dumpuser echo error exec -forward +syn keyword quakeCommand god heartbeat joy_advancedupdate kick kill +syn keyword quakeCommand killserver -left -lookdown -lookup map +syn keyword quakeCommand messagemode messagemode2 -mlook modellist +syn keyword quakeCommand -movedown -moveleft -moveright -moveup play +syn keyword quakeCommand quit rcon reconnect record -right say say_team +syn keyword quakeCommand screenshot serverinfo serverrecord serverstop +syn keyword quakeCommand set sizedown sizeup snd_restart soundinfo +syn keyword quakeCommand soundlist -speed spmap status -strafe stopsound +syn keyword quakeCommand toggleconsole unbind unbindall userinfo pause +syn keyword quakeCommand vid_restart viewpos wait weapnext weapprev + +if exists("quake_is_quake1") +syn keyword quake1Command sv +endif + +if exists("quake_is_quake1") || exists("quake_is_quake2") +syn keyword quake12Command +klook alias cd impulse link load save +syn keyword quake12Command timerefresh changing info loading +syn keyword quake12Command pingservers playerlist players score +endif + +if exists("quake_is_quake2") +syn keyword quake2Command cmd demomap +use condump download drop gamemap +syn keyword quake2Command give gun_model setmaster sky sv_maplist wave +syn keyword quake2Command cmdlist gameversiona gun_next gun_prev invdrop +syn keyword quake2Command inven invnext invnextp invnextw invprev +syn keyword quake2Command invprevp invprevw invuse menu_addressbook +syn keyword quake2Command menu_credits menu_dmoptions menu_game +syn keyword quake2Command menu_joinserver menu_keys menu_loadgame +syn keyword quake2Command menu_main menu_multiplayer menu_options +syn keyword quake2Command menu_playerconfig menu_quit menu_savegame +syn keyword quake2Command menu_startserver menu_video +syn keyword quake2Command notarget precache prog togglechat vid_front +syn keyword quake2Command weaplast +endif + +if exists("quake_is_quake2") || exists("quake_is_quake3") +syn keyword quake23Command imagelist modellist path z_stats +endif + +if exists("quake_is_quake3") +syn keyword quake3Command +info +scores +zoom addbot arena banClient +syn keyword quake3Command banUser callteamvote callvote changeVectors +syn keyword quake3Command cinematic clientinfo clientkick cmd cmdlist +syn keyword quake3Command condump configstrings crash cvar_restart devmap +syn keyword quake3Command fdir follow freeze fs_openedList Fs_pureList +syn keyword quake3Command Fs_referencedList gfxinfo globalservers +syn keyword quake3Command hunk_stats in_restart -info levelshot +syn keyword quake3Command loaddeferred localservers map_restart mem_info +syn keyword quake3Command messagemode3 messagemode4 midiinfo model music +syn keyword quake3Command modelist net_restart nextframe nextskin noclip +syn keyword quake3Command notarget ping prevframe prevskin reset restart +syn keyword quake3Command s_disable_a3d s_enable_a3d s_info s_list s_stop +syn keyword quake3Command scanservers -scores screenshotJPEG sectorlist +syn keyword quake3Command serverstatus seta setenv sets setu setviewpos +syn keyword quake3Command shaderlist showip skinlist spdevmap startOribt +syn keyword quake3Command stats stopdemo stoprecord systeminfo togglemenu +syn keyword quake3Command tcmd team teamtask teamvote tell tell_attacker +syn keyword quake3Command tell_target testgun testmodel testshader toggle +syn keyword quake3Command touchFile vminfo vmprofile vmtest vosay +syn keyword quake3Command vosay_team vote votell vsay vsay_team vstr +syn keyword quake3Command vtaunt vtell vtell_attacker vtell_target weapon +syn keyword quake3Command writeconfig -zoom +syn match quake3Command display "\<[+-]button\(\d\|1[0-4]\)\>" +endif + +syn case match + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_screen_syn_inits") + if version < 508 + let did_screen_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink quakeComment Comment + HiLink quakeTodo Todo + HiLink quakeString String + HiLink quakeNumber Number + HiLink quakeOctal Number + HiLink quakeOctalZero Number + HiLink quakeFloat Number + HiLink quakeOctalError Error + HiLink quakeCommand quakeCommands + HiLink quake1Command quakeCommands + HiLink quake12Command quakeCommands + HiLink quake2Command quakeCommands + HiLink quake23Command quakeCommands + HiLink quake3Command quakeCommands + HiLink quakeCommands Keyword + + delcommand HiLink +endif + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/r.vim b/runtime/syntax/r.vim new file mode 100644 index 000000000..c2ecca4ef --- /dev/null +++ b/runtime/syntax/r.vim @@ -0,0 +1,104 @@ +" Vim syntax file +" Language: R (GNU S) +" Maintainer: Tom Payne <tom@tompayne.org> +" Last Change: 2003 May 11 +" Filenames: *.r +" URL: http://www.tompayne.org/vim/syntax/r.vim + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if version >= 600 + setlocal iskeyword=@,48-57,_,. +else + set iskeyword=@,48-57,_,. +endif + +syn case match + +" Comment +syn match rComment /\#.*/ + +" Constant +" string enclosed in double quotes +syn region rString start=/"/ skip=/\\\\\|\\"/ end=/"/ +" string enclosed in single quotes +syn region rString start=/'/ skip=/\\\\\|\\'/ end=/'/ +" number with no fractional part or exponent +syn match rNumber /\d\+/ +" floating point number with integer and fractional parts and optional exponent +syn match rFloat /\d\+\.\d*\([Ee][-+]\=\d\+\)\=/ +" floating point number with no integer part and optional exponent +syn match rFloat /\.\d\+\([Ee][-+]\=\d\+\)\=/ +" floating point number with no fractional part and optional exponent +syn match rFloat /\d\+[Ee][-+]\=\d\+/ + +" Identifier +" identifier with leading letter and optional following keyword characters +syn match rIdentifier /\a\k*/ +" identifier with leading period, one or more digits, and at least one non-digit keyword character +syn match rIdentifier /\.\d*\K\k*/ + +" Statement +syn keyword rStatement break next return +syn keyword rConditional if else +syn keyword rRepeat for in repeat while + +" Constant +syn keyword rConstant LETTERS letters month.ab month.name pi +syn keyword rConstant NULL +syn keyword rBoolean FALSE TRUE +syn keyword rNumber NA + +" Type +syn keyword rType array category character complex double function integer list logical matrix numeric vector + +" Special +syn match rDelimiter /[,;:]/ + +" Error +syn region rRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError +syn region rRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError +syn region rRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError +syn match rError /[)\]}]/ +syn match rBraceError /[)}]/ contained +syn match rCurlyError /[)\]]/ contained +syn match rParenError /[\]}]/ contained + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_r_syn_inits") + if version < 508 + let did_r_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + HiLink rComment Comment + HiLink rConstant Constant + HiLink rString String + HiLink rNumber Number + HiLink rBoolean Boolean + HiLink rFloat Float + HiLink rStatement Statement + HiLink rConditional Conditional + HiLink rRepeat Repeat + HiLink rIdentifier Identifier + HiLink rType Type + HiLink rDelimiter Delimiter + HiLink rError Error + HiLink rBraceError Error + HiLink rCurlyError Error + HiLink rParenError Error + delcommand HiLink +endif + +let b:current_syntax="r" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/radiance.vim b/runtime/syntax/radiance.vim new file mode 100644 index 000000000..461b708f0 --- /dev/null +++ b/runtime/syntax/radiance.vim @@ -0,0 +1,159 @@ +" Vim syntax file +" Language: Radiance Scene Description +" Maintainer: Georg Mischler <schorsch@schorsch.com> +" Last change: 26. April. 2001 + +" Radiance is a lighting simulation software package written +" by Gregory Ward-Larson ("the computer artist formerly known +" as Greg Ward"), then at LBNL. +" +" http://radsite.lbl.gov/radiance/HOME.html +" +" Of course, there is also information available about it +" from http://www.schorsch.com/ + + +" We take a minimalist approach here, highlighting just the +" essential properties of each object, its type and ID, as well as +" comments, external command names and the null-modifier "void". + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" all printing characters except '#' and '!' are valid in names. +if version >= 600 + setlocal iskeyword=\",$-~ +else + set iskeyword=\",$-~ +endif + +" The null-modifier +syn keyword radianceKeyword void + +" The different kinds of scene description object types +" Reference types +syn keyword radianceExtraType contained alias instance +" Surface types +syn keyword radianceSurfType contained ring polygon sphere bubble +syn keyword radianceSurfType contained cone cup cylinder tube source +" Emitting material types +syn keyword radianceLightType contained light glow illum spotlight +" Material types +syn keyword radianceMatType contained mirror mist prism1 prism2 +syn keyword radianceMatType contained metal plastic trans +syn keyword radianceMatType contained metal2 plastic2 trans2 +syn keyword radianceMatType contained metfunc plasfunc transfunc +syn keyword radianceMatType contained metdata plasdata transdata +syn keyword radianceMatType contained dielectric interface glass +syn keyword radianceMatType contained BRTDfunc antimatter +" Pattern modifier types +syn keyword radiancePatType contained colorfunc brightfunc +syn keyword radiancePatType contained colordata colorpict brightdata +syn keyword radiancePatType contained colortext brighttext +" Texture modifier types +syn keyword radianceTexType contained texfunc texdata +" Mixture types +syn keyword radianceMixType contained mixfunc mixdata mixpict mixtext + + +" Each type name is followed by an ID. +" This doesn't work correctly if the id is one of the type names of the +" same class (which is legal for radiance), in which case the id will get +" type color as well, and the int count (or alias reference) gets id color. + +syn region radianceID start="\<alias\>" end="\<\k*\>" contains=radianceExtraType +syn region radianceID start="\<instance\>" end="\<\k*\>" contains=radianceExtraType + +syn region radianceID start="\<source\>" end="\<\k*\>" contains=radianceSurfType +syn region radianceID start="\<ring\>" end="\<\k*\>" contains=radianceSurfType +syn region radianceID start="\<polygon\>" end="\<\k*\>" contains=radianceSurfType +syn region radianceID start="\<sphere\>" end="\<\k*\>" contains=radianceSurfType +syn region radianceID start="\<bubble\>" end="\<\k*\>" contains=radianceSurfType +syn region radianceID start="\<cone\>" end="\<\k*\>" contains=radianceSurfType +syn region radianceID start="\<cup\>" end="\<\k*\>" contains=radianceSurfType +syn region radianceID start="\<cylinder\>" end="\<\k*\>" contains=radianceSurfType +syn region radianceID start="\<tube\>" end="\<\k*\>" contains=radianceSurfType + +syn region radianceID start="\<light\>" end="\<\k*\>" contains=radianceLightType +syn region radianceID start="\<glow\>" end="\<\k*\>" contains=radianceLightType +syn region radianceID start="\<illum\>" end="\<\k*\>" contains=radianceLightType +syn region radianceID start="\<spotlight\>" end="\<\k*\>" contains=radianceLightType + +syn region radianceID start="\<mirror\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<mist\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<prism1\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<prism2\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<metal\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<plastic\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<trans\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<metal2\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<plastic2\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<trans2\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<metfunc\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<plasfunc\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<transfunc\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<metdata\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<plasdata\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<transdata\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<dielectric\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<interface\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<glass\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<BRTDfunc\>" end="\<\k*\>" contains=radianceMatType +syn region radianceID start="\<antimatter\>" end="\<\k*\>" contains=radianceMatType + +syn region radianceID start="\<colorfunc\>" end="\<\k*\>" contains=radiancePatType +syn region radianceID start="\<brightfunc\>" end="\<\k*\>" contains=radiancePatType +syn region radianceID start="\<colordata\>" end="\<\k*\>" contains=radiancePatType +syn region radianceID start="\<brightdata\>" end="\<\k*\>" contains=radiancePatType +syn region radianceID start="\<colorpict\>" end="\<\k*\>" contains=radiancePatType +syn region radianceID start="\<colortext\>" end="\<\k*\>" contains=radiancePatType +syn region radianceID start="\<brighttext\>" end="\<\k*\>" contains=radiancePatType + +syn region radianceID start="\<texfunc\>" end="\<\k*\>" contains=radianceTexType +syn region radianceID start="\<texdata\>" end="\<\k*\>" contains=radianceTexType + +syn region radianceID start="\<mixfunc\>" end="\<\k*\>" contains=radianceMixType +syn region radianceID start="\<mixdata\>" end="\<\k*\>" contains=radianceMixType +syn region radianceID start="\<mixtext\>" end="\<\k*\>" contains=radianceMixType + +" external commands (generators, xform et al.) +syn match radianceCommand "^\s*!\s*[^\s]\+\>" + +" The usual suspects +syn keyword radianceTodo contained TODO XXX +syn match radianceComment "#.*$" contains=radianceTodo + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_radiance_syn_inits") + if version < 508 + let did_radiance_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + HiLink radianceKeyword Keyword + HiLink radianceExtraType Type + HiLink radianceSurfType Type + HiLink radianceLightType Type + HiLink radianceMatType Type + HiLink radiancePatType Type + HiLink radianceTexType Type + HiLink radianceMixType Type + HiLink radianceComment Comment + HiLink radianceCommand Function + HiLink radianceID String + HiLink radianceTodo Todo + delcommand HiLink +endif + +let b:current_syntax = "radiance" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/ratpoison.vim b/runtime/syntax/ratpoison.vim new file mode 100644 index 000000000..39094fc10 --- /dev/null +++ b/runtime/syntax/ratpoison.vim @@ -0,0 +1,249 @@ +" Vim syntax file +" Filename: ratpoison.vim +" Language: Ratpoison configuration/commands file ( /etc/ratpoisonrc ~/.ratpoisonrc ) +" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au> +" URL: http://mugca.its.monash.edu.au/~djkea2/vim/syntax/ratpoison.vim +" Last Change: 2004 Apr 27 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match ratpoisonComment "^\s*#.*$" contains=ratpoisonTodo + +syn keyword ratpoisonTodo TODO NOTE FIXME XXX contained + +syn case ignore +syn keyword ratpoisonBooleanArg on off contained +syn case match + +syn keyword ratpoisonCommandArg abort addhook alias banish bind contained +syn keyword ratpoisonCommandArg chdir clrunmanaged colon curframe defbarborder contained +syn keyword ratpoisonCommandArg defbargravity defbarpadding defbgcolor defborder deffgcolor contained +syn keyword ratpoisonCommandArg deffont defframesels definekey definputwidth defmaxsizegravity contained +syn keyword ratpoisonCommandArg defpadding defresizeunit deftransgravity defwaitcursor defwinfmt contained +syn keyword ratpoisonCommandArg defwingravity defwinliststyle defwinname delete delkmap contained +syn keyword ratpoisonCommandArg echo escape exec fdump focus contained +syn keyword ratpoisonCommandArg focusdown focuslast focusleft focusright focusup contained +syn keyword ratpoisonCommandArg frestore fselect gdelete getenv gmerge contained +syn keyword ratpoisonCommandArg gmove gnew gnewbg gnext gprev contained +syn keyword ratpoisonCommandArg gravity groups gselect help hsplit contained +syn keyword ratpoisonCommandArg info kill lastmsg license link contained +syn keyword ratpoisonCommandArg listhook meta msgwait newkmap newwm contained +syn keyword ratpoisonCommandArg next nextscreen number only other contained +syn keyword ratpoisonCommandArg prev prevscreen quit readkey redisplay contained +syn keyword ratpoisonCommandArg remhook remove resize restart rudeness contained +syn keyword ratpoisonCommandArg select setenv shrink source split contained +syn keyword ratpoisonCommandArg startup_message time title tmpwm unalias contained +syn keyword ratpoisonCommandArg unbind unmanage unsetenv verbexec version contained +syn keyword ratpoisonCommandArg vsplit warp windows syn case ignore contained + +syn match ratpoisonGravityArg "\<\(n\|north\)\>" contained +syn match ratpoisonGravityArg "\<\(nw\|northwest\)\>" contained +syn match ratpoisonGravityArg "\<\(ne\|northeast\)\>" contained +syn match ratpoisonGravityArg "\<\(w\|west\)\>" contained +syn match ratpoisonGravityArg "\<\(c\|center\)\>" contained +syn match ratpoisonGravityArg "\<\(e\|east\)\>" contained +syn match ratpoisonGravityArg "\<\(s\|south\)\>" contained +syn match ratpoisonGravityArg "\<\(sw\|southwest\)\>" contained +syn match ratpoisonGravityArg "\<\(se\|southeast\)\>" contained +syn case match + +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(F[1-9][0-9]\=\|\(\a\|\d\)\)\>" contained nextgroup=ratpoisonCommandArg skipwhite + +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(space\|exclam\|quotedbl\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(numbersign\|dollar\|percent\|ampersand\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(apostrophe\|quoteright\|parenleft\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(parenright\|asterisk\|plus\|comma\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(minus\|period\|slash\|colon\|semicolon\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(less\|equal\|greater\|question\|at\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(bracketleft\|backslash\|bracketright\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(asciicircum\|underscore\|grave\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(quoteleft\|braceleft\|bar\|braceright\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(asciitilde\)\>" contained nextgroup=ratpoisonCommandArg skipwhite + +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(BackSpace\|Tab\|Linefeed\|Clear\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Return\|Pause\|Scroll_Lock\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Sys_Req\|Escape\|Delete\)\>" contained nextgroup=ratpoisonCommandArg skipwhite + +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Home\|Left\|Up\|Right\|Down\|Prior\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Page_Up\|Next\|Page_Down\|End\|Begin\)\>" contained nextgroup=ratpoisonCommandArg skipwhite + +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Select\|Print\|Execute\|Insert\|Undo\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Redo\|Menu\|Find\|Cancel\|Help\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=\(Break\|Mode_switch\|script_switch\|Num_Lock\)\>" contained nextgroup=ratpoisonCommandArg skipwhite + +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Space\|Tab\|Enter\|F[1234]\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Home\|Left\|Up\|Right\|Down\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Prior\|Page_Up\|Next\|Page_Down\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(End\|Begin\|Insert\|Delete\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Equal\|Multiply\|Add\|Separator\)\>" contained nextgroup=ratpoisonCommandArg skipwhite +syn match ratpoisonKeySeqArg "\<\([CMASH]\(-[CMASH]\)\{,4}-\)\=KP_\(Subtract\|Decimal\|Divide\|\d\)\>" contained nextgroup=ratpoisonCommandArg skipwhite + +syn match ratpoisonHookArg "\<\(key\|switchwin\|switchframe\|switchgroup\|quit\|restart\)\>" contained + +syn match ratpoisonNumberArg "\<\d\+\>" contained nextgroup=ratpoisonNumberArg skipwhite + +syn keyword ratpoisonSetArg barborder contained nextgroup=ratpoisonNumberArg +syn keyword ratpoisonSetArg bargravity contained nextgroup=ratpoisonGravityArg +syn keyword ratpoisonSetArg barpadding contained nextgroup=ratpoisonNumberArg +syn keyword ratpoisonSetArg bgcolor +syn keyword ratpoisonSetArg border contained nextgroup=ratpoisonNumberArg +syn keyword ratpoisonSetArg fgcolor +syn keyword ratpoisonSetArg font +syn keyword ratpoisonSetArg framesels +syn keyword ratpoisonSetArg inputwidth contained nextgroup=ratpoisonNumberArg +syn keyword ratpoisonSetArg maxsizegravity contained nextgroup=ratpoisonGravityArg +syn keyword ratpoisonSetArg padding contained nextgroup=ratpoisonNumberArg +syn keyword ratpoisonSetArg resizeunit contained nextgroup=ratpoisonNumberArg +syn keyword ratpoisonSetArg transgravity contained nextgroup=ratpoisonGravityArg +syn keyword ratpoisonSetArg waitcursor contained nextgroup=ratpoisonNumberArg +syn keyword ratpoisonSetArg winfmt contained nextgroup=ratpoisonWinFmtArg +syn keyword ratpoisonSetArg wingravity contained nextgroup=ratpoisonGravityArg +syn keyword ratpoisonSetArg winliststyle contained nextgroup=ratpoisonWinListArg +syn keyword ratpoisonSetArg winname contained nextgroup=ratpoisonWinNameArg + +syn match ratpoisonWinFmtArg "%[nstacil]" contained nextgroup=ratpoisonWinFmtArg skipwhite + +syn match ratpoisonWinListArg "\<\(row\|column\)\>" contained + +syn match ratpoisonWinNameArg "\<\(name\|title\|class\)\>" contained + +syn match ratpoisonDefCommand "^\s*set\s*" nextgroup=ratpoisonSetArg +syn match ratpoisonDefCommand "^\s*defbarborder\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonDefCommand "^\s*defbargravity\s*" nextgroup=ratpoisonGravityArg +syn match ratpoisonDefCommand "^\s*defbarpadding\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonDefCommand "^\s*defbgcolor\s*" +syn match ratpoisonDefCommand "^\s*defborder\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonDefCommand "^\s*deffgcolor\s*" +syn match ratpoisonDefCommand "^\s*deffont\s*" +syn match ratpoisonDefCommand "^\s*defframesels\s*" +syn match ratpoisonDefCommand "^\s*definputwidth\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonDefCommand "^\s*defmaxsizegravity\s*" nextgroup=ratpoisonGravityArg +syn match ratpoisonDefCommand "^\s*defpadding\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonDefCommand "^\s*defresizeunit\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonDefCommand "^\s*deftransgravity\s*" nextgroup=ratpoisonGravityArg +syn match ratpoisonDefCommand "^\s*defwaitcursor\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonDefCommand "^\s*defwinfmt\s*" nextgroup=ratpoisonWinFmtArg +syn match ratpoisonDefCommand "^\s*defwingravity\s*" nextgroup=ratpoisonGravityArg +syn match ratpoisonDefCommand "^\s*defwinliststyle\s*" nextgroup=ratpoisonWinListArg +syn match ratpoisonDefCommand "^\s*defwinname\s*" nextgroup=ratpoisonWinNameArg +syn match ratpoisonDefCommand "^\s*msgwait\s*" nextgroup=ratpoisonNumberArg + +syn match ratpoisonStringCommand "^\s*\zsaddhook\ze\s*" nextgroup=ratpoisonHookArg +syn match ratpoisonStringCommand "^\s*\zsalias\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsbind\ze\s*" nextgroup=ratpoisonKeySeqArg +syn match ratpoisonStringCommand "^\s*\zschdir\ze\s*" +syn match ratpoisonStringCommand "^\s*\zscolon\ze\s*" nextgroup=ratpoisonCommandArg +syn match ratpoisonStringCommand "^\s*\zsdefinekey\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsdelkmap\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsecho\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsescape\ze\s*" nextgroup=ratpoisonKeySeqArg +syn match ratpoisonStringCommand "^\s*\zsexec\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsfdump\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsfrestore\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsgdelete\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsgetenv\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsgravity\ze\s*" nextgroup=ratpoisonGravityArg +syn match ratpoisonStringCommand "^\s*\zsgselect\ze\s*" +syn match ratpoisonStringCommand "^\s*\zslink\ze\s*" nextgroup=ratpoisonKeySeqArg +syn match ratpoisonStringCommand "^\s*\zslisthook\ze\s*" nextgroup=ratpoisonHookArg +syn match ratpoisonStringCommand "^\s*\zsnewkmap\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsnewwm\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsnumber\ze\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonStringCommand "^\s*\zsreadkey\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsremhook\ze\s*" nextgroup=ratpoisonHookArg +syn match ratpoisonStringCommand "^\s*\zsresize\ze\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonStringCommand "^\s*\zsrudeness\ze\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonStringCommand "^\s*\zsselect\ze\s*" nextgroup=ratpoisonNumberArg +syn match ratpoisonStringCommand "^\s*\zssetenv\ze\s*" +syn match ratpoisonStringCommand "^\s*\zssource\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsstartup_message\ze\s*" nextgroup=ratpoisonBooleanArg +syn match ratpoisonStringCommand "^\s*\zstitle\ze\s*" +syn match ratpoisonStringCommand "^\s*\zstmpwm\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsunalias\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsunbind\ze\s*" nextgroup=ratpoisonKeySeqArg +syn match ratpoisonStringCommand "^\s*\zsunmanage\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsunsetenv\ze\s*" +syn match ratpoisonStringCommand "^\s*\zsverbexec\ze\s*" +syn match ratpoisonStringCommand "^\s*\zswarp\ze\s*" nextgroup=ratpoisonBooleanArg + +syn match ratpoisonVoidCommand "^\s*\zsabort\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsbanish\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsclrunmanaged\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zscurframe\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsdelete\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsfocusdown\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsfocuslast\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsfocusleft\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsfocusright\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsfocus\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsfocusup\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsfselect\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsgmerge\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsgmove\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsgnewbg\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsgnew\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsgnext\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsgprev\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsgroups\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zshelp\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zshsplit\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsinfo\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zskill\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zslastmsg\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zslicense\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsmeta\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsnext\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsnextscreen\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsonly\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsother\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsprev\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsprevscreen\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsquit\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsredisplay\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsremove\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsrestart\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsshrink\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zssplit\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zstime\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsversion\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zsvsplit\ze\s*$" +syn match ratpoisonVoidCommand "^\s*\zswindows\ze\s*$" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_ratpoison_syn_inits") + if version < 508 + let did_ratpoison_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink ratpoisonBooleanArg Boolean + HiLink ratpoisonCommandArg Keyword + HiLink ratpoisonComment Comment + HiLink ratpoisonDefCommand Identifier + HiLink ratpoisonGravityArg Constant + HiLink ratpoisonKeySeqArg Special + HiLink ratpoisonNumberArg Number + HiLink ratpoisonSetArg Keyword + HiLink ratpoisonStringCommand Identifier + HiLink ratpoisonTodo Todo + HiLink ratpoisonVoidCommand Identifier + HiLink ratpoisonWinFmtArg Special + HiLink ratpoisonWinNameArg Constant + HiLink ratpoisonWinListArg Constant + + delcommand HiLink +endif + +let b:current_syntax = "ratpoison" + +" vim: ts=8 diff --git a/runtime/syntax/rc.vim b/runtime/syntax/rc.vim new file mode 100644 index 000000000..c3feb9781 --- /dev/null +++ b/runtime/syntax/rc.vim @@ -0,0 +1,200 @@ +" Vim syntax file +" Language: M$ Resource files (*.rc) +" Maintainer: Heiko Erhardt <Heiko.Erhardt@munich.netsurf.de> +" Last Change: 2001 May 09 + +" This file is based on the c.vim + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Common RC keywords +syn keyword rcLanguage LANGUAGE + +syn keyword rcMainObject TEXTINCLUDE VERSIONINFO BITMAP ICON CURSOR CURSOR +syn keyword rcMainObject MENU ACCELERATORS TOOLBAR DIALOG +syn keyword rcMainObject STRINGTABLE MESSAGETABLE RCDATA DLGINIT DESIGNINFO + +syn keyword rcSubObject POPUP MENUITEM SEPARATOR +syn keyword rcSubObject CONTROL LTEXT CTEXT EDITTEXT +syn keyword rcSubObject BUTTON PUSHBUTTON DEFPUSHBUTTON GROUPBOX LISTBOX COMBOBOX +syn keyword rcSubObject FILEVERSION PRODUCTVERSION FILEFLAGSMASK FILEFLAGS FILEOS +syn keyword rcSubObject FILETYPE FILESUBTYPE + +syn keyword rcCaptionParam CAPTION +syn keyword rcParam CHARACTERISTICS CLASS STYLE EXSTYLE VERSION FONT + +syn keyword rcStatement BEGIN END BLOCK VALUE + +syn keyword rcCommonAttribute PRELOAD LOADONCALL FIXED MOVEABLE DISCARDABLE PURE IMPURE + +syn keyword rcAttribute WS_OVERLAPPED WS_POPUP WS_CHILD WS_MINIMIZE WS_VISIBLE WS_DISABLED WS_CLIPSIBLINGS +syn keyword rcAttribute WS_CLIPCHILDREN WS_MAXIMIZE WS_CAPTION WS_BORDER WS_DLGFRAME WS_VSCROLL WS_HSCROLL +syn keyword rcAttribute WS_SYSMENU WS_THICKFRAME WS_GROUP WS_TABSTOP WS_MINIMIZEBOX WS_MAXIMIZEBOX WS_TILED +syn keyword rcAttribute WS_ICONIC WS_SIZEBOX WS_TILEDWINDOW WS_OVERLAPPEDWINDOW WS_POPUPWINDOW WS_CHILDWINDOW +syn keyword rcAttribute WS_EX_DLGMODALFRAME WS_EX_NOPARENTNOTIFY WS_EX_TOPMOST WS_EX_ACCEPTFILES +syn keyword rcAttribute WS_EX_TRANSPARENT WS_EX_MDICHILD WS_EX_TOOLWINDOW WS_EX_WINDOWEDGE WS_EX_CLIENTEDGE +syn keyword rcAttribute WS_EX_CONTEXTHELP WS_EX_RIGHT WS_EX_LEFT WS_EX_RTLREADING WS_EX_LTRREADING +syn keyword rcAttribute WS_EX_LEFTSCROLLBAR WS_EX_RIGHTSCROLLBAR WS_EX_CONTROLPARENT WS_EX_STATICEDGE +syn keyword rcAttribute WS_EX_APPWINDOW WS_EX_OVERLAPPEDWINDOW WS_EX_PALETTEWINDOW +syn keyword rcAttribute ES_LEFT ES_CENTER ES_RIGHT ES_MULTILINE ES_UPPERCASE ES_LOWERCASE ES_PASSWORD +syn keyword rcAttribute ES_AUTOVSCROLL ES_AUTOHSCROLL ES_NOHIDESEL ES_OEMCONVERT ES_READONLY ES_WANTRETURN +syn keyword rcAttribute ES_NUMBER +syn keyword rcAttribute BS_PUSHBUTTON BS_DEFPUSHBUTTON BS_CHECKBOX BS_AUTOCHECKBOX BS_RADIOBUTTON BS_3STATE +syn keyword rcAttribute BS_AUTO3STATE BS_GROUPBOX BS_USERBUTTON BS_AUTORADIOBUTTON BS_OWNERDRAW BS_LEFTTEXT +syn keyword rcAttribute BS_TEXT BS_ICON BS_BITMAP BS_LEFT BS_RIGHT BS_CENTER BS_TOP BS_BOTTOM BS_VCENTER +syn keyword rcAttribute BS_PUSHLIKE BS_MULTILINE BS_NOTIFY BS_FLAT BS_RIGHTBUTTON +syn keyword rcAttribute SS_LEFT SS_CENTER SS_RIGHT SS_ICON SS_BLACKRECT SS_GRAYRECT SS_WHITERECT +syn keyword rcAttribute SS_BLACKFRAME SS_GRAYFRAME SS_WHITEFRAME SS_USERITEM SS_SIMPLE SS_LEFTNOWORDWRAP +syn keyword rcAttribute SS_OWNERDRAW SS_BITMAP SS_ENHMETAFILE SS_ETCHEDHORZ SS_ETCHEDVERT SS_ETCHEDFRAME +syn keyword rcAttribute SS_TYPEMASK SS_NOPREFIX SS_NOTIFY SS_CENTERIMAGE SS_RIGHTJUST SS_REALSIZEIMAGE +syn keyword rcAttribute SS_SUNKEN SS_ENDELLIPSIS SS_PATHELLIPSIS SS_WORDELLIPSIS SS_ELLIPSISMASK +syn keyword rcAttribute DS_ABSALIGN DS_SYSMODAL DS_LOCALEDIT DS_SETFONT DS_MODALFRAME DS_NOIDLEMSG +syn keyword rcAttribute DS_SETFOREGROUND DS_3DLOOK DS_FIXEDSYS DS_NOFAILCREATE DS_CONTROL DS_CENTER +syn keyword rcAttribute DS_CENTERMOUSE DS_CONTEXTHELP +syn keyword rcAttribute LBS_NOTIFY LBS_SORT LBS_NOREDRAW LBS_MULTIPLESEL LBS_OWNERDRAWFIXED +syn keyword rcAttribute LBS_OWNERDRAWVARIABLE LBS_HASSTRINGS LBS_USETABSTOPS LBS_NOINTEGRALHEIGHT +syn keyword rcAttribute LBS_MULTICOLUMN LBS_WANTKEYBOARDINPUT LBS_EXTENDEDSEL LBS_DISABLENOSCROLL +syn keyword rcAttribute LBS_NODATA LBS_NOSEL LBS_STANDARD +syn keyword rcAttribute CBS_SIMPLE CBS_DROPDOWN CBS_DROPDOWNLIST CBS_OWNERDRAWFIXED CBS_OWNERDRAWVARIABLE +syn keyword rcAttribute CBS_AUTOHSCROLL CBS_OEMCONVERT CBS_SORT CBS_HASSTRINGS CBS_NOINTEGRALHEIGHT +syn keyword rcAttribute CBS_DISABLENOSCROLL CBS_UPPERCASE CBS_LOWERCASE +syn keyword rcAttribute SBS_HORZ SBS_VERT SBS_TOPALIGN SBS_LEFTALIGN SBS_BOTTOMALIGN SBS_RIGHTALIGN +syn keyword rcAttribute SBS_SIZEBOXTOPLEFTALIGN SBS_SIZEBOXBOTTOMRIGHTALIGN SBS_SIZEBOX SBS_SIZEGRIP +syn keyword rcAttribute CCS_TOP CCS_NOMOVEY CCS_BOTTOM CCS_NORESIZE CCS_NOPARENTALIGN CCS_ADJUSTABLE +syn keyword rcAttribute CCS_NODIVIDER +syn keyword rcAttribute LVS_ICON LVS_REPORT LVS_SMALLICON LVS_LIST LVS_TYPEMASK LVS_SINGLESEL LVS_SHOWSELALWAYS +syn keyword rcAttribute LVS_SORTASCENDING LVS_SORTDESCENDING LVS_SHAREIMAGELISTS LVS_NOLABELWRAP +syn keyword rcAttribute LVS_EDITLABELS LVS_OWNERDATA LVS_NOSCROLL LVS_TYPESTYLEMASK LVS_ALIGNTOP LVS_ALIGNLEFT +syn keyword rcAttribute LVS_ALIGNMASK LVS_OWNERDRAWFIXED LVS_NOCOLUMNHEADER LVS_NOSORTHEADER LVS_AUTOARRANGE +syn keyword rcAttribute TVS_HASBUTTONS TVS_HASLINES TVS_LINESATROOT TVS_EDITLABELS TVS_DISABLEDRAGDROP +syn keyword rcAttribute TVS_SHOWSELALWAYS +syn keyword rcAttribute TCS_FORCEICONLEFT TCS_FORCELABELLEFT TCS_TABS TCS_BUTTONS TCS_SINGLELINE TCS_MULTILINE +syn keyword rcAttribute TCS_RIGHTJUSTIFY TCS_FIXEDWIDTH TCS_RAGGEDRIGHT TCS_FOCUSONBUTTONDOWN +syn keyword rcAttribute TCS_OWNERDRAWFIXED TCS_TOOLTIPS TCS_FOCUSNEVER +syn keyword rcAttribute ACS_CENTER ACS_TRANSPARENT ACS_AUTOPLAY +syn keyword rcStdId IDI_APPLICATION IDI_HAND IDI_QUESTION IDI_EXCLAMATION IDI_ASTERISK IDI_WINLOGO IDI_WINLOGO +syn keyword rcStdId IDI_WARNING IDI_ERROR IDI_INFORMATION +syn keyword rcStdId IDCANCEL IDABORT IDRETRY IDIGNORE IDYES IDNO IDCLOSE IDHELP IDC_STATIC + +" Common RC keywords + +" Common RC keywords +syn keyword rcTodo contained TODO FIXME XXX + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match rcSpecial contained "\\[0-7][0-7][0-7]\=\|\\." +syn region rcString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=rcSpecial +syn match rcCharacter "'[^\\]'" +syn match rcSpecialCharacter "'\\.'" +syn match rcSpecialCharacter "'\\[0-7][0-7]'" +syn match rcSpecialCharacter "'\\[0-7][0-7][0-7]'" + +"catch errors caused by wrong parenthesis +syn region rcParen transparent start='(' end=')' contains=ALLBUT,rcParenError,rcIncluded,rcSpecial,rcTodo +syn match rcParenError ")" +syn match rcInParen contained "[{}]" + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match rcNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" +"floating point number, with dot, optional exponent +syn match rcFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, starting with a dot, optional exponent +syn match rcFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match rcFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" +"hex number +syn match rcNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>" +"syn match rcIdentifier "\<[a-z_][a-z0-9_]*\>" +syn case match +" flag an octal number with wrong digits +syn match rcOctalError "\<0[0-7]*[89]" + +if exists("rc_comment_strings") + " A comment can contain rcString, rcCharacter and rcNumber. + " But a "*/" inside a rcString in a rcComment DOES end the comment! So we + " need to use a special type of rcString: rcCommentString, which also ends on + " "*/", and sees a "*" at the start of the line as comment again. + " Unfortunately this doesn't very well work for // type of comments :-( + syntax match rcCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region rcCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=rcSpecial,rcCommentSkip + syntax region rcComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=rcSpecial + syntax region rcComment start="/\*" end="\*/" contains=rcTodo,rcCommentString,rcCharacter,rcNumber,rcFloat + syntax match rcComment "//.*" contains=rcTodo,rcComment2String,rcCharacter,rcNumber +else + syn region rcComment start="/\*" end="\*/" contains=rcTodo + syn match rcComment "//.*" contains=rcTodo +endif +syntax match rcCommentError "\*/" + +syn region rcPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=rcComment,rcString,rcCharacter,rcNumber,rcCommentError +syn region rcIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match rcIncluded contained "<[^>]*>" +syn match rcInclude "^\s*#\s*include\>\s*["<]" contains=rcIncluded +"syn match rcLineSkip "\\$" +syn region rcDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,rcPreCondit,rcIncluded,rcInclude,rcDefine,rcInParen +syn region rcPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,rcPreCondit,rcIncluded,rcInclude,rcDefine,rcInParen + +syn sync ccomment rcComment minlines=10 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_rc_syntax_inits") + if version < 508 + let did_rc_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink rcCharacter Character + HiLink rcSpecialCharacter rcSpecial + HiLink rcNumber Number + HiLink rcFloat Float + HiLink rcOctalError rcError + HiLink rcParenError rcError + HiLink rcInParen rcError + HiLink rcCommentError rcError + HiLink rcInclude Include + HiLink rcPreProc PreProc + HiLink rcDefine Macro + HiLink rcIncluded rcString + HiLink rcError Error + HiLink rcPreCondit PreCondit + HiLink rcCommentString rcString + HiLink rcComment2String rcString + HiLink rcCommentSkip rcComment + HiLink rcString String + HiLink rcComment Comment + HiLink rcSpecial SpecialChar + HiLink rcTodo Todo + + HiLink rcAttribute rcCommonAttribute + HiLink rcStdId rcStatement + HiLink rcStatement Statement + + " Default color overrides + hi def rcLanguage term=reverse ctermbg=Red ctermfg=Yellow guibg=Red guifg=Yellow + hi def rcMainObject term=underline ctermfg=Blue guifg=Blue + hi def rcSubObject ctermfg=Green guifg=Green + hi def rcCaptionParam term=underline ctermfg=DarkGreen guifg=Green + hi def rcParam ctermfg=DarkGreen guifg=DarkGreen + hi def rcStatement ctermfg=DarkGreen guifg=DarkGreen + hi def rcCommonAttribute ctermfg=Brown guifg=Brown + + "HiLink rcIdentifier Identifier + + delcommand HiLink +endif + +let b:current_syntax = "rc" + +" vim: ts=8 diff --git a/runtime/syntax/rcs.vim b/runtime/syntax/rcs.vim new file mode 100644 index 000000000..f4a90c62c --- /dev/null +++ b/runtime/syntax/rcs.vim @@ -0,0 +1,76 @@ +" Vim syntax file +" Language: RCS file +" Maintainer: Dmitry Vasiliev <dima@hlabs.spb.ru> +" URL: http://www.hlabs.spb.ru/vim/rcs.vim +" Last Change: $Date$ +" Filenames: *,v +" $Revision$ +" +" Options: +" rcs_folding = 1 For folding strings + +" For version 5.x: Clear all syntax items. +" For version 6.x: Quit when a syntax file was already loaded. +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" RCS file must end with a newline. +syn match rcsEOFError ".\%$" containedin=ALL + +" Keywords. +syn keyword rcsKeyword head branch access symbols locks strict +syn keyword rcsKeyword comment expand date author state branches +syn keyword rcsKeyword next desc log +syn keyword rcsKeyword text nextgroup=rcsTextStr skipwhite skipempty + +" Revision numbers and dates. +syn match rcsNumber "\<[0-9.]\+\>" display + +" Strings. +if exists("rcs_folding") && has("folding") + " Folded strings. + syn region rcsString matchgroup=rcsString start="@" end="@" skip="@@" fold contains=rcsSpecial + syn region rcsTextStr matchgroup=rcsTextStr start="@" end="@" skip="@@" fold contained contains=rcsSpecial,rcsDiffLines +else + syn region rcsString matchgroup=rcsString start="@" end="@" skip="@@" contains=rcsSpecial + syn region rcsTextStr matchgroup=rcsTextStr start="@" end="@" skip="@@" contained contains=rcsSpecial,rcsDiffLines +endif +syn match rcsSpecial "@@" contained +syn match rcsDiffLines "[da]\d\+ \d\+$" contained + +" Synchronization. +syn sync clear +if exists("rcs_folding") && has("folding") + syn sync fromstart +else + " We have incorrect folding if following sync patterns is turned on. + syn sync match rcsSync grouphere rcsString "[0-9.]\+\(\s\|\n\)\+log\(\s\|\n\)\+@"me=e-1 + syn sync match rcsSync grouphere rcsTextStr "@\(\s\|\n\)\+text\(\s\|\n\)\+@"me=e-1 +endif + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already. +" For version 5.8 and later: only when an item doesn't have highlighting yet. +if version >= 508 || !exists("did_rcs_syn_inits") + if version <= 508 + let did_rcs_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink rcsKeyword Keyword + HiLink rcsNumber Identifier + HiLink rcsString String + HiLink rcsTextStr String + HiLink rcsSpecial Special + HiLink rcsDiffLines Special + HiLink rcsEOFError Error + + delcommand HiLink +endif + +let b:current_syntax = "rcs" diff --git a/runtime/syntax/rcslog.vim b/runtime/syntax/rcslog.vim new file mode 100644 index 000000000..acacfa124 --- /dev/null +++ b/runtime/syntax/rcslog.vim @@ -0,0 +1,38 @@ +" Vim syntax file +" Language: RCS log output +" Maintainer: Joe Karthauser <joe@freebsd.org> +" Last Change: 2001 May 09 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match rcslogRevision "^revision.*$" +syn match rcslogFile "^RCS file:.*" +syn match rcslogDate "^date: .*$" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_rcslog_syntax_inits") + if version < 508 + let did_rcslog_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink rcslogFile Type + HiLink rcslogRevision Constant + HiLink rcslogDate Identifier + + delcommand HiLink +endif + +let b:current_syntax = "rcslog" + +" vim: ts=8 diff --git a/runtime/syntax/readline.vim b/runtime/syntax/readline.vim new file mode 100644 index 000000000..8f72048ab --- /dev/null +++ b/runtime/syntax/readline.vim @@ -0,0 +1,152 @@ +" Vim syntax file +" Language: readline configuration file +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/readline/ +" Latest Revision: 2004-05-22 +" arch-tag: 6d8e7da4-b39c-4bf7-8e6a-d9135f993457 +" Variables: +" readline_has_bash - if defined add support for bash specific +" settings/functions + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Set iskeyword since we need `-' (and potentially others) in keywords. +" For version 5.x: Set it globally +" For version 6.x: Set it locally +if version >= 600 + command -nargs=1 SetIsk setlocal iskeyword=<args> +else + command -nargs=1 SetIsk set iskeyword=<args> +endif +SetIsk 48-57,65-90,97-122,- +delcommand SetIsk + +" comments +syn region readlineComment display oneline matchgroup=readlineComment start="^\s*#" end="$" contains=readlineTodo + +" todo +syn keyword readlineTodo contained TODO FIXME XXX NOTE + +" strings (argh...not the way i want it, but fine..." +syn match readlineString "^\s*[A-Za-z-]\+:"me=e-1 contains=readlineKeys +syn region readlineString display oneline start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=readlineKeysTwo + +" special key +syn case ignore +syn keyword readlineKeys contained Control Meta Del Esc Escape LFD Newline Ret Return Rubout Space Spc Tab +syn case match + +syn match readlineKeysTwo contained +\\\([CM]-\|[e\\"'abdfnrtv]\|\o\{3}\|x\x\{3}\)+ + +" keymaps +syn match readlineKeymaps contained "emacs\(-standard\|-meta\|-ctlx\)\=" +syn match readlineKeymaps contained "vi\(-move\|-command\|-insert\)\=" + +" bell styles +syn keyword readlineBellStyles contained audible visible none + +" numbers +syn match readlineNumber contained "\<\d\+\>" + +" booleans +syn case ignore +syn keyword readlineBoolean contained on off +syn case match + +" conditionals +syn keyword readlineIfOps contained mode term + +syn region readlineConditional display oneline transparent matchgroup=readlineConditional start="^\s*$if" end="$" contains=readlineIfOps,readlineKeymaps +syn match readlineConditional "^\s*$\(else\|endif\)\>" + +" include +syn match readlineInclude "^\s*$include\>" + +" settings + +syn region readlineSet display oneline transparent matchgroup=readlineKeyword start="^\s*set\>" end="$"me=e-1 contains=readlineNumber,readlineBoolean,readlineKeymaps,readlineBellStyles,readlineSettings + +syn keyword readlineSettings contained bell-style comment-begin completion-ignore-case +syn keyword readlineSettings contained completion-query-items convert-meta disable-completion editing-mode enable-keypad +syn keyword readlineSettings contained expand-tilde horizontal-scroll-mode mark-directories keymap mark-modified-lines meta-flag +syn keyword readlineSettings contained input-meta output-meta print-completions-horizontally show-all-if-ambiguous visible-stats +syn keyword readlineSettings contained prefer-visible-bell blink-matching-paren +syn keyword readlineSettings contained match-hidden-files history-preserve-point isearch-terminators + +" bash extensions +if exists("readline_has_bash") + "syn keyword readlineSettings contained +endif + +" key bindings +syn region readlineBinding display oneline transparent matchgroup=readlineKeyword start=":" end="$" contains=readlineKeys,readlineFunctions + +syn match readlineFunctions contained "\<\(beginning\|end\)-of-line\>" +syn match readlineFunctions contained "\<\(backward\|forward\)-\(char\|word\)\>" +syn match readlineFunctions contained "\<\(previous\|next\|\(beginning\|end\)-of\|\(non-incremental-\)\=\(reverse\|forward\)-search\)-history\>" +syn match readlineFunctions contained "\<history-search-\(forward\|backward\)\>" +syn match readlineFunctions contained "\<yank-\(nth\|last\)-arg\>" +syn match readlineFunctions contained "\<\(backward-\)\=kill-\(\(whole-\)\=line\|word\)\>" +syn match readlineFunctions contained "\<\(start\|end\|call-last\)-kbd-macro\>" +syn match readlineFunctions contained "\<dump-\(functions\|variables\|macros\)\>" +syn match readlineFunctions contained "\<non-incremental-\(reverse\|forward\)-search-history-again\>" +syn keyword readlineFunctions contained clear-screen redraw-current-line accept-line delete-char backward-delete-char quoted-insert tab-insert +syn keyword readlineFunctions contained self-insert transpose-chars transpose-words downcase-word capitalize-word unix-word-rubout +syn keyword readlineFunctions contained delete-horizontal-space kill-region copy-region-as-kill copy-backward-word copy-forward-word yank yank-pop +syn keyword readlineFunctions contained digit-argument universal-argument complete possible-completions insert-completions menu-complete +syn keyword readlineFunctions contained re-read-init-file abort do-uppercase-version prefix-meta undo revert-line tilde-expand set-mark +syn keyword readlineFunctions contained exchange-point-and-mark character-search character-search-backward insert-comment emacs-editing-mode vi-editing-mode +syn keyword readlineFunctions contained unix-line-discard upcase-word backward-delete-word vi-eof-maybe vi-movement-mode vi-match vi-tilde-expand +syn keyword readlineFunctions contained vi-complete vi-char-search vi-redo vi-search vi-arg-digit vi-append-eol vi-prev-word vi-change-to vi-delete-to +syn keyword readlineFunctions contained vi-end-word vi-fetch-history vi-insert-beg vi-search-again vi-put vi-replace vi-subst vi-yank-to vi-first-print +syn keyword readlineFunctions contained vi-yank-arg vi-goto-mark vi-append-mode vi-insertion-mode prev-history vi-set-mark vi-search-again vi-put vi-change-char +syn keyword readlineFunctions contained vi-subst vi-delete vi-yank-to vi-column vi-change-case vi-overstrike vi-overstrike-delete +syn keyword readlineFunctions contained do-lowercase-version delete-char-or-list tty-status arrow-key-prefix +syn keyword readlineFunctions contained vi-back-to-indent vi-bword vi-bWord vi-eword vi-eWord vi-fword vi-fWord vi-next-word + +" bash extensions +if exists("readline_has_bash") + syn keyword readlineFunctions contained shell-expand-line history-expand-line magic-space alias-expand-line history-and-alias-expand-line insert-last-argument + syn keyword readlineFunctions contained operate-and-get-next forward-backward-delete-char delete-char-or-list complete-filename possible-filename-completions + syn keyword readlineFunctions contained complete-username possible-username-completions complete-variable possible-variable-completions complete-hostname + syn keyword readlineFunctions contained possible-hostname-completions complete-command possible-command-completions dynamic-complete-history complete-into-braces + syn keyword readlineFunctions contained glob-expand-word glob-list-expansions display-shell-version + syn keyword readlineFunctions contained glob-complete-word edit-and-execute-command +endif + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_readline_syn_inits") + if version < 508 + let did_readline_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink readlineComment Comment + HiLink readlineTodo Todo + HiLink readlineString String + HiLink readlineKeys SpecialChar + HiLink readlineKeysTwo SpecialChar + HiLink readlineKeymaps Constant + HiLink readlineBellStyles Constant + HiLink readlineNumber Number + HiLink readlineBoolean Boolean + HiLink readlineIfOps Type + HiLink readlineConditional Conditional + HiLink readlineInclude Include + HiLink readlineKeyword Keyword + HiLink readlineSettings Type + HiLink readlineFunctions Type + delcommand HiLink +endif + +let b:current_syntax = "readline" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/rebol.vim b/runtime/syntax/rebol.vim new file mode 100644 index 000000000..e6395758f --- /dev/null +++ b/runtime/syntax/rebol.vim @@ -0,0 +1,216 @@ +" Vim syntax file +" Language: Rebol +" Maintainer: Mike Williams <mrw@eandem.co.uk> +" Filenames: *.r +" Last Change: 27th June 2002 +" URL: http://www.eandem.co.uk/mrw/vim +" + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Rebol is case insensitive +syn case ignore + +" As per current users documentation +if version < 600 + set isk=@,48-57,?,!,.,',+,-,*,&,\|,=,_,~ +else + setlocal isk=@,48-57,?,!,.,',+,-,*,&,\|,=,_,~ +endif + +" Yer TODO highlighter +syn keyword rebolTodo contained TODO + +" Comments +syn match rebolComment ";.*$" contains=rebolTodo + +" Words +syn match rebolWord "\a\k*" +syn match rebolWordPath "[^[:space:]]/[^[:space]]"ms=s+1,me=e-1 + +" Booleans +syn keyword rebolBoolean true false on off yes no + +" Values +" Integers +syn match rebolInteger "\<[+-]\=\d\+\('\d*\)*\>" +" Decimals +syn match rebolDecimal "[+-]\=\(\d\+\('\d*\)*\)\=[,.]\d*\(e[+-]\=\d\+\)\=" +syn match rebolDecimal "[+-]\=\d\+\('\d*\)*\(e[+-]\=\d\+\)\=" +" Time +syn match rebolTime "[+-]\=\(\d\+\('\d*\)*\:\)\{1,2}\d\+\('\d*\)*\([.,]\d\+\)\=\([AP]M\)\=\>" +syn match rebolTime "[+-]\=:\d\+\([.,]\d*\)\=\([AP]M\)\=\>" +" Dates +" DD-MMM-YY & YYYY format +syn match rebolDate "\d\{1,2}\([/-]\)\(Jan\|Feb\|Mar\|Apr\|May\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec\)\1\(\d\{2}\)\{1,2}\>" +" DD-month-YY & YYYY format +syn match rebolDate "\d\{1,2}\([/-]\)\(January\|February\|March\|April\|May\|June\|July\|August\|September\|October\|November\|December\)\1\(\d\{2}\)\{1,2}\>" +" DD-MM-YY & YY format +syn match rebolDate "\d\{1,2}\([/-]\)\d\{1,2}\1\(\d\{2}\)\{1,2}\>" +" YYYY-MM-YY format +syn match rebolDate "\d\{4}-\d\{1,2}-\d\{1,2}\>" +" DD.MM.YYYY format +syn match rebolDate "\d\{1,2}\.\d\{1,2}\.\d\{4}\>" +" Money +syn match rebolMoney "\a*\$\d\+\('\d*\)*\([,.]\d\+\)\=" +" Strings +syn region rebolString oneline start=+"+ skip=+^"+ end=+"+ contains=rebolSpecialCharacter +syn region rebolString start=+[^#]{+ end=+}+ skip=+{[^}]*}+ contains=rebolSpecialCharacter +" Binary +syn region rebolBinary start=+\d*#{+ end=+}+ contains=rebolComment +" Email +syn match rebolEmail "\<\k\+@\(\k\+\.\)*\k\+\>" +" File +syn match rebolFile "%\(\k\+/\)*\k\+[/]\=" contains=rebolSpecialCharacter +syn region rebolFile oneline start=+%"+ end=+"+ contains=rebolSpecialCharacter +" URLs +syn match rebolURL "http://\k\+\(\.\k\+\)*\(:\d\+\)\=\(/\(\k\+/\)*\(\k\+\)\=\)*" +syn match rebolURL "file://\k\+\(\.\k\+\)*/\(\k\+/\)*\k\+" +syn match rebolURL "ftp://\(\k\+:\k\+@\)\=\k\+\(\.\k\+\)*\(:\d\+\)\=/\(\k\+/\)*\k\+" +syn match rebolURL "mailto:\k\+\(\.\k\+\)*@\k\+\(\.\k\+\)*" +" Issues +syn match rebolIssue "#\(\d\+-\)*\d\+" +" Tuples +syn match rebolTuple "\(\d\+\.\)\{2,}" + +" Characters +syn match rebolSpecialCharacter contained "\^[^[:space:][]" +syn match rebolSpecialCharacter contained "%\d\+" + + +" Operators +" Math operators +syn match rebolMathOperator "\(\*\{1,2}\|+\|-\|/\{1,2}\)" +syn keyword rebolMathFunction abs absolute add arccosine arcsine arctangent cosine +syn keyword rebolMathFunction divide exp log-10 log-2 log-e max maximum min +syn keyword rebolMathFunction minimum multiply negate power random remainder sine +syn keyword rebolMathFunction square-root subtract tangent +" Binary operators +syn keyword rebolBinaryOperator complement and or xor ~ +" Logic operators +syn match rebolLogicOperator "[<>=]=\=" +syn match rebolLogicOperator "<>" +syn keyword rebolLogicOperator not +syn keyword rebolLogicFunction all any +syn keyword rebolLogicFunction head? tail? +syn keyword rebolLogicFunction negative? positive? zero? even? odd? +syn keyword rebolLogicFunction binary? block? char? date? decimal? email? empty? +syn keyword rebolLogicFunction file? found? function? integer? issue? logic? money? +syn keyword rebolLogicFunction native? none? object? paren? path? port? series? +syn keyword rebolLogicFunction string? time? tuple? url? word? +syn keyword rebolLogicFunction exists? input? same? value? + +" Datatypes +syn keyword rebolType binary! block! char! date! decimal! email! file! +syn keyword rebolType function! integer! issue! logic! money! native! +syn keyword rebolType none! object! paren! path! port! string! time! +syn keyword rebolType tuple! url! word! +syn keyword rebolTypeFunction type? + +" Control statements +syn keyword rebolStatement break catch exit halt reduce return shield +syn keyword rebolConditional if else +syn keyword rebolRepeat for forall foreach forskip loop repeat while until do + +" Series statements +syn keyword rebolStatement change clear copy fifth find first format fourth free +syn keyword rebolStatement func function head insert last match next parse past +syn keyword rebolStatement pick remove second select skip sort tail third trim length? + +" Context +syn keyword rebolStatement alias bind use + +" Object +syn keyword rebolStatement import make make-object rebol info? + +" I/O statements +syn keyword rebolStatement delete echo form format import input load mold prin +syn keyword rebolStatement print probe read save secure send write +syn keyword rebolOperator size? modified? + +" Debug statement +syn keyword rebolStatement help probe trace + +" Misc statements +syn keyword rebolStatement func function free + +" Constants +syn keyword rebolConstant none + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_rebol_syntax_inits") + if version < 508 + let did_rebol_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink rebolTodo Todo + + HiLink rebolStatement Statement + HiLink rebolLabel Label + HiLink rebolConditional Conditional + HiLink rebolRepeat Repeat + + HiLink rebolOperator Operator + HiLink rebolLogicOperator rebolOperator + HiLink rebolLogicFunction rebolLogicOperator + HiLink rebolMathOperator rebolOperator + HiLink rebolMathFunction rebolMathOperator + HiLink rebolBinaryOperator rebolOperator + HiLink rebolBinaryFunction rebolBinaryOperator + + HiLink rebolType Type + HiLink rebolTypeFunction rebolOperator + + HiLink rebolWord Identifier + HiLink rebolWordPath rebolWord + HiLink rebolFunction Function + + HiLink rebolCharacter Character + HiLink rebolSpecialCharacter SpecialChar + HiLink rebolString String + + HiLink rebolNumber Number + HiLink rebolInteger rebolNumber + HiLink rebolDecimal rebolNumber + HiLink rebolTime rebolNumber + HiLink rebolDate rebolNumber + HiLink rebolMoney rebolNumber + HiLink rebolBinary rebolNumber + HiLink rebolEmail rebolString + HiLink rebolFile rebolString + HiLink rebolURL rebolString + HiLink rebolIssue rebolNumber + HiLink rebolTuple rebolNumber + HiLink rebolFloat Float + HiLink rebolBoolean Boolean + + HiLink rebolConstant Constant + + HiLink rebolComment Comment + + HiLink rebolError Error + + delcommand HiLink +endif + +if exists("my_rebol_file") + if file_readable(expand(my_rebol_file)) + execute "source " . my_rebol_file + endif +endif + +let b:current_syntax = "rebol" + +" vim: ts=8 diff --git a/runtime/syntax/registry.vim b/runtime/syntax/registry.vim new file mode 100644 index 000000000..e9ff8fcab --- /dev/null +++ b/runtime/syntax/registry.vim @@ -0,0 +1,114 @@ +" Vim syntax file +" Language: Windows Registry export with regedit (*.reg) +" Maintainer: Dominique Stéphan (dominique@mggen.com) +" URL: http://www.mggen.com/vim/syntax/registry.zip +" Last change: 2004 Apr 23 + +" clear any unwanted syntax defs +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" shut case off +syn case ignore + +" Head of regedit .reg files, it's REGEDIT4 on Win9#/NT +syn match registryHead "^REGEDIT[0-9]*$" + +" Comment +syn match registryComment "^;.*$" + +" Registry Key constant +syn keyword registryHKEY HKEY_LOCAL_MACHINE HKEY_CLASSES_ROOT HKEY_CURRENT_USER +syn keyword registryHKEY HKEY_USERS HKEY_CURRENT_CONFIG HKEY_DYN_DATA +" Registry Key shortcuts +syn keyword registryHKEY HKLM HKCR HKCU HKU HKCC HKDD + +" Some values often found in the registry +" GUID (Global Unique IDentifier) +syn match registryGUID "{[0-9A-Fa-f]\{8}\-[0-9A-Fa-f]\{4}\-[0-9A-Fa-f]\{4}\-[0-9A-Fa-f]\{4}\-[0-9A-Fa-f]\{12}}" contains=registrySpecial + +" Disk +" syn match registryDisk "[a-zA-Z]:\\\\" + +" Special and Separator characters +syn match registrySpecial "\\" +syn match registrySpecial "\\\\" +syn match registrySpecial "\\\"" +syn match registrySpecial "\." +syn match registrySpecial "," +syn match registrySpecial "\/" +syn match registrySpecial ":" +syn match registrySpecial "-" + +" String +syn match registryString "\".*\"" contains=registryGUID,registrySpecial + +" Path +syn region registryPath start="\[" end="\]" contains=registryHKEY,registryGUID,registrySpecial + +" Path to remove +" like preceding path but with a "-" at begin +syn region registryRemove start="\[\-" end="\]" contains=registryHKEY,registryGUID,registrySpecial + +" Subkey +syn match registrySubKey "^\".*\"=" +" Default value +syn match registrySubKey "^\@=" + +" Numbers + +" Hex or Binary +" The format can be precised between () : +" 0 REG_NONE +" 1 REG_SZ +" 2 REG_EXPAND_SZ +" 3 REG_BINARY +" 4 REG_DWORD, REG_DWORD_LITTLE_ENDIAN +" 5 REG_DWORD_BIG_ENDIAN +" 6 REG_LINK +" 7 REG_MULTI_SZ +" 8 REG_RESOURCE_LIST +" 9 REG_FULL_RESOURCE_DESCRIPTOR +" 10 REG_RESOURCE_REQUIREMENTS_LIST +" The value can take several lines, if \ ends the line +" The limit to 999 matches is arbitrary, it avoids Vim crashing on a very long +" line of hex values that ends in a comma. +"syn match registryHex "hex\(([0-9]\{0,2})\)\=:\([0-9a-fA-F]\{2},\)\{0,999}\([0-9a-fA-F]\{2}\|\\\)$" contains=registrySpecial +syn match registryHex "hex\(([0-9]\{0,2})\)\=:\([0-9a-fA-F]\{2},\)*\([0-9a-fA-F]\{2}\|\\\)$" contains=registrySpecial +syn match registryHex "^\s*\([0-9a-fA-F]\{2},\)\{0,999}\([0-9a-fA-F]\{2}\|\\\)$" contains=registrySpecial +" Dword (32 bits) +syn match registryDword "dword:[0-9a-fA-F]\{8}$" contains=registrySpecial + +if version >= 508 || !exists("did_registry_syntax_inits") + if version < 508 + let did_registry_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + +" The default methods for highlighting. Can be overridden later + HiLink registryComment Comment + HiLink registryHead Constant + HiLink registryHKEY Constant + HiLink registryPath Special + HiLink registryRemove PreProc + HiLink registryGUID Identifier + HiLink registrySpecial Special + HiLink registrySubKey Type + HiLink registryString String + HiLink registryHex Number + HiLink registryDword Number + + delcommand HiLink +endif + + +let b:current_syntax = "registry" + +" vim:ts=8 diff --git a/runtime/syntax/remind.vim b/runtime/syntax/remind.vim new file mode 100644 index 000000000..55d583ec3 --- /dev/null +++ b/runtime/syntax/remind.vim @@ -0,0 +1,64 @@ +" Vim syntax file +" Language: Remind +" Maintainer: Davide Alberani <alberanid@bigfoot.com> +" Last Change: 28 Apr 2001 +" Version: 0.2 +" URL: http://digilander.iol.it/alberanid/vim/syntax/remind.vim +" +" remind is a sophisticated reminder service +" you can download remind from http://www.roaringpenguin.com/remind.html + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" shut case off +syn case ignore + +syn keyword remindCommands REM OMIT SET FSET UNSET +syn keyword remindExpiry UNTIL SCANFROM SCAN WARN SCHED +syn keyword remindTag PRIORITY TAG +syn keyword remindTimed AT DURATION +syn keyword remindMove ONCE SKIP BEFORE AFTER +syn keyword remindSpecial INCLUDE INC BANNER PUSH-OMIT-CONTEXT PUSH CLEAR-OMIT-CONTEXT CLEAR POP-OMIT-CONTEXT POP +syn keyword remindRun MSG MSF RUN CAL SATISFY SPECIAL PS PSFILE SHADE MOON +syn keyword remindConditional IF ELSE ENDIF IFTRIG +syn match remindComment "#.*$" +syn region remindString start=+'+ end=+'+ skip=+\\\\\|\\'+ oneline +syn region remindString start=+"+ end=+"+ skip=+\\\\\|\\"+ oneline +syn keyword remindDebug DEBUG DUMPVARS DUMP ERRMSG FLUSH PRESERVE +syn match remindVar "\$[_a-zA-Z][_a-zA-Z0-9]*" +syn match remindSubst "%[^ ]" +syn match remindAdvanceNumber "\(\*\|+\|-\|++\|--\)[0-9]\+" + +if version >= 508 || !exists("did_remind_syn_inits") + if version < 508 + let did_remind_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink remindCommands Function + HiLink remindExpiry Repeat + HiLink remindTag Label + HiLink remindTimed Statement + HiLink remindMove Statement + HiLink remindSpecial Include + HiLink remindRun Function + HiLink remindConditional Conditional + HiLink remindComment Comment + HiLink remindString String + HiLink remindDebug Debug + HiLink remindVar Identifier + HiLink remindSubst Constant + HiLink remindAdvanceNumber Number + + delcommand HiLink +endif + +let b:current_syntax = "remind" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/resolv.vim b/runtime/syntax/resolv.vim new file mode 100644 index 000000000..4fbc242e9 --- /dev/null +++ b/runtime/syntax/resolv.vim @@ -0,0 +1,85 @@ +" Vim syntax file +" Language: resolver configuration file +" Maintaner: Radu Dineiu <littledragon@altern.org> +" URL: http://ld.yi.org/vim/resolv.vim +" ChangeLog: http://ld.yi.org/vim/resolv.ChangeLog +" Last Change: 2003 May 11 +" Version: 0.1 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Errors, comments and operators +syn match resolvError /./ +syn match resolvNull /^\s*$/ +syn match resolvComment /^\s*#.*$/ +syn match resolvOperator /[\/:]/ contained + +" IP + +syn cluster resolvIPCluster contains=resolvIPError,resolvIPSpecial +syn match resolvIPError /\%(\d\{4,}\|25[6-9]\|2[6-9]\d\|[3-9]\d\{2}\)[\.0-9]*/ contained +syn match resolvIPSpecial /\%(127\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)/ contained + +" General +syn match resolvIP contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}/ contains=@resolvIPCluster +syn match resolvIPNetmask contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\%(\%(\d\{1,4}\.\)\{,3}\d\{1,4}\)\)\?/ contains=resolvOperator,@resolvIPCluster +syn match resolvHostname contained /\w\{-}\.[-0-9A-Za-z_\.]*/ + +" Particular +syn match resolvIPNameserver contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\s\|$\)\)\{1,3}/ contains=@resolvIPCluster +syn match resolvHostnameSearch contained /\%(\w\{-}\.[-0-9A-Za-z_\.]\{-}\%(\s\|$\)\)\{1,6}/ +syn match resolvIPNetmaskSortList contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\%(\%(\d\{1,4}\.\)\{,3}\d\{1,4}\)\)\?\%(\s\|$\)\)\{1,10}/ contains=resolvOperator,@resolvIPCluster + +" Identifiers +syn match resolvNameserver /^nameserver / nextgroup=resolvIPNameserver +syn match resolvDomain /^domain / nextgroup=resolvHostname +syn match resolvSearch /^search / nextgroup=resolvHostnameSearch +syn match resolvSortList /^sortlist / nextgroup=resolvIPNetmaskSortList +syn match resolvOptions /^options / nextgroup=resolvOption + +" Options +syn match resolvOption /\%(debug\|ndots:\d\)/ contained contains=resolvOperator + +" Additional errors +syn match resolvError /^search .\{257,}/ +syn match resolvNull /\s\{1,}$/ + +if version >= 508 || !exists("did_config_syntax_inits") + if version < 508 + let did_config_syntax_inits = 1 + command! -nargs=+ HiLink hi link <args> + else + command! -nargs=+ HiLink hi def link <args> + endif + + HiLink resolvIP Number + HiLink resolvIPNetmask Number + HiLink resolvHostname String + HiLink resolvOption String + + HiLink resolvIPNameserver Number + HiLink resolvHostnameSearch String + HiLink resolvIPNetmaskSortList Number + + HiLink resolvNameServer Identifier + HiLink resolvDomain Identifier + HiLink resolvSearch Identifier + HiLink resolvSortList Identifier + HiLink resolvOptions Identifier + + HiLink resolvComment Comment + HiLink resolvOperator Operator + HiLink resolvError Error + HiLink resolvIPError Error + HiLink resolvIPSpecial Special + + delcommand HiLink +endif + +let b:current_syntax = "resolv" + +" vim: ts=8 ft=vim diff --git a/runtime/syntax/rexx.vim b/runtime/syntax/rexx.vim new file mode 100644 index 000000000..ef4b058b5 --- /dev/null +++ b/runtime/syntax/rexx.vim @@ -0,0 +1,113 @@ +" Vim syntax file +" Language: Rexx +" Maintainer: Thomas Geulig <geulig@nentec.de> +" Last Change: 2001 May 2 +" URL: http://mywebpage.netscape.com/sharpPeople/vim/syntax/rexx.vim +" +" Special Thanks to Dan Sharp <dwsharp@hotmail.com> for comments and additions +" (and providing the webspace) + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" A Keyword is the first symbol in a clause. A clause begins at the start +" of a line or after a semicolon. THEN, ELSE, OTHERWISE, and colons are always +" followed by an implied semicolon. +syn match rexxClause "\(^\|;\|:\|then \|else \|otherwise \)\s*\w\+" contains=ALL + +" Considered keywords when used together in a phrase and begin a clause +syn match rexxKeyword contained "\<signal\( on \(error\|failure\|halt\|notready\|novalue\|syntax\|lostdigits\)\(\s\+name\)\=\)\=\>" +syn match rexxKeyword contained "\<signal off \(error\|failure\|halt\|notready\|novalue\|syntax\|lostdigits\)\>" +syn match rexxKeyword contained "\<call off \(error\|failure\|halt\|notready\)\>" +syn match rexxKeyword contained "\<parse \(upper \)\=\(arg\|linein\|pull\|source\|var\|value\|version\)\>" +syn match rexxKeyword contained "\<numeric \(digits\|form \(scientific\|engineering\|value\)\|fuzz\)\>" +syn match rexxKeyword contained "\<\(address\|trace\)\( value\)\=\>" +syn match rexxKeyword contained "\<procedure\( expose\)\=\>" +syn match rexxKeyword contained "\<do\( forever\)\=\>" + +" Another keyword phrase, separated to aid highlighting in rexxFunction +syn match rexxKeyword2 contained "\<call\( on \(error\|failure\|halt\|notready\)\(\s\+name\)\=\)\=\>" + +" Considered keywords when they begin a clause +syn match rexxKeyword contained "\<\(arg\|drop\|end\|exit\|if\|interpret\|iterate\|leave\|nop\)\>" +syn match rexxKeyword contained "\<\(options\|pull\|push\|queue\|return\|say\|select\|trace\)\>" + +" Conditional phrases +syn match rexxConditional "\(^\s*\| \)\(to\|by\|for\|until\|while\|then\|when\|otherwise\|else\)\( \|\s*$\)" contains=ALLBUT,rexxConditional +syn match rexxConditional contained "\<\(to\|by\|for\|until\|while\|then\|when\|else\|otherwise\)\>" + +" Assignments -- a keyword followed by an equal sign becomes a variable +syn match rexxAssign "\<\w\+\s*=\s*" contains=rexxSpecialVariable + +" Functions/Procedures +syn match rexxFunction "\<\h\w*\(/\*\s*\*/\)*("me=e-1 contains=rexxComment,rexxConditional,rexxKeyword +syn match rexxFunction "\<\(arg\|trace\)\(/\*\s*\*/\)*("me=e-1 +syn match rexxFunction "\<call\( on \(error\|failure\|halt\|notready\)\(\s\+name\)\=\)\=\>\s\+\w\+\>" contains=rexxKeyword2 + +" String constants +syn region rexxString start=+"+ skip=+\\\\\|\\'+ end=+"+ +syn region rexxString start=+'+ skip=+\\\\\|\\"+ end=+'+ +syn match rexxCharacter +"'[^\\]'"+ + +" Catch errors caused by wrong parenthesis +syn region rexxParen transparent start='(' end=')' contains=ALLBUT,rexxParenError,rexxTodo,rexxUserLabel,rexxKeyword +syn match rexxParenError ")" +syn match rexxInParen "[\\[\\]{}]" + +" Comments +syn region rexxComment start="/\*" end="\*/" contains=rexxTodo,rexxComment +syn match rexxCommentError "\*/" + +syn keyword rexxTodo contained TODO FIXME XXX + +" Highlight User Labels +syn match rexxUserLabel "\<\I\i*\s*:"me=e-1 + +" Special Variables +syn keyword rexxSpecialVariable sigl rc result +syn match rexxCompoundVariable "\<\w\+\.\w*\>" + +if !exists("rexx_minlines") + let rexx_minlines = 10 +endif +exec "syn sync ccomment rexxComment minlines=" . rexx_minlines + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_rexx_syn_inits") + if version < 508 + let did_rexx_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink rexxUserLabel Function + HiLink rexxCharacter Character + HiLink rexxParenError rexxError + HiLink rexxInParen rexxError + HiLink rexxCommentError rexxError + HiLink rexxError Error + HiLink rexxKeyword Statement + HiLink rexxKeyword2 rexxKeyword + HiLink rexxFunction Function + HiLink rexxString String + HiLink rexxComment Comment + HiLink rexxTodo Todo + HiLink rexxSpecialVariable Special + HiLink rexxConditional rexxKeyword + + delcommand HiLink +endif + +let b:current_syntax = "rexx" + +"vim: ts=8 diff --git a/runtime/syntax/rib.vim b/runtime/syntax/rib.vim new file mode 100644 index 000000000..6b9f2b0bd --- /dev/null +++ b/runtime/syntax/rib.vim @@ -0,0 +1,73 @@ +" Vim syntax file +" Language: Renderman Interface Bytestream +" Maintainer: Andrew Bromage <ajb@spamcop.net> +" Last Change: 2003 May 11 +" + +" Remove any old syntax stuff hanging around +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +syn case match + +" Comments +syn match ribLineComment "#.*$" +syn match ribStructureComment "##.*$" + +syn case ignore +syn match ribCommand /[A-Z][a-zA-Z]*/ +syn case match + +syn region ribString start=/"/ skip=/\\"/ end=/"/ + +syn match ribStructure "[A-Z][a-zA-Z]*Begin\>\|[A-Z][a-zA-Z]*End" +syn region ribSectionFold start="FrameBegin" end="FrameEnd" fold transparent keepend extend +syn region ribSectionFold start="WorldBegin" end="WorldEnd" fold transparent keepend extend +syn region ribSectionFold start="TransformBegin" end="TransformEnd" fold transparent keepend extend +syn region ribSectionFold start="AttributeBegin" end="AttributeEnd" fold transparent keepend extend +syn region ribSectionFold start="MotionBegin" end="MotionEnd" fold transparent keepend extend +syn region ribSectionFold start="SolidBegin" end="SolidEnd" fold transparent keepend extend +syn region ribSectionFold start="ObjectBegin" end="ObjectEnd" fold transparent keepend extend + +syn sync fromstart + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match ribNumbers display transparent "[-]\=\<\d\|\.\d" contains=ribNumber,ribFloat +syn match ribNumber display contained "[-]\=\d\+\>" +"floating point number, with dot, optional exponent +syn match ribFloat display contained "[-]\=\d\+\.\d*\(e[-+]\=\d\+\)\=" +"floating point number, starting with a dot, optional exponent +syn match ribFloat display contained "[-]\=\.\d\+\(e[-+]\=\d\+\)\=\>" +"floating point number, without dot, with exponent +syn match ribFloat display contained "[-]\=\d\+e[-+]\d\+\>" +syn case match + +if version >= 508 || !exists("did_rib_syntax_inits") + if version < 508 + let did_rib_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink ribStructure Structure + HiLink ribCommand Statement + + HiLink ribStructureComment SpecialComment + HiLink ribLineComment Comment + + HiLink ribString String + HiLink ribNumber Number + HiLink ribFloat Float + + delcommand HiLink +end + + +let b:current_syntax = "rib" + +" Options for vi: ts=8 sw=2 sts=2 nowrap noexpandtab ft=vim diff --git a/runtime/syntax/rnc.vim b/runtime/syntax/rnc.vim new file mode 100644 index 000000000..3878c8c1b --- /dev/null +++ b/runtime/syntax/rnc.vim @@ -0,0 +1,94 @@ +" Vim syntax file +" Language: Relax NG compact syntax +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/rnc/ +" Latest Revision: 2004-05-22 +" arch-tag: 061ee0a2-9efa-4e2a-b1a9-14cf5172d645 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Set iskeyword since we need `-' (and potentially others) in keywords. +" For version 5.x: Set it globally +" For version 6.x: Set it locally +if version >= 600 + command -nargs=1 SetIsk setlocal iskeyword=<args> +else + command -nargs=1 SetIsk set iskeyword=<args> +endif +SetIsk @,48-57,_,-,. +delcommand SetIsk + +" Todo +syn keyword rncTodo contained TODO FIXME XXX NOTE + +" Comments +syn region rncComment matchgroup=rncComment start='^\s*#' end='$' contains=rncTodo + +" Operators +syn match rncOperator '[-|,&+?*~]' +syn match rncOperator '\%(|&\)\==' +syn match rncOperator '>>' + +" Namespaces +syn match rncNamespace '\<\k\+:' + +" Quoted Identifier +syn match rncQuoted '\\\k\+\>' + +" Special Characters +syn match rncSpecial '\\x{\x\+}' + +" Annotations +syn region Annotation transparent start='\[' end='\]' contains=ALLBUT,rncComment,rncTodo + +" Literals +syn region rncLiteral matchgroup=rncLiteral oneline start=+"+ end=+"+ contains=rncSpecial +syn region rncLiteral matchgroup=rncLiteral oneline start=+'+ end=+'+ +syn region rncLiteral matchgroup=rncLiteral start=+"""+ end=+"""+ contains=rncSpecial +syn region rncLiteral matchgroup=rncLiteral start=+'''+ end=+'''+ + +" Delimiters +syn match rncDelimiter '[{},()]' + +" Keywords +syn keyword rncKeyword datatypes default div empty external grammar +syn keyword rncKeyword include inherit list mixed name namespace +syn keyword rncKeyword notAllowed parent start string text token + +" Identifiers +syn match rncIdentifier '\k\+\_s*\%(=\|&=\||=\)\@=' nextgroup=rncOperator +syn keyword rncKeyword nextgroup=rncIdName skipwhite skipempty element attribute +syn match rncIdentifier contained '\k\+' + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_rnc_syn_inits") + if version < 508 + let did_rnc_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink rncTodo Todo + HiLink rncComment Comment + HiLink rncOperator Operator + HiLink rncNamespace Identifier + HiLink rncQuoted Special + HiLink rncSpecial SpecialChar + HiLink rncLiteral String + HiLink rncDelimiter Delimiter + HiLink rncKeyword Keyword + HiLink rncIdentifier Identifier + + delcommand HiLink +endif + +let b:current_syntax = "rnc" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/robots.vim b/runtime/syntax/robots.vim new file mode 100644 index 000000000..066628bb3 --- /dev/null +++ b/runtime/syntax/robots.vim @@ -0,0 +1,69 @@ +" Vim syntax file +" Language: "Robots.txt" files +" Robots.txt files indicate to WWW robots which parts of a web site should not be accessed. +" Maintainer: Dominique Stéphan (dominique@mggen.com) +" URL: http://www.mggen.com/vim/syntax/robots.zip +" Last change: 2001 May 09 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + +" shut case off +syn case ignore + +" Comment +syn match robotsComment "#.*$" contains=robotsUrl,robotsMail,robotsString + +" Star * (means all spiders) +syn match robotsStar "\*" + +" : +syn match robotsDelimiter ":" + + +" The keywords +" User-agent +syn match robotsAgent "^[Uu][Ss][Ee][Rr]\-[Aa][Gg][Ee][Nn][Tt]" +" Disallow +syn match robotsDisallow "^[Dd][Ii][Ss][Aa][Ll][Ll][Oo][Ww]" + +" Disallow: or User-Agent: and the rest of the line before an eventual comment +synt match robotsLine "\(^[Uu][Ss][Ee][Rr]\-[Aa][Gg][Ee][Nn][Tt]\|^[Dd][Ii][Ss][Aa][Ll][Ll][Oo][Ww]\):[^#]*" contains=robotsAgent,robotsDisallow,robotsStar,robotsDelimiter + +" Some frequent things in comments +syn match robotsUrl "http[s]\=://\S*" +syn match robotsMail "\S*@\S*" +syn region robotsString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ + +if version >= 508 || !exists("did_robos_syntax_inits") + if version < 508 + let did_robots_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink robotsComment Comment + HiLink robotsAgent Type + HiLink robotsDisallow Statement + HiLink robotsLine Special + HiLink robotsStar Operator + HiLink robotsDelimiter Delimiter + HiLink robotsUrl String + HiLink robotsMail String + HiLink robotsString String + + delcommand HiLink +endif + + +let b:current_syntax = "robots" + +" vim: ts=8 sw=2 + diff --git a/runtime/syntax/rpcgen.vim b/runtime/syntax/rpcgen.vim new file mode 100644 index 000000000..edf87fb28 --- /dev/null +++ b/runtime/syntax/rpcgen.vim @@ -0,0 +1,63 @@ +" Vim syntax file +" Language: rpcgen +" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> +" Last Change: Nov 18, 2002 +" Version: 7 +" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the C syntax to start with +if version < 600 + source <sfile>:p:h/c.vim +else + runtime! syntax/c.vim +endif + +syn keyword rpcProgram program skipnl skipwhite nextgroup=rpcProgName +syn match rpcProgName contained "\<\i\I*\>" skipnl skipwhite nextgroup=rpcProgZone +syn region rpcProgZone contained matchgroup=Delimiter start="{" matchgroup=Delimiter end="}\s*=\s*\(\d\+\|0x[23]\x\{7}\)\s*;"me=e-1 contains=rpcVersion,cComment,rpcProgNmbrErr +syn keyword rpcVersion contained version skipnl skipwhite nextgroup=rpcVersName +syn match rpcVersName contained "\<\i\I*\>" skipnl skipwhite nextgroup=rpcVersZone +syn region rpcVersZone contained matchgroup=Delimiter start="{" matchgroup=Delimiter end="}\s*=\s*\d\+\s*;"me=e-1 contains=cType,cStructure,cStorageClass,rpcDecl,rpcProcNmbr,cComment +syn keyword rpcDecl contained string +syn match rpcProcNmbr contained "=\s*\d\+;"me=e-1 +syn match rpcProgNmbrErr contained "=\s*0x[^23]\x*"ms=s+1 +syn match rpcPassThru "^\s*%.*$" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_rpcgen_syntax_inits") + if version < 508 + let did_rpcgen_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink rpcProgName rpcName + HiLink rpcProgram rpcStatement + HiLink rpcVersName rpcName + HiLink rpcVersion rpcStatement + + HiLink rpcDecl cType + HiLink rpcPassThru cComment + + HiLink rpcName Special + HiLink rpcProcNmbr Delimiter + HiLink rpcProgNmbrErr Error + HiLink rpcStatement Statement + + delcommand HiLink +endif + +let b:current_syntax = "rpcgen" + +" vim: ts=8 diff --git a/runtime/syntax/rpl.vim b/runtime/syntax/rpl.vim new file mode 100644 index 000000000..bc50475e1 --- /dev/null +++ b/runtime/syntax/rpl.vim @@ -0,0 +1,491 @@ +" Vim syntax file +" Language: RPL/2 +" Version: 0.15.15 against RPL/2 version 4.00pre7i +" Last Change: 2003 august 24 +" Maintainer: Joël BERTRAND <rpl2@free.fr> +" URL: http://www.makalis.fr/~bertrand/rpl2/download/vim/indent/rpl.vim +" Credits: Nothing + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Keyword characters (not used) +" set iskeyword=33-127 + +" Case sensitive +syntax case match + +" Constants +syntax match rplConstant "\(^\|\s\+\)\(e\|i\)\ze\($\|\s\+\)" + +" Any binary number +syntax match rplBinaryError "\(^\|\s\+\)#\s*\S\+b\ze" +syntax match rplBinary "\(^\|\s\+\)#\s*[01]\+b\ze\($\|\s\+\)" +syntax match rplOctalError "\(^\|\s\+\)#\s*\S\+o\ze" +syntax match rplOctal "\(^\|\s\+\)#\s*\o\+o\ze\($\|\s\+\)" +syntax match rplDecimalError "\(^\|\s\+\)#\s*\S\+d\ze" +syntax match rplDecimal "\(^\|\s\+\)#\s*\d\+d\ze\($\|\s\+\)" +syntax match rplHexadecimalError "\(^\|\s\+\)#\s*\S\+h\ze" +syntax match rplHexadecimal "\(^\|\s\+\)#\s*\x\+h\ze\($\|\s\+\)" + +" Case unsensitive +syntax case ignore + +syntax match rplControl "\(^\|\s\+\)abort\ze\($\|\s\+\)" +syntax match rplControl "\(^\|\s\+\)kill\ze\($\|\s\+\)" +syntax match rplControl "\(^\|\s\+\)cont\ze\($\|\s\+\)" +syntax match rplControl "\(^\|\s\+\)halt\ze\($\|\s\+\)" +syntax match rplControl "\(^\|\s\+\)cmlf\ze\($\|\s\+\)" +syntax match rplControl "\(^\|\s\+\)sst\ze\($\|\s\+\)" + +syntax match rplConstant "\(^\|\s\+\)pi\ze\($\|\s\+\)" + +syntax match rplStatement "\(^\|\s\+\)return\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)last\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)syzeval\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)wait\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)type\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)kind\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)eval\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)use\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)remove\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)external\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)dup\([2n]\|\)\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)drop\([2n]\|\)\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)depth\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)roll\(d\|\)\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)pick\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)rot\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)swap\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)over\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)clear\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)warranty\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)copyright\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)convert\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)date\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)time\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)mem\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)clmf\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)->num\ze\($\|\s\+\)" +syntax match rplStatement "\(^\|\s\+\)help\ze\($\|\s\+\)" + +syntax match rplStorage "\(^\|\s\+\)get\(i\|r\|c\|\)\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)put\(i\|r\|c\|\)\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)rcl\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)purge\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)sinv\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)sneg\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)sconj\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)steq\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)rceq\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)vars\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)clusr\ze\($\|\s\+\)" +syntax match rplStorage "\(^\|\s\+\)sto\([+-/\*]\|\)\ze\($\|\s\+\)" + +syntax match rplAlgConditional "\(^\|\s\+\)ift\(e\|\)\ze\($\|\s\+\)" + +syntax match rplOperator "\(^\|\s\+\)and\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)\(x\|\)or\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)not\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)same\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)==\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)<=\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)=<\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)=>\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)>=\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)<>\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)>\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)<\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)[+-]\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)[/\*]\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)\^\ze\($\|\s\+\)" +syntax match rplOperator "\(^\|\s\+\)\*\*\ze\($\|\s\+\)" + +syntax match rplBoolean "\(^\|\s\+\)true\ze\($\|\s\+\)" +syntax match rplBoolean "\(^\|\s\+\)false\ze\($\|\s\+\)" + +syntax match rplReadWrite "\(^\|\s\+\)store\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)recall\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)\(\|wf\|un\)lock\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)open\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)close\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)delete\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)create\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)format\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)rewind\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)backspace\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)\(\|re\)write\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)read\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)inquire\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)sync\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)append\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)suppress\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)seek\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)pr\(1\|int\|st\|stc\|lcd\|var\|usr\|md\)\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)paper\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)cr\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)erase\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)disp\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)input\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)prompt\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)key\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)cllcd\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)\(\|re\)draw\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)drax\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)indep\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)depnd\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)res\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)axes\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)label\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)pmin\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)pmax\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)centr\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)persist\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)title\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)\(slice\|auto\|log\|\)scale\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)eyept\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)\(p\|s\)par\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)function\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)polar\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)scatter\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)plotter\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)wireframe\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)parametric\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)slice\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)\*w\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)\*h\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)\*d\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)\*s\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)->lcd\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)lcd->\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)edit\ze\($\|\s\+\)" +syntax match rplReadWrite "\(^\|\s\+\)visit\ze\($\|\s\+\)" + +syntax match rplIntrinsic "\(^\|\s\+\)abs\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)arg\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)conj\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)re\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)im\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)mant\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)xpon\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)ceil\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)fact\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)fp\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)floor\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)inv\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)ip\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)max\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)min\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)mod\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)neg\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)relax\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)sign\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)sq\(\|rt\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)xroot\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)cos\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)sin\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)tan\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)tg\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)a\(\|rc\)cos\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)a\(\|rc\)sin\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)atan\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)arctg\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|a\)cosh\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|a\)sinh\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|a\)tanh\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|arg\)th\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)arg[cst]h\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|a\)log\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)ln\(\|1\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)exp\(\|m\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)trn\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)con\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)idn\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)rdm\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)rsd\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)cnrm\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)cross\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)d[eo]t\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)[cr]swp\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)rci\(j\|\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(in\|de\)cr\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)bessel\ze\($\|\s\+\)" + +syntax match rplIntrinsic "\(^\|\s\+\)\(\|g\)egvl\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|g\)\(\|l\|r\)egv\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)rnrm\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(std\|fix\|sci\|eng\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(rad\|deg\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|n\)rand\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)rdz\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|i\)fft\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(dec\|bin\|oct\|hex\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)rclf\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)stof\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)[cs]f\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)chr\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)num\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)pos\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)sub\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)size\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(st\|rc\)ws\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(r\|s\)\(r\|l\)\(\|b\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)as\(r\|l\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(int\|der\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)stos\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|r\)cls\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)drws\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)scls\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)ns\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)tot\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)mean\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|p\)sdev\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|p\)var\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)maxs\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)mins\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|p\)cov\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)cols\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)s\(x\(\|y\|2\)\|y\(\|2\)\)\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(x\|y\)col\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)corr\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)utp[cfnt]\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)comb\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)perm\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)\(\|p\)lu\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)[lu]chol\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)schur\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)%\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)%ch\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)%t\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)hms->\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)->hms\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)hms+\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)hms-\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)d->r\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)r->d\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)b->r\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)r->b\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)c->r\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)r->c\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)r->p\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)p->r\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)str->\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)->str\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)array->\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)->array\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)list->\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)->list\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)s+\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)s-\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)col-\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)col+\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)row-\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)row+\ze\($\|\s\+\)" +syntax match rplIntrinsic "\(^\|\s\+\)->q\ze\($\|\s\+\)" + +syntax match rplObsolete "\(^\|\s\+\)arry->\ze\($\|\s\+\)"hs=e-5 +syntax match rplObsolete "\(^\|\s\+\)->arry\ze\($\|\s\+\)"hs=e-5 + +" Conditional structures +syntax match rplConditionalError "\(^\|\s\+\)case\ze\($\|\s\+\)"hs=e-3 +syntax match rplConditionalError "\(^\|\s\+\)then\ze\($\|\s\+\)"hs=e-3 +syntax match rplConditionalError "\(^\|\s\+\)else\ze\($\|\s\+\)"hs=e-3 +syntax match rplConditionalError "\(^\|\s\+\)elseif\ze\($\|\s\+\)"hs=e-5 +syntax match rplConditionalError "\(^\|\s\+\)end\ze\($\|\s\+\)"hs=e-2 +syntax match rplConditionalError "\(^\|\s\+\)\(step\|next\)\ze\($\|\s\+\)"hs=e-3 +syntax match rplConditionalError "\(^\|\s\+\)until\ze\($\|\s\+\)"hs=e-4 +syntax match rplConditionalError "\(^\|\s\+\)repeat\ze\($\|\s\+\)"hs=e-5 +syntax match rplConditionalError "\(^\|\s\+\)default\ze\($\|\s\+\)"hs=e-6 + +" FOR/(CYCLE)/(EXIT)/NEXT +" FOR/(CYCLE)/(EXIT)/STEP +" START/(CYCLE)/(EXIT)/NEXT +" START/(CYCLE)/(EXIT)/STEP +syntax match rplCycle "\(^\|\s\+\)\(cycle\|exit\)\ze\($\|\s\+\)" +syntax region rplForNext matchgroup=rplRepeat start="\(^\|\s\+\)\(for\|start\)\ze\($\|\s\+\)" end="\(^\|\s\+\)\(next\|step\)\ze\($\|\s\+\)" contains=ALL keepend extend + +" ELSEIF/END +syntax region rplElseifEnd matchgroup=rplConditional start="\(^\|\s\+\)elseif\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contained contains=ALLBUT,rplElseEnd keepend + +" ELSE/END +syntax region rplElseEnd matchgroup=rplConditional start="\(^\|\s\+\)else\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contained contains=ALLBUT,rplElseEnd,rplThenEnd,rplElseifEnd keepend + +" THEN/END +syntax region rplThenEnd matchgroup=rplConditional start="\(^\|\s\+\)then\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contained containedin=rplIfEnd contains=ALLBUT,rplThenEnd keepend + +" IF/END +syntax region rplIfEnd matchgroup=rplConditional start="\(^\|\s\+\)if\(err\|\)\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contains=ALLBUT,rplElseEnd,rplElseifEnd keepend extend +" if end is accepted ! +" select end too ! + +" CASE/THEN +syntax region rplCaseThen matchgroup=rplConditional start="\(^\|\s\+\)case\ze\($\|\s\+\)" end="\(^\|\s\+\)then\ze\($\|\s\+\)" contains=ALLBUT,rplCaseThen,rplCaseEnd,rplThenEnd keepend extend contained containedin=rplCaseEnd + +" CASE/END +syntax region rplCaseEnd matchgroup=rplConditional start="\(^\|\s\+\)case\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contains=ALLBUT,rplCaseEnd,rplThenEnd,rplElseEnd keepend extend contained containedin=rplSelectEnd + +" DEFAULT/END +syntax region rplDefaultEnd matchgroup=rplConditional start="\(^\|\s\+\)default\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contains=ALLBUT,rplDefaultEnd keepend contained containedin=rplSelectEnd + +" SELECT/END +syntax region rplSelectEnd matchgroup=rplConditional start="\(^\|\s\+\)select\ze\($\|\s\+\)" end="\(^\|\s\+\)end\ze\($\|\s\+\)" contains=ALLBUT,rplThenEnd keepend extend +" select end is accepted ! + +" DO/UNTIL/END +syntax region rplUntilEnd matchgroup=rplConditional start="\(^\|\s\+\)until\ze\($\|\s\+\)" end="\(^\|\s\+\)\zsend\ze\($\|\s\+\)" contains=ALLBUT,rplUntilEnd contained containedin=rplDoUntil extend keepend +syntax region rplDoUntil matchgroup=rplConditional start="\(^\|\s\+\)do\ze\($\|\s\+\)" end="\(^\|\s\+\)until\ze\($\|\s\+\)" contains=ALL keepend extend + +" WHILE/REPEAT/END +syntax region rplRepeatEnd matchgroup=rplConditional start="\(^\|\s\+\)repeat\ze\($\|\s\+\)" end="\(^\|\s\+\)\zsend\ze\($\|\s\+\)" contains=ALLBUT,rplRepeatEnd contained containedin=rplWhileRepeat extend keepend +syntax region rplWhileRepeat matchgroup=rplConditional start="\(^\|\s\+\)while\ze\($\|\s\+\)" end="\(^\|\s\+\)repeat\ze\($\|\s\+\)" contains=ALL keepend extend + +" Comments +syntax match rplCommentError "\*/" +syntax region rplCommentString contained start=+"+ end=+"+ end=+\*/+me=s-1 +syntax region rplCommentLine start="\(^\|\s\+\)//\ze" skip="\\$" end="$" contains=NONE keepend extend +syntax region rplComment start="\(^\|\s\+\)/\*\ze" end="\*/" contains=rplCommentString keepend extend + +" Catch errors caused by too many right parentheses +syntax region rplParen transparent start="(" end=")" contains=ALLBUT,rplParenError,rplComplex,rplIncluded keepend extend +syntax match rplParenError ")" + +" Subroutines +" Catch errors caused by too many right '>>' +syntax match rplSubError "\(^\|\s\+\)>>\ze\($\|\s\+\)"hs=e-1 +syntax region rplSub matchgroup=rplSubDelimitor start="\(^\|\s\+\)<<\ze\($\|\s\+\)" end="\(^\|\s\+\)>>\ze\($\|\s\+\)" contains=ALLBUT,rplSubError,rplIncluded,rplDefaultEnd,rplStorageSub keepend extend + +" Expressions +syntax region rplExpr start="\(^\|\s\+\)'" end="'\ze\($\|\s\+\)" contains=rplParen,rplParenError + +" Local variables +syntax match rplStorageError "\(^\|\s\+\)->\ze\($\|\s\+\)"hs=e-1 +syntax region rplStorageSub matchgroup=rplStorage start="\(^\|\s\+\)<<\ze\($\|\s\+\)" end="\(^\|\s\+\)>>\ze\($\|\s\+\)" contains=ALLBUT,rplSubError,rplIncluded,rplDefaultEnd,rplStorageExpr contained containedin=rplLocalStorage keepend extend +syntax region rplStorageExpr matchgroup=rplStorage start="\(^\|\s\+\)'" end="'\ze\($\|\s\+\)" contains=rplParen,rplParenError extend contained containedin=rplLocalStorage +syntax region rplLocalStorage matchgroup=rplStorage start="\(^\|\s\+\)->\ze\($\|\s\+\)" end="\(^\|\s\+\)\(<<\ze\($\|\s\+\)\|'\)" contains=rplStorageSub,rplStorageExpr,rplComment,rplCommentLine keepend extend + +" Catch errors caused by too many right brackets +syntax match rplArrayError "\]" +syntax match rplArray "\]" contained containedin=rplArray +syntax region rplArray matchgroup=rplArray start="\[" end="\]" contains=ALLBUT,rplArrayError keepend extend + +" Catch errors caused by too many right '}' +syntax match rplListError "}" +syntax match rplList "}" contained containedin=rplList +syntax region rplList matchgroup=rplList start="{" end="}" contains=ALLBUT,rplListError,rplIncluded keepend extend + +" cpp is used by RPL/2 +syntax match rplPreProc "\_^#\s*\(define\|undef\)\>" +syntax match rplPreProc "\_^#\s*\(warning\|error\)\>" +syntax match rplPreCondit "\_^#\s*\(if\|ifdef\|ifndef\|elif\|else\|endif\)\>" +syntax match rplIncluded contained "\<<\s*\S*\s*>\>" +syntax match rplInclude "\_^#\s*include\>\s*["<]" contains=rplIncluded,rplString +"syntax match rplExecPath "\%^\_^#!\s*\S*" +syntax match rplExecPath "\%^\_^#!\p*\_$" + +" Any integer +syntax match rplInteger "\(^\|\s\+\)[-+]\=\d\+\ze\($\|\s\+\)" + +" Floating point number +" [S][ip].[fp] +syntax match rplFloat "\(^\|\s\+\)[-+]\=\(\d*\)\=[\.,]\(\d*\)\=\ze\($\|\s\+\)" contains=ALLBUT,rplPoint,rplSign +" [S]ip[.fp]E[S]exp +syntax match rplFloat "\(^\|\s\+\)[-+]\=\d\+\([\.,]\d*\)\=[eE]\([-+]\)\=\d\+\ze\($\|\s\+\)" contains=ALLBUT,rplPoint,rplSign +" [S].fpE[S]exp +syntax match rplFloat "\(^\|\s\+\)[-+]\=\(\d*\)\=[\.,]\d\+[eE]\([-+]\)\=\d\+\ze\($\|\s\+\)" contains=ALLBUT,rplPoint,rplSign +syntax match rplPoint "\<[\.,]\>" +syntax match rplSign "\<[+-]\>" + +" Complex number +" (x,y) +syntax match rplComplex "\(^\|\s\+\)([-+]\=\(\d*\)\=\.\=\d*\([eE][-+]\=\d\+\)\=\s*,\s*[-+]\=\(\d*\)\=\.\=\d*\([eE][-+]\=\d\+\)\=)\ze\($\|\s\+\)" +" (x.y) +syntax match rplComplex "\(^\|\s\+\)([-+]\=\(\d*\)\=,\=\d*\([eE][-+]\=\d\+\)\=\s*\.\s*[-+]\=\(\d*\)\=,\=\d*\([eE][-+]\=\d\+\)\=)\ze\($\|\s\+\)" + +" Strings +syntax match rplStringGuilles "\\\"" +syntax match rplStringAntislash "\\\\" +syntax region rplString start=+\(^\|\s\+\)"+ end=+"\ze\($\|\s\+\)+ contains=rplStringGuilles,rplStringAntislash + +syntax match rplTab "\t" transparent + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_rpl_syntax_inits") + if version < 508 + let did_rpl_syntax_inits = 1 + command -nargs=+ HiLink highlight link <args> + else + command -nargs=+ HiLink highlight default link <args> + endif + + " The default highlighting. + + HiLink rplControl Statement + HiLink rplStatement Statement + HiLink rplAlgConditional Conditional + HiLink rplConditional Repeat + HiLink rplConditionalError Error + HiLink rplRepeat Repeat + HiLink rplCycle Repeat + HiLink rplUntil Repeat + HiLink rplIntrinsic Special + HiLink rplStorage StorageClass + HiLink rplStorageExpr StorageClass + HiLink rplStorageError Error + HiLink rplReadWrite rplIntrinsic + + HiLink rplOperator Operator + + HiLink rplList Special + HiLink rplArray Special + HiLink rplConstant Identifier + HiLink rplExpr Type + + HiLink rplString String + HiLink rplStringGuilles String + HiLink rplStringAntislash String + + HiLink rplBinary Boolean + HiLink rplOctal Boolean + HiLink rplDecimal Boolean + HiLink rplHexadecimal Boolean + HiLink rplInteger Number + HiLink rplFloat Float + HiLink rplComplex Float + HiLink rplBoolean Identifier + + HiLink rplObsolete Todo + + HiLink rplPreCondit PreCondit + HiLink rplInclude Include + HiLink rplIncluded rplString + HiLink rplInclude Include + HiLink rplExecPath Include + HiLink rplPreProc PreProc + HiLink rplComment Comment + HiLink rplCommentLine Comment + HiLink rplCommentString Comment + HiLink rplSubDelimitor rplStorage + HiLink rplCommentError Error + HiLink rplParenError Error + HiLink rplSubError Error + HiLink rplArrayError Error + HiLink rplListError Error + HiLink rplTab Error + HiLink rplBinaryError Error + HiLink rplOctalError Error + HiLink rplDecimalError Error + HiLink rplHexadecimalError Error + + delcommand HiLink +endif + +let b:current_syntax = "rpl" + +" vim: ts=8 tw=132 diff --git a/runtime/syntax/rst.vim b/runtime/syntax/rst.vim new file mode 100644 index 000000000..02d43c66d --- /dev/null +++ b/runtime/syntax/rst.vim @@ -0,0 +1,107 @@ +" Vim syntax file +" Language: reStructuredText Documentation Format +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/rst/ +" Latest Revision: 2004-05-13 +" arch-tag: 6fae09da-d5d4-49d8-aec1-e49008ea21e6 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" todo +syn keyword rstTodo contained FIXME TODO XXX NOTE + +syn case ignore + +" comments +syn region rstComment matchgroup=rstComment start="^\.\.\%( \%([a-z0-9_.-]\+::\)\@!\|$\)" end="^\s\@!" contains=rstTodo + +syn cluster rstCruft contains=rstFootnoteLabel,rstCitationLabel,rstSubstitutionLabel,rstInline,rstHyperlinks,rstInternalTarget + +" blocks +" syn region rstBlock matchgroup=rstDelimiter start=":\@<!:$" skip="^$" end="^\s\@!" contains=@rstCruft +syn region rstBlock matchgroup=rstDelimiter start="::$" skip="^$" end="^\s\@!" +syn region rstDoctestBlock matchgroup=rstDelimiter start="^>>>\s" end="^$" + +" tables +" TODO: these may actually be a bit too complicated to match correctly and +" should perhaps be removed. Whon really needs it anyway? +syn region rstTable transparent start="^\n\s*+[-=+]\+" end="^$" contains=rstTableLines,@rstCruft +syn match rstTableLines contained "^\s*[|+=-]\+$" +syn region rstSimpleTable transparent start="^\n\s*\%(=\+\s\+\)\%(=\+\s*\)\+$" end="^$" contains=rstSimpleTableLines,@rstCruft +syn match rstSimpleTableLines contained "^\s*\%(=\+\s\+\)\%(=\+\s*\)\+$" + +" footnotes +syn region rstFootnote matchgroup=rstDirective start="^\.\. \[\%([#*]\|[0-9]\+\|#[a-z0-9_.-]\+\)\]\s" end="^\s\@!" contains=@rstCruft +syn match rstFootnoteLabel "\[\%([#*]\|[0-9]\+\|#[a-z0-9_.-]\+\)\]_" + +" citations +syn region rstCitation matchgroup=rstDirective start="^\.\. \[[a-z0-9_.-]\+\]\s" end="^\s\@!" contains=@rstCruft +syn match rstCitationLabel "\[[a-z0-9_.-]\+\]_" + +" directives +syn region rstDirectiveBody matchgroup=rstDirective start="^\.\. [a-z0-9_.-]\+::" end="^\s\@!" + +" substitutions +syn region rstSubstitution matchgroup=rstDirective start="^\.\. |[a-z0-9_.-]|\s[a-z0-9_.-]\+::\s" end="^\s\@!" contains=@rstCruft +syn match rstSubstitutionLabel "|[a-z0-9_.-]|" + +" inline markup +syn match rstInline "\*\{1,2}\S\%([^*]*\S\)\=\*\{1,2}" +syn match rstInline "`\{1,2}\S\%([^`]*\S\)\=`\{1,2}" + +" hyperlinks +syn region rstHyperlinks matchgroup=RstDirective start="^\.\. _[a-z0-9_. -]\+:\s" end="^\s\@!" contains=@rstCruft + +syn match rstHyperlinksLabel "`\S\%([^`]*\S\)\=`__\=\>" +syn match rstHyperlinksLabel "\w\+__\=\>" + +" internal targets +syn match rstInternalTarget "_`\S\%([^`]*\S\)\=`" + +" lists +syn match rstListItem "^:\%(\w\+\s*\)\+:" +syn match rstListItem "^\s*[-*+]\s\+" + +syn sync minlines=50 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_rst_syn_inits") + if version < 508 + let did_rst_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink rstTodo Todo + HiLink rstComment Comment + HiLink rstDelimiter Delimiter + HiLink rstBlock String + HiLink rstDoctestBlock PreProc + HiLink rstTableLines Delimiter + HiLink rstSimpleTableLines rstTableLines + HiLink rstFootnote String + HiLink rstFootnoteLabel Identifier + HiLink rstCitation String + HiLink rstCitationLabel Identifier + HiLink rstDirective Keyword + HiLink rstDirectiveBody Type + HiLink rstSubstitution String + HiLink rstSubstitutionLabel Identifier + HiLink rstHyperlinks String + HiLink rstHyperlinksLabel Identifier + HiLink rstListItem Identifier + hi def rstInline term=italic cterm=italic gui=italic + hi def rstInternalTarget term=italic cterm=italic gui=italic + delcommand HiLink +endif + +let b:current_syntax = "rst" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/rtf.vim b/runtime/syntax/rtf.vim new file mode 100644 index 000000000..8f5ea71a3 --- /dev/null +++ b/runtime/syntax/rtf.vim @@ -0,0 +1,88 @@ +" Vim syntax file +" Language: Rich Text Format +" "*.rtf" files +" +" The Rich Text Format (RTF) Specification is a method of encoding formatted +" text and graphics for easy transfer between applications. +" .hlp (windows help files) use compiled rtf files +" rtf documentation at http://night.primate.wisc.edu/software/RTF/ +" +" Maintainer: Dominique Stéphan (dominique@mggen.com) +" URL: http://www.mggen.com/vim/syntax/rtf.zip +" Last change: 2001 Mai 02 + +" TODO: render underline, italic, bold + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" case on (all controls must be lower case) +syn case match + +" Control Words +syn match rtfControlWord "\\[a-z]\+[\-]\=[0-9]*" + +" New Control Words (not in the 1987 specifications) +syn match rtfNewControlWord "\\\*\\[a-z]\+[\-]\=[0-9]*" + +" Control Symbol : any \ plus a non alpha symbol, *, \, { and } and ' +syn match rtfControlSymbol "\\[^a-zA-Z\*\{\}\\']" + +" { } and \ are special characters, to use them +" we add a backslash \ +syn match rtfCharacter "\\\\" +syn match rtfCharacter "\\{" +syn match rtfCharacter "\\}" +" Escaped characters (for 8 bytes characters upper than 127) +syn match rtfCharacter "\\'[A-Za-z0-9][A-Za-z0-9]" +" Unicode +syn match rtfUnicodeCharacter "\\u[0-9][0-9]*" + +" Color values, we will put this value in Red, Green or Blue +syn match rtfRed "\\red[0-9][0-9]*" +syn match rtfGreen "\\green[0-9][0-9]*" +syn match rtfBlue "\\blue[0-9][0-9]*" + +" Some stuff for help files +syn match rtfFootNote "[#$K+]{\\footnote.*}" contains=rtfControlWord,rtfNewControlWord + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_rtf_syntax_inits") + if version < 508 + let did_rtf_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + + HiLink rtfControlWord Statement + HiLink rtfNewControlWord Special + HiLink rtfControlSymbol Constant + HiLink rtfCharacter Character + HiLink rtfUnicodeCharacter SpecialChar + HiLink rtfFootNote Comment + + " Define colors for the syntax file + hi rtfRed term=underline cterm=underline ctermfg=DarkRed gui=underline guifg=DarkRed + hi rtfGreen term=underline cterm=underline ctermfg=DarkGreen gui=underline guifg=DarkGreen + hi rtfBlue term=underline cterm=underline ctermfg=DarkBlue gui=underline guifg=DarkBlue + + HiLink rtfRed rtfRed + HiLink rtfGreen rtfGreen + HiLink rtfBlue rtfBlue + + delcommand HiLink +endif + + +let b:current_syntax = "rtf" + +" vim:ts=8 diff --git a/runtime/syntax/ruby.vim b/runtime/syntax/ruby.vim new file mode 100644 index 000000000..02f178d65 --- /dev/null +++ b/runtime/syntax/ruby.vim @@ -0,0 +1,285 @@ +" Vim syntax file +" Language: Ruby +" Maintainer: Doug Kearns +" Previous Maintainer: Mirko Nasato +" Last Change: 2003 May 31 +" URL: http://mugca.its.monash.edu.au/~djkea2/vim/syntax/ruby.vim + +" $Id$ + +" Thanks to perl.vim authors, and to Reimer Behrends. :-) (MN) + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Expression Substitution and Backslash Notation +syn match rubyExprSubst "\\\\\|\(\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\w\)\|\(\\\o\{3}\|\\x\x\{2}\|\\[abefnrstv]\)" contained +syn match rubyExprSubst "#{[^}]*}" contained +syn match rubyExprSubst "#[$@]\w\+" contained + +" Numbers and ASCII Codes +syn match rubyNumber "\w\@<!\(?\(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\S\)\)" +syn match rubyNumber "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" + +" Identifiers - constant, class and instance, global, symbol, iterator, predefined +syn match rubyLocalVariableOrMethod "[_[:lower:]][_[:alnum:]]*[?!=]\=" transparent contains=NONE + +if !exists("ruby_no_identifiers") + syn match rubyConstant "\(::\)\=\zs\u\w*" + syn match rubyClassVariable "@@\h\w*" + syn match rubyInstanceVariable "@\h\w*" + syn match rubyGlobalVariable "$\(\h\w*\|-.\)" + syn match rubySymbol ":\@<!:\(\$\|@@\=\)\=\h\w*[?!=]\=" + syn match rubyIterator "|[ ,a-zA-Z0-9_*]\+|" + + syn match rubyPredefinedVariable "$[!"$&'*+,./0:;<=>?@\\_`~1-9]" + syn match rubyPredefinedVariable "$-[0FIKadilpvw]" + syn match rubyPredefinedVariable "$\(defout\|stderr\|stdin\|stdout\)\>" + syn match rubyPredefinedVariable "$\(DEBUG\|FILENAME\|KCODE\|LOAD_PATH\|SAFE\|VERBOSE\)\>" + syn match rubyPredefinedConstant "__\(FILE\|LINE\)__\>" + syn match rubyPredefinedConstant "\<\(::\)\=\zs\(MatchingData\|NotImplementError\|ARGF\|ARGV\|ENV\)\>" + syn match rubyPredefinedConstant "\<\(::\)\=\zs\(DATA\|FALSE\|NIL\|RUBY_PLATFORM\|RUBY_RELEASE_DATE\)\>" + syn match rubyPredefinedConstant "\<\(::\)\=\zs\(RUBY_VERSION\|STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>" + "Obsolete Global Constants + "syn match rubyPredefinedConstant "\<\(::\)\=\zs\(PLATFORM\|RELEASE\|VERSION\)\>" +endif + +" +" BEGIN Autogenerated Stuff +" +" Generalized Regular Expression +syn region rubyString matchgroup=rubyStringDelimit start="%r!" end="![iomx]*" skip="\\\\\|\\!" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r\"" end="\"[iomx]*" skip="\\\\\|\\\"" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r#" end="#[iomx]*" skip="\\\\\|\\#" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r\$" end="\$[iomx]*" skip="\\\\\|\\\$" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r%" end="%[iomx]*" skip="\\\\\|\\%" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r&" end="&[iomx]*" skip="\\\\\|\\&" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r'" end="'[iomx]*" skip="\\\\\|\\'" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r\*" end="\*[iomx]*" skip="\\\\\|\\\*" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r+" end="+[iomx]*" skip="\\\\\|\\+" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r-" end="-[iomx]*" skip="\\\\\|\\-" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r\." end="\.[iomx]*" skip="\\\\\|\\\." contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r/" end="/[iomx]*" skip="\\\\\|\\/" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r:" end=":[iomx]*" skip="\\\\\|\\:" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r;" end=";[iomx]*" skip="\\\\\|\\;" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r=" end="=[iomx]*" skip="\\\\\|\\=" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r?" end="?[iomx]*" skip="\\\\\|\\?" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r@" end="@[iomx]*" skip="\\\\\|\\@" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r\\" end="\\[iomx]*" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r\^" end="\^[iomx]*" skip="\\\\\|\\\^" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r`" end="`[iomx]*" skip="\\\\\|\\`" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r|" end="|[iomx]*" skip="\\\\\|\\|" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r\~" end="\~[iomx]*" skip="\\\\\|\\\~" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r{" end="}[iomx]*" skip="\\\\\|\\}" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r<" end=">[iomx]*" skip="\\\\\|\\>" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r\[" end="\][iomx]*" skip="\\\\\|\\\]" contains=rubyExprSubst fold +syn region rubyString matchgroup=rubyStringDelimit start="%r(" end=")[iomx]*" skip="\\\\\|\\)" contains=rubyExprSubst fold + +" Generalized Single Quoted String and Array of Strings +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]!" end="!" skip="\\\\\|\\!" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]\"" end="\"" skip="\\\\\|\\\"" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]#" end="#" skip="\\\\\|\\#" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]\$" end="\$" skip="\\\\\|\\\$" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]%" end="%" skip="\\\\\|\\%" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]&" end="&" skip="\\\\\|\\&" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]'" end="'" skip="\\\\\|\\'" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]\*" end="\*" skip="\\\\\|\\\*" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]+" end="+" skip="\\\\\|\\+" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]-" end="-" skip="\\\\\|\\-" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]\." end="\." skip="\\\\\|\\\." +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]/" end="/" skip="\\\\\|\\/" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]:" end=":" skip="\\\\\|\\:" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq];" end=";" skip="\\\\\|\\;" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]=" end="=" skip="\\\\\|\\=" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]?" end="?" skip="\\\\\|\\?" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]@" end="@" skip="\\\\\|\\@" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]\\" end="\\" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]\^" end="\^" skip="\\\\\|\\\^" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]`" end="`" skip="\\\\\|\\`" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]|" end="|" skip="\\\\\|\\|" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]\~" end="\~" skip="\\\\\|\\\~" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]{" end="}" skip="\\\\\|\\}" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]<" end=">" skip="\\\\\|\\>" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq]\[" end="\]" skip="\\\\\|\\\]" +syn region rubyString matchgroup=rubyStringDelimit start="%[wq](" end=")" skip="\\\\\|\\)" + +" Generalized Double Quoted String and Shell Command Output +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=!" end="!" skip="\\\\\|\\!" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=\"" end="\"" skip="\\\\\|\\\"" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=#" end="#" skip="\\\\\|\\#" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=\$" end="\$" skip="\\\\\|\\\$" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=%" end="%" skip="\\\\\|\\%" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=&" end="&" skip="\\\\\|\\&" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\='" end="'" skip="\\\\\|\\'" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=\*" end="\*" skip="\\\\\|\\\*" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=+" end="+" skip="\\\\\|\\+" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=-" end="-" skip="\\\\\|\\-" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=\." end="\." skip="\\\\\|\\\." contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=/" end="/" skip="\\\\\|\\/" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=:" end=":" skip="\\\\\|\\:" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=;" end=";" skip="\\\\\|\\;" contains=rubyExprSubst +"syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\==" end="=" skip="\\\\\|\\=" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]=" end="=" skip="\\\\\|\\=" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=?" end="?" skip="\\\\\|\\?" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=@" end="@" skip="\\\\\|\\@" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=\\" end="\\" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=\^" end="\^" skip="\\\\\|\\\^" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=`" end="`" skip="\\\\\|\\`" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=|" end="|" skip="\\\\\|\\|" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=\~" end="\~" skip="\\\\\|\\\~" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\={" end="}" skip="\\\\\|\\}" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=<" end=">" skip="\\\\\|\\>" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=\[" end="\]" skip="\\\\\|\\\]" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="%[Qx]\=(" end=")" skip="\\\\\|\\)" contains=rubyExprSubst + +" Normal String and Shell Command Output +syn region rubyString matchgroup=rubyStringDelimit start="\"" end="\"" skip="\\\\\|\\\"" contains=rubyExprSubst +syn region rubyString matchgroup=rubyStringDelimit start="'" end="'" skip="\\\\\|\\'" +syn region rubyString matchgroup=rubyStringDelimit start="`" end="`" skip="\\\\\|\\`" contains=rubyExprSubst +" +" END Autogenerated Stuff +" + +" Normal Regular Expression +syn region rubyString matchgroup=rubyStringDelimit start="^\s*/" start="\<and\s*/"lc=3 start="\<or\s*/"lc=2 start="\<while\s*/"lc=5 start="\<until\s*/"lc=5 start="\<unless\s*/"lc=6 start="\<if\s*/"lc=2 start="\<elsif\s*/"lc=5 start="\<when\s*/"lc=4 start="[\~=!|&(,[]\s*/"lc=1 end="/[iomx]*" skip="\\\\\|\\/" contains=rubyExprSubst + +" Here Document +if version < 600 + syn region rubyString matchgroup=rubyStringDelimit start=+<<-\(\u\{3,}\|'\u\{3,}'\|"\u\{3,}"\|`\u\{3,}`\)+hs=s+2 end=+^\s*\u\{3,}$+ fold + syn region rubyString matchgroup=rubyStringDelimit start=+<<-\(EOF\|'EOF'\|"EOF"\|`EOF`\)+hs=s+2 end=+^\s*EOF$+ contains=rubyExprSubst fold + syn region rubyString matchgroup=rubyStringDelimit start=+<<-\(EOS\|'EOS'\|"EOS"\|`EOS`\)+hs=s+2 end=+^\s*EOS$+ contains=rubyExprSubst fold + syn region rubyString matchgroup=rubyStringDelimit start=+<<\(\u\{3,}\|'\u\{3,}'\|"\u\{3,}"\|`\u\{3,}`\)+hs=s+2 end=+^\u\{3,}$+ fold + syn region rubyString matchgroup=rubyStringDelimit start=+<<\(EOF\|'EOF'\|"EOF"\|`EOF`\)+hs=s+2 end=+^EOF$+ contains=rubyExprSubst fold + syn region rubyString matchgroup=rubyStringDelimit start=+<<\(EOS\|'EOS'\|"EOS"\|`EOS`\)+hs=s+2 end=+^EOS$+ contains=rubyExprSubst fold +else + syn region rubyString matchgroup=rubyStringDelimit start=+\(class\s*\)\@<!<<\z(\h\w*\)\s*$+hs=s+2 end=+^\z1$+ contains=rubyExprSubst fold + syn region rubyString matchgroup=rubyStringDelimit start=+\(class\s*\)\@<!<<"\z(.*\)"\s*$+hs=s+2 end=+^\z1$+ contains=rubyExprSubst fold + syn region rubyString matchgroup=rubyStringDelimit start=+\(class\s*\)\@<!<<'\z(.*\)'\s*$+hs=s+2 end=+^\z1$+ fold + syn region rubyString matchgroup=rubyStringDelimit start=+\(class\s*\)\@<!<<`\z(.*\)`\s*$+hs=s+2 end=+^\z1$+ contains=rubyExprSubst fold + + syn region rubyString matchgroup=rubyStringDelimit start=+\(class\s*\)\@<!<<-\z(\h\w*\)\s*$+hs=s+3 end=+^\s*\z1$+ contains=rubyExprSubst fold + syn region rubyString matchgroup=rubyStringDelimit start=+\(class\s*\)\@<!<<-"\z(.*\)"\s*$+hs=s+3 end=+^\s*\z1$+ contains=rubyExprSubst fold + syn region rubyString matchgroup=rubyStringDelimit start=+\(class\s*\)\@<!<<-'\z(.*\)'\s*$+hs=s+3 end=+^\s*\z1$+ fold + syn region rubyString matchgroup=rubyStringDelimit start=+\(class\s*\)\@<!<<-`\z(.*\)`\s*$+hs=s+3 end=+^\s*\z1$+ contains=rubyExprSubst fold +endif + +" Expensive Mode - colorize *end* according to opening statement +if !exists("ruby_no_expensive") + syn region rubyFunction matchgroup=rubyDefine start="^\s*def\s" matchgroup=NONE end="\ze\(\s\|(\|;\|$\)" skip="\.\|\(::\)" oneline fold + syn region rubyClassOrModule matchgroup=rubyDefine start="^\s*\(class\|module\)\s" end="<\|$\|;\|\>"he=e-1 oneline fold + + syn region rubyBlock start="^\s*def\s\+"rs=s matchgroup=rubyDefine end="\<end\>" contains=ALLBUT,rubyExprSubst,rubyTodo nextgroup=rubyFunction fold + syn region rubyBlock start="^\s*\(class\|module\)\>"rs=s matchgroup=rubyDefine end="\<end\>" contains=ALLBUT,rubyExprSubst,rubyTodo nextgroup=rubyClassOrModule fold + + " modifiers + redundant *do* + syn match rubyControl "\<\(if\|unless\|while\|until\|do\)\>" + + " *do* requiring *end* + syn region rubyDoBlock matchgroup=rubyControl start="\<do\>" end="\<end\>" contains=ALLBUT,rubyExprSubst,rubyTodo fold + + " *{* requiring *}* + syn region rubyCurlyBlock start="{" end="}" contains=ALLBUT,rubyExprSubst,rubyTodo fold + + " statements without *do* + syn region rubyNoDoBlock matchgroup=rubyControl start="\<\(case\|begin\)\>" start="^\s*\(if\|unless\)\>" start=";\s*\(if\|unless\)\>"hs=s+1 end="\<end\>" contains=ALLBUT,rubyExprSubst,rubyTodo fold + + " statement with optional *do* + syn region rubyOptDoBlock matchgroup=rubyControl start="\<for\>" start="^\s*\(while\|until\)\>" start=";\s*\(while\|until\)\>"hs=s+1 end="\<end\>" contains=ALLBUT,rubyExprSubst,rubyTodo,rubyDoBlock,rubyCurlyBlock fold + + if !exists("ruby_minlines") + let ruby_minlines = 50 + endif + exec "syn sync minlines=" . ruby_minlines + +else " not Expensive + syn region rubyFunction matchgroup=rubyControl start="^\s*def\s" matchgroup=NONE end="\ze\(\s\|(\|;\|$\)" skip="\.\|\(::\)" oneline fold + syn region rubyClassOrModule matchgroup=rubyControl start="^\s*\(class\|module\)\s" end="<\|$\|;\|\>"he=e-1 oneline fold + syn keyword rubyControl case begin do for if unless while until end +endif " Expensive? + +" Keywords +syn keyword rubyControl then else elsif when ensure rescue +syn keyword rubyControl and or not in loop +syn keyword rubyControl break redo retry next return +syn match rubyKeyword "\<defined?" +syn keyword rubyKeyword alias lambda proc super undef yield +syn match rubyInclude "^\s*include\>" +syn keyword rubyInclude load require +syn keyword rubyTodo FIXME NOTE TODO XXX contained +syn keyword rubyBoolean true false self nil +syn keyword rubyException raise fail catch throw +syn keyword rubyBeginEnd BEGIN END + +" Comments and Documentation +if version < 600 + syn match rubySharpBang "#!.*" +else + syn match rubySharpBang "\%^#!.*" +endif +syn match rubyComment "#.*" contains=rubyTodo +syn region rubyDocumentation start="^=begin" end="^=end.*$" contains=rubyTodo fold + +" Note: this is a hack to prevent 'keywords' being highlighted as such when used as method names +syn match rubyKeywordAsMethod "\.\@<!\.\(\s*\n\s*\)*\(alias\|and\|begin\|break\|case\|catch\|class\|def\|do\|elsif\)\>" transparent contains=NONE +syn match rubyKeywordAsMethod "\.\@<!\.\(\s*\n\s*\)*\(else\|fail\|false\|ensure\|for\|end\|if\|in\|include\|lambda\)\>" transparent contains=NONE +syn match rubyKeywordAsMethod "\.\@<!\.\(\s*\n\s*\)*\(load\|loop\|module\|next\|nil\|not\|or\|proc\|raise\|require\)\>" transparent contains=NONE +syn match rubyKeywordAsMethod "\.\@<!\.\(\s*\n\s*\)*\(redo\|rescue\|retry\|return\|self\|super\|then\|throw\|true\|unless\)\>" transparent contains=NONE +syn match rubyKeywordAsMethod "\.\@<!\.\(\s*\n\s*\)*\(undef\|until\|when\|while\|yield\|BEGIN\|END\|__FILE__\|__LINE__\)\>" transparent contains=NONE + +" __END__ Directive +syn region rubyData matchgroup=rubyDataDirective start="^__END__$" matchgroup=NONE end="." skip="." + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_ruby_syntax_inits") + if version < 508 + let did_ruby_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink rubyDefine Define + HiLink rubyFunction Function + HiLink rubyControl Statement + HiLink rubyInclude Include + HiLink rubyNumber Number + HiLink rubyBoolean Boolean + HiLink rubyException Exception + HiLink rubyClassOrModule Type + HiLink rubyIdentifier Identifier + HiLink rubyClassVariable rubyIdentifier + HiLink rubyConstant rubyIdentifier + HiLink rubyGlobalVariable rubyIdentifier + HiLink rubyIterator rubyIdentifier + HiLink rubyInstanceVariable rubyIdentifier + HiLink rubyPredefinedIdentifier rubyIdentifier + HiLink rubyPredefinedConstant rubyPredefinedIdentifier + HiLink rubyPredefinedVariable rubyPredefinedIdentifier + HiLink rubySymbol rubyIdentifier + HiLink rubySharpBang PreProc + HiLink rubyKeyword Keyword + HiLink rubyBeginEnd Statement + + HiLink rubyString String + HiLink rubyStringDelimit Delimiter + HiLink rubyExprSubst Special + + HiLink rubyComment Comment + HiLink rubyDocumentation Comment + HiLink rubyTodo Todo + HiLink rubyData Comment + HiLink rubyDataDirective Delimiter + + delcommand HiLink +endif + +let b:current_syntax = "ruby" + +" vim: nowrap tabstop=8 diff --git a/runtime/syntax/samba.vim b/runtime/syntax/samba.vim new file mode 100644 index 000000000..10f7edce6 --- /dev/null +++ b/runtime/syntax/samba.vim @@ -0,0 +1,117 @@ +" Vim syntax file +" Language: samba configuration files (smb.conf) +" Maintainer: Rafael Garcia-Suarez <rgarciasuarez@free.fr> +" URL: http://rgarciasuarez.free.fr/vim/syntax/samba.vim +" Last change: 2002 May 06 + +" Don't forget to run your config file through testparm(1)! + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +syn match sambaParameter /^[a-zA-Z \t]\+=/ contains=sambaKeyword +syn match sambaSection /^\s*\[[a-zA-Z0-9_\-. ]\+\]/ +syn match sambaMacro /%[SPugUGHvhmLMNpRdaIT]/ +syn match sambaMacro /%$([a-zA-Z0-9_]\+)/ +syn match sambaComment /^\s*[;#].*/ +syn match sambaContinue /\\$/ +syn keyword sambaBoolean true false yes no + +" Keywords for Samba 2.0.5a +syn keyword sambaKeyword contained account acl action add address admin aliases +syn keyword sambaKeyword contained allow alternate always announce anonymous +syn keyword sambaKeyword contained archive as auto available bind blocking +syn keyword sambaKeyword contained bmpx break browsable browse browseable ca +syn keyword sambaKeyword contained cache case casesignames cert certDir +syn keyword sambaKeyword contained certFile change char character chars chat +syn keyword sambaKeyword contained ciphers client clientcert code coding +syn keyword sambaKeyword contained command comment compatibility config +syn keyword sambaKeyword contained connections contention controller copy +syn keyword sambaKeyword contained create deadtime debug debuglevel default +syn keyword sambaKeyword contained delete deny descend dfree dir directory +syn keyword sambaKeyword contained disk dns domain domains dont dos dot drive +syn keyword sambaKeyword contained driver encrypt encrypted equiv exec fake +syn keyword sambaKeyword contained file files filetime filetimes filter follow +syn keyword sambaKeyword contained force fstype getwd group groups guest +syn keyword sambaKeyword contained hidden hide home homedir hosts include +syn keyword sambaKeyword contained interfaces interval invalid keepalive +syn keyword sambaKeyword contained kernel key ldap length level level2 limit +syn keyword sambaKeyword contained links list lm load local location lock +syn keyword sambaKeyword contained locking locks log logon logons logs lppause +syn keyword sambaKeyword contained lpq lpresume lprm machine magic mangle +syn keyword sambaKeyword contained mangled mangling map mask master max mem +syn keyword sambaKeyword contained message min mode modes mux name names +syn keyword sambaKeyword contained netbios nis notify nt null offset ok ole +syn keyword sambaKeyword contained only open oplock oplocks options order os +syn keyword sambaKeyword contained output packet page panic passwd password +syn keyword sambaKeyword contained passwords path permissions pipe port +syn keyword sambaKeyword contained postexec postscript prediction preexec +syn keyword sambaKeyword contained prefered preferred preload preserve print +syn keyword sambaKeyword contained printable printcap printer printers +syn keyword sambaKeyword contained printing program protocol proxy public +syn keyword sambaKeyword contained queuepause queueresume raw read readonly +syn keyword sambaKeyword contained realname remote require resign resolution +syn keyword sambaKeyword contained resolve restrict revalidate rhosts root +syn keyword sambaKeyword contained script security sensitive server servercert +syn keyword sambaKeyword contained service services set share shared short +syn keyword sambaKeyword contained size smb smbrun socket space ssl stack stat +syn keyword sambaKeyword contained status strict string strip suffix support +syn keyword sambaKeyword contained symlinks sync syslog system time timeout +syn keyword sambaKeyword contained times timestamp to trusted ttl unix update +syn keyword sambaKeyword contained use user username users valid version veto +syn keyword sambaKeyword contained volume wait wide wins workgroup writable +syn keyword sambaKeyword contained write writeable xmit + +" New keywords for Samba 2.0.6 +syn keyword sambaKeyword contained hook hires pid uid close rootpreexec + +" New keywords for Samba 2.0.7 +syn keyword sambaKeyword contained utmp wtmp hostname consolidate +syn keyword sambaKeyword contained inherit source environment + +" New keywords for Samba 2.2.0 +syn keyword sambaKeyword contained addprinter auth browsing deleteprinter +syn keyword sambaKeyword contained enhanced enumports filemode gid host jobs +syn keyword sambaKeyword contained lanman msdfs object os2 posix processes +syn keyword sambaKeyword contained scope separator shell show smbd template +syn keyword sambaKeyword contained total vfs winbind wizard + +" New keywords for Samba 2.2.1 +syn keyword sambaKeyword contained large obey pam readwrite restrictions +syn keyword sambaKeyword contained unreadable + +" New keywords for Samba 2.2.2 - 2.2.4 +syn keyword sambaKeyword contained acls allocate bytes count csc devmode +syn keyword sambaKeyword contained disable dn egd entropy enum extensions mmap +syn keyword sambaKeyword contained policy spin spoolss + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_samba_syn_inits") + if version < 508 + let did_samba_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + HiLink sambaParameter Normal + HiLink sambaKeyword Type + HiLink sambaSection Statement + HiLink sambaMacro PreProc + HiLink sambaComment Comment + HiLink sambaContinue Operator + HiLink sambaBoolean Constant + delcommand HiLink +endif + +let b:current_syntax = "samba" + +" vim: ts=8 diff --git a/runtime/syntax/sas.vim b/runtime/syntax/sas.vim new file mode 100644 index 000000000..68e8788e2 --- /dev/null +++ b/runtime/syntax/sas.vim @@ -0,0 +1,236 @@ +" Vim syntax file +" Language: SAS +" Maintainer: James Kidd <james.kidd@covance.com> +" Last Change: 02 Jun 2003 +" Added highlighting for additional keywords and such; +" Attempted to match SAS default syntax colors; +" Changed syncing so it doesn't lose colors on large blocks; +" Much thanks to Bob Heckel for knowledgeable tweaking. +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +syn region sasString start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn region sasString start=+'+ skip=+\\\\\|\\"+ end=+'+ + +" Want region from 'cards;' to ';' to be captured (Bob Heckel) +syn region sasCards start="^\s*CARDS.*" end="^\s*;\s*$" +syn region sasCards start="^\s*DATALINES.*" end="^\s*;\s*$" + +syn match sasNumber "-\=\<\d*\.\=[0-9_]\>" + +syn region sasComment start="/\*" end="\*/" contains=sasTodo +" Ignore misleading //JCL SYNTAX... (Bob Heckel) +syn region sasComment start="[^/][^/]/\*" end="\*/" contains=sasTodo + +" Allow highlighting of embedded TODOs (Bob Heckel) +syn match sasComment "^\s*\*.*;" contains=sasTodo + +" Allow highlighting of embedded TODOs (Bob Heckel) +syn match sasComment ";\s*\*.*;"hs=s+1 contains=sasTodo + +" Handle macro comments too (Bob Heckel). +syn match sasComment "^\s*%*\*.*;" contains=sasTodo + +" This line defines macro variables in code. HiLink at end of file +" defines the color scheme. Begin region with ampersand and end with +" any non-word character offset by -1; put ampersand in the skip list +" just in case it is used to concatenate macro variable values. + +" Thanks to ronald höllwarth for this fix to an intra-versioning +" problem with this little feature + +if version < 600 + syn region sasMacroVar start="\&" skip="[_&]" end="\W"he=e-1 +else " for the older Vim's just do it their way ... + syn region sasMacroVar start="&" skip="[_&]" end="\W"he=e-1 +endif + + +" I dont think specific PROCs need to be listed if use this line (Bob Heckel). +syn match sasProc "^\s*PROC \w\+" +syn keyword sasStep RUN QUIT DATA + + +" Base SAS Procs - version 8.1 + +syn keyword sasConditional DO ELSE END IF THEN UNTIL WHILE + +syn keyword sasStatement ABORT ARRAY ATTRIB BY CALL CARDS CARDS4 CATNAME +syn keyword sasStatement CONTINUE DATALINES DATALINES4 DELETE DISPLAY +syn keyword sasStatement DM DROP ENDSAS ERROR FILE FILENAME FOOTNOTE +syn keyword sasStatement FORMAT GOTO INFILE INFORMAT INPUT KEEP +syn keyword sasStatement LABEL LEAVE LENGTH LIBNAME LINK LIST LOSTCARD +syn keyword sasStatement MERGE MISSING MODIFY OPTIONS OUTPUT PAGE +syn keyword sasStatement PUT REDIRECT REMOVE RENAME REPLACE RETAIN +syn keyword sasStatement RETURN SELECT SET SKIP STARTSAS STOP TITLE +syn keyword sasStatement UPDATE WAITSAS WHERE WINDOW X SYSTASK + +" Keywords that are used in Proc SQL +" I left them as statements because SAS's enhanced editor highlights +" them the same as normal statements used in data steps (Jim Kidd) + +syn keyword sasStatement ADD AND ALTER AS CASCADE CHECK CREATE +syn keyword sasStatement DELETE DESCRIBE DISTINCT DROP FOREIGN +syn keyword sasStatement FROM GROUP HAVING INDEX INSERT INTO IN +syn keyword sasStatement KEY LIKE MESSAGE MODIFY MSGTYPE NOT +syn keyword sasStatement NULL ON OR ORDER PRIMARY REFERENCES +syn keyword sasStatement RESET RESTRICT SELECT SET TABLE +syn keyword sasStatement UNIQUE UPDATE VALIDATE VIEW WHERE + + +syn match sasStatement "FOOTNOTE\d" "TITLE\d" + +syn match sasMacro "%BQUOTE" "%NRBQUOTE" "%CMPRES" "%QCMPRES" +syn match sasMacro "%COMPSTOR" "%DATATYP" "%DISPLAY" "%DO" +syn match sasMacro "%ELSE" "%END" "%EVAL" "%GLOBAL" +syn match sasMacro "%GOTO" "%IF" "%INDEX" "%INPUT" +syn match sasMacro "%KEYDEF" "%LABEL" "%LEFT" "%LENGTH" +syn match sasMacro "%LET" "%LOCAL" "%LOWCASE" "%MACRO" +syn match sasMacro "%MEND" "%NRBQUOTE" "%NRQUOTE" "%NRSTR" +syn match sasMacro "%PUT" "%QCMPRES" "%QLEFT" "%QLOWCASE" +syn match sasMacro "%QSCAN" "%QSUBSTR" "%QSYSFUNC" "%QTRIM" +syn match sasMacro "%QUOTE" "%QUPCASE" "%SCAN" "%STR" +syn match sasMacro "%SUBSTR" "%SUPERQ" "%SYSCALL" "%SYSEVALF" +syn match sasMacro "%SYSEXEC" "%SYSFUNC" "%SYSGET" "%SYSLPUT" +syn match sasMacro "%SYSPROD" "%SYSRC" "%SYSRPUT" "%THEN" +syn match sasMacro "%TO" "%TRIM" "%UNQUOTE" "%UNTIL" +syn match sasMacro "%UPCASE" "%VERIFY" "%WHILE" "%WINDOW" + +" SAS Functions + +syn keyword sasFunction ABS ADDR AIRY ARCOS ARSIN ATAN ATTRC ATTRN +syn keyword sasFunction BAND BETAINV BLSHIFT BNOT BOR BRSHIFT BXOR +syn keyword sasFunction BYTE CDF CEIL CEXIST CINV CLOSE CNONCT COLLATE +syn keyword sasFunction COMPBL COMPOUND COMPRESS COS COSH CSS CUROBS +syn keyword sasFunction CV DACCDB DACCDBSL DACCSL DACCSYD DACCTAB +syn keyword sasFunction DAIRY DATE DATEJUL DATEPART DATETIME DAY +syn keyword sasFunction DCLOSE DEPDB DEPDBSL DEPDBSL DEPSL DEPSL +syn keyword sasFunction DEPSYD DEPSYD DEPTAB DEPTAB DEQUOTE DHMS +syn keyword sasFunction DIF DIGAMMA DIM DINFO DNUM DOPEN DOPTNAME +syn keyword sasFunction DOPTNUM DREAD DROPNOTE DSNAME ERF ERFC EXIST +syn keyword sasFunction EXP FAPPEND FCLOSE FCOL FDELETE FETCH FETCHOBS +syn keyword sasFunction FEXIST FGET FILEEXIST FILENAME FILEREF FINFO +syn keyword sasFunction FINV FIPNAME FIPNAMEL FIPSTATE FLOOR FNONCT +syn keyword sasFunction FNOTE FOPEN FOPTNAME FOPTNUM FPOINT FPOS +syn keyword sasFunction FPUT FREAD FREWIND FRLEN FSEP FUZZ FWRITE +syn keyword sasFunction GAMINV GAMMA GETOPTION GETVARC GETVARN HBOUND +syn keyword sasFunction HMS HOSTHELP HOUR IBESSEL INDEX INDEXC +syn keyword sasFunction INDEXW INPUT INPUTC INPUTN INT INTCK INTNX +syn keyword sasFunction INTRR IRR JBESSEL JULDATE KURTOSIS LAG LBOUND +syn keyword sasFunction LEFT LENGTH LGAMMA LIBNAME LIBREF LOG LOG10 +syn keyword sasFunction LOG2 LOGPDF LOGPMF LOGSDF LOWCASE MAX MDY +syn keyword sasFunction MEAN MIN MINUTE MOD MONTH MOPEN MORT N +syn keyword sasFunction NETPV NMISS NORMAL NOTE NPV OPEN ORDINAL +syn keyword sasFunction PATHNAME PDF PEEK PEEKC PMF POINT POISSON POKE +syn keyword sasFunction PROBBETA PROBBNML PROBCHI PROBF PROBGAM +syn keyword sasFunction PROBHYPR PROBIT PROBNEGB PROBNORM PROBT PUT +syn keyword sasFunction PUTC PUTN QTR QUOTE RANBIN RANCAU RANEXP +syn keyword sasFunction RANGAM RANGE RANK RANNOR RANPOI RANTBL RANTRI +syn keyword sasFunction RANUNI REPEAT RESOLVE REVERSE REWIND RIGHT +syn keyword sasFunction ROUND SAVING SCAN SDF SECOND SIGN SIN SINH +syn keyword sasFunction SKEWNESS SOUNDEX SPEDIS SQRT STD STDERR STFIPS +syn keyword sasFunction STNAME STNAMEL SUBSTR SUM SYMGET SYSGET SYSMSG +syn keyword sasFunction SYSPROD SYSRC SYSTEM TAN TANH TIME TIMEPART +syn keyword sasFunction TINV TNONCT TODAY TRANSLATE TRANWRD TRIGAMMA +syn keyword sasFunction TRIM TRIMN TRUNC UNIFORM UPCASE USS VAR +syn keyword sasFunction VARFMT VARINFMT VARLABEL VARLEN VARNAME +syn keyword sasFunction VARNUM VARRAY VARRAYX VARTYPE VERIFY VFORMAT +syn keyword sasFunction VFORMATD VFORMATDX VFORMATN VFORMATNX VFORMATW +syn keyword sasFunction VFORMATWX VFORMATX VINARRAY VINARRAYX VINFORMAT +syn keyword sasFunction VINFORMATD VINFORMATDX VINFORMATN VINFORMATNX +syn keyword sasFunction VINFORMATW VINFORMATWX VINFORMATX VLABEL +syn keyword sasFunction VLABELX VLENGTH VLENGTHX VNAME VNAMEX VTYPE +syn keyword sasFunction VTYPEX WEEKDAY YEAR YYQ ZIPFIPS ZIPNAME ZIPNAMEL +syn keyword sasFunction ZIPSTATE + +" Handy settings for using vim with log files +syn keyword sasLogMsg NOTE +syn keyword sasWarnMsg WARNING +syn keyword sasErrMsg ERROR + +" Always contained in a comment (Bob Heckel) +syn keyword sasTodo TODO TBD FIXME contained + +" These don't fit anywhere else (Bob Heckel). +syn match sasUnderscore "_NULL_" +syn match sasUnderscore "_INFILE_" +syn match sasUnderscore "_N_" +syn match sasUnderscore "_WEBOUT_" +syn match sasUnderscore "_NUMERIC_" +syn match sasUnderscore "_CHARACTER_" +syn match sasUnderscore "_ALL_" + +" End of SAS Functions + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet + +if version >= 508 || !exists("did_sas_syntax_inits") + if version < 508 + let did_sas_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " Default sas enhanced editor color syntax + hi sComment term=bold cterm=NONE ctermfg=Green ctermbg=Black gui=NONE guifg=DarkGreen guibg=White + hi sCard term=bold cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Black guibg=LightYellow + hi sDate_Time term=NONE cterm=bold ctermfg=Green ctermbg=Black gui=bold guifg=SeaGreen guibg=White + hi sKeyword term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=NONE guifg=Blue guibg=White + hi sFmtInfmt term=NONE cterm=NONE ctermfg=LightGreen ctermbg=Black gui=NONE guifg=SeaGreen guibg=White + hi sString term=NONE cterm=NONE ctermfg=Magenta ctermbg=Black gui=NONE guifg=Purple guibg=White + hi sText term=NONE cterm=NONE ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White + hi sNumber term=NONE cterm=bold ctermfg=Green ctermbg=Black gui=bold guifg=SeaGreen guibg=White + hi sProc term=NONE cterm=bold ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White + hi sSection term=NONE cterm=bold ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White + hi mDefine term=NONE cterm=bold ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White + hi mKeyword term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=NONE guifg=Blue guibg=White + hi mReference term=NONE cterm=bold ctermfg=White ctermbg=Black gui=bold guifg=Blue guibg=White + hi mSection term=NONE cterm=NONE ctermfg=Blue ctermbg=Black gui=bold guifg=Navy guibg=White + hi mText term=NONE cterm=NONE ctermfg=White ctermbg=Black gui=bold guifg=Black guibg=White + +" Colors that closely match SAS log colors for default color scheme + hi lError term=NONE cterm=NONE ctermfg=Red ctermbg=Black gui=none guifg=Red guibg=White + hi lWarning term=NONE cterm=NONE ctermfg=Green ctermbg=Black gui=none guifg=Green guibg=White + hi lNote term=NONE cterm=NONE ctermfg=Cyan ctermbg=Black gui=none guifg=Blue guibg=White + + + " Special hilighting for the SAS proc section + + HiLink sasComment sComment + HiLink sasConditional sKeyword + HiLink sasStep sSection + HiLink sasFunction sKeyword + HiLink sasMacro mKeyword + HiLink sasMacroVar NonText + HiLink sasNumber sNumber + HiLink sasStatement sKeyword + HiLink sasString sString + HiLink sasProc sProc + " (Bob Heckel) + HiLink sasTodo Todo + HiLink sasErrMsg lError + HiLink sasWarnMsg lWarning + HiLink sasLogMsg lNote + HiLink sasCards sCard + " (Bob Heckel) + HiLink sasUnderscore PreProc + delcommand HiLink +endif + +" Syncronize from beginning to keep large blocks from losing +" syntax coloring while moving through code. +syn sync fromstart + +let b:current_syntax = "sas" + +" vim: ts=8 diff --git a/runtime/syntax/sather.vim b/runtime/syntax/sather.vim new file mode 100644 index 000000000..759591bf8 --- /dev/null +++ b/runtime/syntax/sather.vim @@ -0,0 +1,105 @@ +" Vim syntax file +" Language: Sather/pSather +" Maintainer: Claudio Fleiner <claudio@fleiner.com> +" URL: http://www.fleiner.com/vim/syntax/sather.vim +" Last Change: 2003 May 11 + +" Sather is a OO-language developped at the International Computer Science +" Institute (ICSI) in Berkeley, CA. pSather is a parallel extension to Sather. +" Homepage: http://www.icsi.berkeley.edu/~sather +" Sather files use .sa as suffix + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" keyword definitions +syn keyword satherExternal extern +syn keyword satherBranch break continue +syn keyword satherLabel when then +syn keyword satherConditional if else elsif end case typecase assert with +syn match satherConditional "near$" +syn match satherConditional "far$" +syn match satherConditional "near *[^(]"he=e-1 +syn match satherConditional "far *[^(]"he=e-1 +syn keyword satherSynchronize lock guard sync +syn keyword satherRepeat loop parloop do +syn match satherRepeat "while!" +syn match satherRepeat "break!" +syn match satherRepeat "until!" +syn keyword satherBoolValue true false +syn keyword satherValue self here cluster +syn keyword satherOperator new "== != & ^ | && || +syn keyword satherOperator and or not +syn match satherOperator "[#!]" +syn match satherOperator ":-" +syn keyword satherType void attr where +syn match satherType "near *("he=e-1 +syn match satherType "far *("he=e-1 +syn keyword satherStatement return +syn keyword satherStorageClass static const +syn keyword satherExceptions try raise catch +syn keyword satherMethodDecl is pre post +syn keyword satherClassDecl abstract value class include +syn keyword satherScopeDecl public private readonly + + +syn match satherSpecial contained "\\\d\d\d\|\\." +syn region satherString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=satherSpecial +syn match satherCharacter "'[^\\]'" +syn match satherSpecialCharacter "'\\.'" +syn match satherNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" +syn match satherCommentSkip contained "^\s*\*\($\|\s\+\)" +syn region satherComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+$\|"+ contains=satherSpecial +syn match satherComment "--.*" contains=satherComment2String,satherCharacter,satherNumber + + +syn sync ccomment satherComment + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_sather_syn_inits") + if version < 508 + let did_sather_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink satherBranch satherStatement + HiLink satherLabel satherStatement + HiLink satherConditional satherStatement + HiLink satherSynchronize satherStatement + HiLink satherRepeat satherStatement + HiLink satherExceptions satherStatement + HiLink satherStorageClass satherDeclarative + HiLink satherMethodDecl satherDeclarative + HiLink satherClassDecl satherDeclarative + HiLink satherScopeDecl satherDeclarative + HiLink satherBoolValue satherValue + HiLink satherSpecial satherValue + HiLink satherString satherValue + HiLink satherCharacter satherValue + HiLink satherSpecialCharacter satherValue + HiLink satherNumber satherValue + HiLink satherStatement Statement + HiLink satherOperator Statement + HiLink satherComment Comment + HiLink satherType Type + HiLink satherValue String + HiLink satherString String + HiLink satherSpecial String + HiLink satherCharacter String + HiLink satherDeclarative Type + HiLink satherExternal PreCondit + delcommand HiLink +endif + +let b:current_syntax = "sather" + +" vim: ts=8 diff --git a/runtime/syntax/scheme.vim b/runtime/syntax/scheme.vim new file mode 100644 index 000000000..d3de35b6b --- /dev/null +++ b/runtime/syntax/scheme.vim @@ -0,0 +1,189 @@ +" Vim syntax file +" Language: Scheme (R5RS) +" Maintainer: Dirk van Deun <dirk@igwe.vub.ac.be> +" Last Change: April 30, 1998 + +" This script incorrectly recognizes some junk input as numerals: +" parsing the complete system of Scheme numerals using the pattern +" language is practically impossible: I did a lax approximation. + +" Suggestions and bug reports are solicited by the author. + +" Initializing: + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" Fascist highlighting: everything that doesn't fit the rules is an error... + +syn match schemeError oneline ![^ \t()";]*! +syn match schemeError oneline ")" + +" Quoted and backquoted stuff + +syn region schemeQuoted matchgroup=Delimiter start="['`]" end=![ \t()";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc + +syn region schemeQuoted matchgroup=Delimiter start="['`](" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc +syn region schemeQuoted matchgroup=Delimiter start="['`]#(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc + +syn region schemeStrucRestricted matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc +syn region schemeStrucRestricted matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc + +syn region schemeUnquote matchgroup=Delimiter start="," end=![ \t()";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc +syn region schemeUnquote matchgroup=Delimiter start=",@" end=![ \t()";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc + +syn region schemeUnquote matchgroup=Delimiter start=",(" end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc +syn region schemeUnquote matchgroup=Delimiter start=",@(" end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc + +syn region schemeUnquote matchgroup=Delimiter start=",#(" end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc +syn region schemeUnquote matchgroup=Delimiter start=",@#(" end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc + +" R5RS Scheme Functions and Syntax: + +if version < 600 + set iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ +else + setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_ +endif + +syn keyword schemeSyntax lambda and or if cond case define let let* letrec +syn keyword schemeSyntax begin do delay set! else => +syn keyword schemeSyntax quote quasiquote unquote unquote-splicing +syn keyword schemeSyntax define-syntax let-syntax letrec-syntax syntax-rules + +syn keyword schemeFunc not boolean? eq? eqv? equal? pair? cons car cdr set-car! +syn keyword schemeFunc set-cdr! caar cadr cdar cddr caaar caadr cadar caddr +syn keyword schemeFunc cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr +syn keyword schemeFunc cadaar cadadr caddar cadddr cdaaar cdaadr cdadar cdaddr +syn keyword schemeFunc cddaar cddadr cdddar cddddr null? list? list length +syn keyword schemeFunc append reverse list-ref memq memv member assq assv assoc +syn keyword schemeFunc symbol? symbol->string string->symbol number? complex? +syn keyword schemeFunc real? rational? integer? exact? inexact? = < > <= >= +syn keyword schemeFunc zero? positive? negative? odd? even? max min + * - / abs +syn keyword schemeFunc quotient remainder modulo gcd lcm numerator denominator +syn keyword schemeFunc floor ceiling truncate round rationalize exp log sin cos +syn keyword schemeFunc tan asin acos atan sqrt expt make-rectangular make-polar +syn keyword schemeFunc real-part imag-part magnitude angle exact->inexact +syn keyword schemeFunc inexact->exact number->string string->number char=? +syn keyword schemeFunc char-ci=? char<? char-ci<? char>? char-ci>? char<=? +syn keyword schemeFunc char-ci<=? char>=? char-ci>=? char-alphabetic? char? +syn keyword schemeFunc char-numeric? char-whitespace? char-upper-case? +syn keyword schemeFunc char-lower-case? +syn keyword schemeFunc char->integer integer->char char-upcase char-downcase +syn keyword schemeFunc string? make-string string string-length string-ref +syn keyword schemeFunc string-set! string=? string-ci=? string<? string-ci<? +syn keyword schemeFunc string>? string-ci>? string<=? string-ci<=? string>=? +syn keyword schemeFunc string-ci>=? substring string-append vector? make-vector +syn keyword schemeFunc vector vector-length vector-ref vector-set! procedure? +syn keyword schemeFunc apply map for-each call-with-current-continuation +syn keyword schemeFunc call-with-input-file call-with-output-file input-port? +syn keyword schemeFunc output-port? current-input-port current-output-port +syn keyword schemeFunc open-input-file open-output-file close-input-port +syn keyword schemeFunc close-output-port eof-object? read read-char peek-char +syn keyword schemeFunc write display newline write-char call/cc +syn keyword schemeFunc list-tail string->list list->string string-copy +syn keyword schemeFunc string-fill! vector->list list->vector vector-fill! +syn keyword schemeFunc force with-input-from-file with-output-to-file +syn keyword schemeFunc char-ready? load transcript-on transcript-off eval +syn keyword schemeFunc dynamic-wind port? values call-with-values +syn keyword schemeFunc scheme-report-environment null-environment +syn keyword schemeFunc interaction-environment + +" Writing out the complete description of Scheme numerals without +" using variables is a day's work for a trained secretary... +" This is a useful lax approximation: + +syn match schemeNumber oneline "[-#+0-9.][-#+/0-9a-f@i.boxesfdl]*" +syn match schemeError oneline ![-#+0-9.][-#+/0-9a-f@i.boxesfdl]*[^-#+/0-9a-f@i.boxesfdl \t()";][^ \t()";]*! + +syn match schemeOther oneline ![+-][ \t()";]!me=e-1 +syn match schemeOther oneline ![+-]$! +" ... so that a single + or -, inside a quoted context, would not be +" interpreted as a number (outside such contexts, it's a schemeFunc) + +syn match schemeDelimiter oneline !\.[ \t()";]!me=e-1 +syn match schemeDelimiter oneline !\.$! +" ... and a single dot is not a number but a delimiter + +" Simple literals: + +syn match schemeBoolean oneline "#[tf]" +syn match schemeError oneline !#[tf][^ \t()";]\+! + +syn match schemeChar oneline "#\\" +syn match schemeChar oneline "#\\." +syn match schemeError oneline !#\\.[^ \t()";]\+! +syn match schemeChar oneline "#\\space" +syn match schemeError oneline !#\\space[^ \t()";]\+! +syn match schemeChar oneline "#\\newline" +syn match schemeError oneline !#\\newline[^ \t()";]\+! + +" This keeps all other stuff unhighlighted, except *stuff* and <stuff>: + +syn match schemeOther oneline ,[a-z!$%&*/:<=>?^_~][-a-z!$%&*/:<=>?^_~0-9+.@]*, +syn match schemeError oneline ,[a-z!$%&*/:<=>?^_~][-a-z!$%&*/:<=>?^_~0-9+.@]*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*, + +syn match schemeOther oneline "\.\.\." +syn match schemeError oneline !\.\.\.[^ \t()";]\+! +" ... a special identifier + +syn match schemeConstant oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[ \t()";],me=e-1 +syn match schemeConstant oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*$, +syn match schemeError oneline ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*, + +syn match schemeConstant oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[ \t()";],me=e-1 +syn match schemeConstant oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>$, +syn match schemeError oneline ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[^-a-z!$%&*/:<=>?^_~0-9+.@ \t()";]\+[^ \t()";]*, + +" Non-quoted lists, and strings: + +syn region schemeStruc matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALL +syn region schemeStruc matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALL + +syn region schemeString start=+"+ skip=+\\[\\"]+ end=+"+ + +" Comments: + +syn match schemeComment ";.*$" + +" Synchronization and the wrapping up... + +syn sync match matchPlace grouphere NONE "^[^ \t]" +" ... i.e. synchronize on a line that starts at the left margin + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_scheme_syntax_inits") + if version < 508 + let did_scheme_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink schemeSyntax Statement + HiLink schemeFunc Function + + HiLink schemeString String + HiLink schemeChar Character + HiLink schemeNumber Number + HiLink schemeBoolean Boolean + + HiLink schemeDelimiter Delimiter + HiLink schemeConstant Constant + + HiLink schemeComment Comment + HiLink schemeError Error + + delcommand HiLink +endif + +let b:current_syntax = "scheme" diff --git a/runtime/syntax/scilab.vim b/runtime/syntax/scilab.vim new file mode 100644 index 000000000..1bfc00367 --- /dev/null +++ b/runtime/syntax/scilab.vim @@ -0,0 +1,115 @@ +" +" Vim syntax file +" Language : Scilab +" Maintainer : Benoit Hamelin +" File type : *.sci (see :help filetype) +" History +" 28jan2002 benoith 0.1 Creation. Adapted from matlab.vim. +" 04feb2002 benoith 0.5 Fixed bugs with constant highlighting. +" + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + +" Reserved words. +syn keyword scilabStatement abort clear clearglobal end exit global mode predef quit resume +syn keyword scilabStatement return +syn keyword scilabFunction function endfunction funptr +syn keyword scilabPredicate null iserror isglobal +syn keyword scilabKeyword typename +syn keyword scilabDebug debug pause what where whereami whereis who whos +syn keyword scilabRepeat for while break +syn keyword scilabConditional if then else elseif +syn keyword scilabMultiplex select case + +" Reserved constants. +syn match scilabConstant "\(%\)[0-9A-Za-z?!#$]\+" +syn match scilabBoolean "\(%\)[FTft]\>" + +" Delimiters and operators. +syn match scilabDelimiter "[][;,()]" +syn match scilabComparison "[=~]=" +syn match scilabComparison "[<>]=\=" +syn match scilabComparison "<>" +syn match scilabLogical "[&|~]" +syn match scilabAssignment "=" +syn match scilabArithmetic "[+-]" +syn match scilabArithmetic "\.\=[*/\\]\.\=" +syn match scilabArithmetic "\.\=^" +syn match scilabRange ":" +syn match scilabMlistAccess "\." + +syn match scilabLineContinuation "\.\{2,}" + +syn match scilabTransposition "[])a-zA-Z0-9?!_#$.]'"lc=1 + +" Comments and tools. +syn keyword scilabTodo TODO todo FIXME fixme TBD tbd contained +syn match scilabComment "//.*$" contains=scilabTodo + +" Constants. +syn match scilabNumber "[0-9]\+\(\.[0-9]*\)\=\([DEde][+-]\=[0-9]\+\)\=" +syn match scilabNumber "\.[0-9]\+\([DEde][+-]\=[0-9]\+\)\=" +syn region scilabString start=+'+ skip=+''+ end=+'+ oneline +syn region scilabString start=+"+ end=+"+ oneline + +" Identifiers. +syn match scilabIdentifier "\<[A-Za-z?!_#$][A-Za-z0-9?!_#$]*\>" +syn match scilabOverload "%[A-Za-z0-9?!_#$]\+_[A-Za-z0-9?!_#$]\+" + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_scilab_syntax_inits") + if version < 508 + let did_scilab_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink scilabStatement Statement + HiLink scilabFunction Keyword + HiLink scilabPredicate Keyword + HiLink scilabKeyword Keyword + HiLink scilabDebug Debug + HiLink scilabRepeat Repeat + HiLink scilabConditional Conditional + HiLink scilabMultiplex Conditional + + HiLink scilabConstant Constant + HiLink scilabBoolean Boolean + + HiLink scilabDelimiter Delimiter + HiLink scilabMlistAccess Delimiter + HiLink scilabComparison Operator + HiLink scilabLogical Operator + HiLink scilabAssignment Operator + HiLink scilabArithmetic Operator + HiLink scilabRange Operator + HiLink scilabLineContinuation Underlined + HiLink scilabTransposition Operator + + HiLink scilabTodo Todo + HiLink scilabComment Comment + + HiLink scilabNumber Number + HiLink scilabString String + + HiLink scilabIdentifier Identifier + HiLink scilabOverload Special + + delcommand HiLink +endif + +let b:current_syntax = "scilab" + +"EOF vim: ts=4 noet tw=100 sw=4 sts=0 diff --git a/runtime/syntax/screen.vim b/runtime/syntax/screen.vim new file mode 100644 index 000000000..eef74f26f --- /dev/null +++ b/runtime/syntax/screen.vim @@ -0,0 +1,93 @@ +" Vim syntax file +" Language: Screen Virtual Terminal Emulator/Manager Configuration File +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/screen/ +" Latest Revision: 2004-05-22 +" arch-tag: 6a97fb8f-fc88-497f-9c55-e946734ba034 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" comments +syn region screenComment matchgroup=screenComment start="#" end="$" contains=screenTodo + +" todo +syn keyword screenTodo contained TODO FIXME XXX NOTE + +" string (can contain variables) +syn region screenString matchgroup=screenString start='"' skip='\\"' end='"\|$' contains=screenVariable,screenSpecial + +" literal string +syn region screenLiteral matchgroup=screenLiteral start="'" skip="\\'" end="'\|$" + +" environment variables +syn match screenVariable contained "$\(\h\w*\|{\h\w*}\)" + +" booleans +syn keyword screenBoolean on off + +" numbers +syn match screenNumbers "\<\d\+\>" + +" specials +syn match screenSpecials contained "%\([%aAdDhlmMstuwWyY?:{]\|[0-9]*n\|0?cC\)" + +" commands +syn keyword screenCommands acladd aclchg acldel aclgrp aclumask activity addacl allpartial at attrcolor +syn keyword screenCommands autodetach bell_msg bind bindkey bufferfile caption chacl chdir clear colon +syn keyword screenCommands command compacthist console copy copy_regcrlf debug detach digraph dinfo crlf +syn keyword screenCommands displays dumptermcap echo exec fit focus height help history +syn keyword screenCommands info kill lastmsg license lockscreen markkeys meta msgminwait msgwait +syn keyword screenCommands multiuser nethack next nonblock number only other partial_state +syn keyword screenCommands password paste pastefont pow_break pow_detach_msg prev printcmd process +syn keyword screenCommands quit readbuf readreg redisplay register remove removebuf reset resize screen +syn keyword screenCommands select sessionname setenv shelltitle silencewait verbose +syn keyword screenCommands sleep sorendition split startup_message stuff su suspend time +syn keyword screenCommands title umask version wall width writebuf xoff xon defmode hardstatus +syn keyword screenCommands altscreen break breaktype copy_reg defbreaktype defencoding deflog encoding +syn keyword screenCommands eval ignorecase ins_reg maxwin partial pow_detach setsid source unsetenv +syn keyword screenCommands windowlist windows +syn match screenCommands "\<\(def\)\=\(autonuke\|bce\|c1\|charset\|escape\|flow\|kanji\|login\|monitor\|hstatus\|obuflimit\)\>" +syn match screenCommands "\<\(def\)\=\(scrollback\|shell\|silence\|slowpaste\|utf8\|wrap\|writelock\|zombie\|gr\)\>" +syn match screenCommands "\<hard\(copy\(_append\|dir\)\=\|status\)\>" +syn match screenCommands "\<log\(file\|in\|tstamp\)\=\>" +syn match screenCommands "\<map\(default\|notnext\|timeout\)\>" +syn match screenCommands "\<term\(cap\|info\|capinfo\)\=\>" +syn match screenCommands "\<vbell\(_msg\|wait\)\=\>" + +if exists("screen_minlines") + let b:screen_minlines = screen_minlines +else + let b:screen_minlines = 10 +endif +exec "syn sync minlines=" . b:screen_minlines + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_screen_syn_inits") + if version < 508 + let did_screen_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink screenComment Comment + HiLink screenTodo Todo + HiLink screenString String + HiLink screenLiteral String + HiLink screenVariable Identifier + HiLink screenBoolean Boolean + HiLink screenNumbers Number + HiLink screenSpecials Special + HiLink screenCommands Keyword + delcommand HiLink +endif + +let b:current_syntax = "screen" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/sdl.vim b/runtime/syntax/sdl.vim new file mode 100644 index 000000000..d0165e760 --- /dev/null +++ b/runtime/syntax/sdl.vim @@ -0,0 +1,167 @@ +" Vim syntax file +" Language: SDL +" Maintainer: Michael Piefel <piefel@informatik.hu-berlin.de> +" Last Change: 2 May 2001 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("sdl_2000") + syntax case ignore +endif + +" A bunch of useful SDL keywords +syn keyword sdlStatement task else nextstate +syn keyword sdlStatement in out with from interface +syn keyword sdlStatement to via env and use +syn keyword sdlStatement process procedure block system service type +syn keyword sdlStatement endprocess endprocedure endblock endsystem +syn keyword sdlStatement package endpackage connection endconnection +syn keyword sdlStatement channel endchannel connect +syn keyword sdlStatement synonym dcl signal gate timer signallist signalset +syn keyword sdlStatement create output set reset call +syn keyword sdlStatement operators literals +syn keyword sdlStatement active alternative any as atleast constants +syn keyword sdlStatement default endalternative endmacro endoperator +syn keyword sdlStatement endselect endsubstructure external +syn keyword sdlStatement if then fi for import macro macrodefinition +syn keyword sdlStatement macroid mod nameclass nodelay not operator or +syn keyword sdlStatement parent provided referenced rem +syn keyword sdlStatement select spelling substructure xor +syn keyword sdlNewState state endstate +syn keyword sdlInput input start stop return none save priority +syn keyword sdlConditional decision enddecision join +syn keyword sdlVirtual virtual redefined finalized adding inherits +syn keyword sdlExported remote exported export + +if !exists("sdl_no_96") + syn keyword sdlStatement all axioms constant endgenerator endrefinement endservice + syn keyword sdlStatement error fpar generator literal map noequality ordering + syn keyword sdlStatement refinement returns revealed reverse service signalroute + syn keyword sdlStatement view viewed + syn keyword sdlExported imported +endif + +if exists("sdl_2000") + syn keyword sdlStatement abstract aggregation association break choice composition + syn keyword sdlStatement continue endmethod handle method + syn keyword sdlStatement ordered private protected public + syn keyword sdlException exceptionhandler endexceptionhandler onexception + syn keyword sdlException catch new raise + " The same in uppercase + syn keyword sdlStatement TASK ELSE NEXTSTATE + syn keyword sdlStatement IN OUT WITH FROM INTERFACE + syn keyword sdlStatement TO VIA ENV AND USE + syn keyword sdlStatement PROCESS PROCEDURE BLOCK SYSTEM SERVICE TYPE + syn keyword sdlStatement ENDPROCESS ENDPROCEDURE ENDBLOCK ENDSYSTEM + syn keyword sdlStatement PACKAGE ENDPACKAGE CONNECTION ENDCONNECTION + syn keyword sdlStatement CHANNEL ENDCHANNEL CONNECT + syn keyword sdlStatement SYNONYM DCL SIGNAL GATE TIMER SIGNALLIST SIGNALSET + syn keyword sdlStatement CREATE OUTPUT SET RESET CALL + syn keyword sdlStatement OPERATORS LITERALS + syn keyword sdlStatement ACTIVE ALTERNATIVE ANY AS ATLEAST CONSTANTS + syn keyword sdlStatement DEFAULT ENDALTERNATIVE ENDMACRO ENDOPERATOR + syn keyword sdlStatement ENDSELECT ENDSUBSTRUCTURE EXTERNAL + syn keyword sdlStatement IF THEN FI FOR IMPORT MACRO MACRODEFINITION + syn keyword sdlStatement MACROID MOD NAMECLASS NODELAY NOT OPERATOR OR + syn keyword sdlStatement PARENT PROVIDED REFERENCED REM + syn keyword sdlStatement SELECT SPELLING SUBSTRUCTURE XOR + syn keyword sdlNewState STATE ENDSTATE + syn keyword sdlInput INPUT START STOP RETURN NONE SAVE PRIORITY + syn keyword sdlConditional DECISION ENDDECISION JOIN + syn keyword sdlVirtual VIRTUAL REDEFINED FINALIZED ADDING INHERITS + syn keyword sdlExported REMOTE EXPORTED EXPORT + + syn keyword sdlStatement ABSTRACT AGGREGATION ASSOCIATION BREAK CHOICE COMPOSITION + syn keyword sdlStatement CONTINUE ENDMETHOD ENDOBJECT ENDVALUE HANDLE METHOD OBJECT + syn keyword sdlStatement ORDERED PRIVATE PROTECTED PUBLIC + syn keyword sdlException EXCEPTIONHANDLER ENDEXCEPTIONHANDLER ONEXCEPTION + syn keyword sdlException CATCH NEW RAISE +endif + +" String and Character contstants +" Highlight special characters (those which have a backslash) differently +syn match sdlSpecial contained "\\\d\d\d\|\\." +syn region sdlString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial +syn region sdlString start=+'+ skip=+''+ end=+'+ + +" No, this doesn't happen, I just wanted to scare you. SDL really allows all +" these characters for identifiers; fortunately, keywords manage without them. +" set iskeyword=@,48-57,_,192-214,216-246,248-255,- + +syn region sdlComment start="/\*" end="\*/" +syn region sdlComment start="comment" end=";" +syn region sdlComment start="--" end="--\|$" +syn match sdlCommentError "\*/" + +syn keyword sdlOperator present +syn keyword sdlType integer real natural duration pid boolean time +syn keyword sdlType character charstring ia5string +syn keyword sdlType self now sender offspring +syn keyword sdlStructure asntype endasntype syntype endsyntype struct + +if !exists("sdl_no_96") + syn keyword sdlStructure newtype endnewtype +endif + +if exists("sdl_2000") + syn keyword sdlStructure object endobject value endvalue + " The same in uppercase + syn keyword sdlStructure OBJECT ENDOBJECT VALUE ENDVALUE + syn keyword sdlOperator PRESENT + syn keyword sdlType INTEGER NATURAL DURATION PID BOOLEAN TIME + syn keyword sdlType CHARSTRING IA5STRING + syn keyword sdlType SELF NOW SENDER OFFSPRING + syn keyword sdlStructure ASNTYPE ENDASNTYPE SYNTYPE ENDSYNTYPE STRUCT +endif + +" ASN.1 in SDL +syn case match +syn keyword sdlType SET OF BOOLEAN INTEGER REAL BIT OCTET +syn keyword sdlType SEQUENCE CHOICE +syn keyword sdlType STRING OBJECT IDENTIFIER NULL + +syn sync ccomment sdlComment + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_sdl_syn_inits") + if version < 508 + let did_sdl_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + command -nargs=+ Hi hi <args> + else + command -nargs=+ HiLink hi def link <args> + command -nargs=+ Hi hi def <args> + endif + + HiLink sdlException Label + HiLink sdlConditional sdlStatement + HiLink sdlVirtual sdlStatement + HiLink sdlExported sdlFlag + HiLink sdlCommentError sdlError + HiLink sdlOperator Operator + HiLink sdlStructure sdlType + Hi sdlStatement term=bold ctermfg=4 guifg=Blue + Hi sdlFlag term=bold ctermfg=4 guifg=Blue gui=italic + Hi sdlNewState term=italic ctermfg=2 guifg=Magenta gui=underline + Hi sdlInput term=bold guifg=Red + HiLink sdlType Type + HiLink sdlString String + HiLink sdlComment Comment + HiLink sdlSpecial Special + HiLink sdlError Error + + delcommand HiLink + delcommand Hi +endif + +let b:current_syntax = "sdl" + +" vim: ts=8 diff --git a/runtime/syntax/sed.vim b/runtime/syntax/sed.vim new file mode 100644 index 000000000..68e395bb5 --- /dev/null +++ b/runtime/syntax/sed.vim @@ -0,0 +1,122 @@ +" Vim syntax file +" Language: sed +" Maintainer: Haakon Riiser <hakonrk@fys.uio.no> +" URL: http://folk.uio.no/hakonrk/vim/syntax/sed.vim +" Last Change: 2003 May 11 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +syn match sedError "\S" + +syn match sedWhitespace "\s\+" contained +syn match sedSemicolon ";" +syn match sedAddress "[[:digit:]$]" +syn match sedAddress "\d\+\~\d\+" +syn region sedAddress matchgroup=Special start="[{,;]\s*/\(\\/\)\="lc=1 skip="[^\\]\(\\\\\)*\\/" end="/I\=" contains=sedTab,sedRegexpMeta +syn region sedAddress matchgroup=Special start="^\s*/\(\\/\)\=" skip="[^\\]\(\\\\\)*\\/" end="/I\=" contains=sedTab,sedRegexpMeta +syn match sedComment "^\s*#.*$" +syn match sedFunction "[dDgGhHlnNpPqx=]\s*\($\|;\)" contains=sedSemicolon,sedWhitespace +syn match sedLabel ":[^;]*" +syn match sedLineCont "^\(\\\\\)*\\$" contained +syn match sedLineCont "[^\\]\(\\\\\)*\\$"ms=e contained +syn match sedSpecial "[{},!]" +if exists("highlight_sedtabs") + syn match sedTab "\t" contained +endif + +" Append/Change/Insert +syn region sedACI matchgroup=sedFunction start="[aci]\\$" matchgroup=NONE end="^.*$" contains=sedLineCont,sedTab + +syn region sedBranch matchgroup=sedFunction start="[bt]" matchgroup=sedSemicolon end=";\|$" contains=sedWhitespace +syn region sedRW matchgroup=sedFunction start="[rw]" matchgroup=sedSemicolon end=";\|$" contains=sedWhitespace + +" Substitution/transform with various delimiters +syn region sedFlagwrite matchgroup=sedFlag start="w" matchgroup=sedSemicolon end=";\|$" contains=sedWhitespace contained +syn match sedFlag "[[:digit:]gpI]*w\=" contains=sedFlagwrite contained +syn match sedRegexpMeta "[.*^$]" contained +syn match sedRegexpMeta "\\." contains=sedTab contained +syn match sedRegexpMeta "\[.\{-}\]" contains=sedTab contained +syn match sedRegexpMeta "\\{\d\*,\d*\\}" contained +syn match sedRegexpMeta "\\(.\{-}\\)" contains=sedTab contained +syn match sedReplaceMeta "&\|\\\($\|.\)" contains=sedTab contained + +" Metacharacters: $ * . \ ^ [ ~ +" @ is used as delimiter and treated on its own below +let __at = char2nr("@") +let __sed_i = char2nr(" ") +if has("ebcdic") + let __sed_last = 255 +else + let __sed_last = 126 +endif +let __sed_metacharacters = '$*.\^[~' +while __sed_i <= __sed_last + let __sed_delimiter = escape(nr2char(__sed_i), __sed_metacharacters) + if __sed_i != __at + exe 'syn region sedAddress matchgroup=Special start=@\\'.__sed_delimiter.'\(\\'.__sed_delimiter.'\)\=@ skip=@[^\\]\(\\\\\)*\\'.__sed_delimiter.'@ end=@'.__sed_delimiter.'I\=@ contains=sedTab' + exe 'syn region sedRegexp'.__sed_i 'matchgroup=Special start=@'.__sed_delimiter.'\(\\\\\|\\'.__sed_delimiter.'\)*@ skip=@[^\\'.__sed_delimiter.']\(\\\\\)*\\'.__sed_delimiter.'@ end=@'.__sed_delimiter.'@me=e-1 contains=sedTab,sedRegexpMeta keepend contained nextgroup=sedReplacement'.__sed_i + exe 'syn region sedReplacement'.__sed_i 'matchgroup=Special start=@'.__sed_delimiter.'\(\\\\\|\\'.__sed_delimiter.'\)*@ skip=@[^\\'.__sed_delimiter.']\(\\\\\)*\\'.__sed_delimiter.'@ end=@'.__sed_delimiter.'@ contains=sedTab,sedReplaceMeta keepend contained nextgroup=sedFlag' + endif + let __sed_i = __sed_i + 1 +endwhile +syn region sedAddress matchgroup=Special start=+\\@\(\\@\)\=+ skip=+[^\\]\(\\\\\)*\\@+ end=+@I\=+ contains=sedTab,sedRegexpMeta +syn region sedRegexp64 matchgroup=Special start=+@\(\\\\\|\\@\)*+ skip=+[^\\@]\(\\\\\)*\\@+ end=+@+me=e-1 contains=sedTab,sedRegexpMeta keepend contained nextgroup=sedReplacement64 +syn region sedReplacement64 matchgroup=Special start=+@\(\\\\\|\\@\)*+ skip=+[^\\@]\(\\\\\)*\\@+ end=+@+ contains=sedTab,sedReplaceMeta keepend contained nextgroup=sedFlag + +" Since the syntax for the substituion command is very similar to the +" syntax for the transform command, I use the same pattern matching +" for both commands. There is one problem -- the transform command +" (y) does not allow any flags. To save memory, I ignore this problem. +syn match sedST "[sy]" nextgroup=sedRegexp\d\+ + +if version >= 508 || !exists("did_sed_syntax_inits") + if version < 508 + let did_sed_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink sedAddress Macro + HiLink sedACI NONE + HiLink sedBranch Label + HiLink sedComment Comment + HiLink sedDelete Function + HiLink sedError Error + HiLink sedFlag Type + HiLink sedFlagwrite Constant + HiLink sedFunction Function + HiLink sedLabel Label + HiLink sedLineCont Special + HiLink sedPutHoldspc Function + HiLink sedReplaceMeta Special + HiLink sedRegexpMeta Special + HiLink sedRW Constant + HiLink sedSemicolon Special + HiLink sedST Function + HiLink sedSpecial Special + HiLink sedWhitespace NONE + if exists("highlight_sedtabs") + HiLink sedTab Todo + endif + let __sed_i = 32 + while __sed_i <= 126 + exe "HiLink sedRegexp".__sed_i "Macro" + exe "HiLink sedReplacement".__sed_i "NONE" + let __sed_i = __sed_i + 1 + endwhile + + delcommand HiLink +endif + +unlet __sed_i __sed_delimiter __sed_metacharacters + +let b:current_syntax = "sed" + +" vim: sts=4 sw=4 ts=8 diff --git a/runtime/syntax/sendpr.vim b/runtime/syntax/sendpr.vim new file mode 100644 index 000000000..28a26e684 --- /dev/null +++ b/runtime/syntax/sendpr.vim @@ -0,0 +1,32 @@ +" Vim syntax file +" Language: FreeBSD send-pr file +" Maintainer: Hendrik Scholz <hendrik@scholz.net> +" Last Change: 2002 Mar 21 +" +" http://raisdorf.net/files/misc/send-pr.vim + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match sendprComment /^SEND-PR:/ +" email address +syn match sendprType /<[a-zA-Z0-9\-\_\.]*@[a-zA-Z0-9\-\_\.]*>/ +" ^> lines +syn match sendprString /^>[a-zA-Z\-]*:/ +syn region sendprLabel start="\[" end="\]" +syn match sendprString /^To:/ +syn match sendprString /^From:/ +syn match sendprString /^Reply-To:/ +syn match sendprString /^Cc:/ +syn match sendprString /^X-send-pr-version:/ +syn match sendprString /^X-GNATS-Notify:/ + +hi def link sendprComment Comment +hi def link sendprType Type +hi def link sendprString String +hi def link sendprLabel Label diff --git a/runtime/syntax/sgml.vim b/runtime/syntax/sgml.vim new file mode 100644 index 000000000..bcc46c342 --- /dev/null +++ b/runtime/syntax/sgml.vim @@ -0,0 +1,337 @@ +" Vim syntax file +" Language: SGML +" Maintainer: Johannes Zellner <johannes@zellner.org> +" Last Change: Tue, 27 Apr 2004 15:05:21 CEST +" Filenames: *.sgml,*.sgm +" $Id$ + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +let s:sgml_cpo_save = &cpo +set cpo&vim + +syn case match + +" mark illegal characters +syn match sgmlError "[<&]" + + +" unicode numbers: +" provide different highlithing for unicode characters +" inside strings and in plain text (character data). +" +" EXAMPLE: +" +" \u4e88 +" +syn match sgmlUnicodeNumberAttr +\\u\x\{4}+ contained contains=sgmlUnicodeSpecifierAttr +syn match sgmlUnicodeSpecifierAttr +\\u+ contained +syn match sgmlUnicodeNumberData +\\u\x\{4}+ contained contains=sgmlUnicodeSpecifierData +syn match sgmlUnicodeSpecifierData +\\u+ contained + + +" strings inside character data or comments +" +syn region sgmlString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=sgmlEntity,sgmlUnicodeNumberAttr display +syn region sgmlString contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=sgmlEntity,sgmlUnicodeNumberAttr display + +" punctuation (within attributes) e.g. <tag sgml:foo.attribute ...> +" ^ ^ +syn match sgmlAttribPunct +[:.]+ contained display + + +" no highlighting for sgmlEqual (sgmlEqual has no highlighting group) +syn match sgmlEqual +=+ + + +" attribute, everything before the '=' +" +" PROVIDES: @sgmlAttribHook +" +" EXAMPLE: +" +" <tag foo.attribute = "value"> +" ^^^^^^^^^^^^^ +" +syn match sgmlAttrib + \ +[^-'"<]\@<=\<[a-zA-Z0-9.:]\+\>\([^'">]\@=\|$\)+ + \ contained + \ contains=sgmlAttribPunct,@sgmlAttribHook + \ display + + +" UNQUOTED value (not including the '=' -- sgmlEqual) +" +" PROVIDES: @sgmlValueHook +" +" EXAMPLE: +" +" <tag foo.attribute = value> +" ^^^^^ +" +syn match sgmlValue + \ +[^"' =/!?<>][^ =/!?<>]*+ + \ contained + \ contains=sgmlEntity,sgmlUnicodeNumberAttr,@sgmlValueHook + \ display + + +" QUOTED value (not including the '=' -- sgmlEqual) +" +" PROVIDES: @sgmlValueHook +" +" EXAMPLE: +" +" <tag foo.attribute = "value"> +" ^^^^^^^ +" <tag foo.attribute = 'value'> +" ^^^^^^^ +" +syn region sgmlValue contained start=+"+ skip=+\\\\\|\\"+ end=+"+ + \ contains=sgmlEntity,sgmlUnicodeNumberAttr,@sgmlValueHook +syn region sgmlValue contained start=+'+ skip=+\\\\\|\\'+ end=+'+ + \ contains=sgmlEntity,sgmlUnicodeNumberAttr,@sgmlValueHook + + +" value, everything after (and including) the '=' +" no highlighting! +" +" EXAMPLE: +" +" <tag foo.attribute = "value"> +" ^^^^^^^^^ +" <tag foo.attribute = value> +" ^^^^^^^ +" +syn match sgmlEqualValue + \ +=\s*[^ =/!?<>]\++ + \ contained + \ contains=sgmlEqual,sgmlString,sgmlValue + \ display + + +" start tag +" use matchgroup=sgmlTag to skip over the leading '<' +" see also sgmlEmptyTag below. +" +" PROVIDES: @sgmlTagHook +" +syn region sgmlTag + \ matchgroup=sgmlTag start=+<[^ /!?"']\@=+ + \ matchgroup=sgmlTag end=+>+ + \ contained + \ contains=sgmlError,sgmlAttrib,sgmlEqualValue,@sgmlTagHook + + +" tag content for empty tags. This is the same as sgmlTag +" above, except the `matchgroup=sgmlEndTag for highlighting +" the end '/>' differently. +" +" PROVIDES: @sgmlTagHook +" +syn region sgmlEmptyTag + \ matchgroup=sgmlTag start=+<[^ /!?"']\@=+ + \ matchgroup=sgmlEndTag end=+/>+ + \ contained + \ contains=sgmlError,sgmlAttrib,sgmlEqualValue,@sgmlTagHook + + +" end tag +" highlight everything but not the trailing '>' which +" was already highlighted by the containing sgmlRegion. +" +" PROVIDES: @sgmlTagHook +" (should we provide a separate @sgmlEndTagHook ?) +" +syn match sgmlEndTag + \ +</[^ /!?>"']\+>+ + \ contained + \ contains=@sgmlTagHook + + +" [-- SGML SPECIFIC --] + +" SGML specific +" tag content for abbreviated regions +" +" PROVIDES: @sgmlTagHook +" +syn region sgmlAbbrTag + \ matchgroup=sgmlTag start=+<[^ /!?"']\@=+ + \ matchgroup=sgmlTag end=+/+ + \ contained + \ contains=sgmlError,sgmlAttrib,sgmlEqualValue,@sgmlTagHook + + +" SGML specific +" just highlight the trailing '/' +syn match sgmlAbbrEndTag +/+ + + +" SGML specific +" abbreviated regions +" +" No highlighing, highlighing is done by contained elements. +" +" PROVIDES: @sgmlRegionHook +" +" EXAMPLE: +" +" <bold/Im Anfang war das Wort/ +" +syn match sgmlAbbrRegion + \ +<[^/!?>"']\+/\_[^/]\+/+ + \ contains=sgmlAbbrTag,sgmlAbbrEndTag,sgmlCdata,sgmlComment,sgmlEntity,sgmlUnicodeNumberData,@sgmlRegionHook + +" [-- END OF SGML SPECIFIC --] + + +" real (non-empty) elements. We cannot do syntax folding +" as in xml, because end tags may be optional in sgml depending +" on the dtd. +" No highlighing, highlighing is done by contained elements. +" +" PROVIDES: @sgmlRegionHook +" +" EXAMPLE: +" +" <tag id="whoops"> +" <!-- comment --> +" <another.tag></another.tag> +" <another.tag/> +" some data +" </tag> +" +" SGML specific: +" compared to xmlRegion: +" - removed folding +" - added a single '/'in the start pattern +" +syn region sgmlRegion + \ start=+<\z([^ /!?>"']\+\)\(\(\_[^/>]*[^/!?]>\)\|>\)+ + \ end=+</\z1>+ + \ contains=sgmlTag,sgmlEndTag,sgmlCdata,@sgmlRegionCluster,sgmlComment,sgmlEntity,sgmlUnicodeNumberData,@sgmlRegionHook + \ keepend + \ extend + + +" empty tags. Just a container, no highlighting. +" Compare this with sgmlTag. +" +" EXAMPLE: +" +" <tag id="lola"/> +" +" TODO use sgmlEmptyTag intead of sgmlTag +syn match sgmlEmptyRegion + \ +<[^ /!?>"']\(\_[^"'<>]\|"\_[^"]*"\|'\_[^']*'\)*/>+ + \ contains=sgmlEmptyTag + + +" cluster which contains the above two elements +syn cluster sgmlRegionCluster contains=sgmlRegion,sgmlEmptyRegion,sgmlAbbrRegion + + +" &entities; compare with dtd +syn match sgmlEntity "&[^; \t]*;" contains=sgmlEntityPunct +syn match sgmlEntityPunct contained "[&.;]" + + +" The real comments (this implements the comments as defined by sgml, +" but not all sgml pages actually conform to it. Errors are flagged. +syn region sgmlComment start=+<!+ end=+>+ contains=sgmlCommentPart,sgmlString,sgmlCommentError,sgmlTodo +syn keyword sgmlTodo contained TODO FIXME XXX display +syn match sgmlCommentError contained "[^><!]" +syn region sgmlCommentPart contained start=+--+ end=+--+ + + +" CData sections +" +" PROVIDES: @sgmlCdataHook +" +syn region sgmlCdata + \ start=+<!\[CDATA\[+ + \ end=+]]>+ + \ contains=sgmlCdataStart,sgmlCdataEnd,@sgmlCdataHook + \ keepend + \ extend +" using the following line instead leads to corrupt folding at CDATA regions +" syn match sgmlCdata +<!\[CDATA\[\_.\{-}]]>+ contains=sgmlCdataStart,sgmlCdataEnd,@sgmlCdataHook +syn match sgmlCdataStart +<!\[CDATA\[+ contained contains=sgmlCdataCdata +syn keyword sgmlCdataCdata CDATA contained +syn match sgmlCdataEnd +]]>+ contained + + +" Processing instructions +" This allows "?>" inside strings -- good idea? +syn region sgmlProcessing matchgroup=sgmlProcessingDelim start="<?" end="?>" contains=sgmlAttrib,sgmlEqualValue + + +" DTD -- we use dtd.vim here +syn region sgmlDocType matchgroup=sgmlDocTypeDecl start="\c<!DOCTYPE"he=s+2,rs=s+2 end=">" contains=sgmlDocTypeKeyword,sgmlInlineDTD,sgmlString +syn keyword sgmlDocTypeKeyword contained DOCTYPE PUBLIC SYSTEM +syn region sgmlInlineDTD contained start="\[" end="]" contains=@sgmlDTD +syn include @sgmlDTD <sfile>:p:h/dtd.vim + + +" synchronizing +" TODO !!! to be improved !!! + +syn sync match sgmlSyncDT grouphere sgmlDocType +\_.\(<!DOCTYPE\)\@=+ +" syn sync match sgmlSyncDT groupthere NONE +]>+ + +syn sync match sgmlSync grouphere sgmlRegion +\_.\(<[^ /!?>"']\+\)\@=+ +" syn sync match sgmlSync grouphere sgmlRegion "<[^ /!?>"']*>" +syn sync match sgmlSync groupthere sgmlRegion +</[^ /!?>"']\+>+ + +syn sync minlines=100 + + +" The default highlighting. +hi def link sgmlTodo Todo +hi def link sgmlTag Function +hi def link sgmlEndTag Identifier +" SGML specifig +hi def link sgmlAbbrEndTag Identifier +hi def link sgmlEmptyTag Function +hi def link sgmlEntity Statement +hi def link sgmlEntityPunct Type + +hi def link sgmlAttribPunct Comment +hi def link sgmlAttrib Type + +hi def link sgmlValue String +hi def link sgmlString String +hi def link sgmlComment Comment +hi def link sgmlCommentPart Comment +hi def link sgmlCommentError Error +hi def link sgmlError Error + +hi def link sgmlProcessingDelim Comment +hi def link sgmlProcessing Type + +hi def link sgmlCdata String +hi def link sgmlCdataCdata Statement +hi def link sgmlCdataStart Type +hi def link sgmlCdataEnd Type + +hi def link sgmlDocTypeDecl Function +hi def link sgmlDocTypeKeyword Statement +hi def link sgmlInlineDTD Function +hi def link sgmlUnicodeNumberAttr Number +hi def link sgmlUnicodeSpecifierAttr SpecialChar +hi def link sgmlUnicodeNumberData Number +hi def link sgmlUnicodeSpecifierData SpecialChar + +let b:current_syntax = "sgml" + +let &cpo = s:sgml_cpo_save +unlet s:sgml_cpo_save + +" vim: ts=8 diff --git a/runtime/syntax/sgmldecl.vim b/runtime/syntax/sgmldecl.vim new file mode 100644 index 000000000..6a69fc5d2 --- /dev/null +++ b/runtime/syntax/sgmldecl.vim @@ -0,0 +1,79 @@ +" Vim syntax file +" Language: SGML (SGML Declaration <!SGML ...>) +" Last Change: jueves, 28 de diciembre de 2000, 13:51:44 CLST +" Maintainer: "Daniel A. Molina W." <sickd@linux-chile.org> +" You can modify and maintain this file, in other case send comments +" the maintainer email address. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +syn region sgmldeclDeclBlock transparent start=+<!SGML+ end=+>+ +syn region sgmldeclTagBlock transparent start=+<+ end=+>+ + \ contains=ALLBUT, + \ @sgmlTagError,@sgmlErrInTag +syn region sgmldeclComment contained start=+--+ end=+--+ + +syn keyword sgmldeclDeclKeys SGML CHARSET CAPACITY SCOPE SYNTAX + \ FEATURES + +syn keyword sgmldeclTypes BASESET DESCSET DOCUMENT NAMING DELIM + \ NAMES QUANTITY SHUNCHAR DOCTYPE + \ ELEMENT ENTITY ATTLIST NOTATION + \ TYPE + +syn keyword sgmldeclStatem CONTROLS FUNCTION NAMECASE MINIMIZE + \ LINK OTHER APPINFO REF ENTITIES + +syn keyword sgmldeclVariables TOTALCAP GRPCAP ENTCAP DATATAG OMITTAG RANK + \ SIMPLE IMPLICIT EXPLICIT CONCUR SUBDOC FORMAL ATTCAP + \ ATTCHCAP AVGRPCAP ELEMCAP ENTCHCAP IDCAP IDREFCAP + \ SHORTTAG + +syn match sgmldeclNConst contained +[0-9]\++ + +syn region sgmldeclString contained start=+"+ end=+"+ + +syn keyword sgmldeclBool YES NO + +syn keyword sgmldeclSpecial SHORTREF SGMLREF UNUSED NONE GENERAL + \ SEEALSO ANY + +syn sync lines=250 + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_sgmldecl_syntax_init") + if version < 508 + let did_sgmldecl_syntax_init = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink sgmldeclDeclKeys Keyword + HiLink sgmldeclTypes Type + HiLink sgmldeclConst Constant + HiLink sgmldeclNConst Constant + HiLink sgmldeclString String + HiLink sgmldeclDeclBlock Normal + HiLink sgmldeclBool Boolean + HiLink sgmldeclSpecial Special + HiLink sgmldeclComment Comment + HiLink sgmldeclStatem Statement + HiLink sgmldeclVariables Type + + delcommand HiLink +endif + +let b:current_syntax = "sgmldecl" +" vim:set tw=78 ts=4: diff --git a/runtime/syntax/sgmllnx.vim b/runtime/syntax/sgmllnx.vim new file mode 100644 index 000000000..419e904ee --- /dev/null +++ b/runtime/syntax/sgmllnx.vim @@ -0,0 +1,68 @@ +" Vim syntax file +" Language: SGML-linuxdoc (supported by old sgmltools-1.x) +" (for more information, visit www.sgmltools.org) +" Maintainer: Nam SungHyun <namsh@kldp.org> +" Last Change: 2001 Apr 26 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" tags +syn region sgmllnxEndTag start=+</+ end=+>+ contains=sgmllnxTagN,sgmllnxTagError +syn region sgmllnxTag start=+<[^/]+ end=+>+ contains=sgmllnxTagN,sgmllnxTagError +syn match sgmllnxTagN contained +<\s*[-a-zA-Z0-9]\++ms=s+1 contains=sgmllnxTagName +syn match sgmllnxTagN contained +</\s*[-a-zA-Z0-9]\++ms=s+2 contains=sgmllnxTagName + +syn region sgmllnxTag2 start=+<\s*[a-zA-Z]\+/+ keepend end=+/+ contains=sgmllnxTagN2 +syn match sgmllnxTagN2 contained +/.*/+ms=s+1,me=e-1 + +syn region sgmllnxSpecial oneline start="&" end=";" + +" tag names +syn keyword sgmllnxTagName contained article author date toc title sect verb +syn keyword sgmllnxTagName contained abstract tscreen p itemize item enum +syn keyword sgmllnxTagName contained descrip quote htmlurl code ref +syn keyword sgmllnxTagName contained tt tag bf +syn match sgmllnxTagName contained "sect\d\+" + +" Comments +syn region sgmllnxComment start=+<!--+ end=+-->+ +syn region sgmllnxDocType start=+<!doctype+ end=+>+ + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_sgmllnx_syn_inits") + if version < 508 + let did_sgmllnx_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink sgmllnxTag2 Function + HiLink sgmllnxTagN2 Function + HiLink sgmllnxTag Special + HiLink sgmllnxEndTag Special + HiLink sgmllnxParen Special + HiLink sgmllnxEntity Type + HiLink sgmllnxDocEnt Type + HiLink sgmllnxTagName Statement + HiLink sgmllnxComment Comment + HiLink sgmllnxSpecial Special + HiLink sgmllnxDocType PreProc + HiLink sgmllnxTagError Error + + delcommand HiLink +endif + +let b:current_syntax = "sgmllnx" + +" vim:set tw=78 ts=8 sts=2 sw=2 noet: diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim new file mode 100644 index 000000000..c8f6ee0ac --- /dev/null +++ b/runtime/syntax/sh.vim @@ -0,0 +1,538 @@ +" Vim syntax file +" Language: shell (sh) Korn shell (ksh) bash (sh) +" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> +" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int> +" Last Change: Apr 28, 2004 +" Version: 68 +" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax +" +" Using the following VIM variables: +" b:is_kornshell if defined, enhance with kornshell syntax +" b:is_bash if defined, enhance with bash syntax +" is_kornshell if neither b:is_kornshell or b:is_bash is +" defined, then if is_kornshell is set +" b:is_kornshell is default +" is_bash if none of the previous three variables are +" defined, then if is_bash is set b:is_bash is default +" g:sh_fold_enabled if non-zero, syntax folding is enabled +" sh_minlines sets up syn sync minlines (default: 200) +" sh_maxlines sets up syn sync maxlines (default: twice sh_minlines) +" +" This file includes many ideas from Éric Brunet (eric.brunet@ens.fr) + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" b:is_sh is set when "#! /bin/sh" is found; +" However, it often is just a masquerade by bash (typically Linux) +" or kornshell (typically workstations with Posix "sh"). +" So, when the user sets "is_bash" or "is_kornshell", +" a b:is_sh is converted into b:is_bash/b:is_kornshell, +" respectively. +if !exists("b:is_kornshell") && !exists("b:is_bash") + if exists("is_kornshell") + let b:is_kornshell= 1 + if exists("b:is_sh") + unlet b:is_sh + endif + elseif exists("is_bash") + let b:is_bash= 1 + if exists("b:is_sh") + unlet b:is_sh + endif + else + let b:is_sh= 1 + endif +endif + +if !exists("g:sh_fold_enabled") + let g:sh_fold_enabled= 0 +endif + +" sh syntax is case sensitive +syn case match + +" Clusters: contains=@... clusters +"================================== +syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseSingleQuote,shCaseDoubleQuote,shSpecial +syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,bkshFunction,shSpecial +syn cluster shColonList contains=@shCaseList +syn cluster shCommandSubList contains=shArithmetic,shDeref,shDerefSimple,shNumber,shOperator,shPosnParm,shSpecial,shSingleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias +syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shSpecial,shPosnParm +syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError +syn cluster shDerefVarList contains=shDerefOp,shDerefVarArray,shDerefOpError +syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shExpr,shSingleQuote,shDoubleQuote,shSpecial +syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shSingleQuote,shDoubleQuote,shSpecial,shExpr,shDblBrace,shDeref,shDerefSimple +syn cluster shExprList2 contains=@shExprList1,@shCaseList +syn cluster shFunctionList contains=@shCaseList,shOperator +syn cluster shHereBeginList contains=@shCommandSubList +syn cluster shHereList contains=shBeginHere,shHerePayload +syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload +syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shIdWhiteSpace,shDeref,shDerefSimple,shSpecial,shRedir,shSingleQuote,shDoubleQuote,shExpr +syn cluster shLoopList contains=@shCaseList,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac +syn cluster shSubShList contains=@shCaseList +syn cluster shTestList contains=shCharClass,shComment,shCommandSub,shDeref,shDerefSimple,shDoubleQuote,shExpr,shExpr,shNumber,shOperator,shSingleQuote,shSpecial,shTestOpr + + +" Echo: +" ==== +" This one is needed INSIDE a CommandSub, so that `echo bla` be correct +syn region shEcho matchgroup=shStatement start="\<echo\>" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList +syn region shEcho matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|()]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=@shEchoList + +" This must be after the strings, so that bla \" be correct +syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shOperator end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="#"me=e-1 contains=shNumber,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shSpecial,shOperator,shDoubleQuote,shCharClass + +" Alias: +" ===== +if exists("b:is_kornshell") || exists("b:is_bash") + syn match shStatement "\<alias\>" + syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\w\+\)\@=" skip="\\$" end="\>\|`" + syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\w\+=\)\@=" skip="\\$" end="=" +endif + +" Error Codes +" =========== +syn match shDoError "\<done\>" +syn match shIfError "\<fi\>" +syn match shInError "\<in\>" +syn match shCaseError ";;" +syn match shEsacError "\<esac\>" +syn match shCurlyError "}" +syn match shParenError ")" +if exists("b:is_kornshell") + syn match shDTestError "]]" +endif +syn match shTestError "]" + +" Options interceptor +" =================== +syn match shOption "\s[\-+][a-zA-Z0-9]\+\>"ms=s+1 +syn match shOption "\s--\S\+"ms=s+1 + +" Operators: +" ========= +syn match shOperator "[!&;|]" +syn match shOperator "\[[[^:]\|\]]" +syn match shOperator "!\==" skipwhite nextgroup=shPattern +syn match shPattern "\<\S\+\())\)\@=" contained contains=shSingleQuote,shDoubleQuote,shDeref + +" Subshells: +" ========= +syn region shExpr transparent matchgroup=shExprRegion start="{" end="}" contains=@shExprList2 +syn region shSubSh transparent matchgroup=shSubShRegion start="(" end=")" contains=@shSubShList + +" Tests +"====== +"syn region shExpr transparent matchgroup=shRange start="\[" skip=+\\\\\|\\$+ end="\]" contains=@shTestList +syn region shExpr matchgroup=shRange start="\[" skip=+\\\\\|\\$+ end="\]" contains=@shTestList +syn region shExpr transparent matchgroup=shStatement start="\<test\>" skip=+\\\\\|\\$+ matchgroup=NONE end="[;&|]"me=e-1 end="$" contains=@shExprList1 +syn match shTestOpr contained "<=\|>=\|!=\|==\|-.\>\|-\(nt\|ot\|ef\|eq\|ne\|lt\|le\|gt\|ge\)\>\|[!=<>]" +if exists("b:is_kornshell") || exists("b:is_bash") + syn region shDblBrace matchgroup=Delimiter start="\[\[" skip=+\\\\\|\\$+ end="\]\]" contains=@shTestList + syn region shDblParen matchgroup=Delimiter start="((" skip=+\\\\\|\\$+ end="))" contains=@shTestList +endif + +" Character Class in Range +" ======================== +syn match shCharClass contained "\[:\(backspace\|escape\|return\|xdigit\|alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|tab\):\]" + +" Loops: do, if, while, until +" ===== +syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList +syn region shIf transparent matchgroup=shConditional start="\<if\>" matchgroup=shConditional end="\<;\_s*then\>" end="\<fi\>" contains=@shLoopList,shDblBrace,shDblParen +syn region shFor matchgroup=shLoop start="\<for\>" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen +if exists("b:is_kornshell") || exists("b:is_bash") + syn cluster shCaseList add=shRepeat + syn region shRepeat matchgroup=shLoop start="\<while\>" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace + syn region shRepeat matchgroup=shLoop start="\<until\>" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace + syn region shCaseEsac matchgroup=shConditional start="\<select\>" matchgroup=shConditional end="\<in\>" end="\<do\>" contains=@shLoopList +else + syn region shRepeat matchgroup=shLoop start="\<while\>" end="\<do\>"me=e-2 contains=@shLoopList + syn region shRepeat matchgroup=shLoop start="\<until\>" end="\<do\>"me=e-2 contains=@shLoopList +endif + +" Case: case...esac +" ==== +syn match shCaseBar contained skipwhite "[^|"`'()]\{-}|"hs=e nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseSingleQuote,shCaseDoubleQuote +syn match shCaseStart contained skipwhite skipnl "(" nextgroup=shCase,shCaseBar +syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="[^$()]\{-})"ms=s,hs=e end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,,shComment +syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList +syn keyword shCaseIn contained skipwhite skipnl in nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseSingleQuote,shCaseDoubleQuote +syn region shCaseSingleQuote matchgroup=shOperator start=+'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained +syn region shCaseDoubleQuote matchgroup=shOperator start=+"+ skip=+\\\\\|\\.+ end=+"+ contains=@shDblQuoteList,shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained +syn region shCaseCommandSub start=+`+ skip=+\\\\\|\\.+ end=+`+ contains=@shCommandSubList skipwhite skipnl nextgroup=shCaseBar contained + +" Misc +"===== +syn match shWrapLineOperator "\\$" +syn region shCommandSub start="`" skip="\\\\\|\\." end="`" contains=@shCommandSubList + +" $(..) is not supported by sh (Bourne shell). However, apparently +" some systems (HP?) have as their /bin/sh a (link to) Korn shell +" (ie. Posix compliant shell). /bin/ksh should work for those +" systems too, however, so the following syntax will flag $(..) as +" an Error under /bin/sh. By consensus of vimdev'ers! +if exists("b:is_kornshell") || exists("b:is_bash") + syn region shCommandSub matchgroup=shCmdSubRegion start="\$(" skip='\\\\\|\\.' end=")" contains=@shCommandSubList + syn region shArithmetic matchgroup=shArithRegion start="\$((" skip='\\\\\|\\.' end="))" contains=@shCommandSubList + syn match shSkipInitWS contained "^\s\+" +else + syn region shCommandSub matchgroup=Error start="$(" end=")" contains=@shCommandSubList +endif + +if exists("b:is_bash") + syn cluster shCommandSubList add=bashSpecialVariables,bashStatement + syn cluster shCaseList add=bashAdminStatement,bashStatement + syn keyword bashSpecialVariables contained BASH BASH_ENV BASH_VERSINFO BASH_VERSION CDPATH DIRSTACK EUID FCEDIT FIGNORE GLOBIGNORE GROUPS HISTCMD HISTCONTROL HISTFILE HISTFILESIZE HISTIGNORE HISTSIZE HOME HOSTFILE HOSTNAME HOSTTYPE IFS IGNOREEOF INPUTRC LANG LC_ALL LC_COLLATE LC_MESSAGES LINENO MACHTYPE MAIL MAILCHECK MAILPATH OLDPWD OPTARG OPTERR OPTIND OSTYPE PATH PIPESTATUS PPID PROMPT_COMMAND PS1 PS2 PS3 PS4 PWD RANDOM REPLY SECONDS SHELLOPTS SHLVL TIMEFORMAT TIMEOUT UID auto_resume histchars + syn keyword bashStatement chmod clear complete du egrep expr fgrep find gnufind gnugrep grep install less ls mkdir mv rm rmdir rpm sed sleep sort strip tail touch + syn keyword bashAdminStatement daemon killall killproc nice reload restart start status stop +endif + +if exists("b:is_kornshell") + syn cluster shCommandSubList add=kshSpecialVariables,kshStatement + syn cluster shCaseList add=kshStatement + syn keyword kshSpecialVariables contained CDPATH COLUMNS EDITOR ENV ERRNO FCEDIT FPATH HISTFILE HISTSIZE HOME IFS LINENO LINES MAIL MAILCHECK MAILPATH OLDPWD OPTARG OPTIND PATH PPID PS1 PS2 PS3 PS4 PWD RANDOM REPLY SECONDS SHELL TMOUT VISUAL + syn keyword kshStatement cat chmod clear cp du egrep expr fgrep find grep install killall less ls mkdir mv nice printenv rm rmdir sed sort strip stty tail touch tput +endif + +syn match shSource "^\.\s" +syn match shSource "\s\.\s" +syn region shColon start="^\s*:" end="$\|" end="#"me=e-1 contains=@shColonList + +" String and Character constants +"=============================== +syn match shNumber "-\=\<\d\+\>" +syn match shSpecial "\\\d\d\d\|\\[abcfnrtv0]" contained +syn region shSingleQuote matchgroup=shOperator start=+'+ end=+'+ contains=shStringSpecial +syn region shDoubleQuote matchgroup=shOperator start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial +syn match shStringSpecial "[^[:print:]]" contained +syn match shSpecial "\\[\\\"\'`$()#]" + +" Comments +"========= +syn cluster shCommentGroup contains=shTodo,@Spell +syn keyword shTodo contained TODO +syn match shComment "#.*$" contains=@shCommentGroup + +" File redirection highlighted as operators +"========================================== +syn match shRedir "\d\=>\(&[-0-9]\)\=" +syn match shRedir "\d\=>>-\=" +syn match shRedir "\d\=<\(&[-0-9]\)\=" +syn match shRedir "\d<<-\=" + +" Shell Input Redirection (Here Documents) +if version < 600 + syn region shHereDoc matchgroup=shRedir start="<<\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shRedir end="^END[a-zA-Z_0-9]*$" contains=@shDblQuoteList + syn region shHereDoc matchgroup=shRedir start="<<-\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shRedir end="^\s*END[a-zA-Z_0-9]*$" contains=@shDblQuoteList + syn region shHereDoc matchgroup=shRedir start="<<\s*\**EOF\**" matchgroup=shRedir end="^EOF$" contains=@shDblQuoteList + syn region shHereDoc matchgroup=shRedir start="<<-\s*\**EOF\**" matchgroup=shRedir end="^\s*EOF$" contains=@shDblQuoteList + syn region shHereDoc matchgroup=shRedir start="<<\s*\**\.\**" matchgroup=shRedir end="^\.$" contains=@shDblQuoteList + syn region shHereDoc matchgroup=shRedir start="<<-\s*\**\.\**" matchgroup=shRedir end="^\s*\.$" contains=@shDblQuoteList + +elseif g:sh_fold_enabled + + if v:version > 602 || (v:version == 602 && has("patch219")) + syn region shHereDoc fold start="\(<<\s*\\\=\z(\S*\)\)\@=" matchgroup=shRedir end="^\z1$" contains=@shHereListDQ keepend + syn region shHereDoc fold start="\(<<\s*\"\z(\S*\)\"\)\@=" matchgroup=shRedir end="^\z1$"" contains=@shHereList keepend + syn region shHereDoc fold start="\(<<\s*'\z(\S*\)'\)\@=" matchgroup=shRedir end="^\z1$"" contains=@shHereList keepend + syn region shHereDoc fold start="\(<<\s*\\\_$\_s*\z(\S*\)\)\@=" matchgroup=shRedir end="^\z1$"" contains=@shHereList keepend + syn region shHereDoc fold start="\(<<\s*\\\_$\_s*\"\z(\S*\)\"\)\@=" matchgroup=shRedir end="^\z1$"" contains=@shHereList keepend + syn region shHereDoc fold start="\(<<\s*\\\_$\_s*'\z(\S*\)'\)\@=" matchgroup=shRedir end="^\z1$" contains=@shHereList keepend + syn region shHereDoc fold start="\(<<-\s*\z(\S*\)\)\@=" matchgroup=shRedir end="^\s*\z1$" contains=@shHereList keepend + syn region shHereDoc fold start="\(<<-\s*\"\z(\S*\)\"\)\@=" matchgroup=shRedir end="^\s*\z1$"" contains=@shHereListDQ keepend + syn region shHereDoc fold start="\(<<-\s*'\z(\S*\)'\)\@=" matchgroup=shRedir end="^\s*\z1$"" contains=@shHereList keepend + syn region shHereDoc fold start="\(<<-\s*\\\_$\_s*'\z(\S*\)'\)\@=" matchgroup=shRedir end="^\s*\z1$" contains=@shHereList keepend + syn region shHereDoc fold start="\(<<-\s*\\\_$\_s*\z(\S*\)\)\@=" matchgroup=shRedir end="^\s*\z1$" contains=@shHereList keepend + syn region shHereDoc fold start="\(<<-\s*\\\_$\_s*\"\z(\S*\)\"\)\@=" matchgroup=shRedir end="^\s*\z1$" contains=@shHereList keepend + else + syn region shHereDoc matchgroup=shRedir fold start="<<\s*\z(\S*\)" matchgroup=shRedir end="^\z1$" contains=@shDblQuoteList + syn region shHereDoc matchgroup=shRedir fold start="<<\s*\"\z(\S*\)\"" matchgroup=shRedir end="^\z1$" + syn region shHereDoc matchgroup=shRedir fold start="<<\s*'\z(\S*\)'" matchgroup=shRedir end="^\z1$" + syn region shHereDoc matchgroup=shRedir fold start="<<-\s*\z(\S*\)" matchgroup=shRedir end="^\s*\z1$" contains=@shDblQuoteList + syn region shHereDoc matchgroup=shRedir fold start="<<-\s*\"\z(\S*\)\"" matchgroup=shRedir end="^\s*\z1$" + syn region shHereDoc matchgroup=shRedir fold start="<<-\s*'\z(\S*\)'" matchgroup=shRedir end="^\s*\z1$" + syn region shHereDoc matchgroup=shRedir fold start="<<\s*\\\_$\_s*\z(\S*\)" matchgroup=shRedir end="^\z1$" + syn region shHereDoc matchgroup=shRedir fold start="<<\s*\\\_$\_s*\"\z(\S*\)\"" matchgroup=shRedir end="^\z1$" + syn region shHereDoc matchgroup=shRedir fold start="<<-\s*\\\_$\_s*'\z(\S*\)'" matchgroup=shRedir end="^\s*\z1$" + syn region shHereDoc matchgroup=shRedir fold start="<<-\s*\\\_$\_s*\z(\S*\)" matchgroup=shRedir end="^\s*\z1$" + syn region shHereDoc matchgroup=shRedir fold start="<<-\s*\\\_$\_s*\"\z(\S*\)\"" matchgroup=shRedir end="^\s*\z1$" + syn region shHereDoc matchgroup=shRedir fold start="<<\s*\\\_$\_s*'\z(\S*\)'" matchgroup=shRedir end="^\z1$" + endif +else + if v:version > 602 || (v:version == 602 && has("patch219")) + syn region shHereDoc start="\(<<\s*\\\=\z(\S*\)\)\@=" matchgroup=shRedir end="^\z1$" contains=@shHereList keepend + syn region shHereDoc start="\(<<\s*\"\z(\S*\)\"\)\@=" matchgroup=shRedir end="^\z1$"" contains=@shHereListDQ keepend + syn region shHereDoc start="\(<<\s*'\z(\S*\)'\)\@=" matchgroup=shRedir end="^\z1$"" contains=@shHereList keepend + syn region shHereDoc start="\(<<\s*\\\_$\_s*\z(\S*\)\)\@=" matchgroup=shRedir end="^\z1$"" contains=@shHereList keepend + syn region shHereDoc start="\(<<\s*\\\_$\_s*\"\z(\S*\)\"\)\@=" matchgroup=shRedir end="^\z1$"" contains=@shHereList keepend + syn region shHereDoc start="\(<<\s*\\\_$\_s*'\z(\S*\)'\)\@=" matchgroup=shRedir end="^\z1$" contains=@shHereList keepend + syn region shHereDoc start="\(<<-\s*\z(\S*\)\)\@=" matchgroup=shRedir end="^\s*\z1$" contains=@shHereList keepend + syn region shHereDoc start="\(<<-\s*\"\z(\S*\)\"\)\@=" matchgroup=shRedir end="^\s*\z1$"" contains=@shHereListDQ keepend + syn region shHereDoc start="\(<<-\s*'\z(\S*\)'\)\@=" matchgroup=shRedir end="^\s*\z1$"" contains=@shHereList keepend + syn region shHereDoc start="\(<<-\s*\\\_$\_s*'\z(\S*\)'\)\@=" matchgroup=shRedir end="^\s*\z1$" contains=@shHereList keepend + syn region shHereDoc start="\(<<-\s*\\\_$\_s*\z(\S*\)\)\@=" matchgroup=shRedir end="^\s*\z1$" contains=@shHereList keepend + syn region shHereDoc start="\(<<-\s*\\\_$\_s*\"\z(\S*\)\"\)\@=" matchgroup=shRedir end="^\s*\z1$" contains=@shHereList keepend + else + syn region shHereDoc matchgroup=shRedir start="<<\s*\\\=\z(\S*\)" matchgroup=shRedir end="^\z1$" contains=@shDblQuoteList + syn region shHereDoc matchgroup=shRedir start="<<\s*\"\z(\S*\)\"" matchgroup=shRedir end="^\z1$" + syn region shHereDoc matchgroup=shRedir start="<<-\s*\z(\S*\)" matchgroup=shRedir end="^\s*\z1$" contains=@shDblQuoteList + syn region shHereDoc matchgroup=shRedir start="<<-\s*'\z(\S*\)'" matchgroup=shRedir end="^\s*\z1$" + syn region shHereDoc matchgroup=shRedir start="<<\s*'\z(\S*\)'" matchgroup=shRedir end="^\z1$" + syn region shHereDoc matchgroup=shRedir start="<<-\s*\"\z(\S*\)\"" matchgroup=shRedir end="^\s*\z1$" + syn region shHereDoc matchgroup=shRedir start="<<\s*\\\_$\_s*\z(\S*\)" matchgroup=shRedir end="^\z1$" + syn region shHereDoc matchgroup=shRedir start="<<-\s*\\\_$\_s*\z(\S*\)" matchgroup=shRedir end="^\s*\z1$" + syn region shHereDoc matchgroup=shRedir start="<<-\s*\\\_$\_s*'\z(\S*\)'" matchgroup=shRedir end="^\s*\z1$" + syn region shHereDoc matchgroup=shRedir start="<<\s*\\\_$\_s*'\z(\S*\)'" matchgroup=shRedir end="^\z1$" + syn region shHereDoc matchgroup=shRedir start="<<\s*\\\_$\_s*\"\z(\S*\)\"" matchgroup=shRedir end="^\z1$" + syn region shHereDoc matchgroup=shRedir start="<<-\s*\\\_$\_s*\"\z(\S*\)\"" matchgroup=shRedir end="^\s*\z1$" + endif + if v:version > 602 || (v:version == 602 && has("patch219")) + syn match shHerePayload "^.*$" contained skipnl nextgroup=shHerePayload contains=@shDblQuoteList + syn match shBeginLine ".*$" contained skipnl nextgroup=shHerePayload contains=@shCommandSubList + syn match shBeginHere "<<-\=\s*\S\+" contained nextgroup=shBeginLine + endif + if exists("b:is_bash") + syn match shRedir "<<<" + endif +endif + +" Identifiers +"============ +syn match shVariable "\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze=" nextgroup=shSetIdentifier +syn match shIdWhiteSpace contained "\s" +syn match shSetIdentifier contained "=" nextgroup=shPattern,shDeref,shDerefSimple,shDoubleQuote,shSingleQuote +if exists("b:is_bash") + syn region shSetList matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>[^/]"me=e-1 end="$" matchgroup=shOperator end="[;&]"me=e-1 matchgroup=NONE end="#\|="me=e-1 contains=@shIdList + syn region shSetList matchgroup=shSet start="\<set\>[^/]"me=e-1 end="$" end="[|)]"me=e-1 matchgroup=shOperator end="[;&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList + syn match shSet "\<\(declare\|typeset\|local\|export\|set\|unset\)$" +elseif exists("b:is_kornshell") + syn region shSetList matchgroup=shSet start="\<\(typeset\|export\|unset\)\>[^/]"me=e-1 end="$" matchgroup=shOperator end="[;&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList + syn region shSetList matchgroup=shSet start="\<set\>[^/]"me=e-1 end="$" matchgroup=shOperator end="[;&]"me=e-1 matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList + syn match shSet "\<\(typeset\|set\|export\|unset\)$" +else + syn region shSetList matchgroup=shSet start="\<\(set\|export\|unset\)\>[^/]"me=e-1 end="$" end="[)|]"me=e-1 matchgroup=shOperator end="[;&]" matchgroup=NONE end="[#=]"me=e-1 contains=@shIdList + syn match shStatement "\<\(set\|export\|unset\)$" +endif + +" handles functions which start: Function () { +" Apparently Bourne shell accepts functions too, +" even though it isn't documented by my man pages +" for it. +syn cluster shCommandSubList add=bkshFunction +if g:sh_fold_enabled + syn region bkshFunctionBody transparent fold matchgroup=Delimiter start="^\s*\<\h\w*\>\s*()\s*{" end="}" contains=bkshFunction,bkshFunctionDelim,@shFunctionList +else + syn region bkshFunctionBody transparent matchgroup=Delimiter start="^\s*\<\h\w*\>\s*()\s*{" end="}" contains=bkshFunction,bkshFunctionDelim,@shFunctionList +endif +syn match bkshFunction "^\s*\<\h\w*\>\s*()" skipwhite skipnl contains=bkshFunctionParen +syn match bkshFunctionParen "[()]" contained +syn match bkshFunctionDelim "[{}]" contained + +" Parameter Dereferencing +" ======================= +syn match shDerefSimple "\$\w\+" +syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray +syn match shDerefWordError "[^}$[]" contained +syn match shDerefSimple "\$[-#*@!?]" +syn match shDerefSimple "\$\$" +if exists("b:is_bash") || exists("b:is_kornshell") + syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList +endif + +" bash : ${!prefix*} +" bash : ${#parameter} +if exists("b:is_bash") + syn region shDeref matchgroup=PreProc start="\${!" end="\*\=}" contains=@shDerefList,shDerefOp + syn match shDerefVar contained "{\@<=!\w\+" nextgroup=@shDerefVarList +endif + +syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefOpError +syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp +syn match shDerefVar contained "{\@<=\w\+" nextgroup=@shDerefVarList + +" sh ksh bash : ${var[... ]...} array reference +syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError + +" sh ksh bash : ${parameter:-word} word is default value +" sh ksh bash : ${parameter:=word} assign word as default value +" sh ksh bash : ${parameter:?word} display word if parameter is null +" sh ksh bash : ${parameter:+word} use word if parameter is not null, otherwise nothing +" ksh bash : ${parameter#pattern} remove small left pattern +" ksh bash : ${parameter##pattern} remove large left pattern +" ksh bash : ${parameter%pattern} remove small right pattern +" ksh bash : ${parameter%%pattern} remove large right pattern +syn cluster shDerefPatternList contains=shDerefPattern,shDerefString +syn match shDerefOpError contained ":[[:punct:]]" +syn match shDerefOp contained ":\=[-=?]" nextgroup=@shDerefPatternList +syn match shDerefOp contained ":\=+" nextgroup=@shDerefPatternList +if exists("b:is_bash") || exists("b:is_kornshell") + syn match shDerefOp contained "#\{1,2}" nextgroup=@shDerefPatternList + syn match shDerefOp contained "%\{1,2}" nextgroup=@shDerefPatternList + syn match shDerefPattern contained "[^{}]\+" contains=shDeref,shDerefSimple,shDerefPattern,shDerefString,shCommandSub nextgroup=shDerefPattern + syn region shDerefPattern contained start="{" end="}" contains=shDeref,shDerefSimple,shDerefString,shCommandSub nextgroup=shDerefPattern +endif +syn region shDerefString contained matchgroup=shOperator start=+'+ end=+'+ contains=shStringSpecial +syn region shDerefString contained matchgroup=shOperator start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial +syn match shDerefString contained "\\["']" + +" bash : ${parameter:offset} +" bash : ${parameter:offset:length} +" bash : ${parameter//pattern/string} +" bash : ${parameter//pattern} +if exists("b:is_bash") + syn region shDerefOp contained start=":[$[:alnum:]_]"me=e-1 end=":"me=e-1 end="}"me=e-1 contains=@shCommandSubList nextgroup=shDerefPOL + syn match shDerefPOL contained ":[^}]\{1,}" contains=@shCommandSubList + syn match shDerefOp contained "/\{1,2}" nextgroup=shDerefPat + syn match shDerefPat contained "[^/}]\{1,}" nextgroup=shDerefPatStringOp + syn match shDerefPatStringOp contained "/" nextgroup=shDerefPatString + syn match shDerefPatString contained "[^}]\{1,}" +endif + +" A bunch of useful sh keywords +syn keyword shStatement break cd chdir continue eval exec exit kill newgrp pwd read readonly return shift test trap ulimit umask wait +syn keyword shConditional contained elif else then +syn keyword shCondError elif else then + +if exists("b:is_kornshell") || exists("b:is_bash") + syn keyword shFunction function + syn keyword shStatement autoload bg false fc fg functions getopts hash history integer jobs let nohup print printf r stop suspend time times true type unalias whence + + if exists("b:is_bash") + syn keyword shStatement bind builtin dirs disown enable help local logout popd pushd shopt source + else + syn keyword shStatement login newgrp + endif +endif + +" Syncs +" ===== +if !exists("sh_minlines") + let sh_minlines = 200 +endif +if !exists("sh_maxlines") + let sh_maxlines = 2 * sh_minlines +endif +exec "syn sync minlines=" . sh_minlines . " maxlines=" . sh_maxlines +syn sync match shCaseEsacSync grouphere shCaseEsac "\<case\>" +syn sync match shCaseEsacSync groupthere shCaseEsac "\<esac\>" +syn sync match shDoSync grouphere shDo "\<do\>" +syn sync match shDoSync groupthere shDo "\<done\>" +syn sync match shForSync grouphere shFor "\<for\>" +syn sync match shForSync groupthere shFor "\<in\>" +syn sync match shIfSync grouphere shIf "\<if\>" +syn sync match shIfSync groupthere shIf "\<fi\>" +syn sync match shUntilSync grouphere shRepeat "\<until\>" +syn sync match shWhileSync grouphere shRepeat "\<while\>" + +" The default highlighting. +hi def link shArithRegion shShellVariables +hi def link shCaseBar shConditional +hi def link shCaseIn shConditional +hi def link shCaseCommandSub shCommandSub +hi def link shCaseDoubleQuote shDoubleQuote +hi def link shCaseSingleQuote shSingleQuote +hi def link shCaseStart shConditional +hi def link shCmdSubRegion shShellVariables +hi def link shColon shStatement + +hi def link shDeref shShellVariables +hi def link shDerefOp shOperator + +hi def link shDerefVar shDeref +hi def link shDerefPOL shDerefOp +hi def link shDerefPatString shDerefPattern +hi def link shDerefPatStringOp shDerefOp +hi def link shDerefSimple shDeref +hi def link shDerefSpecial shDeref +hi def link shDerefString shDoubleQuote +hi def link shHerePayload shHereDoc +hi def link shBeginHere shRedir + +hi def link shDoubleQuote shString +hi def link shEcho shString +hi def link shEmbeddedEcho shString +hi def link shHereDoc shString +hi def link shLoop shStatement +hi def link shOption shCommandSub +hi def link shPattern shString +hi def link shPosnParm shShellVariables +hi def link shRange shOperator +hi def link shRedir shOperator +hi def link shSingleQuote shString +hi def link shSource shOperator +hi def link shStringSpecial shSpecial +hi def link shSubShRegion shOperator +hi def link shTestOpr shConditional +hi def link shVariable shSetList +hi def link shWrapLineOperator shOperator + +if exists("b:is_bash") + hi def link bashAdminStatement shStatement + hi def link bashSpecialVariables shShellVariables + hi def link bashStatement shStatement + hi def link bkshFunction Function + hi def link bkshFunctionParen Delimiter + hi def link bkshFunctionDelim Delimiter +endif +if exists("b:is_kornshell") + hi def link kshSpecialVariables shShellVariables + hi def link kshStatement shStatement + hi def link bkshFunction Function + hi def link bkshFunctionParen Delimiter +endif + +hi def link shCaseError Error +hi def link shCondError Error +hi def link shCurlyError Error +hi def link shDerefError Error +hi def link shDerefOpError Error +hi def link shDerefWordError Error +hi def link shDoError Error +hi def link shEsacError Error +hi def link shIfError Error +hi def link shInError Error +hi def link shParenError Error +hi def link shTestError Error +if exists("b:is_kornshell") + hi def link shDTestError Error +endif + +hi def link shArithmetic Special +hi def link shCharClass Identifier +hi def link shSnglCase Statement +hi def link shCommandSub Special +hi def link shComment Comment +hi def link shConditional Conditional +hi def link shExprRegion Delimiter +hi def link shFunction Function +hi def link shFunctionName Function +hi def link shNumber Number +hi def link shOperator Operator +hi def link shRepeat Repeat +hi def link shSet Statement +hi def link shSetList Identifier +hi def link shShellVariables PreProc +hi def link shSpecial Special +hi def link shStatement Statement +hi def link shString String +hi def link shTodo Todo +hi def link shAlias Identifier + +" Current Syntax +" ============== +if exists("b:is_bash") + let b:current_syntax = "bash" +elseif exists("b:is_kornshell") + let b:current_syntax = "ksh" +else + let b:current_syntax = "sh" +endif + +" vim: ts=16 diff --git a/runtime/syntax/sicad.vim b/runtime/syntax/sicad.vim new file mode 100644 index 000000000..7e32451be --- /dev/null +++ b/runtime/syntax/sicad.vim @@ -0,0 +1,413 @@ +" Vim syntax file +" Language: SiCAD (procedure language) +" Maintainer: Zsolt Branyiczky <zbranyiczky@lmark.mgx.hu> +" Last Change: 2003 May 11 +" URL: http://lmark.mgx.hu:81/download/vim/sicad.vim + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" use SQL highlighting after 'sql' command +if version >= 600 + syn include @SQL syntax/sql.vim +else + syn include @SQL <sfile>:p:h/sql.vim +endif +unlet b:current_syntax + +" spaces are used in (auto)indents since sicad hates tabulator characters +if version >= 600 + setlocal expandtab +else + set expandtab +endif + +" ignore case +syn case ignore + +" most important commands - not listed by ausku +syn keyword sicadStatement define +syn keyword sicadStatement dialog +syn keyword sicadStatement do +syn keyword sicadStatement dop contained +syn keyword sicadStatement end +syn keyword sicadStatement enddo +syn keyword sicadStatement endp +syn keyword sicadStatement erroff +syn keyword sicadStatement erron +syn keyword sicadStatement exitp +syn keyword sicadGoto goto contained +syn keyword sicadStatement hh +syn keyword sicadStatement if +syn keyword sicadStatement in +syn keyword sicadStatement msgsup +syn keyword sicadStatement out +syn keyword sicadStatement padd +syn keyword sicadStatement parbeg +syn keyword sicadStatement parend +syn keyword sicadStatement pdoc +syn keyword sicadStatement pprot +syn keyword sicadStatement procd +syn keyword sicadStatement procn +syn keyword sicadStatement psav +syn keyword sicadStatement psel +syn keyword sicadStatement psymb +syn keyword sicadStatement ptrace +syn keyword sicadStatement ptstat +syn keyword sicadStatement set +syn keyword sicadStatement sql contained +syn keyword sicadStatement step +syn keyword sicadStatement sys +syn keyword sicadStatement ww + +" functions +syn match sicadStatement "\<atan("me=e-1 +syn match sicadStatement "\<atan2("me=e-1 +syn match sicadStatement "\<cos("me=e-1 +syn match sicadStatement "\<dist("me=e-1 +syn match sicadStatement "\<exp("me=e-1 +syn match sicadStatement "\<log("me=e-1 +syn match sicadStatement "\<log10("me=e-1 +syn match sicadStatement "\<sin("me=e-1 +syn match sicadStatement "\<sqrt("me=e-1 +syn match sicadStatement "\<tanh("me=e-1 +syn match sicadStatement "\<x("me=e-1 +syn match sicadStatement "\<y("me=e-1 +syn match sicadStatement "\<v("me=e-1 +syn match sicadStatement "\<x%g\=p[0-9]\{1,2}\>"me=s+1 +syn match sicadStatement "\<y%g\=p[0-9]\{1,2}\>"me=s+1 + +" logical operators +syn match sicadOperator "\.and\." +syn match sicadOperator "\.ne\." +syn match sicadOperator "\.not\." +syn match sicadOperator "\.eq\." +syn match sicadOperator "\.ge\." +syn match sicadOperator "\.gt\." +syn match sicadOperator "\.le\." +syn match sicadOperator "\.lt\." +syn match sicadOperator "\.or\." +syn match sicadOperator "\.eqv\." +syn match sicadOperator "\.neqv\." + +" variable name +syn match sicadIdentifier "%g\=[irpt][0-9]\{1,2}\>" +syn match sicadIdentifier "%g\=l[0-9]\>" +syn match sicadIdentifier "%g\=[irptl]("me=e-1 +syn match sicadIdentifier "%error\>" +syn match sicadIdentifier "%nsel\>" +syn match sicadIdentifier "%nvar\>" +syn match sicadIdentifier "%scl\>" +syn match sicadIdentifier "%wd\>" +syn match sicadIdentifier "\$[irt][0-9]\{1,2}\>" contained + +" label +syn match sicadLabel1 "^ *\.[a-z][a-z0-9]\{0,7} \+[^ ]"me=e-1 +syn match sicadLabel1 "^ *\.[a-z][a-z0-9]\{0,7}\*"me=e-1 +syn match sicadLabel2 "\<goto \.\=[a-z][a-z0-9]\{0,7}\>" contains=sicadGoto +syn match sicadLabel2 "\<goto\.[a-z][a-z0-9]\{0,7}\>" contains=sicadGoto + +" boolean +syn match sicadBoolean "\.[ft]\." +" integer without sign +syn match sicadNumber "\<[0-9]\+\>" +" floating point number, with dot, optional exponent +syn match sicadFloat "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=\>" +" floating point number, starting with a dot, optional exponent +syn match sicadFloat "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\>" +" floating point number, without dot, with exponent +syn match sicadFloat "\<[0-9]\+e[-+]\=[0-9]\+\>" + +" without this extraString definition a ' ; ' could stop the comment +syn region sicadString_ transparent start=+'+ end=+'+ oneline contained +" string +syn region sicadString start=+'+ end=+'+ oneline + +" comments - nasty ones in sicad + +" - ' * blabla' or ' * blabla;' +syn region sicadComment start="^ *\*" skip='\\ *$' end=";"me=e-1 end="$" contains=sicadString_ +" - ' .LABEL03 * blabla' or ' .LABEL03 * blabla;' +syn region sicadComment start="^ *\.[a-z][a-z0-9]\{0,7} *\*" skip='\\ *$' end=";"me=e-1 end="$" contains=sicadLabel1,sicadString_ +" - '; * blabla' or '; * blabla;' +syn region sicadComment start="; *\*"ms=s+1 skip='\\ *$' end=";"me=e-1 end="$" contains=sicadString_ +" - comments between docbeg and docend +syn region sicadComment matchgroup=sicadStatement start="\<docbeg\>" end="\<docend\>" + +" catch \ at the end of line +syn match sicadLineCont "\\ *$" + +" parameters in dop block - for the time being it is not used +"syn match sicadParameter " [a-z][a-z0-9]*[=:]"me=e-1 contained +" dop block - for the time being it is not used +syn region sicadDopBlock transparent matchgroup=sicadStatement start='\<dop\>' skip='\\ *$' end=';'me=e-1 end='$' contains=ALL + +" sql block - new highlighting mode is used (see syn include) +syn region sicadSqlBlock transparent matchgroup=sicadStatement start='\<sql\>' skip='\\ *$' end=';'me=e-1 end='$' contains=@SQL,sicadIdentifier,sicadLineCont + +" synchronizing +syn sync clear " clear sync used in sql.vim +syn sync match sicadSyncComment groupthere NONE "\<docend\>" +syn sync match sicadSyncComment grouphere sicadComment "\<docbeg\>" +" next line must be examined too +syn sync linecont "\\ *$" + +" catch error caused by tabulator key +syn match sicadError "\t" +" catch errors caused by wrong parenthesis +"syn region sicadParen transparent start='(' end=')' contains=ALLBUT,sicadParenError +syn region sicadParen transparent start='(' skip='\\ *$' end=')' end='$' contains=ALLBUT,sicadParenError +syn match sicadParenError ')' +"syn region sicadApostrophe transparent start=+'+ end=+'+ contains=ALLBUT,sicadApostropheError +"syn match sicadApostropheError +'+ +" not closed apostrophe +"syn region sicadError start=+'+ end=+$+ contains=ALLBUT,sicadApostropheError +"syn match sicadApostropheError +'[^']*$+me=s+1 contained + +" SICAD keywords +syn keyword sicadStatement abst add addsim adrin aib +syn keyword sicadStatement aibzsn aidump aifgeo aisbrk alknam +syn keyword sicadStatement alknr alksav alksel alktrc alopen +syn keyword sicadStatement ansbo aractiv ararea arareao ararsfs +syn keyword sicadStatement arbuffer archeck arcomv arcont arconv +syn keyword sicadStatement arcopy arcopyo arcorr arcreate arerror +syn keyword sicadStatement areval arflfm arflop arfrast argbkey +syn keyword sicadStatement argenf argraph argrapho arinters arkompfl +syn keyword sicadStatement arlasso arlcopy arlgraph arline arlining +syn keyword sicadStatement arlisly armakea armemo arnext aroverl +syn keyword sicadStatement arovers arparkmd arpars arrefp arselect +syn keyword sicadStatement arset arstruct arunify arupdate arvector +syn keyword sicadStatement arveinfl arvflfl arvoroni ausku basis +syn keyword sicadStatement basisaus basisdar basisnr bebos befl +syn keyword sicadStatement befla befli befls beo beorta +syn keyword sicadStatement beortn bep bepan bepap bepola +syn keyword sicadStatement bepoln bepsn bepsp ber berili +syn keyword sicadStatement berk bewz bkl bli bma +syn keyword sicadStatement bmakt bmakts bmbm bmerk bmerw +syn keyword sicadStatement bmerws bminit bmk bmorth bmos +syn keyword sicadStatement bmoss bmpar bmsl bmsum bmsums +syn keyword sicadStatement bmver bmvero bmw bo bta +syn keyword sicadStatement buffer bvl bw bza bzap +syn keyword sicadStatement bzd bzgera bzorth cat catel +syn keyword sicadStatement cdbdiff ce cgmparam close closesim +syn keyword sicadStatement comgener comp comp conclose conclose coninfo +syn keyword sicadStatement conopen conread contour conwrite cop +syn keyword sicadStatement copar coparp coparp2 copel cr +syn keyword sicadStatement cs cstat cursor d da +syn keyword sicadStatement dal dasp dasps dataout dcol +syn keyword sicadStatement dd defsr del delel deskrdef +syn keyword sicadStatement df dfn dfns dfpos dfr +syn keyword sicadStatement dgd dgm dgp dgr dh +syn keyword sicadStatement diag diaus dir disbsd dkl +syn keyword sicadStatement dktx dkur dlgfix dlgfre dma +syn keyword sicadStatement dprio dr druse dsel dskinfo +syn keyword sicadStatement dsr dv dve eba ebd +syn keyword sicadStatement ebdmod ebs edbsdbin edbssnin edbsvtin +syn keyword sicadStatement edt egaus egdef egdefs eglist +syn keyword sicadStatement egloe egloenp egloes egxx eib +syn keyword sicadStatement ekur ekuradd elel elpos epg +syn keyword sicadStatement esau esauadd esek eta etap +syn keyword sicadStatement etav feparam ficonv filse fl +syn keyword sicadStatement fli flin flini flinit flins +syn keyword sicadStatement flkor fln flnli flop flout +syn keyword sicadStatement flowert flparam flraster flsy flsyd +syn keyword sicadStatement flsym flsyms flsymt fmtatt fmtdia +syn keyword sicadStatement fmtlib fpg gbadddb gbaim gbanrs +syn keyword sicadStatement gbatw gbau gbaudit gbclosp gbcredic +syn keyword sicadStatement gbcreem gbcreld gbcresdb gbcretd gbde +syn keyword sicadStatement gbdeldb gbdeldic gbdelem gbdelld gbdelref +syn keyword sicadStatement gbdeltd gbdisdb gbdisem gbdisld gbdistd +syn keyword sicadStatement gbebn gbemau gbepsv gbgetdet gbgetes +syn keyword sicadStatement gbgetmas gbgqel gbgqelr gbgqsa gbgrant +syn keyword sicadStatement gbimpdic gbler gblerb gblerf gbles +syn keyword sicadStatement gblocdic gbmgmg gbmntdb gbmoddb gbnam +syn keyword sicadStatement gbneu gbopenp gbpoly gbpos gbpruef +syn keyword sicadStatement gbpruefg gbps gbqgel gbqgsa gbrefdic +syn keyword sicadStatement gbreftab gbreldic gbresem gbrevoke gbsav +syn keyword sicadStatement gbsbef gbsddk gbsicu gbsrt gbss +syn keyword sicadStatement gbstat gbsysp gbszau gbubp gbueb +syn keyword sicadStatement gbunmdb gbuseem gbw gbweg gbwieh +syn keyword sicadStatement gbzt gelp gera getvar hgw +syn keyword sicadStatement hpg hr0 hra hrar icclchan +syn keyword sicadStatement iccrecon icdescon icfree icgetcon icgtresp +syn keyword sicadStatement icopchan icputcon icreacon icreqd icreqnw +syn keyword sicadStatement icreqw icrespd icresrve icwricon imsget +syn keyword sicadStatement imsgqel imsmget imsplot imsprint inchk +syn keyword sicadStatement inf infd inst kbml kbmls +syn keyword sicadStatement kbmm kbmms kbmt kbmtdps kbmts +syn keyword sicadStatement khboe khbol khdob khe khetap +syn keyword sicadStatement khfrw khktk khlang khld khmfrp +syn keyword sicadStatement khmks khms khpd khpfeil khpl +syn keyword sicadStatement khprofil khrand khsa khsabs khsaph +syn keyword sicadStatement khsd khsdl khse khskbz khsna +syn keyword sicadStatement khsnum khsob khspos khsvph khtrn +syn keyword sicadStatement khver khzpe khzpl kib kldat +syn keyword sicadStatement klleg klsch klsym klvert kmpg +syn keyword sicadStatement kmtlage kmtp kmtps kodef kodefp +syn keyword sicadStatement kodefs kok kokp kolae kom +syn keyword sicadStatement kontly kopar koparp kopg kosy +syn keyword sicadStatement kp kr krsek krtclose krtopen +syn keyword sicadStatement ktk lad lae laesel language +syn keyword sicadStatement lasso lbdes lcs ldesk ldesks +syn keyword sicadStatement le leak leattdes leba lebas +syn keyword sicadStatement lebaznp lebd lebm lebv lebvaus +syn keyword sicadStatement lebvlist lede ledel ledepo ledepol +syn keyword sicadStatement ledepos leder ledist ledm lee +syn keyword sicadStatement leeins lees lege lekr lekrend +syn keyword sicadStatement lekwa lekwas lel lelh lell +syn keyword sicadStatement lelp lem lena lend lenm +syn keyword sicadStatement lep lepe lepee lepko lepl +syn keyword sicadStatement lepmko lepmkop lepos leposm leqs +syn keyword sicadStatement leqsl leqssp leqsv leqsvov les +syn keyword sicadStatement lesch lesr less lestd let +syn keyword sicadStatement letaum letl lev levm levtm +syn keyword sicadStatement levtp levtr lew lewm lexx +syn keyword sicadStatement lfs li lining lldes lmode +syn keyword sicadStatement loedk loepkt lop lose loses +syn keyword sicadStatement lp lppg lppruef lr ls +syn keyword sicadStatement lsop lsta lstat ly lyaus +syn keyword sicadStatement lz lza lzae lzbz lze +syn keyword sicadStatement lznr lzo lzpos ma ma0 +syn keyword sicadStatement ma1 mad map mapoly mcarp +syn keyword sicadStatement mccfr mccgr mcclr mccrf mcdf +syn keyword sicadStatement mcdma mcdr mcdrp mcdve mcebd +syn keyword sicadStatement mcgse mcinfo mcldrp md me +syn keyword sicadStatement mefd mefds minmax mipg ml +syn keyword sicadStatement mmcmdme mmdbf mmdellb mmdir mmdome +syn keyword sicadStatement mmfsb mminfolb mmlapp mmlbf mmlistlb +syn keyword sicadStatement mmloadcm mmmsg mmreadlb mmsetlb mmshowcm +syn keyword sicadStatement mmstatme mnp mpo mr mra +syn keyword sicadStatement ms msav msgout msgsnd msp +syn keyword sicadStatement mspf mtd nasel ncomp new +syn keyword sicadStatement nlist nlistlt nlistly nlistnp nlistpo +syn keyword sicadStatement np npa npdes npe npem +syn keyword sicadStatement npinfa npruef npsat npss npssa +syn keyword sicadStatement ntz oa oan odel odf +syn keyword sicadStatement odfx oj oja ojaddsk ojaed +syn keyword sicadStatement ojaeds ojaef ojaefs ojaen ojak +syn keyword sicadStatement ojaks ojakt ojakz ojalm ojatkis +syn keyword sicadStatement ojatt ojatw ojbsel ojcasel ojckon +syn keyword sicadStatement ojde ojdtl ojeb ojebd ojel +syn keyword sicadStatement ojelpas ojesb ojesbd ojex ojezge +syn keyword sicadStatement ojko ojlb ojloe ojlsb ojmerk +syn keyword sicadStatement ojmos ojnam ojpda ojpoly ojprae +syn keyword sicadStatement ojs ojsak ojsort ojstrukt ojsub +syn keyword sicadStatement ojtdef ojvek ojx old oldd +syn keyword sicadStatement op opa opa1 open opensim +syn keyword sicadStatement opnbsd orth osanz ot otp +syn keyword sicadStatement otrefp param paranf pas passw +syn keyword sicadStatement pcatchf pda pdadd pg pg0 +syn keyword sicadStatement pgauf pgaufsel pgb pgko pgm +syn keyword sicadStatement pgr pgvs pily pkpg plot +syn keyword sicadStatement plotf plotfr pmap pmdata pmdi +syn keyword sicadStatement pmdp pmeb pmep pminfo pmlb +syn keyword sicadStatement pmli pmlp pmmod pnrver poa +syn keyword sicadStatement pos posa posaus post printfr +syn keyword sicadStatement protect prs prssy prsym ps +syn keyword sicadStatement psadd psclose psopen psparam psprw +syn keyword sicadStatement psres psstat psw pswr qualif +syn keyword sicadStatement rahmen raster rasterd rbbackup rbchang2 +syn keyword sicadStatement rbchange rbcmd rbcoldst rbcolor rbcopy +syn keyword sicadStatement rbcut rbcut2 rbdbcl rbdbload rbdbop +syn keyword sicadStatement rbdbwin rbdefs rbedit rbfdel rbfill +syn keyword sicadStatement rbfill2 rbfload rbfload2 rbfnew rbfnew2 +syn keyword sicadStatement rbfpar rbfree rbg rbgetcol rbgetdst +syn keyword sicadStatement rbinfo rbpaste rbpixel rbrstore rbsnap +syn keyword sicadStatement rbsta rbtile rbtrpix rbvtor rcol +syn keyword sicadStatement rd rdchange re reb rebmod +syn keyword sicadStatement refunc ren renel rk rkpos +syn keyword sicadStatement rohr rohrpos rpr rr rr0 +syn keyword sicadStatement rra rrar rs samtosdb sav +syn keyword sicadStatement savd savesim savx scol scopy +syn keyword sicadStatement scopye sdbtosam sddk sdwr se +syn keyword sicadStatement selaus selpos seman semi sesch +syn keyword sicadStatement setscl setvar sfclntpf sfconn sffetchf +syn keyword sicadStatement sffpropi sfftypi sfqugeoc sfquwhcl sfself +syn keyword sicadStatement sfstat sftest sge sid sie +syn keyword sicadStatement sig sigp skk skks sn +syn keyword sicadStatement sn21 snpa snpar snparp snparps +syn keyword sicadStatement snpars snpas snpd snpi snpkor +syn keyword sicadStatement snpl snpm sob sob0 sobloe +syn keyword sicadStatement sobs sof sop split spr +syn keyword sicadStatement sqdadd sqdlad sqdold sqdsav +syn keyword sicadStatement sr sres srt sset stat +syn keyword sicadStatement stdtxt string strukt strupru suinfl +syn keyword sicadStatement suinflk suinfls supo supo1 sva +syn keyword sicadStatement svr sy sya syly sysout +syn keyword sicadStatement syu syux taa tabeg tabl +syn keyword sicadStatement tabm tam tanr tapg tapos +syn keyword sicadStatement tarkd tas tase tb tbadd +syn keyword sicadStatement tbd tbext tbget tbint tbout +syn keyword sicadStatement tbput tbsat tbsel tbstr tcaux +syn keyword sicadStatement tccable tcchkrep tccomm tccond tcdbg +syn keyword sicadStatement tcgbnr tcgrpos tcinit tclconv tcmodel +syn keyword sicadStatement tcnwe tcpairs tcpath tcrect tcrmdli +syn keyword sicadStatement tcscheme tcschmap tcse tcselc tcstar +syn keyword sicadStatement tcstrman tcsubnet tcsymbol tctable tcthrcab +syn keyword sicadStatement tctrans tctst tdb tdbdel tdbget +syn keyword sicadStatement tdblist tdbput tgmod titel tmoff +syn keyword sicadStatement tmon tp tpa tps tpta +syn keyword sicadStatement tra trans transkdo transopt transpro +syn keyword sicadStatement triangle trm trpg trrkd trs +syn keyword sicadStatement ts tsa tx txa txchk +syn keyword sicadStatement txcng txju txl txp txpv +syn keyword sicadStatement txtcmp txv txz uckon uiinfo +syn keyword sicadStatement uistatus umdk umdk1 umdka umge +syn keyword sicadStatement umges umr verbo verflli verif +syn keyword sicadStatement verly versinfo vfg vpactive vpcenter +syn keyword sicadStatement vpcreate vpdelete vpinfo vpmodify vpscroll +syn keyword sicadStatement vpsta wabsym wzmerk zdrhf zdrhfn +syn keyword sicadStatement zdrhfw zdrhfwn zefp zfl zflaus +syn keyword sicadStatement zka zlel zlels zortf zortfn +syn keyword sicadStatement zortfw zortfwn zortp zortpn zparb +syn keyword sicadStatement zparbn zparf zparfn zparfw zparfwn +syn keyword sicadStatement zparp zparpn zwinkp zwinkpn + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_sicad_syntax_inits") + + if version < 508 + let did_sicad_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink sicadLabel PreProc + HiLink sicadLabel1 sicadLabel + HiLink sicadLabel2 sicadLabel + HiLink sicadConditional Conditional + HiLink sicadBoolean Boolean + HiLink sicadNumber Number + HiLink sicadFloat Float + HiLink sicadOperator Operator + HiLink sicadStatement Statement + HiLink sicadParameter sicadStatement + HiLink sicadGoto sicadStatement + HiLink sicadLineCont sicadStatement + HiLink sicadString String + HiLink sicadComment Comment + HiLink sicadSpecial Special + HiLink sicadIdentifier Type +" HiLink sicadIdentifier Identifier + HiLink sicadError Error + HiLink sicadParenError sicadError + HiLink sicadApostropheError sicadError + HiLink sicadStringError sicadError + HiLink sicadCommentError sicadError +" HiLink sqlStatement Special " modified highlight group in sql.vim + + delcommand HiLink + +endif + +let b:current_syntax = "sicad" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/simula.vim b/runtime/syntax/simula.vim new file mode 100644 index 000000000..e952ee26c --- /dev/null +++ b/runtime/syntax/simula.vim @@ -0,0 +1,99 @@ +" Vim syntax file +" Language: Simula +" Maintainer: Haakon Riiser <hakonrk@fys.uio.no> +" URL: http://folk.uio.no/hakonrk/vim/syntax/simula.vim +" Last Change: 2001 May 15 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +" No case sensitivity in Simula +syn case ignore + +syn match simulaComment "^%.*$" contains=simulaTodo +syn region simulaComment start="!\|\<comment\>" end=";" contains=simulaTodo + +" Text between the keyword 'end' and either a semicolon or one of the +" keywords 'end', 'else', 'when' or 'otherwise' is also a comment +syn region simulaComment start="\<end\>"lc=3 matchgroup=Statement end=";\|\<\(end\|else\|when\|otherwise\)\>" + +syn match simulaCharError "'.\{-2,}'" +syn match simulaCharacter "'.'" +syn match simulaCharacter "'!\d\{-}!'" contains=simulaSpecialChar +syn match simulaString '".\{-}"' contains=simulaSpecialChar,simulaTodo + +syn keyword simulaBoolean true false +syn keyword simulaCompound begin end +syn keyword simulaConditional else if otherwise then until when +syn keyword simulaConstant none notext +syn keyword simulaFunction procedure +syn keyword simulaOperator eq eqv ge gt imp in is le lt ne new not qua +syn keyword simulaRepeat while for +syn keyword simulaReserved activate after at before delay go goto label prior reactivate switch to +syn keyword simulaStatement do inner inspect step this +syn keyword simulaStorageClass external hidden name protected value +syn keyword simulaStructure class +syn keyword simulaType array boolean character integer long real short text virtual +syn match simulaAssigned "\<\h\w*\s*\((.*)\)\=\s*:\(=\|-\)"me=e-2 +syn match simulaOperator "[&:=<>+\-*/]" +syn match simulaOperator "\<and\(\s\+then\)\=\>" +syn match simulaOperator "\<or\(\s\+else\)\=\>" +syn match simulaReferenceType "\<ref\s*(.\{-})" +syn match simulaSemicolon ";" +syn match simulaSpecial "[(),.]" +syn match simulaSpecialCharErr "!\d\{-4,}!" contained +syn match simulaSpecialCharErr "!!" contained +syn match simulaSpecialChar "!\d\{-}!" contains=simulaSpecialCharErr contained +syn match simulaTodo "xxx\+" contained + +" Integer number (or float without `.') +syn match simulaNumber "-\=\<\d\+\>" +" Real with optional exponent +syn match simulaReal "-\=\<\d\+\(\.\d\+\)\=\(&&\=[+-]\=\d\+\)\=\>" +" Real starting with a `.', optional exponent +syn match simulaReal "-\=\.\d\+\(&&\=[+-]\=\d\+\)\=\>" + +if version >= 508 || !exists("did_simula_syntax_inits") + if version < 508 + let did_simula_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink simulaAssigned Identifier + HiLink simulaBoolean Boolean + HiLink simulaCharacter Character + HiLink simulaCharError Error + HiLink simulaComment Comment + HiLink simulaCompound Statement + HiLink simulaConditional Conditional + HiLink simulaConstant Constant + HiLink simulaFunction Function + HiLink simulaNumber Number + HiLink simulaOperator Operator + HiLink simulaReal Float + HiLink simulaReferenceType Type + HiLink simulaRepeat Repeat + HiLink simulaReserved Error + HiLink simulaSemicolon Statement + HiLink simulaSpecial Special + HiLink simulaSpecialChar SpecialChar + HiLink simulaSpecialCharErr Error + HiLink simulaStatement Statement + HiLink simulaStorageClass StorageClass + HiLink simulaString String + HiLink simulaStructure Structure + HiLink simulaTodo Todo + HiLink simulaType Type + + delcommand HiLink +endif + +let b:current_syntax = "simula" +" vim: sts=4 sw=4 ts=8 diff --git a/runtime/syntax/sinda.vim b/runtime/syntax/sinda.vim new file mode 100644 index 000000000..2bde267c2 --- /dev/null +++ b/runtime/syntax/sinda.vim @@ -0,0 +1,146 @@ +" Vim syntax file +" Language: sinda85, sinda/fluint input file +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.sin +" URL: http://www.naglenet.org/vim/syntax/sinda.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + + +" Ignore case +syn case ignore + + + +" +" +" Begin syntax definitions for sinda input and output files. +" + +" Force free-form fortran format +let fortran_free_source=1 + +" Load FORTRAN syntax file +if version < 600 + source <sfile>:p:h/fortran.vim +else + runtime! syntax/fortran.vim +endif +unlet b:current_syntax + + + +" Define keywords for SINDA +syn keyword sindaMacro BUILD BUILDF DEBON DEBOFF DEFMOD FSTART FSTOP + +syn keyword sindaOptions TITLE PPSAVE RSI RSO OUTPUT SAVE QMAP USER1 USER2 +syn keyword sindaOptions MODEL PPOUT NOLIST MLINE NODEBUG DIRECTORIES +syn keyword sindaOptions DOUBLEPR + +syn keyword sindaRoutine FORWRD FWDBCK STDSTL FASTIC + +syn keyword sindaControl ABSZRO ACCELX ACCELY ACCELZ ARLXCA ATMPCA +syn keyword sindaControl BACKUP CSGFAC DRLXCA DTIMEH DTIMEI DTIMEL +syn keyword sindaControl DTIMES DTMPCA EBALNA EBALSA EXTLIM ITEROT +syn keyword sindaControl ITERXT ITHOLD NLOOPS NLOOPT OUTPUT OPEITR +syn keyword sindaControl PATMOS SIGMA TIMEO TIMEND UID + +syn keyword sindaSubRoutine ASKERS ADARIN ADDARY ADDMOD ARINDV +syn keyword sindaSubRoutine RYINV ARYMPY ARYSUB ARYTRN BAROC +syn keyword sindaSubRoutine BELACC BNDDRV BNDGET CHENNB CHGFLD +syn keyword sindaSubRoutine CHGLMP CHGSUC CHGVOL CHKCHL CHKCHP +syn keyword sindaSubRoutine CNSTAB COMBAL COMPLQ COMPRS CONTRN +syn keyword sindaSubRoutine CPRINT CRASH CRVINT CRYTRN CSIFLX +syn keyword sindaSubRoutine CVTEMP D11CYL C11DAI D11DIM D11MCY +syn keyword sindaSubRoutine D11MDA D11MDI D11MDT D12CYL D12MCY +syn keyword sindaSubRoutine D12MDA D1D1DA D1D1IM D1D1WM D1D2DA +syn keyword sindaSubRoutine D1D2WM D1DEG1 D1DEG2 D1DG1I D1IMD1 +syn keyword sindaSubRoutine D1IMIM D1IMWM D1M1DA D1M2MD D1M2WM +syn keyword sindaSubRoutine D1MDG1 D1MDG2 D2D1WM D1DEG1 D2DEG2 +syn keyword sindaSubRoutine D2D2 + +syn keyword sindaIdentifier BIV CAL DIM DIV DPM DPV DTV GEN PER PIV PIM +syn keyword sindaIdentifier SIM SIV SPM SPV TVS TVD + + + +" Define matches for SINDA +syn match sindaFortran "^F[0-9 ]"me=e-1 +syn match sindaMotran "^M[0-9 ]"me=e-1 + +syn match sindaComment "^C.*$" +syn match sindaComment "^R.*$" +syn match sindaComment "\$.*$" + +syn match sindaHeader "^header[^,]*" + +syn match sindaIncludeFile "include \+[^ ]\+"hs=s+8 contains=fortranInclude + +syn match sindaMacro "^PSTART" +syn match sindaMacro "^PSTOP" +syn match sindaMacro "^FAC" + +syn match sindaInteger "-\=\<[0-9]*\>" +syn match sindaFloat "-\=\<[0-9]*\.[0-9]*" +syn match sindaScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" + +syn match sindaEndData "^END OF DATA" + +if exists("thermal_todo") + execute 'syn match sindaTodo ' . '"^'.thermal_todo.'.*$"' +else + syn match sindaTodo "^?.*$" +endif + + + +" Define the default highlighting +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_sinda_syntax_inits") + if version < 508 + let did_sinda_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink sindaMacro Macro + HiLink sindaOptions Special + HiLink sindaRoutine Type + HiLink sindaControl Special + HiLink sindaSubRoutine Function + HiLink sindaIdentifier Identifier + + HiLink sindaFortran PreProc + HiLink sindaMotran PreProc + + HiLink sindaComment Comment + HiLink sindaHeader Typedef + HiLink sindaIncludeFile Type + HiLink sindaInteger Number + HiLink sindaFloat Float + HiLink sindaScientific Float + + HiLink sindaEndData Macro + + HiLink sindaTodo Todo + + delcommand HiLink +endif + + +let b:current_syntax = "sinda" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/sindacmp.vim b/runtime/syntax/sindacmp.vim new file mode 100644 index 000000000..87b483409 --- /dev/null +++ b/runtime/syntax/sindacmp.vim @@ -0,0 +1,74 @@ +" Vim syntax file +" Language: sinda85, sinda/fluint compare file +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.cmp +" URL: http://www.naglenet.org/vim/syntax/sindacmp.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + + +" Ignore case +syn case ignore + + + +" +" Begin syntax definitions for compare files. +" + +" Define keywords for sinda compare (sincomp) +syn keyword sindacmpUnit celsius fahrenheit + + + +" Define matches for sinda compare (sincomp) +syn match sindacmpTitle "Steady State Temperature Comparison" + +syn match sindacmpLabel "File [1-6] is" + +syn match sindacmpHeader "^ *Node\( *File \d\)* *Node Description" + +syn match sindacmpInteger "^ *-\=\<[0-9]*\>" +syn match sindacmpFloat "-\=\<[0-9]*\.[0-9]*" + + + +" Define the default highlighting +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_sindacmp_syntax_inits") + if version < 508 + let did_sindacmp_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink sindacmpTitle Type + HiLink sindacmpUnit PreProc + + HiLink sindacmpLabel Statement + + HiLink sindacmpHeader sindaHeader + + HiLink sindacmpInteger Number + HiLink sindacmpFloat Special + + delcommand HiLink +endif + + +let b:current_syntax = "sindacmp" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/sindaout.vim b/runtime/syntax/sindaout.vim new file mode 100644 index 000000000..b557e017e --- /dev/null +++ b/runtime/syntax/sindaout.vim @@ -0,0 +1,100 @@ +" Vim syntax file +" Language: sinda85, sinda/fluint output file +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.out +" URL: http://www.naglenet.org/vim/syntax/sindaout.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + + +" Ignore case +syn case match + + + +" Load SINDA syntax file +if version < 600 + source <sfile>:p:h/sinda.vim +else + runtime! syntax/sinda.vim +endif +unlet b:current_syntax + + + +" +" +" Begin syntax definitions for sinda output files. +" + +" Define keywords for sinda output +syn case match + +syn keyword sindaoutPos ON SI +syn keyword sindaoutNeg OFF ENG + + + +" Define matches for sinda output +syn match sindaoutFile ": \w*\.TAK"hs=s+2 + +syn match sindaoutInteger "T\=[0-9]*\>"ms=s+1 + +syn match sindaoutSectionDelim "[-<>]\{4,}" contains=sindaoutSectionTitle +syn match sindaoutSectionDelim ":\=\.\{4,}:\=" contains=sindaoutSectionTitle +syn match sindaoutSectionTitle "[-<:] \w[0-9A-Za-z_() ]\+ [->:]"hs=s+1,me=e-1 + +syn match sindaoutHeaderDelim "=\{5,}" +syn match sindaoutHeaderDelim "|\{5,}" +syn match sindaoutHeaderDelim "+\{5,}" + +syn match sindaoutLabel "Input File:" contains=sindaoutFile +syn match sindaoutLabel "Begin Solution: Routine" + +syn match sindaoutError "<<< Error >>>" + + +" Define the default highlighting +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_sindaout_syntax_inits") + if version < 508 + let did_sindaout_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + hi sindaHeaderDelim ctermfg=Black ctermbg=Green guifg=Black guibg=Green + + HiLink sindaoutPos Statement + HiLink sindaoutNeg PreProc + HiLink sindaoutTitle Type + HiLink sindaoutFile sindaIncludeFile + HiLink sindaoutInteger sindaInteger + + HiLink sindaoutSectionDelim Delimiter + HiLink sindaoutSectionTitle Exception + HiLink sindaoutHeaderDelim SpecialComment + HiLink sindaoutLabel Identifier + + HiLink sindaoutError Error + + delcommand HiLink +endif + + +let b:current_syntax = "sindaout" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/skill.vim b/runtime/syntax/skill.vim new file mode 100644 index 000000000..8b960441f --- /dev/null +++ b/runtime/syntax/skill.vim @@ -0,0 +1,562 @@ +" Vim syntax file +" Language: SKILL +" Maintainer: Toby Schaffer <jtschaff@eos.ncsu.edu> +" Last Change: 2003 May 11 +" Comments: SKILL is a Lisp-like programming language for use in EDA +" tools from Cadence Design Systems. It allows you to have +" a programming environment within the Cadence environment +" that gives you access to the complete tool set and design +" database. This file also defines syntax highlighting for +" certain Design Framework II interface functions. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn keyword skillConstants t nil unbound + +" enumerate all the SKILL reserved words/functions +syn match skillFunction "(abs\>"hs=s+1 +syn match skillFunction "\<abs("he=e-1 +syn match skillFunction "(a\=cos\>"hs=s+1 +syn match skillFunction "\<a\=cos("he=e-1 +syn match skillFunction "(add1\>"hs=s+1 +syn match skillFunction "\<add1("he=e-1 +syn match skillFunction "(addDefstructClass\>"hs=s+1 +syn match skillFunction "\<addDefstructClass("he=e-1 +syn match skillFunction "(alias\>"hs=s+1 +syn match skillFunction "\<alias("he=e-1 +syn match skillFunction "(alphalessp\>"hs=s+1 +syn match skillFunction "\<alphalessp("he=e-1 +syn match skillFunction "(alphaNumCmp\>"hs=s+1 +syn match skillFunction "\<alphaNumCmp("he=e-1 +syn match skillFunction "(append1\=\>"hs=s+1 +syn match skillFunction "\<append1\=("he=e-1 +syn match skillFunction "(apply\>"hs=s+1 +syn match skillFunction "\<apply("he=e-1 +syn match skillFunction "(arrayp\>"hs=s+1 +syn match skillFunction "\<arrayp("he=e-1 +syn match skillFunction "(arrayref\>"hs=s+1 +syn match skillFunction "\<arrayref("he=e-1 +syn match skillFunction "(a\=sin\>"hs=s+1 +syn match skillFunction "\<a\=sin("he=e-1 +syn match skillFunction "(assoc\>"hs=s+1 +syn match skillFunction "\<assoc("he=e-1 +syn match skillFunction "(ass[qv]\>"hs=s+1 +syn match skillFunction "\<ass[qv]("he=e-1 +syn match skillFunction "(a\=tan\>"hs=s+1 +syn match skillFunction "\<a\=tan("he=e-1 +syn match skillFunction "(ato[fim]\>"hs=s+1 +syn match skillFunction "\<ato[fim]("he=e-1 +syn match skillFunction "(bcdp\>"hs=s+1 +syn match skillFunction "\<bcdp("he=e-1 +syn match skillKeywords "(begin\>"hs=s+1 +syn match skillKeywords "\<begin("he=e-1 +syn match skillFunction "(booleanp\>"hs=s+1 +syn match skillFunction "\<booleanp("he=e-1 +syn match skillFunction "(boundp\>"hs=s+1 +syn match skillFunction "\<boundp("he=e-1 +syn match skillFunction "(buildString\>"hs=s+1 +syn match skillFunction "\<buildString("he=e-1 +syn match skillFunction "(c[ad]{1,3}r\>"hs=s+1 +syn match skillFunction "\<c[ad]{1,3}r("he=e-1 +syn match skillConditional "(caseq\=\>"hs=s+1 +syn match skillConditional "\<caseq\=("he=e-1 +syn match skillFunction "(ceiling\>"hs=s+1 +syn match skillFunction "\<ceiling("he=e-1 +syn match skillFunction "(changeWorkingDir\>"hs=s+1 +syn match skillFunction "\<changeWorkingDir("he=e-1 +syn match skillFunction "(charToInt\>"hs=s+1 +syn match skillFunction "\<charToInt("he=e-1 +syn match skillFunction "(clearExitProcs\>"hs=s+1 +syn match skillFunction "\<clearExitProcs("he=e-1 +syn match skillFunction "(close\>"hs=s+1 +syn match skillFunction "\<close("he=e-1 +syn match skillFunction "(compareTime\>"hs=s+1 +syn match skillFunction "\<compareTime("he=e-1 +syn match skillFunction "(compress\>"hs=s+1 +syn match skillFunction "\<compress("he=e-1 +syn match skillFunction "(concat\>"hs=s+1 +syn match skillFunction "\<concat("he=e-1 +syn match skillConditional "(cond\>"hs=s+1 +syn match skillConditional "\<cond("he=e-1 +syn match skillFunction "(cons\>"hs=s+1 +syn match skillFunction "\<cons("he=e-1 +syn match skillFunction "(copy\>"hs=s+1 +syn match skillFunction "\<copy("he=e-1 +syn match skillFunction "(copyDefstructDeep\>"hs=s+1 +syn match skillFunction "\<copyDefstructDeep("he=e-1 +syn match skillFunction "(createDir\>"hs=s+1 +syn match skillFunction "\<createDir("he=e-1 +syn match skillFunction "(csh\>"hs=s+1 +syn match skillFunction "\<csh("he=e-1 +syn match skillKeywords "(declare\>"hs=s+1 +syn match skillKeywords "\<declare("he=e-1 +syn match skillKeywords "(declare\(N\|SQN\)\=Lambda\>"hs=s+1 +syn match skillKeywords "\<declare\(N\|SQN\)\=Lambda("he=e-1 +syn match skillKeywords "(defmacro\>"hs=s+1 +syn match skillKeywords "\<defmacro("he=e-1 +syn match skillKeywords "(defprop\>"hs=s+1 +syn match skillKeywords "\<defprop("he=e-1 +syn match skillKeywords "(defstruct\>"hs=s+1 +syn match skillKeywords "\<defstruct("he=e-1 +syn match skillFunction "(defstructp\>"hs=s+1 +syn match skillFunction "\<defstructp("he=e-1 +syn match skillKeywords "(defun\>"hs=s+1 +syn match skillKeywords "\<defun("he=e-1 +syn match skillKeywords "(defUserInitProc\>"hs=s+1 +syn match skillKeywords "\<defUserInitProc("he=e-1 +syn match skillKeywords "(defvar\>"hs=s+1 +syn match skillKeywords "\<defvar("he=e-1 +syn match skillFunction "(delete\(Dir\|File\)\>"hs=s+1 +syn match skillKeywords "\<delete\(Dir\|File\)("he=e-1 +syn match skillFunction "(display\>"hs=s+1 +syn match skillFunction "\<display("he=e-1 +syn match skillFunction "(drain\>"hs=s+1 +syn match skillFunction "\<drain("he=e-1 +syn match skillFunction "(dtpr\>"hs=s+1 +syn match skillFunction "\<dtpr("he=e-1 +syn match skillFunction "(ed\(i\|l\|it\)\=\>"hs=s+1 +syn match skillFunction "\<ed\(i\|l\|it\)\=("he=e-1 +syn match skillFunction "(envobj\>"hs=s+1 +syn match skillFunction "\<envobj("he=e-1 +syn match skillFunction "(equal\>"hs=s+1 +syn match skillFunction "\<equal("he=e-1 +syn match skillFunction "(eqv\=\>"hs=s+1 +syn match skillFunction "\<eqv\=("he=e-1 +syn match skillFunction "(err\>"hs=s+1 +syn match skillFunction "\<err("he=e-1 +syn match skillFunction "(error\>"hs=s+1 +syn match skillFunction "\<error("he=e-1 +syn match skillFunction "(errset\>"hs=s+1 +syn match skillFunction "\<errset("he=e-1 +syn match skillFunction "(errsetstring\>"hs=s+1 +syn match skillFunction "\<errsetstring("he=e-1 +syn match skillFunction "(eval\>"hs=s+1 +syn match skillFunction "\<eval("he=e-1 +syn match skillFunction "(evalstring\>"hs=s+1 +syn match skillFunction "\<evalstring("he=e-1 +syn match skillFunction "(evenp\>"hs=s+1 +syn match skillFunction "\<evenp("he=e-1 +syn match skillFunction "(exists\>"hs=s+1 +syn match skillFunction "\<exists("he=e-1 +syn match skillFunction "(exit\>"hs=s+1 +syn match skillFunction "\<exit("he=e-1 +syn match skillFunction "(exp\>"hs=s+1 +syn match skillFunction "\<exp("he=e-1 +syn match skillFunction "(expandMacro\>"hs=s+1 +syn match skillFunction "\<expandMacro("he=e-1 +syn match skillFunction "(file\(Length\|Seek\|Tell\|TimeModified\)\>"hs=s+1 +syn match skillFunction "\<file\(Length\|Seek\|Tell\|TimeModified\)("he=e-1 +syn match skillFunction "(fixp\=\>"hs=s+1 +syn match skillFunction "\<fixp\=("he=e-1 +syn match skillFunction "(floatp\=\>"hs=s+1 +syn match skillFunction "\<floatp\=("he=e-1 +syn match skillFunction "(floor\>"hs=s+1 +syn match skillFunction "\<floor("he=e-1 +syn match skillRepeat "(for\(all\|each\)\=\>"hs=s+1 +syn match skillRepeat "\<for\(all\|each\)\=("he=e-1 +syn match skillFunction "([fs]\=printf\>"hs=s+1 +syn match skillFunction "\<[fs]\=printf("he=e-1 +syn match skillFunction "(f\=scanf\>"hs=s+1 +syn match skillFunction "\<f\=scanf("he=e-1 +syn match skillFunction "(funobj\>"hs=s+1 +syn match skillFunction "\<funobj("he=e-1 +syn match skillFunction "(gc\>"hs=s+1 +syn match skillFunction "\<gc("he=e-1 +syn match skillFunction "(gensym\>"hs=s+1 +syn match skillFunction "\<gensym("he=e-1 +syn match skillFunction "(get\(_pname\|_string\)\=\>"hs=s+1 +syn match skillFunction "\<get\(_pname\|_string\)\=("he=e-1 +syn match skillFunction "(getc\(har\)\=\>"hs=s+1 +syn match skillFunction "\<getc\(har\)\=("he=e-1 +syn match skillFunction "(getCurrentTime\>"hs=s+1 +syn match skillFunction "\<getCurrentTime("he=e-1 +syn match skillFunction "(getd\>"hs=s+1 +syn match skillFunction "\<getd("he=e-1 +syn match skillFunction "(getDirFiles\>"hs=s+1 +syn match skillFunction "\<getDirFiles("he=e-1 +syn match skillFunction "(getFnWriteProtect\>"hs=s+1 +syn match skillFunction "\<getFnWriteProtect("he=e-1 +syn match skillFunction "(getRunType\>"hs=s+1 +syn match skillFunction "\<getRunType("he=e-1 +syn match skillFunction "(getInstallPath\>"hs=s+1 +syn match skillFunction "\<getInstallPath("he=e-1 +syn match skillFunction "(getqq\=\>"hs=s+1 +syn match skillFunction "\<getqq\=("he=e-1 +syn match skillFunction "(gets\>"hs=s+1 +syn match skillFunction "\<gets("he=e-1 +syn match skillFunction "(getShellEnvVar\>"hs=s+1 +syn match skillFunction "\<getShellEnvVar("he=e-1 +syn match skillFunction "(getSkill\(Path\|Version\)\>"hs=s+1 +syn match skillFunction "\<getSkill\(Path\|Version\)("he=e-1 +syn match skillFunction "(getVarWriteProtect\>"hs=s+1 +syn match skillFunction "\<getVarWriteProtect("he=e-1 +syn match skillFunction "(getVersion\>"hs=s+1 +syn match skillFunction "\<getVersion("he=e-1 +syn match skillFunction "(getWarn\>"hs=s+1 +syn match skillFunction "\<getWarn("he=e-1 +syn match skillFunction "(getWorkingDir\>"hs=s+1 +syn match skillFunction "\<getWorkingDir("he=e-1 +syn match skillRepeat "(go\>"hs=s+1 +syn match skillRepeat "\<go("he=e-1 +syn match skillConditional "(if\>"hs=s+1 +syn match skillConditional "\<if("he=e-1 +syn keyword skillConditional then else +syn match skillFunction "(index\>"hs=s+1 +syn match skillFunction "\<index("he=e-1 +syn match skillFunction "(infile\>"hs=s+1 +syn match skillFunction "\<infile("he=e-1 +syn match skillFunction "(inportp\>"hs=s+1 +syn match skillFunction "\<inportp("he=e-1 +syn match skillFunction "(in\(Scheme\|Skill\)\>"hs=s+1 +syn match skillFunction "\<in\(Scheme\|Skill\)("he=e-1 +syn match skillFunction "(instring\>"hs=s+1 +syn match skillFunction "\<instring("he=e-1 +syn match skillFunction "(integerp\>"hs=s+1 +syn match skillFunction "\<integerp("he=e-1 +syn match skillFunction "(intToChar\>"hs=s+1 +syn match skillFunction "\<intToChar("he=e-1 +syn match skillFunction "(is\(Callable\|Dir\|Executable\|File\|FileEncrypted\|FileName\|Link\|Macro\|Writable\)\>"hs=s+1 +syn match skillFunction "\<is\(Callable\|Dir\|Executable\|File\|FileEncrypted\|FileName\|Link\|Macro\|Writable\)("he=e-1 +syn match skillKeywords "(n\=lambda\>"hs=s+1 +syn match skillKeywords "\<n\=lambda("he=e-1 +syn match skillKeywords "(last\>"hs=s+1 +syn match skillKeywords "\<last("he=e-1 +syn match skillFunction "(lconc\>"hs=s+1 +syn match skillFunction "\<lconc("he=e-1 +syn match skillFunction "(length\>"hs=s+1 +syn match skillFunction "\<length("he=e-1 +syn match skillKeywords "(let\>"hs=s+1 +syn match skillKeywords "\<let("he=e-1 +syn match skillFunction "(lineread\(string\)\=\>"hs=s+1 +syn match skillFunction "\<lineread\(string\)\=("he=e-1 +syn match skillKeywords "(list\>"hs=s+1 +syn match skillKeywords "\<list("he=e-1 +syn match skillFunction "(listp\>"hs=s+1 +syn match skillFunction "\<listp("he=e-1 +syn match skillFunction "(listToVector\>"hs=s+1 +syn match skillFunction "\<listToVector("he=e-1 +syn match skillFunction "(loadi\=\>"hs=s+1 +syn match skillFunction "\<loadi\=("he=e-1 +syn match skillFunction "(loadstring\>"hs=s+1 +syn match skillFunction "\<loadstring("he=e-1 +syn match skillFunction "(log\>"hs=s+1 +syn match skillFunction "\<log("he=e-1 +syn match skillFunction "(lowerCase\>"hs=s+1 +syn match skillFunction "\<lowerCase("he=e-1 +syn match skillFunction "(makeTable\>"hs=s+1 +syn match skillFunction "\<makeTable("he=e-1 +syn match skillFunction "(makeTempFileName\>"hs=s+1 +syn match skillFunction "\<makeTempFileName("he=e-1 +syn match skillFunction "(makeVector\>"hs=s+1 +syn match skillFunction "\<makeVector("he=e-1 +syn match skillFunction "(map\(c\|can\|car\|list\)\>"hs=s+1 +syn match skillFunction "\<map\(c\|can\|car\|list\)("he=e-1 +syn match skillFunction "(max\>"hs=s+1 +syn match skillFunction "\<max("he=e-1 +syn match skillFunction "(measureTime\>"hs=s+1 +syn match skillFunction "\<measureTime("he=e-1 +syn match skillFunction "(member\>"hs=s+1 +syn match skillFunction "\<member("he=e-1 +syn match skillFunction "(mem[qv]\>"hs=s+1 +syn match skillFunction "\<mem[qv]("he=e-1 +syn match skillFunction "(min\>"hs=s+1 +syn match skillFunction "\<min("he=e-1 +syn match skillFunction "(minusp\>"hs=s+1 +syn match skillFunction "\<minusp("he=e-1 +syn match skillFunction "(mod\(ulo\)\=\>"hs=s+1 +syn match skillFunction "\<mod\(ulo\)\=("he=e-1 +syn match skillKeywords "([mn]\=procedure\>"hs=s+1 +syn match skillKeywords "\<[mn]\=procedure("he=e-1 +syn match skillFunction "(ncon[cs]\>"hs=s+1 +syn match skillFunction "\<ncon[cs]("he=e-1 +syn match skillFunction "(needNCells\>"hs=s+1 +syn match skillFunction "\<needNCells("he=e-1 +syn match skillFunction "(negativep\>"hs=s+1 +syn match skillFunction "\<negativep("he=e-1 +syn match skillFunction "(neq\(ual\)\=\>"hs=s+1 +syn match skillFunction "\<neq\(ual\)\=("he=e-1 +syn match skillFunction "(newline\>"hs=s+1 +syn match skillFunction "\<newline("he=e-1 +syn match skillFunction "(nindex\>"hs=s+1 +syn match skillFunction "\<nindex("he=e-1 +syn match skillFunction "(not\>"hs=s+1 +syn match skillFunction "\<not("he=e-1 +syn match skillFunction "(nth\(cdr\|elem\)\=\>"hs=s+1 +syn match skillFunction "\<nth\(cdr\|elem\)\=("he=e-1 +syn match skillFunction "(null\>"hs=s+1 +syn match skillFunction "\<null("he=e-1 +syn match skillFunction "(numberp\>"hs=s+1 +syn match skillFunction "\<numberp("he=e-1 +syn match skillFunction "(numOpenFiles\>"hs=s+1 +syn match skillFunction "\<numOpenFiles("he=e-1 +syn match skillFunction "(oddp\>"hs=s+1 +syn match skillFunction "\<oddp("he=e-1 +syn match skillFunction "(onep\>"hs=s+1 +syn match skillFunction "\<onep("he=e-1 +syn match skillFunction "(otherp\>"hs=s+1 +syn match skillFunction "\<otherp("he=e-1 +syn match skillFunction "(outfile\>"hs=s+1 +syn match skillFunction "\<outfile("he=e-1 +syn match skillFunction "(outportp\>"hs=s+1 +syn match skillFunction "\<outportp("he=e-1 +syn match skillFunction "(pairp\>"hs=s+1 +syn match skillFunction "\<pairp("he=e-1 +syn match skillFunction "(parseString\>"hs=s+1 +syn match skillFunction "\<parseString("he=e-1 +syn match skillFunction "(plist\>"hs=s+1 +syn match skillFunction "\<plist("he=e-1 +syn match skillFunction "(plusp\>"hs=s+1 +syn match skillFunction "\<plusp("he=e-1 +syn match skillFunction "(portp\>"hs=s+1 +syn match skillFunction "\<portp("he=e-1 +syn match skillFunction "(p\=print\>"hs=s+1 +syn match skillFunction "\<p\=print("he=e-1 +syn match skillFunction "(prependInstallPath\>"hs=s+1 +syn match skillFunction "\<prependInstallPath("he=e-1 +syn match skillFunction "(printl\(ev\|n\)\>"hs=s+1 +syn match skillFunction "\<printl\(ev\|n\)("he=e-1 +syn match skillFunction "(procedurep\>"hs=s+1 +syn match skillFunction "\<procedurep("he=e-1 +syn match skillKeywords "(prog[12n]\=\>"hs=s+1 +syn match skillKeywords "\<prog[12n]\=("he=e-1 +syn match skillFunction "(putd\>"hs=s+1 +syn match skillFunction "\<putd("he=e-1 +syn match skillFunction "(putpropq\{,2}\>"hs=s+1 +syn match skillFunction "\<putpropq\{,2}("he=e-1 +syn match skillFunction "(random\>"hs=s+1 +syn match skillFunction "\<random("he=e-1 +syn match skillFunction "(read\>"hs=s+1 +syn match skillFunction "\<read("he=e-1 +syn match skillFunction "(readString\>"hs=s+1 +syn match skillFunction "\<readString("he=e-1 +syn match skillFunction "(readTable\>"hs=s+1 +syn match skillFunction "\<readTable("he=e-1 +syn match skillFunction "(realp\>"hs=s+1 +syn match skillFunction "\<realp("he=e-1 +syn match skillFunction "(regExit\(After\|Before\)\>"hs=s+1 +syn match skillFunction "\<regExit\(After\|Before\)("he=e-1 +syn match skillFunction "(remainder\>"hs=s+1 +syn match skillFunction "\<remainder("he=e-1 +syn match skillFunction "(remdq\=\>"hs=s+1 +syn match skillFunction "\<remdq\=("he=e-1 +syn match skillFunction "(remExitProc\>"hs=s+1 +syn match skillFunction "\<remExitProc("he=e-1 +syn match skillFunction "(remove\>"hs=s+1 +syn match skillFunction "\<remove("he=e-1 +syn match skillFunction "(remprop\>"hs=s+1 +syn match skillFunction "\<remprop("he=e-1 +syn match skillFunction "(remq\>"hs=s+1 +syn match skillFunction "\<remq("he=e-1 +syn match skillKeywords "(return\>"hs=s+1 +syn match skillKeywords "\<return("he=e-1 +syn match skillFunction "(reverse\>"hs=s+1 +syn match skillFunction "\<reverse("he=e-1 +syn match skillFunction "(rexCompile\>"hs=s+1 +syn match skillFunction "\<rexCompile("he=e-1 +syn match skillFunction "(rexExecute\>"hs=s+1 +syn match skillFunction "\<rexExecute("he=e-1 +syn match skillFunction "(rexMagic\>"hs=s+1 +syn match skillFunction "\<rexMagic("he=e-1 +syn match skillFunction "(rexMatchAssocList\>"hs=s+1 +syn match skillFunction "\<rexMatchAssocList("he=e-1 +syn match skillFunction "(rexMatchList\>"hs=s+1 +syn match skillFunction "\<rexMatchList("he=e-1 +syn match skillFunction "(rexMatchp\>"hs=s+1 +syn match skillFunction "\<rexMatchp("he=e-1 +syn match skillFunction "(rexReplace\>"hs=s+1 +syn match skillFunction "\<rexReplace("he=e-1 +syn match skillFunction "(rexSubstitute\>"hs=s+1 +syn match skillFunction "\<rexSubstitute("he=e-1 +syn match skillFunction "(rindex\>"hs=s+1 +syn match skillFunction "\<rindex("he=e-1 +syn match skillFunction "(round\>"hs=s+1 +syn match skillFunction "\<round("he=e-1 +syn match skillFunction "(rplac[ad]\>"hs=s+1 +syn match skillFunction "\<rplac[ad]("he=e-1 +syn match skillFunction "(schemeTopLevelEnv\>"hs=s+1 +syn match skillFunction "\<schemeTopLevelEnv("he=e-1 +syn match skillFunction "(set\>"hs=s+1 +syn match skillFunction "\<set("he=e-1 +syn match skillFunction "(setarray\>"hs=s+1 +syn match skillFunction "\<setarray("he=e-1 +syn match skillFunction "(setc[ad]r\>"hs=s+1 +syn match skillFunction "\<setc[ad]r("he=e-1 +syn match skillFunction "(setFnWriteProtect\>"hs=s+1 +syn match skillFunction "\<setFnWriteProtect("he=e-1 +syn match skillFunction "(setof\>"hs=s+1 +syn match skillFunction "\<setof("he=e-1 +syn match skillFunction "(setplist\>"hs=s+1 +syn match skillFunction "\<setplist("he=e-1 +syn match skillFunction "(setq\>"hs=s+1 +syn match skillFunction "\<setq("he=e-1 +syn match skillFunction "(setShellEnvVar\>"hs=s+1 +syn match skillFunction "\<setShellEnvVar("he=e-1 +syn match skillFunction "(setSkillPath\>"hs=s+1 +syn match skillFunction "\<setSkillPath("he=e-1 +syn match skillFunction "(setVarWriteProtect\>"hs=s+1 +syn match skillFunction "\<setVarWriteProtect("he=e-1 +syn match skillFunction "(sh\(ell\)\=\>"hs=s+1 +syn match skillFunction "\<sh\(ell\)\=("he=e-1 +syn match skillFunction "(simplifyFilename\>"hs=s+1 +syn match skillFunction "\<simplifyFilename("he=e-1 +syn match skillFunction "(sort\(car\)\=\>"hs=s+1 +syn match skillFunction "\<sort\(car\)\=("he=e-1 +syn match skillFunction "(sqrt\>"hs=s+1 +syn match skillFunction "\<sqrt("he=e-1 +syn match skillFunction "(srandom\>"hs=s+1 +syn match skillFunction "\<srandom("he=e-1 +syn match skillFunction "(sstatus\>"hs=s+1 +syn match skillFunction "\<sstatus("he=e-1 +syn match skillFunction "(strn\=cat\>"hs=s+1 +syn match skillFunction "\<strn\=cat("he=e-1 +syn match skillFunction "(strn\=cmp\>"hs=s+1 +syn match skillFunction "\<strn\=cmp("he=e-1 +syn match skillFunction "(stringp\>"hs=s+1 +syn match skillFunction "\<stringp("he=e-1 +syn match skillFunction "(stringTo\(Function\|Symbol\|Time\)\>"hs=s+1 +syn match skillFunction "\<stringTo\(Function\|Symbol\|Time\)("he=e-1 +syn match skillFunction "(strlen\>"hs=s+1 +syn match skillFunction "\<strlen("he=e-1 +syn match skillFunction "(sub1\>"hs=s+1 +syn match skillFunction "\<sub1("he=e-1 +syn match skillFunction "(subst\>"hs=s+1 +syn match skillFunction "\<subst("he=e-1 +syn match skillFunction "(substring\>"hs=s+1 +syn match skillFunction "\<substring("he=e-1 +syn match skillFunction "(sxtd\>"hs=s+1 +syn match skillFunction "\<sxtd("he=e-1 +syn match skillFunction "(symbolp\>"hs=s+1 +syn match skillFunction "\<symbolp("he=e-1 +syn match skillFunction "(symbolToString\>"hs=s+1 +syn match skillFunction "\<symbolToString("he=e-1 +syn match skillFunction "(symeval\>"hs=s+1 +syn match skillFunction "\<symeval("he=e-1 +syn match skillFunction "(symstrp\>"hs=s+1 +syn match skillFunction "\<symstrp("he=e-1 +syn match skillFunction "(system\>"hs=s+1 +syn match skillFunction "\<system("he=e-1 +syn match skillFunction "(tablep\>"hs=s+1 +syn match skillFunction "\<tablep("he=e-1 +syn match skillFunction "(tableToList\>"hs=s+1 +syn match skillFunction "\<tableToList("he=e-1 +syn match skillFunction "(tailp\>"hs=s+1 +syn match skillFunction "\<tailp("he=e-1 +syn match skillFunction "(tconc\>"hs=s+1 +syn match skillFunction "\<tconc("he=e-1 +syn match skillFunction "(timeToString\>"hs=s+1 +syn match skillFunction "\<timeToString("he=e-1 +syn match skillFunction "(timeToTm\>"hs=s+1 +syn match skillFunction "\<timeToTm("he=e-1 +syn match skillFunction "(tmToTime\>"hs=s+1 +syn match skillFunction "\<tmToTime("he=e-1 +syn match skillFunction "(truncate\>"hs=s+1 +syn match skillFunction "\<truncate("he=e-1 +syn match skillFunction "(typep\=\>"hs=s+1 +syn match skillFunction "\<typep\=("he=e-1 +syn match skillFunction "(unalias\>"hs=s+1 +syn match skillFunction "\<unalias("he=e-1 +syn match skillConditional "(unless\>"hs=s+1 +syn match skillConditional "\<unless("he=e-1 +syn match skillFunction "(upperCase\>"hs=s+1 +syn match skillFunction "\<upperCase("he=e-1 +syn match skillFunction "(vector\(ToList\)\=\>"hs=s+1 +syn match skillFunction "\<vector\(ToList\)\=("he=e-1 +syn match skillFunction "(warn\>"hs=s+1 +syn match skillFunction "\<warn("he=e-1 +syn match skillConditional "(when\>"hs=s+1 +syn match skillConditional "\<when("he=e-1 +syn match skillRepeat "(while\>"hs=s+1 +syn match skillRepeat "\<while("he=e-1 +syn match skillFunction "(write\>"hs=s+1 +syn match skillFunction "\<write("he=e-1 +syn match skillFunction "(writeTable\>"hs=s+1 +syn match skillFunction "\<writeTable("he=e-1 +syn match skillFunction "(xcons\>"hs=s+1 +syn match skillFunction "\<xcons("he=e-1 +syn match skillFunction "(zerop\>"hs=s+1 +syn match skillFunction "\<zerop("he=e-1 +syn match skillFunction "(zxtd\>"hs=s+1 +syn match skillFunction "\<zxtd("he=e-1 + +" DFII procedural interface routines + +" CDF functions +syn match skillcdfFunctions "(cdf\u\a\+\>"hs=s+1 +syn match skillcdfFunctions "\<cdf\u\a\+("he=e-1 +" graphic editor functions +syn match skillgeFunctions "(ge\u\a\+\>"hs=s+1 +syn match skillgeFunctions "\<ge\u\a\+("he=e-1 +" human interface functions +syn match skillhiFunctions "(hi\u\a\+\>"hs=s+1 +syn match skillhiFunctions "\<hi\u\a\+("he=e-1 +" layout editor functions +syn match skillleFunctions "(le\u\a\+\>"hs=s+1 +syn match skillleFunctions "\<le\u\a\+("he=e-1 +" database|design editor|design flow functions +syn match skilldbefFunctions "(d[bef]\u\a\+\>"hs=s+1 +syn match skilldbefFunctions "\<d[bef]\u\a\+("he=e-1 +" design management & design data services functions +syn match skillddFunctions "(dd[s]\=\u\a\+\>"hs=s+1 +syn match skillddFunctions "\<dd[s]\=\u\a\+("he=e-1 +" parameterized cell functions +syn match skillpcFunctions "(pc\u\a\+\>"hs=s+1 +syn match skillpcFunctions "\<pc\u\a\+("he=e-1 +" tech file functions +syn match skilltechFunctions "(\(tech\|tc\)\u\a\+\>"hs=s+1 +syn match skilltechFunctions "\<\(tech\|tc\)\u\a\+("he=e-1 + +" strings +syn region skillString start=+"+ skip=+\\"+ end=+"+ + +syn keyword skillTodo contained TODO FIXME XXX +syn keyword skillNote contained NOTE IMPORTANT + +" comments are either C-style or begin with a semicolon +syn region skillComment start="/\*" end="\*/" contains=skillTodo,skillNote +syn match skillComment ";.*" contains=skillTodo,skillNote +syn match skillCommentError "\*/" + +syn sync ccomment skillComment minlines=10 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_skill_syntax_inits") + if version < 508 + let did_skill_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink skillcdfFunctions Function + HiLink skillgeFunctions Function + HiLink skillhiFunctions Function + HiLink skillleFunctions Function + HiLink skilldbefFunctions Function + HiLink skillddFunctions Function + HiLink skillpcFunctions Function + HiLink skilltechFunctions Function + HiLink skillConstants Constant + HiLink skillFunction Function + HiLink skillKeywords Statement + HiLink skillConditional Conditional + HiLink skillRepeat Repeat + HiLink skillString String + HiLink skillTodo Todo + HiLink skillNote Todo + HiLink skillComment Comment + HiLink skillCommentError Error + + delcommand HiLink +endif + +let b:current_syntax = "skill" + +" vim: ts=4 diff --git a/runtime/syntax/sl.vim b/runtime/syntax/sl.vim new file mode 100644 index 000000000..fa3bca06d --- /dev/null +++ b/runtime/syntax/sl.vim @@ -0,0 +1,120 @@ +" Vim syntax file +" Language: Renderman shader language +" Maintainer: Dan Piponi <dan@tanelorn.demon.co.uk> +" Last Change: 2001 May 09 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" A bunch of useful Renderman keywords including special +" RenderMan control structures +syn keyword slStatement break return continue +syn keyword slConditional if else +syn keyword slRepeat while for +syn keyword slRepeat illuminance illuminate solar + +syn keyword slTodo contained TODO FIXME XXX + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match slSpecial contained "\\[0-9][0-9][0-9]\|\\." +syn region slString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=slSpecial +syn match slCharacter "'[^\\]'" +syn match slSpecialCharacter "'\\.'" +syn match slSpecialCharacter "'\\[0-9][0-9]'" +syn match slSpecialCharacter "'\\[0-9][0-9][0-9]'" + +"catch errors caused by wrong parenthesis +syn region slParen transparent start='(' end=')' contains=ALLBUT,slParenError,slIncluded,slSpecial,slTodo,slUserLabel +syn match slParenError ")" +syn match slInParen contained "[{}]" + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match slNumber "\<[0-9]\+\(u\=l\=\|lu\|f\)\>" +"floating point number, with dot, optional exponent +syn match slFloat "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=[fl]\=\>" +"floating point number, starting with a dot, optional exponent +syn match slFloat "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match slFloat "\<[0-9]\+e[-+]\=[0-9]\+[fl]\=\>" +"hex number +syn match slNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>" +"syn match slIdentifier "\<[a-z_][a-z0-9_]*\>" +syn case match + +if exists("sl_comment_strings") + " A comment can contain slString, slCharacter and slNumber. + " But a "*/" inside a slString in a slComment DOES end the comment! So we + " need to use a special type of slString: slCommentString, which also ends on + " "*/", and sees a "*" at the start of the line as comment again. + " Unfortunately this doesn't very well work for // type of comments :-( + syntax match slCommentSkip contained "^\s*\*\($\|\s\+\)" + syntax region slCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=slSpecial,slCommentSkip + syntax region slComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=slSpecial + syntax region slComment start="/\*" end="\*/" contains=slTodo,slCommentString,slCharacter,slNumber +else + syn region slComment start="/\*" end="\*/" contains=slTodo +endif +syntax match slCommentError "\*/" + +syn keyword slOperator sizeof +syn keyword slType float point color string vector normal matrix void +syn keyword slStorageClass varying uniform extern +syn keyword slStorageClass light surface volume displacement transformation imager +syn keyword slVariable Cs Os P dPdu dPdv N Ng u v du dv s t +syn keyword slVariable L Cl Ol E I ncomps time Ci Oi +syn keyword slVariable Ps alpha +syn keyword slVariable dtime dPdtime + +syn sync ccomment slComment minlines=10 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_sl_syntax_inits") + if version < 508 + let did_sl_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink slLabel Label + HiLink slUserLabel Label + HiLink slConditional Conditional + HiLink slRepeat Repeat + HiLink slCharacter Character + HiLink slSpecialCharacter slSpecial + HiLink slNumber Number + HiLink slFloat Float + HiLink slParenError slError + HiLink slInParen slError + HiLink slCommentError slError + HiLink slOperator Operator + HiLink slStorageClass StorageClass + HiLink slError Error + HiLink slStatement Statement + HiLink slType Type + HiLink slCommentError slError + HiLink slCommentString slString + HiLink slComment2String slString + HiLink slCommentSkip slComment + HiLink slString String + HiLink slComment Comment + HiLink slSpecial SpecialChar + HiLink slTodo Todo + HiLink slVariable Identifier + "HiLink slIdentifier Identifier + + delcommand HiLink +endif + +let b:current_syntax = "sl" + +" vim: ts=8 diff --git a/runtime/syntax/slang.vim b/runtime/syntax/slang.vim new file mode 100644 index 000000000..9fa89b4d6 --- /dev/null +++ b/runtime/syntax/slang.vim @@ -0,0 +1,102 @@ +" Vim syntax file +" Language: S-Lang +" Maintainer: Jan Hlavacek <lahvak@math.ohio-state.edu> +" Last Change: 980216 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn keyword slangStatement break return continue EXECUTE_ERROR_BLOCK +syn match slangStatement "\<X_USER_BLOCK[0-4]\>" +syn keyword slangLabel case +syn keyword slangConditional !if if else switch +syn keyword slangRepeat while for _for loop do forever +syn keyword slangDefinition define typedef variable struct +syn keyword slangOperator or and andelse orelse shr shl xor not +syn keyword slangBlock EXIT_BLOCK ERROR_BLOCK +syn match slangBlock "\<USER_BLOCK[0-4]\>" +syn keyword slangConstant NULL +syn keyword slangType Integer_Type Double_Type Complex_Type String_Type Struct_Type Ref_Type Null_Type Array_Type DataType_Type + +syn match slangOctal "\<0\d\+\>" contains=slangOctalError +syn match slangOctalError "[89]\+" contained +syn match slangHex "\<0[xX][0-9A-Fa-f]*\>" +syn match slangDecimal "\<[1-9]\d*\>" +syn match slangFloat "\<\d\+\." +syn match slangFloat "\<\d\+\.\d\+\([Ee][-+]\=\d\+\)\=\>" +syn match slangFloat "\<\d\+\.[Ee][-+]\=\d\+\>" +syn match slangFloat "\<\d\+[Ee][-+]\=\d\+\>" +syn match slangFloat "\.\d\+\([Ee][-+]\=\d\+\)\=\>" +syn match slangImaginary "\.\d\+\([Ee][-+]\=\d*\)\=[ij]\>" +syn match slangImaginary "\<\d\+\(\.\d*\)\=\([Ee][-+]\=\d\+\)\=[ij]\>" + +syn region slangString oneline start='"' end='"' skip='\\"' +syn match slangCharacter "'[^\\]'" +syn match slangCharacter "'\\.'" +syn match slangCharacter "'\\[0-7]\{1,3}'" +syn match slangCharacter "'\\d\d\{1,3}'" +syn match slangCharacter "'\\x[0-7a-fA-F]\{1,2}'" + +syn match slangDelim "[][{};:,]" +syn match slangOperator "[-%+/&*=<>|!~^@]" + +"catch errors caused by wrong parenthesis +syn region slangParen matchgroup=slangDelim transparent start='(' end=')' contains=ALLBUT,slangParenError +syn match slangParenError ")" + +syn match slangComment "%.*$" +syn keyword slangOperator sizeof + +syn region slangPreCondit start="^\s*#\s*\(ifdef\>\|ifndef\>\|iftrue\>\|ifnfalse\>\|iffalse\>\|ifntrue\>\|if\$\|ifn\$\|\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=cComment,slangString,slangCharacter,slangNumber + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_slang_syntax_inits") + if version < 508 + let did_slang_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink slangDefinition Type + HiLink slangBlock slangDefinition + HiLink slangLabel Label + HiLink slangConditional Conditional + HiLink slangRepeat Repeat + HiLink slangCharacter Character + HiLink slangFloat Float + HiLink slangImaginary Float + HiLink slangDecimal slangNumber + HiLink slangOctal slangNumber + HiLink slangHex slangNumber + HiLink slangNumber Number + HiLink slangParenError Error + HiLink slangOctalError Error + HiLink slangOperator Operator + HiLink slangStructure Structure + HiLink slangInclude Include + HiLink slangPreCondit PreCondit + HiLink slangError Error + HiLink slangStatement Statement + HiLink slangType Type + HiLink slangString String + HiLink slangConstant Constant + HiLink slangRangeArray slangConstant + HiLink slangComment Comment + HiLink slangSpecial SpecialChar + HiLink slangTodo Todo + HiLink slangDelim Delimiter + + delcommand HiLink +endif + +let b:current_syntax = "slang" + +" vim: ts=8 diff --git a/runtime/syntax/slice.vim b/runtime/syntax/slice.vim new file mode 100644 index 000000000..e8f876c8b --- /dev/null +++ b/runtime/syntax/slice.vim @@ -0,0 +1,90 @@ +" Vim syntax file +" Language: Slice (ZeroC's Specification Language for Ice) +" Maintainer: Morel Bodin <bodin@tuxfamily.net> +" Last Change: 2003 Sep 24 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" The Slice keywords + +syn keyword sliceType bool byte double float int long short string void +syn keyword sliceQualifier const extends idempotent implements local nonmutating out throws +syn keyword sliceConstruct class enum exception dictionnary interface module LocalObject Object sequence struct +syn keyword sliceQualifier const extends idempotent implements local nonmutating out throws +syn keyword sliceBoolean false true + +" Include directives +syn match sliceIncluded display contained "<[^>]*>" +syn match sliceInclude display "^\s*#\s*include\>\s*["<]" contains=sliceIncluded + +" Double-include guards +syn region sliceGuard start="^#\(define\|ifndef\|endif\)" end="$" + +" Strings and characters +syn region sliceString start=+"+ end=+"+ + +" Numbers (shamelessly ripped from c.vim, only slightly modified) +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match sliceNumbers display transparent "\<\d\|\.\d" contains=sliceNumber,sliceFloat,sliceOctal +syn match sliceNumber display contained "\d\+" +"hex number +syn match sliceNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" +" Flag the first zero of an octal number as something special +syn match sliceOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=sliceOctalZero +syn match sliceOctalZero display contained "\<0" +syn match sliceFloat display contained "\d\+f" +"floating point number, with dot, optional exponent +syn match sliceFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" +"floating point number, starting with a dot, optional exponent +syn match sliceFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match sliceFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" +" flag an octal number with wrong digits +syn case match + + +" Comments +syn region sliceComment start="/\*" end="\*/" +syn match sliceComment "//.*" + +syn sync ccomment sliceComment + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_slice_syn_inits") + if version < 508 + let did_slice_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink sliceComment Comment + HiLink sliceConstruct Keyword + HiLink sliceType Type + HiLink sliceString String + HiLink sliceIncluded String + HiLink sliceQualifier Keyword + HiLink sliceInclude Include + HiLink sliceGuard PreProc + HiLink sliceBoolean Boolean + HiLink sliceFloat Number + HiLink sliceNumber Number + HiLink sliceOctal Number + HiLink sliceOctalZero Special + HiLink sliceNumberError Special + + delcommand HiLink +endif + +let b:current_syntax = "slice" + +" vim: ts=8 diff --git a/runtime/syntax/slrnrc.vim b/runtime/syntax/slrnrc.vim new file mode 100644 index 000000000..c15d9afd8 --- /dev/null +++ b/runtime/syntax/slrnrc.vim @@ -0,0 +1,194 @@ +" Vim syntax file +" Language: Slrn setup file (based on slrn 0.9.8.0) +" Maintainer: Preben 'Peppe' Guldberg <peppe-vim@wielders.org> +" Last Change: 19 May 2004 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn keyword slrnrcTodo contained Todo + +" In some places whitespace is illegal +syn match slrnrcSpaceError contained "\s" + +syn match slrnrcNumber contained "-\=\<\d\+\>" +syn match slrnrcNumber contained +'[^']\+'+ + +syn match slrnrcSpecKey contained +\(\\[er"']\|\^[^'"]\|\\\o\o\o\)+ + +syn match slrnrcKey contained "\S\+" contains=slrnrcSpecKey +syn region slrnrcKey contained start=+"+ skip=+\\"+ end=+"+ oneline contains=slrnrcSpecKey +syn region slrnrcKey contained start=+'+ skip=+\\'+ end=+'+ oneline contains=slrnrcSpecKey + +syn match slrnrcSpecChar contained +'+ +syn match slrnrcSpecChar contained +\\[n"]+ +syn match slrnrcSpecChar contained "%[dfmnrs%]" + +syn match slrnrcString contained /[^ \t%"']\+/ contains=slrnrcSpecChar +syn region slrnrcString contained start=+"+ skip=+\\"+ end=+"+ oneline contains=slrnrcSpecChar + +syn match slrnSlangPreCondit "^#\s*ifn\=\(def\>\|false\>\|true\>\|\$\)" +syn match slrnSlangPreCondit "^#\s*e\(lif\|lse\|ndif\)\>" + +syn match slrnrcComment "%.*$" contains=slrnrcTodo + +syn keyword slrnrcVarInt contained abort_unmodified_edits article_window_page_overlap auto_mark_article_as_read beep broken_xref broken_xref cc_followup check_new_groups +syn keyword slrnrcVarInt contained color_by_score confirm_actions custom_sort_by_threads display_cursor_bar drop_bogus_groups editor_uses_mime_charset emphasized_text_mask +syn keyword slrnrcVarInt contained emphasized_text_mode fold_headers fold_headers followup_strip_signature force_authentication force_authentication generate_date_header +syn keyword slrnrcVarInt contained generate_email_from generate_email_from generate_message_id grouplens_port hide_pgpsignature hide_quotes hide_signature +syn keyword slrnrcVarInt contained hide_verbatim_marks hide_verbatim_text highlight_unread_subjects highlight_urls ignore_signature kill_score lines_per_update +syn keyword slrnrcVarInt contained mail_editor_is_mua max_low_score max_queued_groups min_high_score mouse netiquette_warnings new_subject_breaks_threads no_autosave +syn keyword slrnrcVarInt contained no_backups prefer_head process_verbatim_marks query_next_article query_next_group query_read_group_cutoff read_active reject_long_lines +syn keyword slrnrcVarInt contained scroll_by_page show_article show_thread_subject simulate_graphic_chars smart_quote sorting_method spoiler_char spoiler_char +syn keyword slrnrcVarInt contained spoiler_display_mode spoiler_display_mode spool_check_up_on_nov spool_check_up_on_nov uncollapse_threads unsubscribe_new_groups use_blink +syn keyword slrnrcVarInt contained use_color use_flow_control use_grouplens use_grouplens use_header_numbers use_inews use_inews use_localtime use_metamail use_mime use_mime +syn keyword slrnrcVarInt contained use_recommended_msg_id use_slrnpull use_slrnpull use_tilde use_tmpdir use_uudeview use_uudeview warn_followup_to wrap_flags wrap_method +syn keyword slrnrcVarInt contained write_newsrc_flags + +" Listed for removal +syn keyword slrnrcVarInt contained author_display display_author_realname display_score group_dsc_start_column process_verbatum_marks prompt_next_group query_reconnect +syn keyword slrnrcVarInt contained show_descriptions use_xgtitle + +" Match as a "string" too +syn region slrnrcVarIntStr contained matchgroup=slrnrcVarInt start=+"+ end=+"+ oneline contains=slrnrcVarInt,slrnrcSpaceError + +syn keyword slrnrcVarStr contained Xbrowser art_help_line art_status_line cansecret_file cc_post_string charset custom_headers custom_sort_order decode_directory +syn keyword slrnrcVarStr contained editor_command failed_posts_file followup_custom_headers followup_date_format followup_string followupto_string group_help_line +syn keyword slrnrcVarStr contained group_status_line grouplens_host grouplens_pseudoname header_help_line header_status_line hostname inews_program macro_directory +syn keyword slrnrcVarStr contained mail_editor_command metamail_command mime_charset non_Xbrowser organization overview_date_format post_editor_command post_object +syn keyword slrnrcVarStr contained postpone_directory printer_name quote_string realname reply_custom_headers reply_string replyto save_directory save_posts save_replies +syn keyword slrnrcVarStr contained score_editor_command scorefile sendmail_command server_object signature signoff_string spool_active_file spool_activetimes_file +syn keyword slrnrcVarStr contained spool_inn_root spool_newsgroups_file spool_nov_file spool_nov_root spool_overviewfmt_file spool_root supersedes_custom_headers +syn keyword slrnrcVarStr contained top_status_line username + +" Listed for removal +syn keyword slrnrcVarStr contained followup cc_followup_string + +" Match as a "string" too +syn region slrnrcVarStrStr contained matchgroup=slrnrcVarStr start=+"+ end=+"+ oneline contains=slrnrcVarStr,slrnrcSpaceError + +" Various commands +syn region slrnrcCmdLine matchgroup=slrnrcCmd start="\<\(autobaud\|color\|compatible_charsets\|group_display_format\|grouplens_add\|header_display_format\|ignore_quotes\|include\|interpret\|mono\|nnrpaccess\|posting_host\|server\|set\|setkey\|strip_re_regexp\|strip_sig_regexp\|strip_was_regexp\|unsetkey\|visible_headers\)\>" end="$" oneline contains=slrnrc\(String\|Comment\) + +" Listed for removal +syn region slrnrcCmdLine matchgroup=slrnrcCmd start="\<\(cc_followup_string\|decode_directory\|editor_command\|followup\|hostname\|organization\|quote_string\|realname\|replyto\|scorefile\|signature\|username\)\>" end="$" oneline contains=slrnrc\(String\|Comment\) + +" Setting variables +syn keyword slrnrcSet contained set +syn match slrnrcSetStr "^\s*set\s\+\S\+" skipwhite nextgroup=slrnrcString contains=slrnrcSet,slrnrcVarStr\(Str\)\= +syn match slrnrcSetInt contained "^\s*set\s\+\S\+" contains=slrnrcSet,slrnrcVarInt\(Str\)\= +syn match slrnrcSetIntLine "^\s*set\s\+\S\+\s\+\(-\=\d\+\>\|'[^']\+'\)" contains=slrnrcSetInt,slrnrcNumber,slrnrcVarInt + +" Color definitions +syn match slrnrcColorObj contained "\<quotes\d\+\>" +syn keyword slrnrcColorObj contained article author boldtext box cursor date description error frame from_myself group grouplens_display header_name header_number headers +syn keyword slrnrcColorObj contained high_score italicstext menu menu_press message neg_score normal pgpsignature pos_score quotes response_char selection signature status +syn keyword slrnrcColorObj contained subject thread_number tilde tree underlinetext unread_subject url verbatim + +" Listed for removal +syn keyword slrnrcColorObj contained verbatum + +syn region slrnrcColorObjStr contained matchgroup=slrnrcColorObj start=+"+ end=+"+ oneline contains=slrnrcColorObj,slrnrcSpaceError +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 +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\) + +" Mono settings +syn keyword slrnrcMonoVal contained blink bold none reverse underline +syn region slrnrcMonoValStr contained matchgroup=slrnrcMonoVal start=+"+ end=+"+ oneline contains=slrnrcMonoVal,slrnrcSpaceError +" Color object is inherited +" Mono needs at least one argument +syn keyword slrnrcMono contained mono +syn match slrnrcMonoInit contained "^\s*mono\s\+\S\+" contains=slrnrcMono,slrnrcColorObj\(Str\)\= +syn match slrnrcMonoLine "^\s*mono\s\+\S\+\s\+\S.*" contains=slrnrcMono\(Init\|Val\|ValStr\),slrnrcComment + +" Functions in article mode +syn keyword slrnrcFunArt contained article_bob article_eob article_left article_line_down article_line_up article_page_down article_page_up article_right article_search +syn keyword slrnrcFunArt contained author_search_backward author_search_forward browse_url cancel catchup catchup_all create_score decode delete delete_thread digit_arg +syn keyword slrnrcFunArt contained enlarge_article_window evaluate_cmd exchange_mark expunge fast_quit followup forward forward_digest get_children_headers get_parent_header +syn keyword slrnrcFunArt contained goto_article goto_last_read grouplens_rate_article header_bob header_eob header_line_down header_line_up header_page_down header_page_up +syn keyword slrnrcFunArt contained help hide_article locate_article mark_spot next next_high_score next_same_subject pipe post post_postponed previous print quit redraw +syn keyword slrnrcFunArt contained repeat_last_key reply request save show_spoilers shrink_article_window skip_quotes skip_to_next_group skip_to_previous_group +syn keyword slrnrcFunArt contained subject_search_backward subject_search_forward supersede suspend tag_header toggle_collapse_threads toggle_header_formats +syn keyword slrnrcFunArt contained toggle_header_tag toggle_headers toggle_pgpsignature toggle_quotes toggle_rot13 toggle_signature toggle_verbatim_marks +syn keyword slrnrcFunArt contained toggle_verbatim_text uncatchup uncatchup_all undelete untag_headers view_scores wrap_article zoom_article_window + +" Listed for removal +syn keyword slrnrcFunArt contained art_bob art_eob art_xpunge article_linedn article_lineup article_pagedn article_pageup down enlarge_window goto_beginning goto_end left +syn keyword slrnrcFunArt contained locate_header_by_msgid pagedn pageup pipe_article prev print_article right scroll_dn scroll_up shrink_window skip_to_prev_group +syn keyword slrnrcFunArt contained toggle_show_author up + +" Functions in group mode +syn keyword slrnrcFunGroup contained add_group bob catchup digit_arg eob evaluate_cmd group_search group_search_backward group_search_forward help line_down line_up move_group +syn keyword slrnrcFunGroup contained page_down page_up post post_postponed quit redraw refresh_groups repeat_last_key save_newsrc select_group subscribe suspend +syn keyword slrnrcFunGroup contained toggle_group_formats toggle_hidden toggle_list_all toggle_scoring transpose_groups uncatchup unsubscribe + +" Listed for removal +syn keyword slrnrcFunGroup contained down group_bob group_eob pagedown pageup toggle_group_display uncatch_up up + +" Functions in readline mode (actually from slang's slrline.c) +syn keyword slrnrcFunRead contained bdel bol del deleol down enter eol left quoted_insert right self_insert trim up + +" Binding keys +syn keyword slrnrcSetkeyObj contained article group readline +syn region slrnrcSetkeyObjStr contained matchgroup=slrnrcSetkeyObj start=+"+ end=+"+ oneline contains=slrnrcSetkeyObj +syn match slrnrcSetkeyArt contained '\("\=\)\<article\>\1\s\+\S\+' skipwhite nextgroup=slrnrcKey contains=slrnrcSetKeyObj\(Str\)\=,slrnrcFunArt +syn match slrnrcSetkeyGroup contained '\("\=\)\<group\>\1\s\+\S\+' skipwhite nextgroup=slrnrcKey contains=slrnrcSetKeyObj\(Str\)\=,slrnrcFunGroup +syn match slrnrcSetkeyRead contained '\("\=\)\<readline\>\1\s\+\S\+' skipwhite nextgroup=slrnrcKey contains=slrnrcSetKeyObj\(Str\)\=,slrnrcFunRead +syn match slrnrcSetkey "^\s*setkey\>" skipwhite nextgroup=slrnrcSetkeyArt,slrnrcSetkeyGroup,slrnrcSetkeyRead + +" Unbinding keys +syn match slrnrcUnsetkey '^\s*unsetkey\s\+\("\)\=\(article\|group\|readline\)\>\1' skipwhite nextgroup=slrnrcKey contains=slrnrcSetkeyObj\(Str\)\= + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_slrnrc_syntax_inits") + if version < 508 + let did_slrnrc_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink slrnrcTodo Todo + HiLink slrnrcSpaceError Error + HiLink slrnrcNumber Number + HiLink slrnrcSpecKey SpecialChar + HiLink slrnrcKey String + HiLink slrnrcSpecChar SpecialChar + HiLink slrnrcString String + HiLink slrnSlangPreCondit Special + HiLink slrnrcComment Comment + HiLink slrnrcVarInt Identifier + HiLink slrnrcVarStr Identifier + HiLink slrnrcCmd slrnrcSet + HiLink slrnrcSet Operator + HiLink slrnrcColor Keyword + HiLink slrnrcColorObj Identifier + HiLink slrnrcColorVal String + HiLink slrnrcMono Keyword + HiLink slrnrcMonoObj Identifier + HiLink slrnrcMonoVal String + HiLink slrnrcFunArt Macro + HiLink slrnrcFunGroup Macro + HiLink slrnrcFunRead Macro + HiLink slrnrcSetkeyObj Identifier + HiLink slrnrcSetkey Keyword + HiLink slrnrcUnsetkey slrnrcSetkey + + delcommand HiLink +endif + +let b:current_syntax = "slrnrc" + +"EOF vim: ts=8 noet tw=120 sw=8 sts=0 diff --git a/runtime/syntax/slrnsc.vim b/runtime/syntax/slrnsc.vim new file mode 100644 index 000000000..3f653cc4e --- /dev/null +++ b/runtime/syntax/slrnsc.vim @@ -0,0 +1,85 @@ +" Vim syntax file +" Language: Slrn score file (based on slrn 0.9.8.0) +" Maintainer: Preben 'Peppe' Guldberg <peppe-vim@wielders.org> +" Last Change: 19 May 2004 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" characters in newsgroup names +if version < 600 + set isk=@,48-57,.,-,_,+ +else + setlocal isk=@,48-57,.,-,_,+ +endif + +syn match slrnscComment "%.*$" +syn match slrnscSectionCom ".].*"lc=2 + +syn match slrnscGroup contained "\(\k\|\*\)\+" +syn match slrnscNumber contained "\d\+" +syn match slrnscDate contained "\(\d\{1,2}[-/]\)\{2}\d\{4}" +syn match slrnscDelim contained ":" +syn match slrnscComma contained "," +syn match slrnscOper contained "\~" +syn match slrnscEsc contained "\\[ecC<>.]" +syn match slrnscEsc contained "[?^]" +syn match slrnscEsc contained "[^\\]$\s*$"lc=1 + +syn keyword slrnscInclude contained include +syn match slrnscIncludeLine "^\s*Include\s\+\S.*$" + +syn region slrnscSection matchgroup=slrnscSectionStd start="^\s*\[" end='\]' contains=slrnscGroup,slrnscComma,slrnscSectionCom +syn region slrnscSection matchgroup=slrnscSectionNot start="^\s*\[\~" end='\]' contains=slrnscGroup,slrnscCommas,slrnscSectionCom + +syn keyword slrnscItem contained Age Bytes Date Expires From Has-Body Lines Message-Id Newsgroup References Subject Xref + +syn match slrnscScoreItem contained "%.*$" skipempty nextgroup=slrnscScoreItem contains=slrnscComment +syn match slrnscScoreItem contained "^\s*Expires:\s*\(\d\{1,2}[-/]\)\{2}\d\{4}\s*$" skipempty nextgroup=slrnscScoreItem contains=slrnscItem,slrnscDelim,slrnscDate +syn match slrnscScoreItem contained "^\s*\~\=\(Age\|Bytes\|Has-Body\|Lines\):\s*\d\+\s*$" skipempty nextgroup=slrnscScoreItem contains=slrnscOper,slrnscItem,slrnscDelim,slrnscNumber +syn match slrnscScoreItemFill contained ".*$" skipempty nextgroup=slrnscScoreItem contains=slrnscEsc +syn match slrnscScoreItem contained "^\s*\~\=\(Date\|From\|Message-Id\|Newsgroup\|References\|Subject\|Xref\):" nextgroup=slrnscScoreItemFill contains=slrnscOper,slrnscItem,slrnscDelim +syn region slrnscScoreItem contained matchgroup=Special start="^\s*\~\={::\=" end="^\s*}" skipempty nextgroup=slrnscScoreItem contains=slrnscScoreItem + +syn keyword slrnscScore contained Score +syn match slrnscScoreIdent contained "%.*" +syn match slrnScoreLine "^\s*Score::\=\s\+=\=-\=\d\+\s*\(%.*\)\=$" skipempty nextgroup=slrnscScoreItem contains=slrnscScore,slrnscDelim,slrnscOper,slrnscNumber,slrnscScoreIdent + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_slrnsc_syntax_inits") + if version < 508 + let did_slrnsc_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink slrnscComment Comment + HiLink slrnscSectionCom slrnscComment + HiLink slrnscGroup String + HiLink slrnscNumber Number + HiLink slrnscDate Special + HiLink slrnscDelim Delimiter + HiLink slrnscComma SpecialChar + HiLink slrnscOper SpecialChar + HiLink slrnscEsc String + HiLink slrnscSectionStd Type + HiLink slrnscSectionNot Delimiter + HiLink slrnscItem Statement + HiLink slrnscScore Keyword + HiLink slrnscScoreIdent Identifier + HiLink slrnscInclude Keyword + + delcommand HiLink +endif + +let b:current_syntax = "slrnsc" + +"EOF vim: ts=8 noet tw=200 sw=8 sts=0 diff --git a/runtime/syntax/sm.vim b/runtime/syntax/sm.vim new file mode 100644 index 000000000..f919d8732 --- /dev/null +++ b/runtime/syntax/sm.vim @@ -0,0 +1,96 @@ +" Vim syntax file +" Language: sendmail +" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> +" Last Change: Sep 02, 2003 +" Version: 3 +" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Comments +syn match smComment "^#.*$" contains=@Spell + +" Definitions, Classes, Files, Options, Precedence, Trusted Users, Mailers +syn match smDefine "^[CDF]." +syn match smDefine "^O[AaBcdDeFfgHiLmNoQqrSsTtuvxXyYzZ]" +syn match smDefine "^O\s"he=e-1 +syn match smDefine "^M[a-zA-Z0-9]\+,"he=e-1 +syn match smDefine "^T" nextgroup=smTrusted +syn match smDefine "^P" nextgroup=smMesg +syn match smTrusted "\S\+$" contained +syn match smMesg "\S*="he=e-1 contained nextgroup=smPrecedence +syn match smPrecedence "-\=[0-9]\+" contained + +" Header Format H?list-of-mailer-flags?name: format +syn match smHeaderSep contained "[?:]" +syn match smHeader "^H\(?[a-zA-Z]\+?\)\=[-a-zA-Z_]\+:" contains=smHeaderSep + +" Variables +syn match smVar "\$[a-z\.\|]" + +" Rulesets +syn match smRuleset "^S\d*" + +" Rewriting Rules +syn match smRewrite "^R" skipwhite nextgroup=smRewriteLhsToken,smRewriteLhsUser + +syn match smRewriteLhsUser contained "[^\t$]\+" skipwhite nextgroup=smRewriteLhsToken,smRewriteLhsSep +syn match smRewriteLhsToken contained "\(\$[-*+]\|\$[-=][A-Za-z]\|\$Y\)\+" skipwhite nextgroup=smRewriteLhsUser,smRewriteLhsSep + +syn match smRewriteLhsSep contained "\t\+" skipwhite nextgroup=smRewriteRhsToken,smRewriteRhsUser + +syn match smRewriteRhsUser contained "[^\t$]\+" skipwhite nextgroup=smRewriteRhsToken,smRewriteRhsSep +syn match smRewriteRhsToken contained "\(\$\d\|\$>\d\|\$#\|\$@\|\$:[-_a-zA-Z]\+\|\$[[\]]\|\$@\|\$:\|\$[A-Za-z]\)\+" skipwhite nextgroup=smRewriteRhsUser,smRewriteRhsSep + +syn match smRewriteRhsSep contained "\t\+" skipwhite nextgroup=smRewriteComment,smRewriteRhsSep +syn match smRewriteRhsSep contained "$" + +syn match smRewriteComment contained "[^\t$]*$" + +" Clauses +syn match smClauseError "\$\." +syn match smElse contained "\$|" +syn match smClauseCont contained "^\t" +syn region smClause matchgroup=Delimiter start="\$?." matchgroup=Delimiter end="\$\." contains=smElse,smClause,smVar,smClauseCont + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_smil_syntax_inits") + if version < 508 + let did_smil_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink smClause Special + HiLink smClauseError Error + HiLink smComment Comment + HiLink smDefine Statement + HiLink smElse Delimiter + HiLink smHeader Statement + HiLink smHeaderSep String + HiLink smMesg Special + HiLink smPrecedence Number + HiLink smRewrite Statement + HiLink smRewriteComment Comment + HiLink smRewriteLhsToken String + HiLink smRewriteLhsUser Statement + HiLink smRewriteRhsToken String + HiLink smRuleset Preproc + HiLink smTrusted Special + HiLink smVar String + + delcommand HiLink +endif + +let b:current_syntax = "sm" + +" vim: ts=18 diff --git a/runtime/syntax/smarty.vim b/runtime/syntax/smarty.vim new file mode 100644 index 000000000..6dda366ba --- /dev/null +++ b/runtime/syntax/smarty.vim @@ -0,0 +1,86 @@ +" Vim syntax file +" Language: Smarty Templates +" Maintainer: Manfred Stienstra manfred.stienstra@dwerg.net +" Last Change: Mon Nov 4 11:42:23 CET 2002 +" Filenames: *.tpl +" URL: http://www.dwerg.net/projects/vim/smarty.vim + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if !exists("main_syntax") + if version < 600 + syntax clear + elseif exists("b:current_syntax") + finish +endif + let main_syntax = 'smarty' +endif + +syn case ignore + +runtime! syntax/html.vim +"syn cluster htmlPreproc add=smartyUnZone + +syn match smartyBlock contained "[\[\]]" + +syn keyword smartyTagName capture config_load include include_php +syn keyword smartyTagName insert if elseif else ldelim rdelim literal +syn keyword smartyTagName php section sectionelse foreach foreachelse +syn keyword smartyTagName strip assign counter cycle debug eval fetch +syn keyword smartyTagName html_options html_select_date html_select_time +syn keyword smartyTagName math popup_init popup html_checkboxes html_image +syn keyword smartyTagName html_radios html_table mailto textformat + +syn keyword smartyModifier cat capitalize count_characters count_paragraphs +syn keyword smartyModifier count_sentences count_words date_format default +syn keyword smartyModifier escape indent lower nl2br regex_replace replace +syn keyword smartyModifier spacify string_format strip strip_tags truncate +syn keyword smartyModifier upper wordwrap + +syn keyword smartyInFunc neq eq + +syn keyword smartyProperty contained "file=" +syn keyword smartyProperty contained "loop=" +syn keyword smartyProperty contained "name=" +syn keyword smartyProperty contained "include=" +syn keyword smartyProperty contained "skip=" +syn keyword smartyProperty contained "section=" + +syn keyword smartyConstant "\$smarty" + +syn keyword smartyDot . + +syn region smartyZone matchgroup=Delimiter start="{" end="}" contains=smartyProperty, smartyString, smartyBlock, smartyTagName, smartyConstant, smartyInFunc, smartyModifier + +syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,smartyZone +syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc,smartyZone + syn region htmlLink start="<a\>\_[^>]*\<href\>" end="</a>"me=e-4 contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc,smartyZone + + +if version >= 508 || !exists("did_smarty_syn_inits") + if version < 508 + let did_smarty_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink smartyTagName Identifier + HiLink smartyProperty Constant + " if you want the text inside the braces to be colored, then + " remove the comment in from of the next statement + "HiLink smartyZone Include + HiLink smartyInFunc Function + HiLink smartyBlock Constant + HiLink smartyDot SpecialChar + HiLink smartyModifier Function + delcommand HiLink +endif + +let b:current_syntax = "smarty" + +if main_syntax == 'smarty' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/runtime/syntax/smil.vim b/runtime/syntax/smil.vim new file mode 100644 index 000000000..0b53d8ec3 --- /dev/null +++ b/runtime/syntax/smil.vim @@ -0,0 +1,154 @@ +" Vim syntax file +" Language: SMIL (Synchronized Multimedia Integration Language) +" Maintainer: Herve Foucher <Herve.Foucher@helio.org> +" URL: http://www.helio.org/vim/syntax/smil.vim +" Last Change: 2003 May 11 + +" To learn more about SMIL, please refer to http://www.w3.org/AudioVideo/ +" and to http://www.helio.org/products/smil/tutorial/ + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" SMIL is case sensitive +syn case match + +" illegal characters +syn match smilError "[<>&]" +syn match smilError "[()&]" + +if !exists("main_syntax") + let main_syntax = 'smil' +endif + +" tags +syn match smilSpecial contained "\\\d\d\d\|\\." +syn match smilSpecial contained "(" +syn match smilSpecial contained "id(" +syn match smilSpecial contained ")" +syn keyword smilSpecial contained remove freeze true false on off overdub caption new pause replace +syn keyword smilSpecial contained first last +syn keyword smilSpecial contained fill meet slice scroll hidden +syn region smilString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=smilSpecial +syn region smilString contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=smilSpecial +syn match smilValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 +syn region smilEndTag start=+</+ end=+>+ contains=smilTagN,smilTagError +syn region smilTag start=+<[^/]+ end=+>+ contains=smilTagN,smilString,smilArg,smilValue,smilTagError,smilEvent,smilCssDefinition +syn match smilTagN contained +<\s*[-a-zA-Z0-9]\++ms=s+1 contains=smilTagName,smilSpecialTagName +syn match smilTagN contained +</\s*[-a-zA-Z0-9]\++ms=s+2 contains=smilTagName,smilSpecialTagName +syn match smilTagError contained "[^>]<"ms=s+1 + +" tag names +syn keyword smilTagName contained smil head body anchor a switch region layout meta +syn match smilTagName contained "root-layout" +syn keyword smilTagName contained par seq +syn keyword smilTagName contained animation video img audio ref text textstream +syn match smilTagName contained "\<\(head\|body\)\>" + + +" legal arg names +syn keyword smilArg contained dur begin end href target id coords show title abstract author copyright alt +syn keyword smilArg contained left top width height fit src name content fill longdesc repeat type +syn match smilArg contained "z-index" +syn match smilArg contained " end-sync" +syn match smilArg contained " region" +syn match smilArg contained "background-color" +syn match smilArg contained "system-bitrate" +syn match smilArg contained "system-captions" +syn match smilArg contained "system-overdub-or-caption" +syn match smilArg contained "system-language" +syn match smilArg contained "system-required" +syn match smilArg contained "system-screen-depth" +syn match smilArg contained "system-screen-size" +syn match smilArg contained "clip-begin" +syn match smilArg contained "clip-end" +syn match smilArg contained "skip-content" + + +" SMIL Boston ext. +" This are new SMIL functionnalities seen on www.w3.org on August 3rd 1999 + +" Animation +syn keyword smilTagName contained animate set move +syn keyword smilArg contained calcMode from to by additive values origin path +syn keyword smilArg contained accumulate hold attribute +syn match smilArg contained "xml:link" +syn keyword smilSpecial contained discrete linear spline parent layout +syn keyword smilSpecial contained top left simple + +" Linking +syn keyword smilTagName contained area +syn keyword smilArg contained actuate behavior inline sourceVolume +syn keyword smilArg contained destinationVolume destinationPlaystate tabindex +syn keyword smilArg contained class style lang dir onclick ondblclick onmousedown onmouseup onmouseover onmousemove onmouseout onkeypress onkeydown onkeyup shape nohref accesskey onfocus onblur +syn keyword smilSpecial contained play pause stop rect circ poly child par seq + +" Media Object +syn keyword smilTagName contained rtpmap +syn keyword smilArg contained port transport encoding payload clipBegin clipEnd +syn match smilArg contained "fmt-list" + +" Timing and Synchronization +syn keyword smilTagName contained excl +syn keyword smilArg contained beginEvent endEvent eventRestart endSync repeatCount repeatDur +syn keyword smilArg contained syncBehavior syncTolerance +syn keyword smilSpecial contained canSlip locked + +" special characters +syn match smilSpecialChar "&[^;]*;" + +if exists("smil_wrong_comments") + syn region smilComment start=+<!--+ end=+-->+ +else + syn region smilComment start=+<!+ end=+>+ contains=smilCommentPart,smilCommentError + syn match smilCommentError contained "[^><!]" + syn region smilCommentPart contained start=+--+ end=+--+ +endif +syn region smilComment start=+<!DOCTYPE+ keepend end=+>+ + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_smil_syntax_inits") + if version < 508 + let did_smil_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink smilTag Function + HiLink smilEndTag Identifier + HiLink smilArg Type + HiLink smilTagName smilStatement + HiLink smilSpecialTagName Exception + HiLink smilValue Value + HiLink smilSpecialChar Special + + HiLink smilSpecial Special + HiLink smilSpecialChar Special + HiLink smilString String + HiLink smilStatement Statement + HiLink smilComment Comment + HiLink smilCommentPart Comment + HiLink smilPreProc PreProc + HiLink smilValue String + HiLink smilCommentError smilError + HiLink smilTagError smilError + HiLink smilError Error + + delcommand HiLink +endif + +let b:current_syntax = "smil" + +if main_syntax == 'smil' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/runtime/syntax/smith.vim b/runtime/syntax/smith.vim new file mode 100644 index 000000000..e05ce6968 --- /dev/null +++ b/runtime/syntax/smith.vim @@ -0,0 +1,52 @@ +" Vim syntax file +" Language: SMITH +" Maintainer: Rafal M. Sulejman <rms@poczta.onet.pl> +" Last Change: 21.07.2000 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + + +syn match smithComment ";.*$" + +syn match smithNumber "\<[+-]*[0-9]\d*\>" + +syn match smithRegister "R[\[]*[0-9]*[\]]*" + +syn match smithKeyword "COR\|MOV\|MUL\|NOT\|STOP\|SUB\|NOP\|BLA\|REP" + +syn region smithString start=+"+ skip=+\\\\\|\\"+ end=+"+ + + +syn case match + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_smith_syntax_inits") + if version < 508 + let did_smith_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink smithRegister Identifier + HiLink smithKeyword Keyword + HiLink smithComment Comment + HiLink smithString String + HiLink smithNumber Number + + delcommand HiLink +endif + +let b:current_syntax = "smith" + +" vim: ts=2 diff --git a/runtime/syntax/sml.vim b/runtime/syntax/sml.vim new file mode 100644 index 000000000..b3c335b8b --- /dev/null +++ b/runtime/syntax/sml.vim @@ -0,0 +1,230 @@ +" Vim syntax file +" Language: SML +" Filenames: *.sml *.sig +" Maintainers: Markus Mottl <markus@oefai.at> +" Fabrizio Zeno Cornelli <zeno@filibusta.crema.unimi.it> +" URL: http://www.ai.univie.ac.at/~markus/vim/syntax/sml.vim +" Last Change: 2003 May 11 +" 2001 Nov 20 - Fixed small highlighting bug with modules (MM) +" 2001 Aug 29 - Fixed small highlighting bug (MM) + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" SML is case sensitive. +syn case match + +" lowercase identifier - the standard way to match +syn match smlLCIdentifier /\<\(\l\|_\)\(\w\|'\)*\>/ + +syn match smlKeyChar "|" + +" Errors +syn match smlBraceErr "}" +syn match smlBrackErr "\]" +syn match smlParenErr ")" +syn match smlCommentErr "\*)" +syn match smlThenErr "\<then\>" + +" Error-highlighting of "end" without synchronization: +" as keyword or as error (default) +if exists("sml_noend_error") + syn match smlKeyword "\<end\>" +else + syn match smlEndErr "\<end\>" +endif + +" Some convenient clusters +syn cluster smlAllErrs contains=smlBraceErr,smlBrackErr,smlParenErr,smlCommentErr,smlEndErr,smlThenErr + +syn cluster smlAENoParen contains=smlBraceErr,smlBrackErr,smlCommentErr,smlEndErr,smlThenErr + +syn cluster smlContained contains=smlTodo,smlPreDef,smlModParam,smlModParam1,smlPreMPRestr,smlMPRestr,smlMPRestr1,smlMPRestr2,smlMPRestr3,smlModRHS,smlFuncWith,smlFuncStruct,smlModTypeRestr,smlModTRWith,smlWith,smlWithRest,smlModType,smlFullMod + + +" Enclosing delimiters +syn region smlEncl transparent matchgroup=smlKeyword start="(" matchgroup=smlKeyword end=")" contains=ALLBUT,@smlContained,smlParenErr +syn region smlEncl transparent matchgroup=smlKeyword start="{" matchgroup=smlKeyword end="}" contains=ALLBUT,@smlContained,smlBraceErr +syn region smlEncl transparent matchgroup=smlKeyword start="\[" matchgroup=smlKeyword end="\]" contains=ALLBUT,@smlContained,smlBrackErr +syn region smlEncl transparent matchgroup=smlKeyword start="#\[" matchgroup=smlKeyword end="\]" contains=ALLBUT,@smlContained,smlBrackErr + + +" Comments +syn region smlComment start="(\*" end="\*)" contains=smlComment,smlTodo +syn keyword smlTodo contained TODO FIXME XXX + + +" let +syn region smlEnd matchgroup=smlKeyword start="\<let\>" matchgroup=smlKeyword end="\<end\>" contains=ALLBUT,@smlContained,smlEndErr + +" local +syn region smlEnd matchgroup=smlKeyword start="\<local\>" matchgroup=smlKeyword end="\<end\>" contains=ALLBUT,@smlContained,smlEndErr + +" abstype +syn region smlNone matchgroup=smlKeyword start="\<abstype\>" matchgroup=smlKeyword end="\<end\>" contains=ALLBUT,@smlContained,smlEndErr + +" begin +syn region smlEnd matchgroup=smlKeyword start="\<begin\>" matchgroup=smlKeyword end="\<end\>" contains=ALLBUT,@smlContained,smlEndErr + +" if +syn region smlNone matchgroup=smlKeyword start="\<if\>" matchgroup=smlKeyword end="\<then\>" contains=ALLBUT,@smlContained,smlThenErr + + +"" Modules + +" "struct" +syn region smlStruct matchgroup=smlModule start="\<struct\>" matchgroup=smlModule end="\<end\>" contains=ALLBUT,@smlContained,smlEndErr + +" "sig" +syn region smlSig matchgroup=smlModule start="\<sig\>" matchgroup=smlModule end="\<end\>" contains=ALLBUT,@smlContained,smlEndErr,smlModule +syn region smlModSpec matchgroup=smlKeyword start="\<structure\>" matchgroup=smlModule end="\<\u\(\w\|'\)*\>" contained contains=@smlAllErrs,smlComment skipwhite skipempty nextgroup=smlModTRWith,smlMPRestr + +" "open" +syn region smlNone matchgroup=smlKeyword start="\<open\>" matchgroup=smlModule end="\<\u\(\w\|'\)*\(\.\u\(\w\|'\)*\)*\>" contains=@smlAllErrs,smlComment + +" "structure" - somewhat complicated stuff ;-) +syn region smlModule matchgroup=smlKeyword start="\<\(structure\|functor\)\>" matchgroup=smlModule end="\<\u\(\w\|'\)*\>" contains=@smlAllErrs,smlComment skipwhite skipempty nextgroup=smlPreDef +syn region smlPreDef start="."me=e-1 matchgroup=smlKeyword end="\l\|="me=e-1 contained contains=@smlAllErrs,smlComment,smlModParam,smlModTypeRestr,smlModTRWith nextgroup=smlModPreRHS +syn region smlModParam start="([^*]" end=")" contained contains=@smlAENoParen,smlModParam1 +syn match smlModParam1 "\<\u\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=smlPreMPRestr + +syn region smlPreMPRestr start="."me=e-1 end=")"me=e-1 contained contains=@smlAllErrs,smlComment,smlMPRestr,smlModTypeRestr + +syn region smlMPRestr start=":" end="."me=e-1 contained contains=@smlComment skipwhite skipempty nextgroup=smlMPRestr1,smlMPRestr2,smlMPRestr3 +syn region smlMPRestr1 matchgroup=smlModule start="\ssig\s\=" matchgroup=smlModule end="\<end\>" contained contains=ALLBUT,@smlContained,smlEndErr,smlModule +syn region smlMPRestr2 start="\sfunctor\(\s\|(\)\="me=e-1 matchgroup=smlKeyword end="->" contained contains=@smlAllErrs,smlComment,smlModParam skipwhite skipempty nextgroup=smlFuncWith +syn match smlMPRestr3 "\w\(\w\|'\)*\(\.\w\(\w\|'\)*\)*" contained +syn match smlModPreRHS "=" contained skipwhite skipempty nextgroup=smlModParam,smlFullMod +syn region smlModRHS start="." end=".\w\|([^*]"me=e-2 contained contains=smlComment skipwhite skipempty nextgroup=smlModParam,smlFullMod +syn match smlFullMod "\<\u\(\w\|'\)*\(\.\u\(\w\|'\)*\)*" contained skipwhite skipempty nextgroup=smlFuncWith + +syn region smlFuncWith start="([^*]"me=e-1 end=")" contained contains=smlComment,smlWith,smlFuncStruct +syn region smlFuncStruct matchgroup=smlModule start="[^a-zA-Z]struct\>"hs=s+1 matchgroup=smlModule end="\<end\>" contains=ALLBUT,@smlContained,smlEndErr + +syn match smlModTypeRestr "\<\w\(\w\|'\)*\(\.\w\(\w\|'\)*\)*\>" contained +syn region smlModTRWith start=":\s*("hs=s+1 end=")" contained contains=@smlAENoParen,smlWith +syn match smlWith "\<\(\u\(\w\|'\)*\.\)*\w\(\w\|'\)*\>" contained skipwhite skipempty nextgroup=smlWithRest +syn region smlWithRest start="[^)]" end=")"me=e-1 contained contains=ALLBUT,@smlContained + +" "signature" +syn region smlKeyword start="\<signature\>" matchgroup=smlModule end="\<\w\(\w\|'\)*\>" contains=smlComment skipwhite skipempty nextgroup=smlMTDef +syn match smlMTDef "=\s*\w\(\w\|'\)*\>"hs=s+1,me=s + +syn keyword smlKeyword and andalso case +syn keyword smlKeyword datatype else eqtype +syn keyword smlKeyword exception fn fun handle +syn keyword smlKeyword in infix infixl infixr +syn keyword smlKeyword match nonfix of orelse +syn keyword smlKeyword raise handle type +syn keyword smlKeyword val where while with withtype + +syn keyword smlType bool char exn int list option +syn keyword smlType real string unit + +syn keyword smlOperator div mod not or quot rem + +syn keyword smlBoolean true false +syn match smlConstructor "(\s*)" +syn match smlConstructor "\[\s*\]" +syn match smlConstructor "#\[\s*\]" +syn match smlConstructor "\u\(\w\|'\)*\>" + +" Module prefix +syn match smlModPath "\u\(\w\|'\)*\."he=e-1 + +syn match smlCharacter +#"."\|#"\\\d\d\d"+ +syn match smlCharErr +#"\\\d\d"\|#"\\\d"+ +syn region smlString start=+"+ skip=+\\\\\|\\"+ end=+"+ + +syn match smlFunDef "=>" +syn match smlRefAssign ":=" +syn match smlTopStop ";;" +syn match smlOperator "\^" +syn match smlOperator "::" +syn match smlAnyVar "\<_\>" +syn match smlKeyChar "!" +syn match smlKeyChar ";" +syn match smlKeyChar "\*" +syn match smlKeyChar "=" + +syn match smlNumber "\<-\=\d\+\>" +syn match smlNumber "\<-\=0[x|X]\x\+\>" +syn match smlReal "\<-\=\d\+\.\d*\([eE][-+]\=\d\+\)\=[fl]\=\>" + +" Synchronization +syn sync minlines=20 +syn sync maxlines=500 + +syn sync match smlEndSync grouphere smlEnd "\<begin\>" +syn sync match smlEndSync groupthere smlEnd "\<end\>" +syn sync match smlStructSync grouphere smlStruct "\<struct\>" +syn sync match smlStructSync groupthere smlStruct "\<end\>" +syn sync match smlSigSync grouphere smlSig "\<sig\>" +syn sync match smlSigSync groupthere smlSig "\<end\>" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_sml_syntax_inits") + if version < 508 + let did_sml_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink smlBraceErr Error + HiLink smlBrackErr Error + HiLink smlParenErr Error + + HiLink smlCommentErr Error + + HiLink smlEndErr Error + HiLink smlThenErr Error + + HiLink smlCharErr Error + + HiLink smlComment Comment + + HiLink smlModPath Include + HiLink smlModule Include + HiLink smlModParam1 Include + HiLink smlModType Include + HiLink smlMPRestr3 Include + HiLink smlFullMod Include + HiLink smlModTypeRestr Include + HiLink smlWith Include + HiLink smlMTDef Include + + HiLink smlConstructor Constant + + HiLink smlModPreRHS Keyword + HiLink smlMPRestr2 Keyword + HiLink smlKeyword Keyword + HiLink smlFunDef Keyword + HiLink smlRefAssign Keyword + HiLink smlKeyChar Keyword + HiLink smlAnyVar Keyword + HiLink smlTopStop Keyword + HiLink smlOperator Keyword + + HiLink smlBoolean Boolean + HiLink smlCharacter Character + HiLink smlNumber Number + HiLink smlReal Float + HiLink smlString String + HiLink smlType Type + HiLink smlTodo Todo + HiLink smlEncl Keyword + + delcommand HiLink +endif + +let b:current_syntax = "sml" + +" vim: ts=8 diff --git a/runtime/syntax/snnsnet.vim b/runtime/syntax/snnsnet.vim new file mode 100644 index 000000000..6b24de563 --- /dev/null +++ b/runtime/syntax/snnsnet.vim @@ -0,0 +1,77 @@ +" Vim syntax file +" Language: SNNS network file +" Maintainer: Davide Alberani <alberanid@bigfoot.com> +" Last Change: 28 Apr 2001 +" Version: 0.2 +" URL: http://digilander.iol.it/alberanid/vim/syntax/snnsnet.vim +" +" SNNS http://www-ra.informatik.uni-tuebingen.de/SNNS/ +" is a simulator for neural networks. + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match snnsnetTitle "no\." +syn match snnsnetTitle "type name" +syn match snnsnetTitle "unit name" +syn match snnsnetTitle "act\( func\)\=" +syn match snnsnetTitle "out func" +syn match snnsnetTitle "site\( name\)\=" +syn match snnsnetTitle "site function" +syn match snnsnetTitle "source:weight" +syn match snnsnetTitle "unitNo\." +syn match snnsnetTitle "delta x" +syn match snnsnetTitle "delta y" +syn keyword snnsnetTitle typeName unitName bias st position subnet layer sites name target z LLN LUN Toff Soff Ctype + +syn match snnsnetType "SNNS network definition file [Vv]\d.\d.*" contains=snnsnetNumbers +syn match snnsnetType "generated at.*" contains=snnsnetNumbers +syn match snnsnetType "network name\s*:" +syn match snnsnetType "source files\s*:" +syn match snnsnetType "no\. of units\s*:.*" contains=snnsnetNumbers +syn match snnsnetType "no\. of connections\s*:.*" contains=snnsnetNumbers +syn match snnsnetType "no\. of unit types\s*:.*" contains=snnsnetNumbers +syn match snnsnetType "no\. of site types\s*:.*" contains=snnsnetNumbers +syn match snnsnetType "learning function\s*:" +syn match snnsnetType "pruning function\s*:" +syn match snnsnetType "subordinate learning function\s*:" +syn match snnsnetType "update function\s*:" + +syn match snnsnetSection "unit definition section" +syn match snnsnetSection "unit default section" +syn match snnsnetSection "site definition section" +syn match snnsnetSection "type definition section" +syn match snnsnetSection "connection definition section" +syn match snnsnetSection "layer definition section" +syn match snnsnetSection "subnet definition section" +syn match snnsnetSection "3D translation section" +syn match snnsnetSection "time delay section" + +syn match snnsnetNumbers "\d" contained +syn match snnsnetComment "#.*$" contains=snnsnetTodo +syn keyword snnsnetTodo TODO XXX FIXME contained + +if version >= 508 || !exists("did_snnsnet_syn_inits") + if version < 508 + let did_snnsnet_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink snnsnetType Type + HiLink snnsnetComment Comment + HiLink snnsnetNumbers Number + HiLink snnsnetSection Statement + HiLink snnsnetTitle Label + HiLink snnsnetTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "snnsnet" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/snnspat.vim b/runtime/syntax/snnspat.vim new file mode 100644 index 000000000..3c07fad16 --- /dev/null +++ b/runtime/syntax/snnspat.vim @@ -0,0 +1,68 @@ +" Vim syntax file +" Language: SNNS pattern file +" Maintainer: Davide Alberani <alberanid@bigfoot.com> +" Last Change: 28 Apr 2001 +" Version: 0.2 +" URL: http://digilander.iol.it/alberanid/vim/syntax/snnspat.vim +" +" SNNS http://www-ra.informatik.uni-tuebingen.de/SNNS/ +" is a simulator for neural networks. + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + +" anything that isn't part of the header, a comment or a number +" is wrong +syn match snnspatError ".*" +" hoping that matches any kind of notation... +syn match snnspatAccepted "\([-+]\=\(\d\+\.\|\.\)\=\d\+\([Ee][-+]\=\d\+\)\=\)" +syn match snnspatAccepted "\s" +syn match snnspatBrac "\[\s*\d\+\(\s\|\d\)*\]" contains=snnspatNumbers + +" the accepted fields in the header +syn match snnspatNoHeader "No\. of patterns\s*:\s*" contained +syn match snnspatNoHeader "No\. of input units\s*:\s*" contained +syn match snnspatNoHeader "No\. of output units\s*:\s*" contained +syn match snnspatNoHeader "No\. of variable input dimensions\s*:\s*" contained +syn match snnspatNoHeader "No\. of variable output dimensions\s*:\s*" contained +syn match snnspatNoHeader "Maximum input dimensions\s*:\s*" contained +syn match snnspatNoHeader "Maximum output dimensions\s*:\s*" contained +syn match snnspatGen "generated at.*" contained contains=snnspatNumbers +syn match snnspatGen "SNNS pattern definition file [Vv]\d\.\d" contained contains=snnspatNumbers + +" the header, what is not an accepted field, is an error +syn region snnspatHeader start="^SNNS" end="^\s*[-+\.]\=[0-9#]"me=e-2 contains=snnspatNoHeader,snnspatNumbers,snnspatGen,snnspatBrac + +" numbers inside the header +syn match snnspatNumbers "\d" contained +syn match snnspatComment "#.*$" contains=snnspatTodo +syn keyword snnspatTodo TODO XXX FIXME contained + +if version >= 508 || !exists("did_snnspat_syn_inits") + if version < 508 + let did_snnspat_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink snnspatGen Statement + HiLink snnspatHeader Error + HiLink snnspatNoHeader Define + HiLink snnspatNumbers Number + HiLink snnspatComment Comment + HiLink snnspatError Error + HiLink snnspatTodo Todo + HiLink snnspatAccepted NONE + HiLink snnspatBrac NONE + + delcommand HiLink +endif + +let b:current_syntax = "snnspat" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/snnsres.vim b/runtime/syntax/snnsres.vim new file mode 100644 index 000000000..4c1d59600 --- /dev/null +++ b/runtime/syntax/snnsres.vim @@ -0,0 +1,60 @@ +" Vim syntax file +" Language: SNNS result file +" Maintainer: Davide Alberani <alberanid@bigfoot.com> +" Last Change: 28 Apr 2001 +" Version: 0.2 +" URL: http://digilander.iol.it/alberanid/vim/syntax/snnsres.vim +" +" SNNS http://www-ra.informatik.uni-tuebingen.de/SNNS/ +" is a simulator for neural networks. + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" the accepted fields in the header +syn match snnsresNoHeader "No\. of patterns\s*:\s*" contained +syn match snnsresNoHeader "No\. of input units\s*:\s*" contained +syn match snnsresNoHeader "No\. of output units\s*:\s*" contained +syn match snnsresNoHeader "No\. of variable input dimensions\s*:\s*" contained +syn match snnsresNoHeader "No\. of variable output dimensions\s*:\s*" contained +syn match snnsresNoHeader "Maximum input dimensions\s*:\s*" contained +syn match snnsresNoHeader "Maximum output dimensions\s*:\s*" contained +syn match snnsresNoHeader "startpattern\s*:\s*" contained +syn match snnsresNoHeader "endpattern\s*:\s*" contained +syn match snnsresNoHeader "input patterns included" contained +syn match snnsresNoHeader "teaching output included" contained +syn match snnsresGen "generated at.*" contained contains=snnsresNumbers +syn match snnsresGen "SNNS result file [Vv]\d\.\d" contained contains=snnsresNumbers + +" the header, what is not an accepted field, is an error +syn region snnsresHeader start="^SNNS" end="^\s*[-+\.]\=[0-9#]"me=e-2 contains=snnsresNoHeader,snnsresNumbers,snnsresGen + +" numbers inside the header +syn match snnsresNumbers "\d" contained +syn match snnsresComment "#.*$" contains=snnsresTodo +syn keyword snnsresTodo TODO XXX FIXME contained + +if version >= 508 || !exists("did_snnsres_syn_inits") + if version < 508 + let did_snnsres_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink snnsresGen Statement + HiLink snnsresHeader Statement + HiLink snnsresNoHeader Define + HiLink snnsresNumbers Number + HiLink snnsresComment Comment + HiLink snnsresTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "snnsres" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/snobol4.vim b/runtime/syntax/snobol4.vim new file mode 100644 index 000000000..d5475e5e7 --- /dev/null +++ b/runtime/syntax/snobol4.vim @@ -0,0 +1,93 @@ +" Vim syntax file +" Language: SNOBOL4 +" Maintainer: Rafal Sulejman <rms@poczta.onet.pl> +" Last change: 2004 May 16 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syntax case ignore +" Vanilla Snobol4 keywords +syn keyword snobol4Keywoard any apply arb arbno arg array +syn keyword snobol4Keywoard break +syn keyword snobol4Keywoard char clear code collect convert copy +syn keyword snobol4Keywoard data datatype date define detach differ dump dupl +syn keyword snobol4Keywoard endfile eq eval +syn keyword snobol4Keywoard field +syn keyword snobol4Keywoard ge gt ident +syn keyword snobol4Keywoard input integer item +syn keyword snobol4Keywoard le len lgt local lpad lt +syn keyword snobol4Keywoard ne notany +syn keyword snobol4Keywoard opsyn output +syn keyword snobol4Keywoard pos prototype +syn keyword snobol4Keywoard remdr replace rpad rpos rtab +syn keyword snobol4Keywoard size span stoptr +syn keyword snobol4Keywoard tab table time trace trim +syn keyword snobol4Keywoard unload +syn keyword snobol4Keywoard value +" Spitbol keywords +" CSNOBOL keywords +syn keyword snobol4Keywoard sset + +syn region snobol4String matchgroup=Quote start=+"+ skip=+\\"+ end=+"+ +syn region snobol4String matchgroup=Quote start=+'+ skip=+\\'+ end=+'+ +syn match snobol4Label "^[^- \t][^ \t]*" +syn match snobol4Statement "^-[^ ][^ ]*" +syn match snobol4Comment "^*.*$" +syn match Constant "\.[a-z][a-z0-9\-]*" +"syn match snobol4Label ":\([sf]*([^)]*)\)*" contains=ALLBUT,snobol4ParenError +syn region snobol4Label start=":(" end=")" contains=ALLBUT,snobol4ParenError +syn region snobol4Label start=":f(" end=")" contains=ALLBUT,snobol4ParenError +syn region snobol4Label start=":s(" end=")" contains=ALLBUT,snobol4ParenError +syn match snobol4Number "\<\d*\(\.\d\d*\)*\>" +" Parens matching +syn cluster snobol4ParenGroup contains=snobol4ParenError +syn region snobol4Paren transparent start='(' end=')' contains=ALLBUT,@snobol4ParenGroup,snobol4ErrInBracket +syn match snobol4ParenError display "[\])]" +syn match snobol4ErrInParen display contained "[\]{}]\|<%\|%>" +syn region snobol4Bracket transparent start='\[\|<:' end=']\|:>' contains=ALLBUT,@snobol4ParenGroup,snobol4ErrInParen +syn match snobol4ErrInBracket display contained "[);{}]\|<%\|%>" + +" optional shell shebang line +syn match snobol4Comment "^\#\!.*$" + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_snobol4_syntax_inits") + if version < 508 + let did_snobol4_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink snobol4Label Label + HiLink snobol4Conditional Conditional + HiLink snobol4Repeat Repeat + HiLink snobol4Number Number + HiLink snobol4Error Error + HiLink snobol4Statement PreProc + HiLink snobol4String String + HiLink snobol4Comment Comment + HiLink snobol4Special Special + HiLink snobol4Todo Todo + HiLink snobol4Keyword Statement + HiLink snobol4Function Statement + HiLink snobol4Keyword Keyword + HiLink snobol4MathsOperator Operator + HiLink snobol4ParenError snobol4Error + HiLink snobol4ErrInParen snobol4Error + HiLink snobol4ErrInBracket snobol4Error + + delcommand HiLink +endif + +let b:current_syntax = "snobol4" +" vim: ts=8 diff --git a/runtime/syntax/spec.vim b/runtime/syntax/spec.vim new file mode 100644 index 000000000..fafb2d4af --- /dev/null +++ b/runtime/syntax/spec.vim @@ -0,0 +1,236 @@ +" Filename: spec.vim +" Purpose: Vim syntax file +" Language: SPEC: Build/install scripts for Linux RPM packages +" Maintainer: Donovan Rebbechi elflord@pegasus.rutgers.edu +" URL: http://pegasus.rutgers.edu/~elflord/vim/syntax/spec.vim +" Last Change: Tue Oct 3 17:35:15 BRST 2000 <aurelio@conectiva.com.br> + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn sync minlines=1000 + +syn match specSpecialChar contained '[][!$()\\|>^;:{}]' +syn match specColon contained ':' +syn match specPercent contained '%' + +syn match specVariables contained '\$\h\w*' contains=specSpecialVariablesNames,specSpecialChar +syn match specVariables contained '\${\w*}' contains=specSpecialVariablesNames,specSpecialChar + +syn match specMacroIdentifier contained '%\h\w*' contains=specMacroNameLocal,specMacroNameOther,specPercent +syn match specMacroIdentifier contained '%{\w*}' contains=specMacroNameLocal,specMacroNameOther,specPercent,specSpecialChar + +syn match specSpecialVariables contained '\$[0-9]\|\${[0-9]}' +syn match specCommandOpts contained '\s\(-\w\+\|--\w[a-zA-Z_-]\+\)'ms=s+1 +syn match specComment '^\s*#.*$' + + +syn case match + + +"matches with no highlight +syn match specNoNumberHilite 'X11\|X11R6\|[a-zA-Z]*\.\d\|[a-zA-Z][-/]\d' +syn match specManpageFile '[a-zA-Z]\.1' + +"Day, Month and most used license acronyms +syn keyword specLicense contained GPL LGPL BSD MIT GNU +syn keyword specWeekday contained Mon Tue Wed Thu Fri Sat Sun +syn keyword specMonth contained Jan Feb Mar Apr Jun Jul Aug Sep Oct Nov Dec +syn keyword specMonth contained January February March April May June July August September October November December + +"#, @, www +syn match specNumber '\(^-\=\|[ \t]-\=\|-\)[0-9.-]*[0-9]' +syn match specEmail contained "<\=\<[A-Za-z0-9_.-]\+@\([A-Za-z0-9_-]\+\.\)\+[A-Za-z]\+\>>\=" +syn match specURL contained '\<\(\(https\{0,1}\|ftp\)://\|\(www[23]\{0,1}\.\|ftp\.\)\)[A-Za-z0-9._/~:,#-]\+\>' +syn match specURLMacro contained '\<\(\(https\{0,1}\|ftp\)://\|\(www[23]\{0,1}\.\|ftp\.\)\)[A-Za-z0-9._/~:,#%{}-]\+\>' contains=specMacroIdentifier + +"TODO take specSpecialVariables out of the cluster for the sh* contains (ALLBUT) +"Special system directories +syn match specListedFilesPrefix contained '/\(usr\|local\|opt\|X11R6\|X11\)/'me=e-1 +syn match specListedFilesBin contained '/s\=bin/'me=e-1 +syn match specListedFilesLib contained '/\(lib\|include\)/'me=e-1 +syn match specListedFilesDoc contained '/\(man\d*\|doc\|info\)\>' +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 +syn match specConfigure contained '\./configure' +syn match specTarCommand contained '\<tar\s\+[cxvpzIf]\{,5}\s*' +syn keyword specCommandSpecial contained root +syn keyword specCommand contained make xmkmf mkdir chmod ln find sed rm strip moc echo grep ls rm mv mkdir install cp pwd cat tail then else elif cd gzip rmdir ln eval export touch +syn cluster specCommands contains=specCommand,specTarCommand,specConfigure,specCommandSpecial + +"frequently used rpm env vars +syn keyword specSpecialVariablesNames contained RPM_BUILD_ROOT RPM_BUILD_DIR RPM_SOURCE_DIR RPM_OPT_FLAGS LDFLAGS CC CC_FLAGS CPPNAME CFLAGS CXX CXXFLAGS CPPFLAGS + +"valid macro names from /usr/lib/rpm/macros +syn keyword specMacroNameOther contained buildroot buildsubdir distribution disturl ix86 name nil optflags perl_sitearch release requires_eq vendor version +syn match specMacroNameOther contained '\<\(PATCH\|SOURCE\)\d*\>' + +"valid _macro names from /usr/lib/rpm/macros +syn keyword specMacroNameLocal contained _arch _binary_payload _bindir _build _build_alias _build_cpu _builddir _build_os _buildshell _buildsubdir _build_vendor _bzip2bin _datadir _dbpath _dbpath_rebuild _defaultdocdir _docdir _excludedocs _exec_prefix _fixgroup _fixowner _fixperms _ftpport _ftpproxy _gpg_path _gzipbin _host _host_alias _host_cpu _host_os _host_vendor _httpport _httpproxy _includedir _infodir _install_langs _install_script_path _instchangelog _langpatt _lib _libdir _libexecdir _localstatedir _mandir _netsharedpath _oldincludedir _os _pgpbin _pgp_path _prefix _preScriptEnvironment _provides _rpmdir _rpmfilename _sbindir _sharedstatedir _signature _sourcedir _source_payload _specdir _srcrpmdir _sysconfdir _target _target_alias _target_cpu _target_os _target_platform _target_vendor _timecheck _tmppath _topdir _usr _usrsrc _var _vendor + + +"------------------------------------------------------------------------------ +" here's is all the spec sections definitions: PreAmble, Description, Package, +" Scripts, Files and Changelog + +"One line macros - valid in all ScriptAreas +"tip: remember do include new itens on specScriptArea's skip section +syn region specSectionMacroArea oneline matchgroup=specSectionMacro start='^%\(define\|patch\d*\|setup\|configure\|GNUconfigure\|find_lang\|makeinstall\)\>' end='$' contains=specCommandOpts,specMacroIdentifier +syn region specSectionMacroBracketArea oneline matchgroup=specSectionMacro start='^%{\(configure\|GNUconfigure\|find_lang\|makeinstall\)}' end='$' contains=specCommandOpts,specMacroIdentifier + +"%% Files Section %% +"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\|verify\|ghost\)\>' end='^%[a-zA-Z]'me=e-2 contains=specFilesOpts,specFilesDirective,@specListedFiles,specComment,specCommandSpecial,specMacroIdentifier +"tip: remember to include new itens in specFilesArea above +syn match specFilesDirective contained '%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|verify\|ghost\)\>' + +"valid options for certain section headers +syn match specDescriptionOpts contained '\s-[ln]\s*\a'ms=s+1,me=e-1 +syn match specPackageOpts contained '\s-n\s*\w'ms=s+1,me=e-1 +syn match specFilesOpts contained '\s-f\s*\w'ms=s+1,me=e-1 + + +syn case ignore + + +"%% PreAmble Section %% +"Copyright and Serial were deprecated by License and Epoch +syn region specPreAmbleDeprecated oneline matchgroup=specError start='^\(Copyright\|Serial\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier +syn region specPreAmble oneline matchgroup=specCommand start='^\(Prereq\|Summary\|Name\|Version\|Packager\|Requires\|Icon\|URL\|Source\d*\|Patch\d*\|Prefix\|Packager\|Group\|License\|Release\|BuildRoot\|Distribution\|Vendor\|Provides\|ExclusiveArch\|ExcludeArch\|ExclusiveOS\|Obsoletes\|BuildArch\|BuildArchitectures\|BuildRequires\|BuildConflicts\|BuildPreReq\|Conflicts\|AutoRequires\|AutoReq\|AutoReqProv\|AutoProv\|Epoch\)' end='$' contains=specEmail,specURL,specURLMacro,specLicense,specColon,specVariables,specSpecialChar,specMacroIdentifier + +"%% Description Section %% +syn region specDescriptionArea matchgroup=specSection start='^%description' end='^%'me=e-1 contains=specDescriptionOpts,specEmail,specURL,specNumber,specMacroIdentifier,specComment + +"%% Package Section %% +syn region specPackageArea matchgroup=specSection start='^%package' end='^%'me=e-1 contains=specPackageOpts,specPreAmble,specComment + +"%% Scripts Section %% +syn region specScriptArea matchgroup=specSection start='^%\(prep\|build\|install\|clean\|pre\|postun\|preun\|post\)\>' skip='^%{\|^%\(define\|patch\d*\|configure\|GNUconfigure\|setup\|find_lang\|makeinstall\)\>' end='^%'me=e-1 contains=specSpecialVariables,specVariables,@specCommands,specVariables,shDo,shFor,shCaseEsac,specNoNumberHilite,specCommandOpts,shComment,shIf,specSpecialChar,specMacroIdentifier,specSectionMacroArea,specSectionMacroBracketArea,shOperator,shQuote1,shQuote2 + +"%% Changelog Section %% +syn region specChangelogArea matchgroup=specSection start='^%changelog' end='^%'me=e-1 contains=specEmail,specURL,specWeekday,specMonth,specNumber,specComment,specLicense + + + +"------------------------------------------------------------------------------ +"here's the shell syntax for all the Script Sections + + +syn case match + + +"sh-like comment stile, only valid in script part +syn match shComment contained '#.*$' + +syn region shQuote1 contained matchgroup=shQuoteDelim start=+'+ skip=+\\'+ end=+'+ contains=specMacroIdentifier +syn region shQuote2 contained matchgroup=shQuoteDelim start=+"+ skip=+\\"+ end=+"+ contains=specVariables,specMacroIdentifier + +syn match shOperator contained '[><|!&;]\|[!=]=' +syn region shDo transparent matchgroup=specBlock start="\<do\>" end="\<done\>" contains=ALLBUT,shFunction,shDoError,shCase,specPreAmble,@specListedFiles + +syn region specIf matchgroup=specBlock start="%ifosf\|%ifos\|%ifnos\|%ifarch\|%ifnarch\|%else" end='%endif' contains=ALLBUT, specIfError, shCase + +syn region shIf transparent matchgroup=specBlock start="\<if\>" end="\<fi\>" contains=ALLBUT,shFunction,shIfError,shCase,@specListedFiles + +syn region shFor matchgroup=specBlock start="\<for\>" end="\<in\>" contains=ALLBUT,shFunction,shInError,shCase,@specListedFiles + +syn region shCaseEsac transparent matchgroup=specBlock start="\<case\>" matchgroup=NONE end="\<in\>"me=s-1 contains=ALLBUT,shFunction,shCaseError,@specListedFiles nextgroup=shCaseEsac +syn region shCaseEsac matchgroup=specBlock start="\<in\>" end="\<esac\>" contains=ALLBUT,shFunction,shCaseError,@specListedFilesBin +syn region shCase matchgroup=specBlock contained start=")" end=";;" contains=ALLBUT,shFunction,shCaseError,shCase,@specListedFiles + +syn sync match shDoSync grouphere shDo "\<do\>" +syn sync match shDoSync groupthere shDo "\<done\>" +syn sync match shIfSync grouphere shIf "\<if\>" +syn sync match shIfSync groupthere shIf "\<fi\>" +syn sync match specIfSync grouphere specIf "%ifarch\|%ifos\|%ifnos" +syn sync match specIfSync groupthere specIf "%endIf" +syn sync match shForSync grouphere shFor "\<for\>" +syn sync match shForSync groupthere shFor "\<in\>" +syn sync match shCaseEsacSync grouphere shCaseEsac "\<case\>" +syn sync match shCaseEsacSync groupthere shCaseEsac "\<esac\>" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_spec_syntax_inits") + if version < 508 + let did_spec_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + "main types color definitions + HiLink specSection Structure + HiLink specSectionMacro Macro + HiLink specWWWlink PreProc + HiLink specOpts Operator + + "yes, it's ugly, but white is sooo cool + if &background == "dark" + hi def specGlobalMacro ctermfg=white + else + HiLink specGlobalMacro Identifier + endif + + "sh colors + HiLink shComment Comment + HiLink shIf Statement + HiLink shOperator Special + HiLink shQuote1 String + HiLink shQuote2 String + HiLink shQuoteDelim Statement + + "spec colors + HiLink specBlock Function + HiLink specColon Special + HiLink specCommand Statement + HiLink specCommandOpts specOpts + HiLink specCommandSpecial Special + HiLink specComment Comment + HiLink specConfigure specCommand + HiLink specDate String + HiLink specDescriptionOpts specOpts + HiLink specEmail specWWWlink + HiLink specError Error + HiLink specFilesDirective specSectionMacro + HiLink specFilesOpts specOpts + HiLink specLicense String + HiLink specMacroNameLocal specGlobalMacro + HiLink specMacroNameOther specGlobalMacro + HiLink specManpageFile NONE + HiLink specMonth specDate + HiLink specNoNumberHilite NONE + HiLink specNumber Number + HiLink specPackageOpts specOpts + HiLink specPercent Special + HiLink specSpecialChar Special + HiLink specSpecialVariables specGlobalMacro + HiLink specSpecialVariablesNames specGlobalMacro + HiLink specTarCommand specCommand + HiLink specURL specWWWlink + HiLink specURLMacro specWWWlink + HiLink specVariables Identifier + HiLink specWeekday specDate + HiLink specListedFilesBin Statement + HiLink specListedFilesDoc Statement + HiLink specListedFilesEtc Statement + HiLink specListedFilesLib Statement + HiLink specListedFilesPrefix Statement + HiLink specListedFilesShare Statement + + delcommand HiLink +endif + +let b:current_syntax = "spec" + +" vim: ts=8 diff --git a/runtime/syntax/specman.vim b/runtime/syntax/specman.vim new file mode 100644 index 000000000..3fb77a2af --- /dev/null +++ b/runtime/syntax/specman.vim @@ -0,0 +1,182 @@ +" Vim syntax file +" Language: SPECMAN E-LANGUAGE +" Maintainer: Or Freund <or@mobilian.com ;omf@gmx.co.uk; OrMeir@yahoo.com> +" Last Update: Wed Oct 24 2001 + +"--------------------------------------------------------- +"| If anyone found an error or fix the parenthesis part | +"| I will be happy to hear about it | +"| Thanks Or. | +"--------------------------------------------------------- + +" Remove any old syntax stuff hanging around +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn keyword specmanTodo contained TODO todo ToDo FIXME XXX + +syn keyword specmanStatement var instance on compute start event expect check that routine +syn keyword specmanStatement specman is also first only with like +syn keyword specmanStatement list of all radix hex dec bin ignore illegal +syn keyword specmanStatement traceable untraceable +syn keyword specmanStatement cover using count_only trace_only at_least transition item ranges +syn keyword specmanStatement cross text call task within + +syn keyword specmanMethod initialize non_terminal testgroup delayed exit finish +syn keyword specmanMethod out append print outf appendf +syn keyword specmanMethod post_generate pre_generate setup_test finalize_test extract_test +syn keyword specmanMethod init run copy as_a set_config dut_error add clear lock quit +syn keyword specmanMethod lock unlock release swap quit to_string value stop_run +syn keyword specmanMethod crc_8 crc_32 crc_32_flip get_config add0 all_indices and_all +syn keyword specmanMethod apply average count delete exists first_index get_indices +syn keyword specmanMethod has insert is_a_permutation is_empty key key_exists key_index +syn keyword specmanMethod last last_index max max_index max_value min min_index +syn keyword specmanMethod min_value or_all pop pop0 push push0 product resize reverse +syn keyword specmanMethod sort split sum top top0 unique clear is_all_iterations +syn keyword specmanMethod get_enclosing_unit hdl_path exec deep_compare deep_compare_physical +syn keyword specmanMethod pack unpack warning error fatal +syn match specmanMethod "size()" +syn keyword specmanPacking packing low high +syn keyword specmanType locker address +syn keyword specmanType body code vec chars +syn keyword specmanType integer real bool int long uint byte bits bit time string +syn keyword specmanType byte_array external_pointer +syn keyword specmanBoolean TRUE FALSE +syn keyword specmanPreCondit #ifdef #ifndef #else + +syn keyword specmanConditional choose matches +syn keyword specmanConditional if then else when try + + + +syn keyword specmanLabel case casex casez default + +syn keyword specmanLogical and or not xor + +syn keyword specmanRepeat until repeat while for from to step each do break continue +syn keyword specmanRepeat before next sequence always -kind network +syn keyword specmanRepeat index it me in new return result select + +syn keyword specmanTemporal cycle sample events forever +syn keyword specmanTemporal wait change negedge rise fall delay sync sim true detach eventually emit + +syn keyword specmanConstant MAX_INT MIN_INT NULL UNDEF + +syn keyword specmanDefine define as computed type extend +syn keyword specmanDefine verilog vhdl variable global sys +syn keyword specmanStructure struct unit +syn keyword specmanInclude import +syn keyword specmanConstraint gen keep keeping soft before + +syn keyword specmanSpecial untyped symtab ECHO DOECHO +syn keyword specmanFile files load module ntv source_ref script read write +syn keyword specmanFSM initial idle others posedge clock cycles + + +syn match specmanOperator "[&|~><!)(*%@+/=?:;}{,.\^\-\[\]]" +syn match specmanOperator "+=" +syn match specmanOperator "-=" +syn match specmanOperator "*=" + +syn match specmanComment "//.*" contains=specmanTodo +syn match specmanComment "--.*" +syn region specmanComment start="^'>"hs=s+2 end="^<'"he=e-2 + +syn match specmanHDL "'[`.a-zA-Z0-9_@\[\]]\+\>'" + + +syn match specmanCompare "==" +syn match specmanCompare "!===" +syn match specmanCompare "===" +syn match specmanCompare "!=" +syn match specmanCompare ">=" +syn match specmanCompare "<=" +syn match specmanNumber "[0-9]:[0-9]" +syn match specmanNumber "\(\<\d\+\|\)'[bB]\s*[0-1_xXzZ?]\+\>" +syn match specmanNumber "0[bB]\s*[0-1_xXzZ?]\+\>" +syn match specmanNumber "\(\<\d\+\|\)'[oO]\s*[0-7_xXzZ?]\+\>" +syn match specmanNumber "0[oO]\s*[0-9a-fA-F_xXzZ?]\+\>" +syn match specmanNumber "\(\<\d\+\|\)'[dD]\s*[0-9_xXzZ?]\+\>" +syn match specmanNumber "\(\<\d\+\|\)'[hH]\s*[0-9a-fA-F_xXzZ?]\+\>" +syn match specmanNumber "0[xX]\s*[0-9a-fA-F_xXzZ?]\+\>" +syn match specmanNumber "\<[+-]\=[0-9_]\+\(\.[0-9_]*\|\)\(e[0-9_]*\|\)\>" + +syn region specmanString start=+"+ end=+"+ + + + +"********************************************************************** +" I took this section from c.vim but I didnt succeded to make it work +" ANY one who dare jumping to this deep watter is more than welocome! +"********************************************************************** +""catch errors caused by wrong parenthesis and brackets + +"syn cluster specmanParenGroup contains=specmanParenError +"" ,specmanNumbera,specmanComment +"if exists("specman_no_bracket_error") +"syn region specmanParen transparent start='(' end=')' contains=ALLBUT,@specmanParenGroup +"syn match specmanParenError ")" +"syn match specmanErrInParen contained "[{}]" +"else +"syn region specmanParen transparent start='(' end=')' contains=ALLBUT,@specmanParenGroup,specmanErrInBracket +"syn match specmanParenError "[\])]" +"syn match specmanErrInParen contained "[\]{}]" +"syn region specmanBracket transparent start='\[' end=']' contains=ALLBUT,@specmanParenGroup,specmanErrInParen +"syn match specmanErrInBracket contained "[);{}]" +"endif +" + +"Modify the following as needed. The trade-off is performance versus +"functionality. + +syn sync lines=50 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_specman_syn_inits") + if version < 508 + let did_specman_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + " The default methods for highlighting. Can be overridden later + HiLink specmanConditional Conditional + HiLink specmanConstraint Conditional + HiLink specmanRepeat Repeat + HiLink specmanString String + HiLink specmanComment Comment + HiLink specmanConstant Macro + HiLink specmanNumber Number + HiLink specmanCompare Operator + HiLink specmanOperator Operator + HiLink specmanLogical Operator + HiLink specmanStatement Statement + HiLink specmanHDL SpecialChar + HiLink specmanMethod Function + HiLink specmanInclude Include + HiLink specmanStructure Structure + HiLink specmanBoolean Boolean + HiLink specmanFSM Label + HiLink specmanSpecial Special + HiLink specmanType Type + HiLink specmanTemporal Type + HiLink specmanFile Include + HiLink specmanPreCondit Include + HiLink specmanDefine Typedef + HiLink specmanLabel Label + HiLink specmanPacking keyword + HiLink specmanTodo Todo + HiLink specmanParenError Error + HiLink specmanErrInParen Error + HiLink specmanErrInBracket Error + delcommand HiLink +endif + +let b:current_syntax = "specman" diff --git a/runtime/syntax/spice.vim b/runtime/syntax/spice.vim new file mode 100644 index 000000000..ee1433ead --- /dev/null +++ b/runtime/syntax/spice.vim @@ -0,0 +1,87 @@ +" Vim syntax file +" Language: Spice circuit simulator input netlist +" Maintainer: Noam Halevy <Noam.Halevy.motorola.com> +" Last Change: 12/08/99 +" +" This is based on sh.vim by Lennart Schultz +" but greatly simplified + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" spice syntax is case INsensitive +syn case ignore + +syn keyword spiceTodo contained TODO + +syn match spiceComment "^ \=\*.*$" +syn match spiceComment "\$.*$" + +" Numbers, all with engineering suffixes and optional units +"========================================================== +"floating point number, with dot, optional exponent +syn match spiceNumber "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=\(meg\=\|[afpnumkg]\)\=" +"floating point number, starting with a dot, optional exponent +syn match spiceNumber "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\(meg\=\|[afpnumkg]\)\=" +"integer number with optional exponent +syn match spiceNumber "\<[0-9]\+\(e[-+]\=[0-9]\+\)\=\(meg\=\|[afpnumkg]\)\=" + +" Misc +"===== +syn match spiceWrapLineOperator "\\$" +syn match spiceWrapLineOperator "^+" + +syn match spiceStatement "^ \=\.\I\+" + +" Matching pairs of parentheses +"========================================== +syn region spiceParen transparent matchgroup=spiceOperator start="(" end=")" contains=ALLBUT,spiceParenError +syn region spiceSinglequote matchgroup=spiceOperator start=+'+ end=+'+ + +" Errors +"======= +syn match spiceParenError ")" + +" Syncs +" ===== +syn sync minlines=50 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_spice_syntax_inits") + if version < 508 + let did_spice_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink spiceTodo Todo + HiLink spiceWrapLineOperator spiceOperator + HiLink spiceSinglequote spiceExpr + HiLink spiceExpr Function + HiLink spiceParenError Error + HiLink spiceStatement Statement + HiLink spiceNumber Number + HiLink spiceComment Comment + HiLink spiceOperator Operator + + delcommand HiLink +endif + +let b:current_syntax = "spice" + +" insert the following to $VIM/syntax/scripts.vim +" to autodetect HSpice netlists and text listing output: +" +" " Spice netlists and text listings +" elseif getline(1) =~ 'spice\>' || getline("$") =~ '^\.end' +" so <sfile>:p:h/spice.vim + +" vim: ts=8 diff --git a/runtime/syntax/splint.vim b/runtime/syntax/splint.vim new file mode 100644 index 000000000..2f283809d --- /dev/null +++ b/runtime/syntax/splint.vim @@ -0,0 +1,260 @@ +" Vim syntax file +" Language: splint (C with lclint/splint Annotations) +" Maintainer: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> +" Splint Home: http://www.splint.org/ +" Last Change: $Date$ +" $Revision$ + +" Note: Splint annotated files are not detected by default. +" If you want to use this file for highlighting C code, +" please make sure splint.vim is sourced instead of c.vim, +" for example by putting +" /* vim: set filetype=splint : */ +" at the end of your code or something like +" au! BufRead,BufNewFile *.c setfiletype splint +" in your vimrc file or filetype.vim + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the C syntax to start with +if version < 600 + so <sfile>:p:h/c.vim +else + runtime! syntax/c.vim +endif + + +" FIXME: uses and changes several clusters defined in c.vim +" so watch for changes there + +" TODO: make a little more grammar explicit +" match flags with hyphen and underscore notation +" match flag expanded forms +" accept other comment char than @ + +syn case match +" splint annotations (taken from 'splint -help annotations') +syn match splintStateAnnot contained "\(pre\|post\):\(only\|shared\|owned\|dependent\|observer\|exposed\|isnull\|notnull\)" +syn keyword splintSpecialAnnot contained special +syn keyword splintSpecTag contained uses sets defines allocated releases +syn keyword splintModifies contained modifies +syn keyword splintRequires contained requires ensures +syn keyword splintGlobals contained globals +syn keyword splintGlobitem contained internalState fileSystem +syn keyword splintGlobannot contained undef killed +syn keyword splintWarning contained warn + +syn keyword splintModitem contained internalState fileSystem nothing +syn keyword splintReqitem contained MaxSet MaxRead result +syn keyword splintIter contained iter yield +syn keyword splintConst contained constant +syn keyword splintAlt contained alt + +syn keyword splintType contained abstract concrete mutable immutable refcounted numabstract +syn keyword splintGlobalType contained unchecked checkmod checked checkedstrict +syn keyword splintMemMgm contained dependent keep killref only owned shared temp +syn keyword splintAlias contained unique returned +syn keyword splintExposure contained observer exposed +syn keyword splintDefState contained out in partial reldef +syn keyword splintGlobState contained undef killed +syn keyword splintNullState contained null notnull relnull +syn keyword splintNullPred contained truenull falsenull nullwhentrue falsewhennull +syn keyword splintExit contained exits mayexit trueexit falseexit neverexit +syn keyword splintExec contained noreturn maynotreturn noreturnwhentrue noreturnwhenfalse alwaysreturns +syn keyword splintSef contained sef +syn keyword splintDecl contained unused external +syn keyword splintCase contained fallthrough +syn keyword splintBreak contained innerbreak loopbreak switchbreak innercontinue +syn keyword splintUnreach contained notreached +syn keyword splintSpecFunc contained printflike scanflike messagelike + +" TODO: make these region or match +syn keyword splintErrSupp contained i ignore end t +syn match splintErrSupp contained "[it]\d\+\>" +syn keyword splintTypeAcc contained access noaccess + +syn keyword splintMacro contained notfunction +syn match splintSpecType contained "\(\|unsigned\|signed\)integraltype" + +" Flags taken from 'splint -help flags full' divided in local and global flags +" Local Flags: +syn keyword splintFlag contained abstract abstractcompare accessall accessczech accessczechoslovak +syn keyword splintFlag contained accessfile accessmodule accessslovak aliasunique allblock +syn keyword splintFlag contained allempty allglobs allimponly allmacros alwaysexits +syn keyword splintFlag contained annotationerror ansi89limits assignexpose badflag bitwisesigned +syn keyword splintFlag contained boolcompare boolfalse boolint boolops booltrue +syn keyword splintFlag contained booltype bounds boundscompacterrormessages boundsread boundswrite +syn keyword splintFlag contained branchstate bufferoverflow bufferoverflowhigh bugslimit casebreak +syn keyword splintFlag contained caseinsensitivefilenames castexpose castfcnptr charindex charint +syn keyword splintFlag contained charintliteral charunsignedchar checkedglobalias checkmodglobalias checkpost +syn keyword splintFlag contained checkstrictglobalias checkstrictglobs codeimponly commentchar commenterror +syn keyword splintFlag contained compdef compdestroy compmempass constmacros constprefix +syn keyword splintFlag contained constprefixexclude constuse continuecomment controlnestdepth cppnames +syn keyword splintFlag contained csvoverwrite czech czechconsts czechfcns czechmacros +syn keyword splintFlag contained czechoslovak czechoslovakconsts czechoslovakfcns czechoslovakmacros czechoslovaktypes +syn keyword splintFlag contained czechoslovakvars czechtypes czechvars debugfcnconstraint declundef +syn keyword splintFlag contained deepbreak deparrays dependenttrans distinctexternalnames distinctinternalnames +syn keyword splintFlag contained duplicatecases duplicatequals elseifcomplete emptyret enumindex +syn keyword splintFlag contained enumint enummembers enummemuse enumprefix enumprefixexclude +syn keyword splintFlag contained evalorder evalorderuncon exitarg exportany exportconst +syn keyword splintFlag contained exportfcn exportheader exportheadervar exportiter exportlocal +syn keyword splintFlag contained exportmacro exporttype exportvar exposetrans externalnamecaseinsensitive +syn keyword splintFlag contained externalnamelen externalprefix externalprefixexclude fcnderef fcnmacros +syn keyword splintFlag contained fcnpost fcnuse fielduse fileextensions filestaticprefix +syn keyword splintFlag contained filestaticprefixexclude firstcase fixedformalarray floatdouble forblock +syn keyword splintFlag contained forcehints forempty forloopexec formalarray formatcode +syn keyword splintFlag contained formatconst formattype forwarddecl freshtrans fullinitblock +syn keyword splintFlag contained globalias globalprefix globalprefixexclude globimponly globnoglobs +syn keyword splintFlag contained globs globsimpmodsnothing globstate globuse gnuextensions +syn keyword splintFlag contained grammar hasyield hints htmlfileformat ifblock +syn keyword splintFlag contained ifempty ignorequals ignoresigns immediatetrans impabstract +syn keyword splintFlag contained impcheckedglobs impcheckedspecglobs impcheckedstatics impcheckedstrictglobs impcheckedstrictspecglobs +syn keyword splintFlag contained impcheckedstrictstatics impcheckmodglobs impcheckmodinternals impcheckmodspecglobs impcheckmodstatics +syn keyword splintFlag contained impconj implementationoptional implictconstraint impouts imptype +syn keyword splintFlag contained includenest incompletetype incondefs incondefslib indentspaces +syn keyword splintFlag contained infloops infloopsuncon initallelements initsize internalglobs +syn keyword splintFlag contained internalglobsnoglobs internalnamecaseinsensitive internalnamelen internalnamelookalike iso99limits +syn keyword splintFlag contained isoreserved isoreservedinternal iterbalance iterloopexec iterprefix +syn keyword splintFlag contained iterprefixexclude iteryield its4low its4moderate its4mostrisky +syn keyword splintFlag contained its4risky its4veryrisky keep keeptrans kepttrans +syn keyword splintFlag contained legacy libmacros likelyboundsread likelyboundswrite likelybool +syn keyword splintFlag contained likelybounds limit linelen lintcomments localprefix +syn keyword splintFlag contained localprefixexclude locindentspaces longint longintegral longsignedintegral +syn keyword splintFlag contained longunsignedintegral longunsignedunsignedintegral loopexec looploopbreak looploopcontinue +syn keyword splintFlag contained loopswitchbreak macroassign macroconstdecl macrodecl macroempty +syn keyword splintFlag contained macrofcndecl macromatchname macroparams macroparens macroredef +syn keyword splintFlag contained macroreturn macrostmt macrounrecog macrovarprefix macrovarprefixexclude +syn keyword splintFlag contained maintype matchanyintegral matchfields mayaliasunique memchecks +syn keyword splintFlag contained memimp memtrans misplacedsharequal misscase modfilesys +syn keyword splintFlag contained modglobs modglobsnomods modglobsunchecked modinternalstrict modnomods +syn keyword splintFlag contained modobserver modobserveruncon mods modsimpnoglobs modstrictglobsnomods +syn keyword splintFlag contained moduncon modunconnomods modunspec multithreaded mustdefine +syn keyword splintFlag contained mustfree mustfreefresh mustfreeonly mustmod mustnotalias +syn keyword splintFlag contained mutrep namechecks needspec nestcomment nestedextern +syn keyword splintFlag contained newdecl newreftrans nextlinemacros noaccess nocomments +syn keyword splintFlag contained noeffect noeffectuncon noparams nopp noret +syn keyword splintFlag contained null nullassign nullderef nullinit nullpass +syn keyword splintFlag contained nullptrarith nullret nullstate nullterminated +syn keyword splintFlag contained numabstract numabstractcast numabstractindex numabstractlit numabstractprint +syn keyword splintFlag contained numenummembers numliteral numstructfields observertrans obviousloopexec +syn keyword splintFlag contained oldstyle onlytrans onlyunqglobaltrans orconstraint overload +syn keyword splintFlag contained ownedtrans paramimptemp paramuse parenfileformat partial +syn keyword splintFlag contained passunknown portability predassign predbool predboolint +syn keyword splintFlag contained predboolothers predboolptr preproc protoparammatch protoparamname +syn keyword splintFlag contained protoparamprefix protoparamprefixexclude ptrarith ptrcompare ptrnegate +syn keyword splintFlag contained quiet readonlystrings readonlytrans realcompare redecl +syn keyword splintFlag contained redef redundantconstraints redundantsharequal refcounttrans relaxquals +syn keyword splintFlag contained relaxtypes repeatunrecog repexpose retalias retexpose +syn keyword splintFlag contained retimponly retval retvalbool retvalint retvalother +syn keyword splintFlag contained sefparams sefuncon shadow sharedtrans shiftimplementation +syn keyword splintFlag contained shiftnegative shortint showallconjs showcolumn showconstraintlocation +syn keyword splintFlag contained showconstraintparens showdeephistory showfunc showloadloc showscan +syn keyword splintFlag contained showsourceloc showsummary sizeofformalarray sizeoftype skipisoheaders +syn keyword splintFlag contained skipposixheaders slashslashcomment slovak slovakconsts slovakfcns +syn keyword splintFlag contained slovakmacros slovaktypes slovakvars specglobimponly specimponly +syn keyword splintFlag contained specmacros specretimponly specstructimponly specundecl specundef +syn keyword splintFlag contained stackref statemerge statetransfer staticinittrans statictrans +syn keyword splintFlag contained strictbranchstate strictdestroy strictops strictusereleased stringliterallen +syn keyword splintFlag contained stringliteralnoroom stringliteralnoroomfinalnull stringliteralsmaller stringliteraltoolong structimponly +syn keyword splintFlag contained superuser switchloopbreak switchswitchbreak syntax sysdirerrors +syn keyword splintFlag contained sysdirexpandmacros sysunrecog tagprefix tagprefixexclude temptrans +syn keyword splintFlag contained tmpcomments toctou topuse trytorecover type +syn keyword splintFlag contained typeprefix typeprefixexclude typeuse uncheckedglobalias uncheckedmacroprefix +syn keyword splintFlag contained uncheckedmacroprefixexclude uniondef unixstandard unqualifiedinittrans unqualifiedtrans +syn keyword splintFlag contained unreachable unrecog unrecogcomments unrecogdirective unrecogflagcomments +syn keyword splintFlag contained unsignedcompare unusedspecial usedef usereleased usevarargs +syn keyword splintFlag contained varuse voidabstract warnflags warnlintcomments warnmissingglobs +syn keyword splintFlag contained warnmissingglobsnoglobs warnposixheaders warnrc warnsysfiles warnunixlib +syn keyword splintFlag contained warnuse whileblock whileempty whileloopexec zerobool +syn keyword splintFlag contained zeroptr +" Global Flags: +syn keyword splintGlobalFlag contained csv dump errorstream errorstreamstderr errorstreamstdout +syn keyword splintGlobalFlag contained expect f help i isolib +syn keyword splintGlobalFlag contained larchpath lclexpect lclimportdir lcs lh +syn keyword splintGlobalFlag contained load messagestream messagestreamstderr messagestreamstdout mts +syn keyword splintGlobalFlag contained neverinclude nof nolib posixlib posixstrictlib +syn keyword splintGlobalFlag contained showalluses singleinclude skipsysheaders stats streamoverwrite +syn keyword splintGlobalFlag contained strictlib supcounts sysdirs timedist tmpdir +syn keyword splintGlobalFlag contained unixlib unixstrictlib warningstream warningstreamstderr warningstreamstdout +syn keyword splintGlobalFlag contained whichlib +syn match splintFlagExpr contained "[\+\-\=]" nextgroup=splintFlag,splintGlobalFlag + +" detect missing /*@ and wrong */ +syn match splintAnnError "@\*/" +syn cluster cCommentGroup add=splintAnnError +syn match splintAnnError2 "[^@]\*/"hs=s+1 contained +syn region splintAnnotation start="/\*@" end="@\*/" contains=@splintAnnotElem,cType keepend +syn match splintShortAnn "/\*@\*/" +syn cluster splintAnnotElem contains=splintStateAnnot,splintSpecialAnnot,splintSpecTag,splintModifies,splintRequires,splintGlobals,splintGlobitem,splintGlobannot,splintWarning,splintModitem,splintIter,splintConst,splintAlt,splintType,splintGlobalType,splintMemMgm,splintAlias,splintExposure,splintDefState,splintGlobState,splintNullState,splintNullPred,splintExit,splintExec,splintSef,splintDecl,splintCase,splintBreak,splintUnreach,splintSpecFunc,splintErrSupp,splintTypeAcc,splintMacro,splintSpecType,splintAnnError2,splintFlagExpr +syn cluster splintAllStuff contains=@splintAnnotElem,splintFlag,splintGlobalFlag +syn cluster cParenGroup add=@splintAllStuff +syn cluster cPreProcGroup add=@splintAllStuff +syn cluster cMultiGroup add=@splintAllStuff + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_splint_syntax_inits") + if version < 508 + let did_splint_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink splintShortAnn splintAnnotation + HiLink splintAnnotation Comment + HiLink splintAnnError splintError + HiLink splintAnnError2 splintError + HiLink splintFlag SpecialComment + HiLink splintGlobalFlag splintError + HiLink splintSpecialAnnot splintAnnKey + HiLink splintStateAnnot splintAnnKey + HiLink splintSpecTag splintAnnKey + HiLink splintModifies splintAnnKey + HiLink splintRequires splintAnnKey + HiLink splintGlobals splintAnnKey + HiLink splintGlobitem Constant + HiLink splintGlobannot splintAnnKey + HiLink splintWarning splintAnnKey + HiLink splintModitem Constant + HiLink splintIter splintAnnKey + HiLink splintConst splintAnnKey + HiLink splintAlt splintAnnKey + HiLink splintType splintAnnKey + HiLink splintGlobalType splintAnnKey + HiLink splintMemMgm splintAnnKey + HiLink splintAlias splintAnnKey + HiLink splintExposure splintAnnKey + HiLink splintDefState splintAnnKey + HiLink splintGlobState splintAnnKey + HiLink splintNullState splintAnnKey + HiLink splintNullPred splintAnnKey + HiLink splintExit splintAnnKey + HiLink splintExec splintAnnKey + HiLink splintSef splintAnnKey + HiLink splintDecl splintAnnKey + HiLink splintCase splintAnnKey + HiLink splintBreak splintAnnKey + HiLink splintUnreach splintAnnKey + HiLink splintSpecFunc splintAnnKey + HiLink splintErrSupp splintAnnKey + HiLink splintTypeAcc splintAnnKey + HiLink splintMacro splintAnnKey + HiLink splintSpecType splintAnnKey + HiLink splintAnnKey Type + HiLink splintError Error + + delcommand HiLink +endif + +let b:current_syntax = "splint" + +" vim: ts=8 diff --git a/runtime/syntax/spup.vim b/runtime/syntax/spup.vim new file mode 100644 index 000000000..af5773740 --- /dev/null +++ b/runtime/syntax/spup.vim @@ -0,0 +1,277 @@ +" Vim syntax file +" Language: Speedup, plant simulator from AspenTech +" Maintainer: Stefan.Schwarzer <s.schwarzer@ndh.net> +" URL: http://www.ndh.net/home/sschwarzer/download/spup.vim +" Last Change: 2003 May 11 +" Filename: spup.vim + +" Bugs +" - in the appropriate sections keywords are always highlighted +" even if they are not used with the appropriate meaning; +" example: in +" MODEL demonstration +" TYPE +" *area AS area +" both "area" are highlighted as spupType. +" +" If you encounter problems or have questions or suggestions, mail me + +" Remove old syntax stuff +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" don't hightlight several keywords like subsections +"let strict_subsections = 1 + +" highlight types usually found in DECLARE section +if !exists("hightlight_types") + let highlight_types = 1 +endif + +" one line comment syntax (# comments) +" 1. allow appended code after comment, do not complain +" 2. show code beginnig with the second # as an error +" 3. show whole lines with more than one # as an error +if !exists("oneline_comments") + let oneline_comments = 2 +endif + +" Speedup SECTION regions +syn case ignore +syn region spupCdi matchgroup=spupSection start="^CDI" end="^\*\*\*\*" contains=spupCdiSubs,@spupOrdinary +syn region spupConditions matchgroup=spupSection start="^CONDITIONS" end="^\*\*\*\*" contains=spupConditionsSubs,@spupOrdinary,spupConditional,spupOperator,spupCode +syn region spupDeclare matchgroup=spupSection start="^DECLARE" end="^\*\*\*\*" contains=spupDeclareSubs,@spupOrdinary,spupTypes,spupCode +syn region spupEstimation matchgroup=spupSection start="^ESTIMATION" end="^\*\*\*\*" contains=spupEstimationSubs,@spupOrdinary +syn region spupExternal matchgroup=spupSection start="^EXTERNAL" end="^\*\*\*\*" contains=spupExternalSubs,@spupOrdinary +syn region spupFlowsheet matchgroup=spupSection start="^FLOWSHEET" end="^\*\*\*\*" contains=spupFlowsheetSubs,@spupOrdinary,spupStreams,@spupTextproc +syn region spupFunction matchgroup=spupSection start="^FUNCTION" end="^\*\*\*\*" contains=spupFunctionSubs,@spupOrdinary,spupHelp,spupCode,spupTypes +syn region spupGlobal matchgroup=spupSection start="^GLOBAL" end="^\*\*\*\*" contains=spupGlobalSubs,@spupOrdinary +syn region spupHomotopy matchgroup=spupSection start="^HOMOTOPY" end="^\*\*\*\*" contains=spupHomotopySubs,@spupOrdinary +syn region spupMacro matchgroup=spupSection start="^MACRO" end="^\*\*\*\*" contains=spupMacroSubs,@spupOrdinary,@spupTextproc,spupTypes,spupStreams,spupOperator +syn region spupModel matchgroup=spupSection start="^MODEL" end="^\*\*\*\*" contains=spupModelSubs,@spupOrdinary,spupConditional,spupOperator,spupTypes,spupStreams,@spupTextproc,spupHelp +syn region spupOperation matchgroup=spupSection start="^OPERATION" end="^\*\*\*\*" contains=spupOperationSubs,@spupOrdinary,@spupTextproc +syn region spupOptions matchgroup=spupSection start="^OPTIONS" end="^\*\*\*\*" contains=spupOptionsSubs,@spupOrdinary +syn region spupProcedure matchgroup=spupSection start="^PROCEDURE" end="^\*\*\*\*" contains=spupProcedureSubs,@spupOrdinary,spupHelp,spupCode,spupTypes +syn region spupProfiles matchgroup=spupSection start="^PROFILES" end="^\*\*\*\*" contains=@spupOrdinary,@spupTextproc +syn region spupReport matchgroup=spupSection start="^REPORT" end="^\*\*\*\*" contains=spupReportSubs,@spupOrdinary,spupHelp,@spupTextproc +syn region spupTitle matchgroup=spupSection start="^TITLE" end="^\*\*\*\*" contains=spupTitleSubs,spupComment,spupConstant,spupError +syn region spupUnit matchgroup=spupSection start="^UNIT" end="^\*\*\*\*" contains=spupUnitSubs,@spupOrdinary + +" Subsections +syn keyword spupCdiSubs INPUT FREE OUTPUT LINEARTIME MINNONZERO CALCULATE FILES SCALING contained +syn keyword spupDeclareSubs TYPE STREAM contained +syn keyword spupEstimationSubs ESTIMATE SSEXP DYNEXP RESULT contained +syn keyword spupExternalSubs TRANSMIT RECEIVE contained +syn keyword spupFlowsheetSubs STREAM contained +syn keyword spupFunctionSubs INPUT OUTPUT contained +syn keyword spupGlobalSubs VARIABLES MAXIMIZE MINIMIZE CONSTRAINT contained +syn keyword spupHomotopySubs VARY OPTIONS contained +syn keyword spupMacroSubs MODEL FLOWSHEET contained +syn keyword spupModelSubs CATEGORY SET TYPE STREAM EQUATION PROCEDURE contained +syn keyword spupOperationSubs SET PRESET INITIAL SSTATE FREE contained +syn keyword spupOptionsSubs ROUTINES TRANSLATE EXECUTION contained +syn keyword spupProcedureSubs INPUT OUTPUT SPACE PRECALL POSTCALL DERIVATIVE STREAM contained +" no subsections for Profiles +syn keyword spupReportSubs SET INITIAL FIELDS FIELDMARK DISPLAY WITHIN contained +syn keyword spupUnitSubs ROUTINES SET contained + +" additional keywords for subsections +if !exists( "strict_subsections" ) + syn keyword spupConditionsSubs STOP PRINT contained + syn keyword spupDeclareSubs UNIT SET COMPONENTS THERMO OPTIONS contained + syn keyword spupEstimationSubs VARY MEASURE INITIAL contained + syn keyword spupFlowsheetSubs TYPE FEED PRODUCT INPUT OUTPUT CONNECTION OF IS contained + syn keyword spupMacroSubs CONNECTION STREAM SET INPUT OUTPUT OF IS FEED PRODUCT TYPE contained + syn keyword spupModelSubs AS ARRAY OF INPUT OUTPUT CONNECTION contained + syn keyword spupOperationSubs WITHIN contained + syn keyword spupReportSubs LEFT RIGHT CENTER CENTRE UOM TIME DATE VERSION RELDATE contained + syn keyword spupUnitSubs IS A contained +endif + +" Speedup data types +if exists( "highlight_types" ) + syn keyword spupTypes act_coeff_liq area coefficient concentration contained + syn keyword spupTypes control_signal cond_liq cond_vap cp_mass_liq contained + syn keyword spupTypes cp_mol_liq cp_mol_vap cv_mol_liq cv_mol_vap contained + syn keyword spupTypes diffus_liq diffus_vap delta_p dens_mass contained + syn keyword spupTypes dens_mass_sol dens_mass_liq dens_mass_vap dens_mol contained + syn keyword spupTypes dens_mol_sol dens_mol_liq dens_mol_vap enthflow contained + syn keyword spupTypes enth_mass enth_mass_liq enth_mass_vap enth_mol contained + syn keyword spupTypes enth_mol_sol enth_mol_liq enth_mol_vap entr_mol contained + syn keyword spupTypes entr_mol_sol entr_mol_liq entr_mol_vap fraction contained + syn keyword spupTypes flow_mass flow_mass_liq flow_mass_vap flow_mol contained + syn keyword spupTypes flow_mol_vap flow_mol_liq flow_vol flow_vol_vap contained + syn keyword spupTypes flow_vol_liq fuga_vap fuga_liq fuga_sol contained + syn keyword spupTypes gibb_mol_sol heat_react heat_trans_coeff contained + syn keyword spupTypes holdup_heat holdup_heat_liq holdup_heat_vap contained + syn keyword spupTypes holdup_mass holdup_mass_liq holdup_mass_vap contained + syn keyword spupTypes holdup_mol holdup_mol_liq holdup_mol_vap k_value contained + syn keyword spupTypes length length_delta length_short liqfraction contained + syn keyword spupTypes liqmassfraction mass massfraction molefraction contained + syn keyword spupTypes molweight moment_inertia negative notype percent contained + syn keyword spupTypes positive pressure press_diff press_drop press_rise contained + syn keyword spupTypes ratio reaction reaction_mass rotation surf_tens contained + syn keyword spupTypes temperature temperature_abs temp_diff temp_drop contained + syn keyword spupTypes temp_rise time vapfraction vapmassfraction contained + syn keyword spupTypes velocity visc_liq visc_vap volume zmom_rate contained + syn keyword spupTypes seg_rate smom_rate tmom_rate zmom_mass seg_mass contained + syn keyword spupTypes smom_mass tmom_mass zmom_holdup seg_holdup contained + syn keyword spupTypes smom_holdup tmom_holdup contained +endif + +" stream types +syn keyword spupStreams mainstream vapour liquid contained + +" "conditional" keywords +syn keyword spupConditional IF THEN ELSE ENDIF contained +" Operators, symbols etc. +syn keyword spupOperator AND OR NOT contained +syn match spupSymbol "[,\-+=:;*/\"<>@%()]" contained +syn match spupSpecial "[&\$?]" contained +" Surprisingly, Speedup allows no unary + instead of the - +syn match spupError "[(=+\-*/]\s*+\d\+\([ed][+-]\=\d\+\)\=\>"lc=1 contained +syn match spupError "[(=+\-*/]\s*+\d\+\.\([ed][+-]\=\d\+\)\=\>"lc=1 contained +syn match spupError "[(=+\-*/]\s*+\d*\.\d\+\([ed][+-]\=\d\+\)\=\>"lc=1 contained +" String +syn region spupString start=+"+ end=+"+ oneline contained +syn region spupString start=+'+ end=+'+ oneline contained +" Identifier +syn match spupIdentifier "\<[a-z][a-z0-9_]*\>" contained +" Textprocessor directives +syn match spupTextprocGeneric "?[a-z][a-z0-9_]*\>" contained +syn region spupTextprocError matchgroup=spupTextprocGeneric start="?ERROR" end="?END"he=s-1 contained +" Number, without decimal point +syn match spupNumber "-\=\d\+\([ed][+-]\=\d\+\)\=" contained +" Number, allows 1. before exponent +syn match spupNumber "-\=\d\+\.\([ed][+-]\=\d\+\)\=" contained +" Number allows .1 before exponent +syn match spupNumber "-\=\d*\.\d\+\([ed][+-]\=\d\+\)\=" contained +" Help subsections +syn region spupHelp start="^HELP"hs=e+1 end="^\$ENDHELP"he=s-1 contained +" Fortran code +syn region spupCode start="^CODE"hs=e+1 end="^\$ENDCODE"he=s-1 contained +" oneline comments +if oneline_comments > 3 + oneline_comments = 2 " default +endif +if oneline_comments == 1 + syn match spupComment "#[^#]*#\=" +elseif oneline_comments == 2 + syn match spupError "#.*$" + syn match spupComment "#[^#]*" nextgroup=spupError +elseif oneline_comments == 3 + syn match spupComment "#[^#]*" + syn match spupError "#[^#]*#.*" +endif +" multiline comments +syn match spupOpenBrace "{" contained +syn match spupError "}" +syn region spupComment matchgroup=spupComment2 start="{" end="}" keepend contains=spupOpenBrace + +syn cluster spupOrdinary contains=spupNumber,spupIdentifier,spupSymbol +syn cluster spupOrdinary add=spupError,spupString,spupComment +syn cluster spupTextproc contains=spupTextprocGeneric,spupTextprocError + +" define syncronizing; especially OPERATION sections can become very large +syn sync clear +syn sync minlines=100 +syn sync maxlines=500 + +syn sync match spupSyncOperation grouphere spupOperation "^OPERATION" +syn sync match spupSyncCdi grouphere spupCdi "^CDI" +syn sync match spupSyncConditions grouphere spupConditions "^CONDITIONS" +syn sync match spupSyncDeclare grouphere spupDeclare "^DECLARE" +syn sync match spupSyncEstimation grouphere spupEstimation "^ESTIMATION" +syn sync match spupSyncExternal grouphere spupExternal "^EXTERNAL" +syn sync match spupSyncFlowsheet grouphere spupFlowsheet "^FLOWSHEET" +syn sync match spupSyncFunction grouphere spupFunction "^FUNCTION" +syn sync match spupSyncGlobal grouphere spupGlobal "^GLOBAL" +syn sync match spupSyncHomotopy grouphere spupHomotopy "^HOMOTOPY" +syn sync match spupSyncMacro grouphere spupMacro "^MACRO" +syn sync match spupSyncModel grouphere spupModel "^MODEL" +syn sync match spupSyncOperation grouphere spupOperation "^OPERATION" +syn sync match spupSyncOptions grouphere spupOptions "^OPTIONS" +syn sync match spupSyncProcedure grouphere spupProcedure "^PROCEDURE" +syn sync match spupSyncProfiles grouphere spupProfiles "^PROFILES" +syn sync match spupSyncReport grouphere spupReport "^REPORT" +syn sync match spupSyncTitle grouphere spupTitle "^TITLE" +syn sync match spupSyncUnit grouphere spupUnit "^UNIT" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_spup_syn_inits") + if version < 508 + let did_spup_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink spupCdi spupSection + HiLink spupConditions spupSection + HiLink spupDeclare spupSection + HiLink spupEstimation spupSection + HiLink spupExternal spupSection + HiLink spupFlowsheet spupSection + HiLink spupFunction spupSection + HiLink spupGlobal spupSection + HiLink spupHomotopy spupSection + HiLink spupMacro spupSection + HiLink spupModel spupSection + HiLink spupOperation spupSection + HiLink spupOptions spupSection + HiLink spupProcedure spupSection + HiLink spupProfiles spupSection + HiLink spupReport spupSection + HiLink spupTitle spupConstant " this is correct, truly ;) + HiLink spupUnit spupSection + + HiLink spupCdiSubs spupSubs + HiLink spupConditionsSubs spupSubs + HiLink spupDeclareSubs spupSubs + HiLink spupEstimationSubs spupSubs + HiLink spupExternalSubs spupSubs + HiLink spupFlowsheetSubs spupSubs + HiLink spupFunctionSubs spupSubs + HiLink spupHomotopySubs spupSubs + HiLink spupMacroSubs spupSubs + HiLink spupModelSubs spupSubs + HiLink spupOperationSubs spupSubs + HiLink spupOptionsSubs spupSubs + HiLink spupProcedureSubs spupSubs + HiLink spupReportSubs spupSubs + HiLink spupUnitSubs spupSubs + + HiLink spupCode Normal + HiLink spupComment Comment + HiLink spupComment2 spupComment + HiLink spupConditional Statement + HiLink spupConstant Constant + HiLink spupError Error + HiLink spupHelp Normal + HiLink spupIdentifier Identifier + HiLink spupNumber Constant + HiLink spupOperator Special + HiLink spupOpenBrace spupError + HiLink spupSection Statement + HiLink spupSpecial spupTextprocGeneric + HiLink spupStreams Type + HiLink spupString Constant + HiLink spupSubs Statement + HiLink spupSymbol Special + HiLink spupTextprocError Normal + HiLink spupTextprocGeneric PreProc + HiLink spupTypes Type + + delcommand HiLink +endif + +let b:current_syntax = "spup" + +" vim:ts=4 diff --git a/runtime/syntax/spyce.vim b/runtime/syntax/spyce.vim new file mode 100644 index 000000000..641aa8659 --- /dev/null +++ b/runtime/syntax/spyce.vim @@ -0,0 +1,110 @@ +" Vim syntax file +" Language: SPYCE +" Maintainer: Rimon Barr <rimon AT acm DOT org> +" URL: http://spyce.sourceforge.net +" Last Change: 2003 May 11 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" we define it here so that included files can test for it +if !exists("main_syntax") + let main_syntax='spyce' +endif + +" Read the HTML syntax to start with +let b:did_indent = 1 " don't perform HTML indentation! +let html_no_rendering = 1 " do not render <b>,<i>, etc... +if version < 600 + so <sfile>:p:h/html.vim +else + runtime! syntax/html.vim + unlet b:current_syntax +endif + +" include python +syn include @Python <sfile>:p:h/python.vim +syn include @Html <sfile>:p:h/html.vim + +" spyce definitions +syn keyword spyceDirectiveKeyword include compact module import contained +syn keyword spyceDirectiveArg name names file contained +syn region spyceDirectiveString start=+"+ end=+"+ contained +syn match spyceDirectiveValue "=[\t ]*[^'", \t>][^, \t>]*"hs=s+1 contained + +syn match spyceBeginErrorS ,\[\[, +syn match spyceBeginErrorA ,<%, +syn cluster spyceBeginError contains=spyceBeginErrorS,spyceBeginErrorA +syn match spyceEndErrorS ,\]\], +syn match spyceEndErrorA ,%>, +syn cluster spyceEndError contains=spyceEndErrorS,spyceEndErrorA + +syn match spyceEscBeginS ,\\\[\[, +syn match spyceEscBeginA ,\\<%, +syn cluster spyceEscBegin contains=spyceEscBeginS,spyceEscBeginA +syn match spyceEscEndS ,\\\]\], +syn match spyceEscEndA ,\\%>, +syn cluster spyceEscEnd contains=spyceEscEndS,spyceEscEndA +syn match spyceEscEndCommentS ,--\\\]\], +syn match spyceEscEndCommentA ,--\\%>, +syn cluster spyceEscEndComment contains=spyceEscEndCommentS,spyceEscEndCommentA + +syn region spyceStmtS matchgroup=spyceStmtDelim start=,\[\[, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend +syn region spyceStmtA matchgroup=spyceStmtDelim start=,<%, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend +syn region spyceChunkS matchgroup=spyceChunkDelim start=,\[\[\\, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend +syn region spyceChunkA matchgroup=spyceChunkDelim start=,<%\\, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend +syn region spyceEvalS matchgroup=spyceEvalDelim start=,\[\[=, end=,\]\], contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend +syn region spyceEvalA matchgroup=spyceEvalDelim start=,<%=, end=,%>, contains=@Python,spyceLambdaS,spyceLambdaA,spyceBeginError keepend +syn region spyceDirectiveS matchgroup=spyceDelim start=,\[\[\., end=,\]\], contains=spyceBeginError,spyceDirectiveKeyword,spyceDirectiveArg,spyceDirectiveValue,spyceDirectiveString keepend +syn region spyceDirectiveA matchgroup=spyceDelim start=,<%@, end=,%>, contains=spyceBeginError,spyceDirectiveKeyword,spyceDirectiveArg,spyceDirectiveValue,spyceDirectiveString keepend +syn region spyceCommentS matchgroup=spyceCommentDelim start=,\[\[--, end=,--\]\], +syn region spyceCommentA matchgroup=spyceCommentDelim start=,<%--, end=,--%>, +syn region spyceLambdaS matchgroup=spyceLambdaDelim start=,\[\[spy!\?, end=,\]\], contains=@Html,@spyce extend +syn region spyceLambdaA matchgroup=spyceLambdaDelim start=,<%spy!\?, end=,%>, contains=@Html,@spyce extend + +syn cluster spyce contains=spyceStmtS,spyceStmtA,spyceChunkS,spyceChunkA,spyceEvalS,spyceEvalA,spyceCommentS,spyceCommentA,spyceDirectiveS,spyceDirectiveA + +syn cluster htmlPreproc contains=@spyce + +hi link spyceDirectiveKeyword Special +hi link spyceDirectiveArg Type +hi link spyceDirectiveString String +hi link spyceDirectiveValue String + +hi link spyceDelim Special +hi link spyceStmtDelim spyceDelim +hi link spyceChunkDelim spyceDelim +hi link spyceEvalDelim spyceDelim +hi link spyceLambdaDelim spyceDelim +hi link spyceCommentDelim Comment + +hi link spyceBeginErrorS Error +hi link spyceBeginErrorA Error +hi link spyceEndErrorS Error +hi link spyceEndErrorA Error + +hi link spyceStmtS spyce +hi link spyceStmtA spyce +hi link spyceChunkS spyce +hi link spyceChunkA spyce +hi link spyceEvalS spyce +hi link spyceEvalA spyce +hi link spyceDirectiveS spyce +hi link spyceDirectiveA spyce +hi link spyceCommentS Comment +hi link spyceCommentA Comment +hi link spyceLambdaS Normal +hi link spyceLambdaA Normal + +hi link spyce Statement + +let b:current_syntax = "spyce" +if main_syntax == 'spyce' + unlet main_syntax +endif + diff --git a/runtime/syntax/sql.vim b/runtime/syntax/sql.vim new file mode 100644 index 000000000..9083b8136 --- /dev/null +++ b/runtime/syntax/sql.vim @@ -0,0 +1,89 @@ +" Vim syntax file +" Language: SQL, PL/SQL (Oracle 8i) +" Maintainer: Paul Moore <gustav@morpheus.demon.co.uk> +" Last Change: 2001 Apr 30 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" The SQL reserved words, defined as keywords. + +syn keyword sqlSpecial false null true + +syn keyword sqlKeyword access add as asc begin by check cluster column +syn keyword sqlKeyword compress connect current cursor decimal default desc +syn keyword sqlKeyword else elsif end exception exclusive file for from +syn keyword sqlKeyword function group having identified if immediate increment +syn keyword sqlKeyword index initial into is level loop maxextents mode modify +syn keyword sqlKeyword nocompress nowait of offline on online start +syn keyword sqlKeyword successful synonym table then to trigger uid +syn keyword sqlKeyword unique user validate values view whenever +syn keyword sqlKeyword where with option order pctfree privileges procedure +syn keyword sqlKeyword public resource return row rowlabel rownum rows +syn keyword sqlKeyword session share size smallint type using + +syn keyword sqlOperator not and or +syn keyword sqlOperator in any some all between exists +syn keyword sqlOperator like escape +syn keyword sqlOperator union intersect minus +syn keyword sqlOperator prior distinct +syn keyword sqlOperator sysdate out + +syn keyword sqlStatement alter analyze audit comment commit create +syn keyword sqlStatement delete drop execute explain grant insert lock noaudit +syn keyword sqlStatement rename revoke rollback savepoint select set +syn keyword sqlStatement truncate update + +syn keyword sqlType boolean char character date float integer long +syn keyword sqlType mlslabel number raw rowid varchar varchar2 varray + +" Strings and characters: +syn region sqlString start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn region sqlString start=+'+ skip=+\\\\\|\\'+ end=+'+ + +" Numbers: +syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>" + +" Comments: +syn region sqlComment start="/\*" end="\*/" contains=sqlTodo +syn match sqlComment "--.*$" contains=sqlTodo + +syn sync ccomment sqlComment + +" Todo. +syn keyword sqlTodo TODO FIXME XXX DEBUG NOTE + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_sql_syn_inits") + if version < 508 + let did_sql_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink sqlComment Comment + HiLink sqlKeyword sqlSpecial + HiLink sqlNumber Number + HiLink sqlOperator sqlStatement + HiLink sqlSpecial Special + HiLink sqlStatement Statement + HiLink sqlString String + HiLink sqlType Type + HiLink sqlTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "sql" + +" vim: ts=8 diff --git a/runtime/syntax/sqlforms.vim b/runtime/syntax/sqlforms.vim new file mode 100644 index 000000000..055b2ae87 --- /dev/null +++ b/runtime/syntax/sqlforms.vim @@ -0,0 +1,168 @@ +" Vim syntax file +" Language: SQL*Forms (Oracle 7), based on sql.vim (vim5.0) +" Maintainer: Austin Ziegler (austin@halostatue.ca) +" Last Change: 2003 May 11 +" Prev Change: 19980710 +" URL: http://www.halostatue.ca/vim/syntax/proc.vim +" +" TODO Find a new maintainer who knows SQL*Forms. + + " For version 5.x, clear all syntax items. + " For version 6.x, quit when a syntax file was already loaded. +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syntax case ignore + +if version >= 600 + setlocal iskeyword=a-z,A-Z,48-57,_,.,-,> +else + set iskeyword=a-z,A-Z,48-57,_,.,-,> +endif + + + " The SQL reserved words, defined as keywords. +syntax match sqlTriggers /on-.*$/ +syntax match sqlTriggers /key-.*$/ +syntax match sqlTriggers /post-.*$/ +syntax match sqlTriggers /pre-.*$/ +syntax match sqlTriggers /user-.*$/ + +syntax keyword sqlSpecial null false true + +syntax keyword sqlProcedure abort_query anchor_view bell block_menu break call +syntax keyword sqlProcedure call_input call_query clear_block clear_eol +syntax keyword sqlProcedure clear_field clear_form clear_record commit_form +syntax keyword sqlProcedure copy count_query create_record default_value +syntax keyword sqlProcedure delete_record display_error display_field down +syntax keyword sqlProcedure duplicate_field duplicate_record edit_field +syntax keyword sqlProcedure enter enter_query erase execute_query +syntax keyword sqlProcedure execute_trigger exit_form first_Record go_block +syntax keyword sqlProcedure go_field go_record help hide_menu hide_page host +syntax keyword sqlProcedure last_record list_values lock_record message +syntax keyword sqlProcedure move_view new_form next_block next_field next_key +syntax keyword sqlProcedure next_record next_set pause post previous_block +syntax keyword sqlProcedure previous_field previous_record print redisplay +syntax keyword sqlProcedure replace_menu resize_view scroll_down scroll_up +syntax keyword sqlProcedure set_field show_keys show_menu show_page +syntax keyword sqlProcedure synchronize up user_exit + +syntax keyword sqlFunction block_characteristic error_code error_text +syntax keyword sqlFunction error_type field_characteristic form_failure +syntax keyword sqlFunction form_fatal form_success name_in + +syntax keyword sqlParameters hide no_hide replace no_replace ask_commit +syntax keyword sqlParameters do_commit no_commit no_validate all_records +syntax keyword sqlParameters for_update no_restrict restrict no_screen +syntax keyword sqlParameters bar full_screen pull_down auto_help auto_skip +syntax keyword sqlParameters fixed_length enterable required echo queryable +syntax keyword sqlParameters updateable update_null upper_case attr_on +syntax keyword sqlParameters attr_off base_table first_field last_field +syntax keyword sqlParameters datatype displayed display_length field_length +syntax keyword sqlParameters list page primary_key query_length x_pos y_pos + +syntax match sqlSystem /system\.block_status/ +syntax match sqlSystem /system\.current_block/ +syntax match sqlSystem /system\.current_field/ +syntax match sqlSystem /system\.current_form/ +syntax match sqlSystem /system\.current_value/ +syntax match sqlSystem /system\.cursor_block/ +syntax match sqlSystem /system\.cursor_field/ +syntax match sqlSystem /system\.cursor_record/ +syntax match sqlSystem /system\.cursor_value/ +syntax match sqlSystem /system\.form_status/ +syntax match sqlSystem /system\.last_query/ +syntax match sqlSystem /system\.last_record/ +syntax match sqlSystem /system\.message_level/ +syntax match sqlSystem /system\.record_status/ +syntax match sqlSystem /system\.trigger_block/ +syntax match sqlSystem /system\.trigger_field/ +syntax match sqlSystem /system\.trigger_record/ +syntax match sqlSystem /\$\$date\$\$/ +syntax match sqlSystem /\$\$time\$\$/ + +syntax keyword sqlKeyword accept access add as asc by check cluster column +syntax keyword sqlKeyword compress connect current decimal default +syntax keyword sqlKeyword desc exclusive file for from group +syntax keyword sqlKeyword having identified immediate increment index +syntax keyword sqlKeyword initial into is level maxextents mode modify +syntax keyword sqlKeyword nocompress nowait of offline on online start +syntax keyword sqlKeyword successful synonym table to trigger uid +syntax keyword sqlKeyword unique user validate values view whenever +syntax keyword sqlKeyword where with option order pctfree privileges +syntax keyword sqlKeyword public resource row rowlabel rownum rows +syntax keyword sqlKeyword session share size smallint sql\*forms_version +syntax keyword sqlKeyword terse define form name title procedure begin +syntax keyword sqlKeyword default_menu_application trigger block field +syntax keyword sqlKeyword enddefine declare exception raise when cursor +syntax keyword sqlKeyword definition base_table pragma +syntax keyword sqlKeyword column_name global trigger_type text description +syntax match sqlKeyword "<<<" +syntax match sqlKeyword ">>>" + +syntax keyword sqlOperator not and or out to_number to_date message erase +syntax keyword sqlOperator in any some all between exists substr nvl +syntax keyword sqlOperator exception_init +syntax keyword sqlOperator like escape trunc lpad rpad sum +syntax keyword sqlOperator union intersect minus to_char greatest +syntax keyword sqlOperator prior distinct decode least avg +syntax keyword sqlOperator sysdate true false field_characteristic +syntax keyword sqlOperator display_field call host + +syntax keyword sqlStatement alter analyze audit comment commit create +syntax keyword sqlStatement delete drop explain grant insert lock noaudit +syntax keyword sqlStatement rename revoke rollback savepoint select set +syntax keyword sqlStatement truncate update if elsif loop then +syntax keyword sqlStatement open fetch close else end + +syntax keyword sqlType char character date long raw mlslabel number rowid +syntax keyword sqlType varchar varchar2 float integer boolean global + +syntax keyword sqlCodes sqlcode no_data_found too_many_rows others +syntax keyword sqlCodes form_trigger_failure notfound found +syntax keyword sqlCodes validate no_commit + + " Comments: +syntax region sqlComment start="/\*" end="\*/" +syntax match sqlComment "--.*" + + " Strings and characters: +syntax region sqlString start=+"+ skip=+\\\\\|\\"+ end=+"+ +syntax region sqlString start=+'+ skip=+\\\\\|\\"+ end=+'+ + + " Numbers: +syntax match sqlNumber "-\=\<[0-9]*\.\=[0-9_]\>" + +syntax sync ccomment sqlComment + +if version >= 508 || !exists("did_sqlforms_syn_inits") + if version < 508 + let did_sqlforms_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink sqlComment Comment + HiLink sqlKeyword Statement + HiLink sqlNumber Number + HiLink sqlOperator Statement + HiLink sqlProcedure Statement + HiLink sqlFunction Statement + HiLink sqlSystem Identifier + HiLink sqlSpecial Special + HiLink sqlStatement Statement + HiLink sqlString String + HiLink sqlType Type + HiLink sqlCodes Identifier + HiLink sqlTriggers PreProc + + delcommand HiLink +endif + +let b:current_syntax = "sqlforms" + +" vim: ts=8 sw=4 diff --git a/runtime/syntax/sqlj.vim b/runtime/syntax/sqlj.vim new file mode 100644 index 000000000..ba64bdfc0 --- /dev/null +++ b/runtime/syntax/sqlj.vim @@ -0,0 +1,100 @@ +" Vim syntax file +" Language: sqlj +" Maintainer: Andreas Fischbach <afisch@altavista.com> +" This file is based on sql.vim && java.vim (thanx) +" with a handful of additional sql words and still +" a subset of whatever standard +" Last change: 31th Dec 2001 + +" au BufNewFile,BufRead *.sqlj so $VIM/syntax/sqlj.vim + +" Remove any old syntax stuff hanging around +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the Java syntax to start with +source <sfile>:p:h/java.vim + +" SQLJ extentions +" The SQL reserved words, defined as keywords. + +syn case ignore +syn keyword sqljSpecial null + +syn keyword sqljKeyword access add as asc by check cluster column +syn keyword sqljKeyword compress connect current decimal default +syn keyword sqljKeyword desc else exclusive file for from group +syn keyword sqljKeyword having identified immediate increment index +syn keyword sqljKeyword initial into is level maxextents mode modify +syn keyword sqljKeyword nocompress nowait of offline on online start +syn keyword sqljKeyword successful synonym table then to trigger uid +syn keyword sqljKeyword unique user validate values view whenever +syn keyword sqljKeyword where with option order pctfree privileges +syn keyword sqljKeyword public resource row rowlabel rownum rows +syn keyword sqljKeyword session share size smallint + +syn keyword sqljKeyword fetch database context iterator field join +syn keyword sqljKeyword foreign outer inner isolation left right +syn keyword sqljKeyword match primary key + +syn keyword sqljOperator not and or +syn keyword sqljOperator in any some all between exists +syn keyword sqljOperator like escape +syn keyword sqljOperator union intersect minus +syn keyword sqljOperator prior distinct +syn keyword sqljOperator sysdate + +syn keyword sqljOperator max min avg sum count hex + +syn keyword sqljStatement alter analyze audit comment commit create +syn keyword sqljStatement delete drop explain grant insert lock noaudit +syn keyword sqljStatement rename revoke rollback savepoint select set +syn keyword sqljStatement truncate update begin work + +syn keyword sqljType char character date long raw mlslabel number +syn keyword sqljType rowid varchar varchar2 float integer + +syn keyword sqljType byte text serial + + +" Strings and characters: +syn region sqljString start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn region sqljString start=+'+ skip=+\\\\\|\\"+ end=+'+ + +" Numbers: +syn match sqljNumber "-\=\<\d*\.\=[0-9_]\>" + +" PreProc +syn match sqljPre "#sql" + +" Comments: +syn region sqljComment start="/\*" end="\*/" +syn match sqlComment "--.*" + +syn sync ccomment sqljComment + +if version >= 508 || !exists("did_sqlj_syn_inits") + if version < 508 + let did_sqlj_syn_inits = 1 + command! -nargs=+ HiLink hi link <args> + else + command! -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later. + HiLink sqljComment Comment + HiLink sqljKeyword sqljSpecial + HiLink sqljNumber Number + HiLink sqljOperator sqljStatement + HiLink sqljSpecial Special + HiLink sqljStatement Statement + HiLink sqljString String + HiLink sqljType Type + HiLink sqljPre PreProc +endif + +let b:current_syntax = "sqlj" + diff --git a/runtime/syntax/sqr.vim b/runtime/syntax/sqr.vim new file mode 100644 index 000000000..874944779 --- /dev/null +++ b/runtime/syntax/sqr.vim @@ -0,0 +1,295 @@ +" Vim syntax file +" Language: Structured Query Report Writer (SQR) +" Maintainer: Nathan Stratton Treadway (nathanst at ontko dot com) +" URL: http://www.ontko.com/sqr/#editor_config_files +" +" Modification History: +" 2002-Apr-12: Updated for SQR v6.x +" 2002-Jul-30: Added { and } to iskeyword definition +" 2003-Oct-15: Allow "." in variable names +" highlight entire open '... literal when it contains +" "''" inside it (e.g. "'I can''t say" is treated +" as one open string, not one terminated and one open) +" {} variables can occur inside of '...' literals +" +" Thanks to the previous maintainer of this file, Jeff Lanzarotta: +" http://lanzarotta.tripod.com/vim.html +" jefflanzarotta at yahoo dot com + +" For version 5.x, clear all syntax items. +" For version 6.x, quit when a syntax file was already loaded. +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if version >= 600 + setlocal iskeyword=@,48-57,_,-,#,$,{,} +else + set iskeyword=@,48-57,_,-,#,$,{,} +endif + +syn case ignore + +" BEGIN GENERATED SECTION ============================================ + +" Generated by generate_vim_syntax.sqr at 2002/04/11 13:04 +" (based on the UltraEdit syntax file for SQR 6.1.4 +" found at http://www.ontko.com/sqr/#editor_config_files ) + +syn keyword sqrSection begin-footing begin-heading begin-procedure +syn keyword sqrSection begin-program begin-report begin-setup +syn keyword sqrSection end-footing end-heading end-procedure +syn keyword sqrSection end-program end-report end-setup + +syn keyword sqrParagraph alter-color-map alter-conection +syn keyword sqrParagraph alter-locale alter-printer alter-report +syn keyword sqrParagraph begin-document begin-execute begin-select +syn keyword sqrParagraph begin-sql declare-chart declare-image +syn keyword sqrParagraph declare-color-map declare-conection +syn keyword sqrParagraph declare-layout declare-printer +syn keyword sqrParagraph declare-report declare-procedure +syn keyword sqrParagraph declare-toc declare-variable end-declare +syn keyword sqrParagraph end-document end-select exit-select end-sql +syn keyword sqrParagraph load-lookup + +syn keyword sqrReserved #current-column #current-date #current-line +syn keyword sqrReserved #end-file #page-count #return-status +syn keyword sqrReserved #sql-count #sql-status #sqr-max-columns +syn keyword sqrReserved #sqr-max-lines #sqr-pid #sqr-toc-level +syn keyword sqrReserved #sqr-toc-page $sqr-database {sqr-database} +syn keyword sqrReserved $sqr-dbcs {sqr-dbcs} $sqr-encoding +syn keyword sqrReserved {sqr-encoding} $sqr-encoding-console +syn keyword sqrReserved {sqr-encoding-console} +syn keyword sqrReserved $sqr-encoding-database +syn keyword sqrReserved {sqr-encoding-database} +syn keyword sqrReserved $sqr-encoding-file-input +syn keyword sqrReserved {sqr-encoding-file-input} +syn keyword sqrReserved $sqr-encoding-file-output +syn keyword sqrReserved {sqr-encoding-file-output} +syn keyword sqrReserved $sqr-encoding-report-input +syn keyword sqrReserved {sqr-encoding-report-input} +syn keyword sqrReserved $sqr-encoding-report-output +syn keyword sqrReserved {sqr-encoding-report-output} +syn keyword sqrReserved $sqr-encoding-source {sqr-encoding-source} +syn keyword sqrReserved $sql-error $sqr-hostname {sqr-hostname} +syn keyword sqrReserved $sqr-locale $sqr-platform {sqr-platform} +syn keyword sqrReserved $sqr-program $sqr-report $sqr-toc-text +syn keyword sqrReserved $sqr-ver $username + +syn keyword sqrPreProc #define #else #end-if #endif #if #ifdef +syn keyword sqrPreProc #ifndef #include + +syn keyword sqrCommand add array-add array-divide array-multiply +syn keyword sqrCommand array-subtract ask break call clear-array +syn keyword sqrCommand close columns commit concat connect +syn keyword sqrCommand create-array create-color-palette date-time +syn keyword sqrCommand display divide do dollar-symbol else encode +syn keyword sqrCommand end-evaluate end-if end-while evaluate +syn keyword sqrCommand execute extract find get get-color goto +syn keyword sqrCommand graphic if input last-page let lookup +syn keyword sqrCommand lowercase mbtosbs money-symbol move +syn keyword sqrCommand multiply new-page new-report next-column +syn keyword sqrCommand next-listing no-formfeed open page-number +syn keyword sqrCommand page-size position print print-bar-code +syn keyword sqrCommand print-chart print-direct print-image +syn keyword sqrCommand printer-deinit printer-init put read +syn keyword sqrCommand rollback security set-color set-delay-print +syn keyword sqrCommand set-generations set-levels set-members +syn keyword sqrCommand sbtombs show stop string subtract toc-entry +syn keyword sqrCommand unstring uppercase use use-column +syn keyword sqrCommand use-printer-type use-procedure use-report +syn keyword sqrCommand while write + +syn keyword sqrParam 3d-effects after after-bold after-page +syn keyword sqrParam after-report after-toc and as at-end before +syn keyword sqrParam background batch-mode beep before-bold +syn keyword sqrParam before-page before-report before-toc blink +syn keyword sqrParam bold border bottom-margin box break by +syn keyword sqrParam caption center char char-size char-width +syn keyword sqrParam chars-inch chart-size checksum cl +syn keyword sqrParam clear-line clear-screen color color-palette +syn keyword sqrParam cs color_ data-array +syn keyword sqrParam data-array-column-count +syn keyword sqrParam data-array-column-labels +syn keyword sqrParam data-array-row-count data-labels date +syn keyword sqrParam date-edit-mask date-seperator +syn keyword sqrParam day-of-week-case day-of-week-full +syn keyword sqrParam day-of-week-short decimal decimal-seperator +syn keyword sqrParam default-numeric delay distinct dot-leader +syn keyword sqrParam edit-option-ad edit-option-am +syn keyword sqrParam edit-option-bc edit-option-na +syn keyword sqrParam edit-option-pm encoding entry erase-page +syn keyword sqrParam extent field fill fixed fixed_nolf float +syn keyword sqrParam font font-style font-type footing +syn keyword sqrParam footing-size foreground for-append +syn keyword sqrParam for-reading for-reports for-tocs +syn keyword sqrParam for-writing format formfeed from goto-top +syn keyword sqrParam group having heading heading-size height +syn keyword sqrParam horz-line image-size in indentation +syn keyword sqrParam init-string input-date-edit-mask insert +syn keyword sqrParam integer into item-color item-size key +syn keyword sqrParam layout left-margin legend legend-placement +syn keyword sqrParam legend-presentation legend-title level +syn keyword sqrParam line-height line-size line-width lines-inch +syn keyword sqrParam local locale loops max-columns max-lines +syn keyword sqrParam maxlen money money-edit-mask money-sign +syn keyword sqrParam money-sign-location months-case months-full +syn keyword sqrParam months-short name need newline newpage +syn keyword sqrParam no-advance nolf noline noprompt normal not +syn keyword sqrParam nowait number number-edit-mask on-break +syn keyword sqrParam on-error or order orientation page-depth +syn keyword sqrParam paper-size pie-segment-explode +syn keyword sqrParam pie-segment-percent-display +syn keyword sqrParam pie-segment-quantity-display pitch +syn keyword sqrParam point-markers point-size printer +syn keyword sqrParam printer-type quiet record reset-string +syn keyword sqrParam return_value reverse right-margin rows save +syn keyword sqrParam select size skip skiplines sort source +syn keyword sqrParam sqr-database sqr-platform startup-file +syn keyword sqrParam status stop sub-title symbol-set system +syn keyword sqrParam table text thousand-seperator +syn keyword sqrParam time-seperator times title to toc +syn keyword sqrParam top-margin type underline update using +syn keyword sqrParam value vary vert-line wait warn when +syn keyword sqrParam when-other where with x-axis-grid +syn keyword sqrParam x-axis-label x-axis-major-increment +syn keyword sqrParam x-axis-major-tick-marks x-axis-max-value +syn keyword sqrParam x-axis-min-value x-axis-minor-increment +syn keyword sqrParam x-axis-minor-tick-marks x-axis-rotate +syn keyword sqrParam x-axis-scale x-axis-tick-mark-placement xor +syn keyword sqrParam y-axis-grid y-axis-label +syn keyword sqrParam y-axis-major-increment +syn keyword sqrParam y-axis-major-tick-marks y-axis-max-value +syn keyword sqrParam y-axis-min-value y-axis-minor-increment +syn keyword sqrParam y-axis-minor-tick-marks y-axis-scale +syn keyword sqrParam y-axis-tick-mark-placement y2-type +syn keyword sqrParam y2-data-array y2-data-array-row-count +syn keyword sqrParam y2-data-array-column-count +syn keyword sqrParam y2-data-array-column-labels +syn keyword sqrParam y2-axis-color-palette y2-axis-label +syn keyword sqrParam y2-axis-major-increment +syn keyword sqrParam y2-axis-major-tick-marks y2-axis-max-value +syn keyword sqrParam y2-axis-min-value y2-axis-minor-increment +syn keyword sqrParam y2-axis-minor-tick-marks y2-axis-scale + +syn keyword sqrFunction abs acos asin atan array ascii asciic ceil +syn keyword sqrFunction cos cosh chr cond deg delete dateadd +syn keyword sqrFunction datediff datenow datetostr e10 exp edit +syn keyword sqrFunction exists floor getenv instr instrb isblank +syn keyword sqrFunction isnull log log10 length lengthb lengthp +syn keyword sqrFunction lengtht lower lpad ltrim mod nvl power rad +syn keyword sqrFunction round range replace roman rpad rtrim rename +syn keyword sqrFunction sign sin sinh sqrt substr substrb substrp +syn keyword sqrFunction substrt strtodate tan tanh trunc to_char +syn keyword sqrFunction to_multi_byte to_number to_single_byte +syn keyword sqrFunction transform translate unicode upper wrapdepth + +" END GENERATED SECTION ============================================== + +" Variables +syn match sqrVariable /\(\$\|#\|&\)\(\k\|\.\)*/ + + +" Debug compiler directives +syn match sqrPreProc /\s*#debug\a\=\(\s\|$\)/ +syn match sqrSubstVar /{\k*}/ + + +" Strings +" Note: if an undoubled ! is found, this is not a valid string +" (SQR will treat the end of the line as a comment) +syn match sqrString /'\(!!\|[^!']\)*'/ contains=sqrSubstVar +syn match sqrStrOpen /'\(!!\|''\|[^!']\)*$/ +" If we find a ' followed by an unmatched ! before a matching ', +" flag the error. +syn match sqrError /'\(!!\|[^'!]\)*![^!]/me=e-1 +syn match sqrError /'\(!!\|[^'!]\)*!$/ + +" Numbers: +syn match sqrNumber /-\=\<\d*\.\=[0-9_]\>/ + + + +" Comments: +" Handle comments that start with "!=" specially; they are only valid +" in the first column of the source line. Also, "!!" is only treated +" as a start-comment if there is only whitespace ahead of it on the line. + +syn keyword sqrTodo TODO FIXME XXX DEBUG NOTE ### +syn match sqrTodo /???/ + +if version >= 600 + " See also the sqrString section above for handling of ! characters + " inside of strings. (Those patterns override the ones below.) + syn match sqrComment /!\@<!!\([^!=].*\|$\)/ contains=sqrTodo + " the ! can't be preceeded by another !, + " and must be followed by at least one + " character other than ! or =, or immediately + " by the end-of-line + syn match sqrComment /^!=.*/ contains=sqrTodo + syn match sqrComment /^!!.*/ contains=sqrTodo + syn match sqrError /^\s\+\zs!=.*/ + " it's an error to have "!=" preceeded by + " just whitespace on the line ("!=" + " preceeded by non-whitespace is treated + " as neither a comment nor an error, since + " it is often correct, i.e. + " if #count != 7 + syn match sqrError /.\+\zs!!.*/ + " a "!!" anywhere but at the beginning of + " the line is always an error +else "For versions before 6.0, same idea as above but we are limited + "to simple patterns only. Also, the sqrString patterns above + "don't seem to take precedence in v5 as they do in v6, so + "we split the last rule to ignore comments found inside of + "string literals. + syn match sqrComment /!\([^!=].*\|$\)/ contains=sqrTodo + syn match sqrComment /^!=.*/ contains=sqrTodo + syn match sqrComment /^!!.*/ contains=sqrTodo + syn match sqrError /^\s\+!=.*/ + syn match sqrError /^[^'!]\+!!/ + " flag !! on lines that don't have ! or ' + syn match sqrError /^\([^!']*'[^']*'[^!']*\)\+!!/ + " flag !! found after matched ' ' chars + " (that aren't also commented) +endif + + +" Define the default highlighting. +" For version 5.7 and earlier, only when not done already. +" For version 5.8 and later, only when an item doesn;t have hightlighting yet. +if version >= 508 || !exists("did_sqr_syn_inits") + if version < 508 + let did_sqr_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink sqrSection Statement + HiLink sqrParagraph Statement + HiLink sqrReserved Statement + HiLink sqrParameter Statement + HiLink sqrPreProc PreProc + HiLink sqrSubstVar PreProc + HiLink sqrCommand Statement + HiLink sqrParam Type + HiLink sqrFunction Special + + HiLink sqrString String + HiLink sqrStrOpen Todo + HiLink sqrNumber Number + HiLink sqrVariable Identifier + + HiLink sqrComment Comment + HiLink sqrTodo Todo + HiLink sqrError Error + + delcommand HiLink +endif + +let b:current_syntax = "sqr" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/squid.vim b/runtime/syntax/squid.vim new file mode 100644 index 000000000..554bdca09 --- /dev/null +++ b/runtime/syntax/squid.vim @@ -0,0 +1,149 @@ +" Vim syntax file +" Language: Squid config file +" Maintainer: Klaus Muth <klaus@hampft.de> +" Last Change: 2004 Feb 01 +" URL: http://www.hampft.de/vim/syntax/squid.vim +" ThanksTo: Ilya Sher <iso8601@mail.ru> + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" squid.conf syntax seems to be case insensitive +syn case ignore + +syn keyword squidTodo contained TODO +syn match squidComment "#.*$" contains=squidTodo,squidTag +syn match squidTag contained "TAG: .*$" + +" Lots & lots of Keywords! +syn keyword squidConf acl always_direct announce_host +syn keyword squidConf announce_period announce_port announce_to +syn keyword squidConf anonymize_headers append_domain +syn keyword squidConf as_whois_server authenticate_children +syn keyword squidConf authenticate_program authenticate_ttl +syn keyword squidConf broken_posts buffered_logs cache_access_log +syn keyword squidConf cache_announce cache_dir cache_dns_program +syn keyword squidConf cache_effective_group cache_effective_user +syn keyword squidConf cache_host cache_host_acl cache_host_domain +syn keyword squidConf cache_log cache_mem cache_mem_high +syn keyword squidConf cache_mem_low cache_mgr cachemgr_passwd +syn keyword squidConf cache_peer cache_stoplist +syn keyword squidConf cache_stoplist_pattern cache_store_log +syn keyword squidConf cache_swap cache_swap_high cache_swap_log +syn keyword squidConf cache_swap_low client_db client_lifetime +syn keyword squidConf client_netmask connect_timeout coredump_dir +syn keyword squidConf dead_peer_timeout debug_options delay_access +syn keyword squidConf delay_class delay_initial_bucket_level +syn keyword squidConf delay_parameters delay_pools dns_children +syn keyword squidConf dns_defnames dns_nameservers dns_testnames +syn keyword squidConf emulate_httpd_log err_html_text +syn keyword squidConf fake_user_agent firewall_ip forwarded_for +syn keyword squidConf forward_snmpd_port fqdncache_size +syn keyword squidConf ftpget_options ftpget_program ftp_list_width +syn keyword squidConf ftp_user half_closed_clients +syn keyword squidConf hierarchy_stoplist htcp_port http_access +syn keyword squidConf http_anonymizer httpd_accel httpd_accel_host +syn keyword squidConf httpd_accel_port httpd_accel_uses_host_header +syn keyword squidConf httpd_accel_with_proxy http_port +syn keyword squidConf http_reply_access icp_access icp_hit_stale +syn keyword squidConf icp_port icp_query_timeout ident_lookup +syn keyword squidConf ident_lookup_access ident_timeout +syn keyword squidConf incoming_http_average incoming_icp_average +syn keyword squidConf inside_firewall ipcache_high ipcache_low +syn keyword squidConf ipcache_size local_domain local_ip +syn keyword squidConf logfile_rotate log_fqdn log_icp_queries +syn keyword squidConf log_mime_hdrs maximum_object_size +syn keyword squidConf maximum_single_addr_tries mcast_groups +syn keyword squidConf mcast_icp_query_timeout mcast_miss_addr +syn keyword squidConf mcast_miss_encode_key mcast_miss_port +syn keyword squidConf memory_pools mime_table min_http_poll_cnt +syn keyword squidConf min_icp_poll_cnt minimum_direct_hops +syn keyword squidConf minimum_retry_timeout miss_access +syn keyword squidConf negative_dns_ttl negative_ttl +syn keyword squidConf neighbor_timeout neighbor_type_domain +syn keyword squidConf netdb_high netdb_low netdb_ping_period +syn keyword squidConf netdb_ping_rate no_cache passthrough_proxy +syn keyword squidConf pconn_timeout pid_filename pinger_program +syn keyword squidConf positive_dns_ttl prefer_direct proxy_auth +syn keyword squidConf proxy_auth_realm query_icmp quick_abort +syn keyword squidConf quick_abort quick_abort_max quick_abort_min +syn keyword squidConf quick_abort_pct range_offset_limit +syn keyword squidConf read_timeout redirect_children +syn keyword squidConf redirect_program +syn keyword squidConf redirect_rewrites_host_header reference_age +syn keyword squidConf reference_age refresh_pattern reload_into_ims +syn keyword squidConf request_size request_timeout +syn keyword squidConf shutdown_lifetime single_parent_bypass +syn keyword squidConf siteselect_timeout snmp_access +syn keyword squidConf snmp_incoming_address snmp_port source_ping +syn keyword squidConf ssl_proxy store_avg_object_size +syn keyword squidConf store_objects_per_bucket strip_query_terms +syn keyword squidConf swap_level1_dirs swap_level2_dirs +syn keyword squidConf tcp_incoming_address tcp_outgoing_address +syn keyword squidConf tcp_recv_bufsize test_reachability +syn keyword squidConf udp_hit_obj udp_hit_obj_size +syn keyword squidConf udp_incoming_address udp_outgoing_address +syn keyword squidConf unique_hostname unlinkd_program +syn keyword squidConf uri_whitespace useragent_log visible_hostname +syn keyword squidConf wais_relay wais_relay_host wais_relay_port + +syn keyword squidOpt proxy-only weight ttl no-query default +syn keyword squidOpt round-robin multicast-responder +syn keyword squidOpt on off all deny allow + +" Security Actions for cachemgr_passwd +syn keyword squidAction shutdown info parameter server_list +syn keyword squidAction client_list +syn match squidAction "stats/\(objects\|vm_objects\|utilization\|ipcache\|fqdncache\|dns\|redirector\|io\|reply_headers\|filedescriptors\|netdb\)" +syn match squidAction "log\(/\(status\|enable\|disable\|clear\)\)\=" +syn match squidAction "squid\.conf" + +" Keywords for the acl-config +syn keyword squidAcl url_regex urlpath_regex referer_regex port proto +syn keyword squidAcl req_mime_type rep_mime_type +syn keyword squidAcl method browser user src dst + +syn match squidNumber "\<\d\+\>" +syn match squidIP "\<\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\>" +syn match squidStr "\(^\s*acl\s\+\S\+\s\+\(\S*_regex\|re[pq]_mime_type\|browser\|_domain\|user\)\+\s\+\)\@<=.*" contains=squidRegexOpt +syn match squidRegexOpt contained "\(^\s*acl\s\+\S\+\s\+\S\+\(_regex\|_mime_type\)\s\+\)\@<=[-+]i\s\+" + +" All config is in one line, so this has to be sufficient +" Make it fast like hell :) +syn sync minlines=3 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_squid_syntax_inits") + if version < 508 + let did_squid_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink squidTodo Todo + HiLink squidComment Comment + HiLink squidTag Special + HiLink squidConf Keyword + HiLink squidOpt Constant + HiLink squidAction String + HiLink squidNumber Number + HiLink squidIP Number + HiLink squidAcl Keyword + HiLink squidStr String + HiLink squidRegexOpt Special + + delcommand HiLink +endif + +let b:current_syntax = "squid" + +" vim: ts=8 diff --git a/runtime/syntax/sshconfig.vim b/runtime/syntax/sshconfig.vim new file mode 100644 index 000000000..c2da72ad7 --- /dev/null +++ b/runtime/syntax/sshconfig.vim @@ -0,0 +1,99 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: OpenSSH server configuration file (ssh_config) +" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> +" Last Change: 2003-05-06 +" URL: http://trific.ath.cx/Ftp/vim/syntax/sshconfig.vim + +" Setup +if version >= 600 + if exists("b:current_syntax") + finish + endif +else + syntax clear +endif + +if version >= 600 + setlocal iskeyword=_,-,a-z,A-Z,48-57 +else + set iskeyword=_,-,a-z,A-Z,48-57 +endif + +syn case ignore + +" Comments +syn match sshconfigComment "#.*$" contains=sshconfigTodo +syn keyword sshconfigTodo TODO FIXME NOT contained + +" Constants +syn keyword sshconfigYesNo yes no ask +syn keyword sshconfigCipher blowfish des 3des +syn keyword sshconfigCipher aes128-cbc 3des-cbc blowfish-cbc cast128-cbc +syn keyword sshconfigCipher arcfour aes192-cbc aes256-cbc +syn keyword sshconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96 +syn keyword sshconfigMAC hmac-md5-96 +syn keyword sshconfigHostKeyAlg ssh-rsa ssh-dss +syn keyword sshconfigPreferredAuth hostbased publickey password +syn keyword sshconfigPreferredAuth keyboard-interactive +syn keyword sshconfigLogLevel QUIET FATAL ERROR INFO VERBOSE +syn keyword sshconfigLogLevel DEBUG DEBUG1 DEBUG2 DEBUG3 +syn keyword sshconfigSysLogFacility DAEMON USER AUTH LOCAL0 LOCAL1 LOCAL2 +syn keyword sshconfigSysLogFacility LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7 +syn match sshconfigSpecial "[*?]" +syn match sshconfigNumber "\d\+" +syn match sshconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>" +syn match sshconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>" +syn match sshconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}[:/]\d\+\>" + +" Keywords +syn keyword sshconfigHostSect Host +syn keyword sshconfigKeyword AFSTokenPassing BatchMode BindAddress +syn keyword sshconfigKeyword ChallengeResponseAuthentication CheckHostIP +syn keyword sshconfigKeyword Cipher Ciphers ClearAllForwardings Compression +syn keyword sshconfigKeyword CompressionLevel ConnectionAttempts +syn keyword sshconfigKeyword DynamicForward EscapeChar ForwardAgent ForwardX11 +syn keyword sshconfigKeyword GatewayPorts GlobalKnownHostsFile +syn keyword sshconfigKeyword HostbasedAuthentication HostKeyAlgorithms +syn keyword sshconfigKeyword HostKeyAlias HostName IdentityFile KeepAlive +syn keyword sshconfigKeyword KerberosAuthentication KerberosTgtPassing +syn keyword sshconfigKeyword LocalForward LogLevel MACs +syn keyword sshconfigKeyword NoHostAuthenticationForLocalhost +syn keyword sshconfigKeyword NumberOfPasswordPrompts PasswordAuthentication +syn keyword sshconfigKeyword Port PreferredAuthentications Protocol +syn keyword sshconfigKeyword ProxyCommand PubkeyAuthentication RemoteForward +syn keyword sshconfigKeyword RhostsAuthentication RhostsRSAAuthentication +syn keyword sshconfigKeyword RSAAuthentication SmartcardDevice +syn keyword sshconfigKeyword StrictHostKeyChecking UsePrivilegedPort User +syn keyword sshconfigKeyword UserKnownHostsFile XAuthLocation + +" Define the default highlighting +if version >= 508 || !exists("did_sshconfig_syntax_inits") + if version < 508 + let did_sshconfig_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink sshconfigComment Comment + HiLink sshconfigTodo Todo + HiLink sshconfigHostPort sshconfigConstant + HiLink sshconfigNumber sshconfigConstant + HiLink sshconfigConstant Constant + HiLink sshconfigYesNo sshconfigEnum + HiLink sshconfigCipher sshconfigEnum + HiLink sshconfigMAC sshconfigEnum + HiLink sshconfigHostKeyAlg sshconfigEnum + HiLink sshconfigLogLevel sshconfigEnum + HiLink sshconfigSysLogFacility sshconfigEnum + HiLink sshconfigPreferredAuth sshconfigEnum + HiLink sshconfigEnum Function + HiLink sshconfigSpecial Special + HiLink sshconfigKeyword Keyword + HiLink sshconfigHostSect Type + delcommand HiLink +endif + +let b:current_syntax = "sshconfig" + diff --git a/runtime/syntax/sshdconfig.vim b/runtime/syntax/sshdconfig.vim new file mode 100644 index 000000000..c334304f9 --- /dev/null +++ b/runtime/syntax/sshdconfig.vim @@ -0,0 +1,98 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: OpenSSH server configuration file (sshd_config) +" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> +" Last Change: 2003-05-06 +" URL: http://trific.ath.cx/Ftp/vim/syntax/sshdconfig.vim + +" Setup +if version >= 600 + if exists("b:current_syntax") + finish + endif +else + syntax clear +endif + +if version >= 600 + setlocal iskeyword=_,-,a-z,A-Z,48-57 +else + set iskeyword=_,-,a-z,A-Z,48-57 +endif + +syn case ignore + +" Comments +syn match sshdconfigComment "#.*$" contains=sshdconfigTodo +syn keyword sshdconfigTodo TODO FIXME NOT contained + +" Constants +syn keyword sshdconfigYesNo yes no +syn keyword sshdconfigCipher aes128-cbc 3des-cbc blowfish-cbc cast128-cbc +syn keyword sshdconfigCipher aes192-cbc aes256-cbc +syn keyword sshdconfigCipher arcfour +syn keyword sshdconfigMAC hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96 +syn keyword sshdconfigMAC hmac-md5-96 +syn keyword sshdconfigRootLogin without-password forced-commands-only +syn keyword sshdconfigLogLevel QUIET FATAL ERROR INFO VERBOSE +syn keyword sshdconfigLogLevel DEBUG DEBUG1 DEBUG2 DEBUG3 +syn keyword sshdconfigSysLogFacility DAEMON USER AUTH LOCAL0 LOCAL1 LOCAL2 +syn keyword sshdconfigSysLogFacility LOCAL3 LOCAL4 LOCAL5 LOCAL6 LOCAL7 +syn match sshdconfigSpecial "[*?]" +syn match sshdconfigNumber "\d\+" +syn match sshdconfigHostPort "\<\(\d\{1,3}\.\)\{3}\d\{1,3}\(:\d\+\)\?\>" +syn match sshdconfigHostPort "\<\([-a-zA-Z0-9]\+\.\)\+[-a-zA-Z0-9]\{2,}\(:\d\+\)\?\>" +syn match sshdconfigHostPort "\<\(\x\{,4}:\)\+\x\{,4}:\d\+\>" +syn match sshdconfigTime "\<\(\d\+[sSmMhHdDwW]\)\+\>" + +" Keywords +syn keyword sshdconfigKeyword AFSTokenPassing AllowGroups AllowTcpForwarding +syn keyword sshdconfigKeyword AllowUsers AuthorizedKeysFile Banner +syn keyword sshdconfigKeyword ChallengeResponseAuthentication Ciphers +syn keyword sshdconfigKeyword ClientAliveInterval ClientAliveCountMax +syn keyword sshdconfigKeyword Compression DenyGroups DenyUsers GatewayPorts +syn keyword sshdconfigKeyword HostbasedAuthentication HostKey IgnoreRhosts +syn keyword sshdconfigKeyword IgnoreUserKnownHosts KeepAlive +syn keyword sshdconfigKeyword KerberosAuthentication KerberosOrLocalPasswd +syn keyword sshdconfigKeyword KerberosTgtPassing KerberosTicketCleanup +syn keyword sshdconfigKeyword KeyRegenerationInterval ListenAddress +syn keyword sshdconfigKeyword LoginGraceTime LogLevel MACs MaxStartups +syn keyword sshdconfigKeyword PAMAuthenticationViaKbdInt +syn keyword sshdconfigKeyword PasswordAuthentication PermitEmptyPasswords +syn keyword sshdconfigKeyword PermitRootLogin PermitUserEnvironment PidFile +syn keyword sshdconfigKeyword Port PrintLastLog PrintMotd Protocol +syn keyword sshdconfigKeyword PubkeyAuthentication RhostsAuthentication +syn keyword sshdconfigKeyword RhostsRSAAuthentication RSAAuthentication +syn keyword sshdconfigKeyword ServerKeyBits StrictModes Subsystem +syn keyword sshdconfigKeyword SyslogFacility UseLogin UsePrivilegeSeparation +syn keyword sshdconfigKeyword VerifyReverseMapping X11DisplayOffset +syn keyword sshdconfigKeyword X11Forwarding X11UseLocalhost XAuthLocation + +" Define the default highlighting +if version >= 508 || !exists("did_sshdconfig_syntax_inits") + if version < 508 + let did_sshdconfig_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink sshdconfigComment Comment + HiLink sshdconfigTodo Todo + HiLink sshdconfigHostPort sshdconfigConstant + HiLink sshdconfigTime sshdconfigConstant + HiLink sshdconfigNumber sshdconfigConstant + HiLink sshdconfigConstant Constant + HiLink sshdconfigYesNo sshdconfigEnum + HiLink sshdconfigCipher sshdconfigEnum + HiLink sshdconfigMAC sshdconfigEnum + HiLink sshdconfigRootLogin sshdconfigEnum + HiLink sshdconfigLogLevel sshdconfigEnum + HiLink sshdconfigSysLogFacility sshdconfigEnum + HiLink sshdconfigEnum Function + HiLink sshdconfigSpecial Special + HiLink sshdconfigKeyword Keyword + delcommand HiLink +endif + +let b:current_syntax = "sshdconfig" diff --git a/runtime/syntax/st.vim b/runtime/syntax/st.vim new file mode 100644 index 000000000..d629eb4ed --- /dev/null +++ b/runtime/syntax/st.vim @@ -0,0 +1,102 @@ +" Vim syntax file +" Language: Smalltalk +" Maintainer: Arndt Hesse <hesse@self.de> +" Last Change: 2001 May 09 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" some Smalltalk keywords and standard methods +syn keyword stKeyword super self class true false new not +syn keyword stKeyword notNil isNil inspect out nil +syn match stMethod "\<do\>:" +syn match stMethod "\<whileTrue\>:" +syn match stMethod "\<whileFalse\>:" +syn match stMethod "\<ifTrue\>:" +syn match stMethod "\<ifFalse\>:" +syn match stMethod "\<put\>:" +syn match stMethod "\<to\>:" +syn match stMethod "\<at\>:" +syn match stMethod "\<add\>:" +syn match stMethod "\<new\>:" +syn match stMethod "\<for\>:" +syn match stMethod "\<methods\>:" +syn match stMethod "\<methodsFor\>:" +syn match stMethod "\<instanceVariableNames\>:" +syn match stMethod "\<classVariableNames\>:" +syn match stMethod "\<poolDictionaries\>:" +syn match stMethod "\<subclass\>:" + +" the block of local variables of a method +syn region stLocalVariables start="^[ \t]*|" end="|" + +" the Smalltalk comment +syn region stComment start="\"" end="\"" + +" the Smalltalk strings and single characters +syn region stString start='\'' skip="''" end='\'' +syn match stCharacter "$." + +syn case ignore + +" the symols prefixed by a '#' +syn match stSymbol "\(#\<[a-z_][a-z0-9_]*\>\)" +syn match stSymbol "\(#'[^']*'\)" + +" the variables in a statement block for loops +syn match stBlockVariable "\(:[ \t]*\<[a-z_][a-z0-9_]*\>[ \t]*\)\+|" contained + +" some representations of numbers +syn match stNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" +syn match stFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" +syn match stFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" + +syn case match + +" a try to higlight paren mismatches +syn region stParen transparent start='(' end=')' contains=ALLBUT,stParenError +syn match stParenError ")" +syn region stBlock transparent start='\[' end='\]' contains=ALLBUT,stBlockError +syn match stBlockError "\]" +syn region stSet transparent start='{' end='}' contains=ALLBUT,stSetError +syn match stSetError "}" + +hi link stParenError stError +hi link stSetError stError +hi link stBlockError stError + +" synchronization for syntax analysis +syn sync minlines=50 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_st_syntax_inits") + if version < 508 + let did_st_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink stKeyword Statement + HiLink stMethod Statement + HiLink stComment Comment + HiLink stCharacter Constant + HiLink stString Constant + HiLink stSymbol Special + HiLink stNumber Type + HiLink stFloat Type + HiLink stError Error + HiLink stLocalVariables Identifier + HiLink stBlockVariable Identifier + + delcommand HiLink +endif + +let b:current_syntax = "st" diff --git a/runtime/syntax/stp.vim b/runtime/syntax/stp.vim new file mode 100644 index 000000000..f4f0f3b61 --- /dev/null +++ b/runtime/syntax/stp.vim @@ -0,0 +1,167 @@ +" Vim syntax file +" Language: Stored Procedures (STP) +" Maintainer: Jeff Lanzarotta (jefflanzarotta@yahoo.com) +" URL: http://lanzarotta.tripod.com/vim/syntax/stp.vim.zip +" Last Change: March 05, 2002 + +" For version 5.x, clear all syntax items. +" For version 6.x, quit when a syntax file was already loaded. +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" Specials. +syn keyword stpSpecial null + +" Keywords. +syn keyword stpKeyword begin break call case create deallocate dynamic +syn keyword stpKeyword execute from function go grant +syn keyword stpKeyword index insert into leave max min on output procedure +syn keyword stpKeyword public result return returns scroll table to +syn keyword stpKeyword when +syn match stpKeyword "\<end\>" + +" Conditional. +syn keyword stpConditional if else elseif then +syn match stpConditional "\<end\s\+if\>" + +" Repeats. +syn keyword stpRepeat for while loop +syn match stpRepeat "\<end\s\+loop\>" + +" Operators. +syn keyword stpOperator asc not and or desc group having in is any some all +syn keyword stpOperator between exists like escape with union intersect minus +syn keyword stpOperator out prior distinct sysdate + +" Statements. +syn keyword stpStatement alter analyze as audit avg by close clustered comment +syn keyword stpStatement commit continue count create cursor declare delete +syn keyword stpStatement drop exec execute explain fetch from index insert +syn keyword stpStatement into lock max min next noaudit nonclustered open +syn keyword stpStatement order output print raiserror recompile rename revoke +syn keyword stpStatement rollback savepoint select set sum transaction +syn keyword stpStatement truncate unique update values where + +" Functions. +syn keyword stpFunction abs acos ascii asin atan atn2 avg ceiling charindex +syn keyword stpFunction charlength convert col_name col_length cos cot count +syn keyword stpFunction curunreservedpgs datapgs datalength dateadd datediff +syn keyword stpFunction datename datepart db_id db_name degree difference +syn keyword stpFunction exp floor getdate hextoint host_id host_name index_col +syn keyword stpFunction inttohex isnull lct_admin log log10 lower ltrim max +syn keyword stpFunction min now object_id object_name patindex pi pos power +syn keyword stpFunction proc_role radians rand replace replicate reserved_pgs +syn keyword stpFunction reverse right rtrim rowcnt round show_role sign sin +syn keyword stpFunction soundex space sqrt str stuff substr substring sum +syn keyword stpFunction suser_id suser_name tan tsequal upper used_pgs user +syn keyword stpFunction user_id user_name valid_name valid_user message + +" Types. +syn keyword stpType binary bit char datetime decimal double float image +syn keyword stpType int integer long money nchar numeric precision real +syn keyword stpType smalldatetime smallint smallmoney text time tinyint +syn keyword stpType timestamp varbinary varchar + +" Globals. +syn match stpGlobals '@@char_convert' +syn match stpGlobals '@@cient_csname' +syn match stpGlobals '@@client_csid' +syn match stpGlobals '@@connections' +syn match stpGlobals '@@cpu_busy' +syn match stpGlobals '@@error' +syn match stpGlobals '@@identity' +syn match stpGlobals '@@idle' +syn match stpGlobals '@@io_busy' +syn match stpGlobals '@@isolation' +syn match stpGlobals '@@langid' +syn match stpGlobals '@@language' +syn match stpGlobals '@@max_connections' +syn match stpGlobals '@@maxcharlen' +syn match stpGlobals '@@ncharsize' +syn match stpGlobals '@@nestlevel' +syn match stpGlobals '@@pack_received' +syn match stpGlobals '@@pack_sent' +syn match stpGlobals '@@packet_errors' +syn match stpGlobals '@@procid' +syn match stpGlobals '@@rowcount' +syn match stpGlobals '@@servername' +syn match stpGlobals '@@spid' +syn match stpGlobals '@@sqlstatus' +syn match stpGlobals '@@testts' +syn match stpGlobals '@@textcolid' +syn match stpGlobals '@@textdbid' +syn match stpGlobals '@@textobjid' +syn match stpGlobals '@@textptr' +syn match stpGlobals '@@textsize' +syn match stpGlobals '@@thresh_hysteresis' +syn match stpGlobals '@@timeticks' +syn match stpGlobals '@@total_error' +syn match stpGlobals '@@total_read' +syn match stpGlobals '@@total_write' +syn match stpGlobals '@@tranchained' +syn match stpGlobals '@@trancount' +syn match stpGlobals '@@transtate' +syn match stpGlobals '@@version' + +" Todos. +syn keyword stpTodo TODO FIXME XXX DEBUG NOTE + +" Strings and characters. +syn match stpStringError "'.*$" +syn match stpString "'\([^']\|''\)*'" + +" Numbers. +syn match stpNumber "-\=\<\d*\.\=[0-9_]\>" + +" Comments. +syn region stpComment start="/\*" end="\*/" contains=stpTodo +syn match stpComment "--.*" contains=stpTodo +syn sync ccomment stpComment + +" Parens. +syn region stpParen transparent start='(' end=')' contains=ALLBUT,stpParenError +syn match stpParenError ")" + +" Syntax Synchronizing. +syn sync minlines=10 maxlines=100 + +" Define the default highlighting. +" For version 5.x and earlier, only when not done already. +" For version 5.8 and later, only when and item doesn't have highlighting yet. +if version >= 508 || !exists("did_stp_syn_inits") + if version < 508 + let did_stp_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink stpConditional Conditional + HiLink stpComment Comment + HiLink stpKeyword Keyword + HiLink stpNumber Number + HiLink stpOperator Operator + HiLink stpSpecial Special + HiLink stpStatement Statement + HiLink stpString String + HiLink stpStringError Error + HiLink stpType Type + HiLink stpTodo Todo + HiLink stpFunction Function + HiLink stpGlobals Macro + HiLink stpParen Normal + HiLink stpParenError Error + HiLink stpSQLKeyword Function + HiLink stpRepeat Repeat + + delcommand HiLink +endif + +let b:current_syntax = "stp" + +" vim ts=8 sw=2 diff --git a/runtime/syntax/strace.vim b/runtime/syntax/strace.vim new file mode 100644 index 000000000..80cd262ef --- /dev/null +++ b/runtime/syntax/strace.vim @@ -0,0 +1,66 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: strace output +" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> +" Last Change: 2002-10-10 +" URL: http://trific.ath.cx/Ftp/vim/syntax/strace.vim + +" Setup +if version >= 600 + if exists("b:current_syntax") + finish + endif +else + syntax clear +endif + +syn case match + +" Parse the line +syn match straceSpecialChar "\\\d\d\d\|\\." contained +syn region straceString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=straceSpecialChar oneline +syn match straceNumber "\W[+-]\=\(\d\+\)\=\.\=\d\+\([eE][+-]\=\d\+\)\="lc=1 +syn match straceNumber "\W0x\x\+"lc=1 +syn match straceNumberRHS "\W\(0x\x\+\|-\=\d\+\)"lc=1 contained +syn match straceOtherRHS "?" contained +syn match straceConstant "[A-Z_]\{2,}" +syn region straceVerbosed start="(" end=")" matchgroup=Normal contained oneline +syn region straceReturned start="\s=\s" end="$" contains=StraceEquals,straceNumberRHS,straceOtherRHS,straceConstant,straceVerbosed oneline transparent +syn match straceEquals "\s=\s"ms=s+1,me=e-1 +syn match straceParenthesis "[][(){}]" +syn match straceSysCall "^\w\+" +syn match straceOtherPID "^\[[^]]*\]" contains=stracePID,straceNumber nextgroup=straceSysCallEmbed skipwhite +syn match straceSysCallEmbed "\w\+" contained +syn keyword stracePID pid contained +syn match straceOperator "[-+=*/!%&|:,]" +syn region straceComment start="/\*" end="\*/" oneline + +" Define the default highlighting +if version >= 508 || !exists("did_strace_syntax_inits") + if version < 508 + let did_strace_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink straceComment Comment + HiLink straceVerbosed Comment + HiLink stracePID PreProc + HiLink straceNumber Number + HiLink straceNumberRHS Type + HiLink straceOtherRHS Type + HiLink straceString String + HiLink straceConstant Function + HiLink straceEquals Type + HiLink straceSysCallEmbed straceSysCall + HiLink straceSysCall Statement + HiLink straceParenthesis Statement + HiLink straceOperator Normal + HiLink straceSpecialChar Special + HiLink straceOtherPID PreProc + + delcommand HiLink +endif + +let b:current_syntax = "strace" diff --git a/runtime/syntax/svn.vim b/runtime/syntax/svn.vim new file mode 100644 index 000000000..5ec3236c5 --- /dev/null +++ b/runtime/syntax/svn.vim @@ -0,0 +1,46 @@ +" Vim syntax file +" Language: Subversion (svn) commit file +" Maintainer: Dmitry Vasiliev <dima@hlabs.spb.ru> +" URL: http://www.hlabs.spb.ru/vim/svn.vim +" Last Change: $Date$ +" $Revision$ + +" For version 5.x: Clear all syntax items. +" For version 6.x: Quit when a syntax file was already loaded. +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn region svnRegion start="--This line, and those below, will be ignored--" end="\%$" contains=ALL +syn match svnRemoved "^D .*$" contained +syn match svnAdded "^A[ M] .*$" contained +syn match svnModified "^M[ M] .*$" contained +syn match svnProperty "^_M .*$" contained + +" Synchronization. +syn sync clear +syn sync match svnSync grouphere svnRegion "--This line, and those below, will be ignored--"me=s-1 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already. +" For version 5.8 and later: only when an item doesn't have highlighting yet. +if version >= 508 || !exists("did_svn_syn_inits") + if version <= 508 + let did_svn_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink svnRegion Comment + HiLink svnRemoved Constant + HiLink svnAdded Identifier + HiLink svnModified Special + HiLink svnProperty Special + + delcommand HiLink +endif + +let b:current_syntax = "svn" diff --git a/runtime/syntax/syncolor.vim b/runtime/syntax/syncolor.vim new file mode 100644 index 000000000..8d0064db1 --- /dev/null +++ b/runtime/syntax/syncolor.vim @@ -0,0 +1,85 @@ +" Vim syntax support file +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last Change: 2001 Sep 12 + +" This file sets up the default methods for highlighting. +" It is loaded from "synload.vim" and from Vim for ":syntax reset". +" Also used from init_highlight(). + +if !exists("syntax_cmd") || syntax_cmd == "on" + " ":syntax on" works like in Vim 5.7: set colors but keep links + command -nargs=* SynColor hi <args> + command -nargs=* SynLink hi link <args> +else + if syntax_cmd == "enable" + " ":syntax enable" keeps any existing colors + command -nargs=* SynColor hi def <args> + command -nargs=* SynLink hi def link <args> + elseif syntax_cmd == "reset" + " ":syntax reset" resets all colors to the default + command -nargs=* SynColor hi <args> + command -nargs=* SynLink hi! link <args> + else + " User defined syncolor file has already set the colors. + finish + endif +endif + +" Many terminals can only use six different colors (plus black and white). +" Therefore the number of colors used is kept low. It doesn't look nice with +" too many colors anyway. +" Careful with "cterm=bold", it changes the color to bright for some terminals. +" There are two sets of defaults: for a dark and a light background. +if &background == "dark" + SynColor Comment term=bold cterm=NONE ctermfg=Cyan ctermbg=NONE gui=NONE guifg=#80a0ff guibg=NONE + SynColor Constant term=underline cterm=NONE ctermfg=Magenta ctermbg=NONE gui=NONE guifg=#ffa0a0 guibg=NONE + SynColor Special term=bold cterm=NONE ctermfg=LightRed ctermbg=NONE gui=NONE guifg=Orange guibg=NONE + SynColor Identifier term=underline cterm=bold ctermfg=Cyan ctermbg=NONE gui=NONE guifg=#40ffff guibg=NONE + SynColor Statement term=bold cterm=NONE ctermfg=Yellow ctermbg=NONE gui=bold guifg=#ffff60 guibg=NONE + SynColor PreProc term=underline cterm=NONE ctermfg=LightBlue ctermbg=NONE gui=NONE guifg=#ff80ff guibg=NONE + SynColor Type term=underline cterm=NONE ctermfg=LightGreen ctermbg=NONE gui=bold guifg=#60ff60 guibg=NONE + SynColor Underlined term=underline cterm=underline ctermfg=LightBlue gui=underline guifg=#80a0ff + SynColor Ignore term=NONE cterm=NONE ctermfg=black ctermbg=NONE gui=NONE guifg=bg guibg=NONE +else + SynColor Comment term=bold cterm=NONE ctermfg=DarkBlue ctermbg=NONE gui=NONE guifg=Blue guibg=NONE + SynColor Constant term=underline cterm=NONE ctermfg=DarkRed ctermbg=NONE gui=NONE guifg=Magenta guibg=NONE + SynColor Special term=bold cterm=NONE ctermfg=DarkMagenta ctermbg=NONE gui=NONE guifg=SlateBlue guibg=NONE + SynColor Identifier term=underline cterm=NONE ctermfg=DarkCyan ctermbg=NONE gui=NONE guifg=DarkCyan guibg=NONE + SynColor Statement term=bold cterm=NONE ctermfg=Brown ctermbg=NONE gui=bold guifg=Brown guibg=NONE + SynColor PreProc term=underline cterm=NONE ctermfg=DarkMagenta ctermbg=NONE gui=NONE guifg=Purple guibg=NONE + SynColor Type term=underline cterm=NONE ctermfg=DarkGreen ctermbg=NONE gui=bold guifg=SeaGreen guibg=NONE + SynColor Underlined term=underline cterm=underline ctermfg=DarkMagenta gui=underline guifg=SlateBlue + SynColor Ignore term=NONE cterm=NONE ctermfg=white ctermbg=NONE gui=NONE guifg=bg guibg=NONE +endif +SynColor Error term=reverse cterm=NONE ctermfg=White ctermbg=Red gui=NONE guifg=White guibg=Red +SynColor Todo term=standout cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Blue guibg=Yellow + +" Common groups that link to default highlighting. +" You can specify other highlighting easily. +SynLink String Constant +SynLink Character Constant +SynLink Number Constant +SynLink Boolean Constant +SynLink Float Number +SynLink Function Identifier +SynLink Conditional Statement +SynLink Repeat Statement +SynLink Label Statement +SynLink Operator Statement +SynLink Keyword Statement +SynLink Exception Statement +SynLink Include PreProc +SynLink Define PreProc +SynLink Macro PreProc +SynLink PreCondit PreProc +SynLink StorageClass Type +SynLink Structure Type +SynLink Typedef Type +SynLink Tag Special +SynLink SpecialChar Special +SynLink Delimiter Special +SynLink SpecialComment Special +SynLink Debug Special + +delcommand SynColor +delcommand SynLink diff --git a/runtime/syntax/synload.vim b/runtime/syntax/synload.vim new file mode 100644 index 000000000..f816bc2d2 --- /dev/null +++ b/runtime/syntax/synload.vim @@ -0,0 +1,69 @@ +" Vim syntax support file +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last Change: 2001 May 21 + +" This file sets up for syntax highlighting. +" It is loaded from "syntax.vim" and "manual.vim". +" 1. Set the default highlight groups. +" 2. Install Syntax autocommands for all the available syntax files. + +if !has("syntax") + finish +endif + +" let others know that syntax has been switched on +let syntax_on = 1 + +" Set the default highlighting colors. Use a color scheme if specified. +if exists("colors_name") + exe "colors " . colors_name +else + runtime! syntax/syncolor.vim +endif + +" Line continuation is used here, remove 'C' from 'cpoptions' +let s:cpo_save = &cpo +set cpo&vim + +" First remove all old syntax autocommands. +au! Syntax + +au Syntax * call s:SynSet() + +fun! s:SynSet() + " clear syntax for :set syntax=OFF and any syntax name that doesn't exist + syn clear + if exists("b:current_syntax") + unlet b:current_syntax + endif + + let s = expand("<amatch>") + if s == "ON" + " :set syntax=ON + if &filetype == "" + echohl ErrorMsg + echo "filetype unknown" + echohl None + endif + let s = &filetype + endif + + if s != "" + " Load the syntax file(s) +" if has("mac") +" exe "runtime! syntax:" . s . ".vim" +" else + exe "runtime! syntax/" . s . ".vim" +" endif + endif +endfun + + +" Source the user-specified syntax highlighting file +if exists("mysyntaxfile") && filereadable(expand(mysyntaxfile)) + execute "source " . mysyntaxfile +endif + +" Restore 'cpoptions' +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/runtime/syntax/syntax.vim b/runtime/syntax/syntax.vim new file mode 100644 index 000000000..f274d93f4 --- /dev/null +++ b/runtime/syntax/syntax.vim @@ -0,0 +1,43 @@ +" Vim syntax support file +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last Change: 2001 Sep 04 + +" This file is used for ":syntax on". +" It installs the autocommands and starts highlighting for all buffers. + +if !has("syntax") + finish +endif + +" If Syntax highlighting appears to be on already, turn it off first, so that +" any leftovers are cleared. +if exists("syntax_on") || exists("syntax_manual") + so <sfile>:p:h/nosyntax.vim +endif + +" Load the Syntax autocommands and set the default methods for highlighting. +runtime syntax/synload.vim + +" Load the FileType autocommands if not done yet. +if exists("did_load_filetypes") + let s:did_ft = 1 +else + filetype on + let s:did_ft = 0 +endif + +" Set up the connection between FileType and Syntax autocommands. +" This makes the syntax automatically set when the file type is detected. +augroup syntaxset + au! FileType * exe "set syntax=" . expand("<amatch>") +augroup END + + +" Execute the syntax autocommands for the each buffer. +" If the filetype wasn't detected yet, do that now. +" Always do the syntaxset autocommands, for buffers where the 'filetype' +" already was set manually (e.g., help buffers). +doautoall syntaxset FileType +if !s:did_ft + doautoall filetypedetect BufRead +endif diff --git a/runtime/syntax/tads.vim b/runtime/syntax/tads.vim new file mode 100644 index 000000000..70ffe6f21 --- /dev/null +++ b/runtime/syntax/tads.vim @@ -0,0 +1,184 @@ +" Vim syntax file +" Language: TADS +" Maintainer: Amir Karger <karger@post.harvard.edu> +" $Date$ +" $Revision$ +" Stolen from: Bram Moolenaar's C language file +" Newest version at: http://www.hec.utah.edu/~karger/vim/syntax/tads.vim +" History info at the bottom of the file + +" TODO lots more keywords +" global, self, etc. are special *objects*, not functions. They should +" probably be a different color than the special functions +" Actually, should cvtstr etc. be functions?! (change tadsFunction) +" Make global etc. into Identifiers, since we don't have regular variables? + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" A bunch of useful keywords +syn keyword tadsStatement goto break return continue pass +syn keyword tadsLabel case default +syn keyword tadsConditional if else switch +syn keyword tadsRepeat while for do +syn keyword tadsStorageClass local compoundWord formatstring specialWords +syn keyword tadsBoolean nil true + +" TADS keywords +syn keyword tadsKeyword replace modify +syn keyword tadsKeyword global self inherited +" builtin functions +syn keyword tadsKeyword cvtstr cvtnum caps lower upper substr +syn keyword tadsKeyword say length +syn keyword tadsKeyword setit setscore +syn keyword tadsKeyword datatype proptype +syn keyword tadsKeyword car cdr +syn keyword tadsKeyword defined isclass +syn keyword tadsKeyword find firstobj nextobj +syn keyword tadsKeyword getarg argcount +syn keyword tadsKeyword input yorn askfile +syn keyword tadsKeyword rand randomize +syn keyword tadsKeyword restart restore quit save undo +syn keyword tadsException abort exit exitobj + +syn keyword tadsTodo contained TODO FIXME XXX + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match tadsSpecial contained "\\." +syn region tadsDoubleString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=tadsSpecial,tadsEmbedded +syn region tadsSingleString start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=tadsSpecial +" Embedded expressions in strings +syn region tadsEmbedded contained start="<<" end=">>" contains=tadsKeyword + +" TADS doesn't have \xxx, right? +"syn match cSpecial contained "\\[0-7][0-7][0-7]\=\|\\." +"syn match cSpecialCharacter "'\\[0-7][0-7]'" +"syn match cSpecialCharacter "'\\[0-7][0-7][0-7]'" + +"catch errors caused by wrong parenthesis +"syn region cParen transparent start='(' end=')' contains=ALLBUT,cParenError,cIncluded,cSpecial,cTodo,cUserCont,cUserLabel +"syn match cParenError ")" +"syn match cInParen contained "[{}]" +syn region tadsBrace transparent start='{' end='}' contains=ALLBUT,tadsBraceError,tadsIncluded,tadsSpecial,tadsTodo +syn match tadsBraceError "}" + +"integer number (TADS has no floating point numbers) +syn case ignore +syn match tadsNumber "\<[0-9]\+\>" +"hex number +syn match tadsNumber "\<0x[0-9a-f]\+\>" +syn match tadsIdentifier "\<[a-z][a-z0-9_$]*\>" +syn case match +" flag an octal number with wrong digits +syn match tadsOctalError "\<0[0-7]*[89]" + +" Removed complicated c_comment_strings +syn region tadsComment start="/\*" end="\*/" contains=tadsTodo +syn match tadsComment "//.*" contains=tadsTodo +syntax match tadsCommentError "\*/" + +syn region tadsPreCondit start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=tadsComment,tadsString,tadsNumber,tadsCommentError +syn region tadsIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match tadsIncluded contained "<[^>]*>" +syn match tadsInclude "^\s*#\s*include\>\s*["<]" contains=tadsIncluded +syn region tadsDefine start="^\s*#\s*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,tadsPreCondit,tadsIncluded,tadsInclude,tadsDefine,tadsInBrace,tadsIdentifier + +syn region tadsPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,tadsPreCondit,tadsIncluded,tadsInclude,tadsDefine,tadsInParen,tadsIdentifier + +" Highlight User Labels +" TODO labels for gotos? +"syn region cMulti transparent start='?' end=':' contains=ALLBUT,cIncluded,cSpecial,cTodo,cUserCont,cUserLabel,cBitField +" Avoid matching foo::bar() in C++ by requiring that the next char is not ':' +"syn match cUserCont "^\s*\I\i*\s*:$" contains=cUserLabel +"syn match cUserCont ";\s*\I\i*\s*:$" contains=cUserLabel +"syn match cUserCont "^\s*\I\i*\s*:[^:]" contains=cUserLabel +"syn match cUserCont ";\s*\I\i*\s*:[^:]" contains=cUserLabel + +"syn match cUserLabel "\I\i*" contained + +" identifier: class-name [, class-name [...]] [property-list] ; +" Don't highlight comment in class def +syn match tadsClassDef "\<class\>[^/]*" contains=tadsObjectDef,tadsClass +syn match tadsClass contained "\<class\>" +syn match tadsObjectDef "\<[a-zA-Z][a-zA-Z0-9_$]*\s*:\s*[a-zA-Z0-9_$]\+\(\s*,\s*[a-zA-Z][a-zA-Z0-9_$]*\)*\(\s*;\)\=" +syn keyword tadsFunction contained function +syn match tadsFunctionDef "\<[a-zA-Z][a-zA-Z0-9_$]*\s*:\s*function[^{]*" contains=tadsFunction +"syn region tadsObject transparent start = '[a-zA-Z][\i$]\s*:\s*' end=";" contains=tadsBrace,tadsObjectDef + +" How far back do we go to find matching groups +if !exists("tads_minlines") + let tads_minlines = 15 +endif +exec "syn sync ccomment tadsComment minlines=" . tads_minlines +if !exists("tads_sync_dist") + let tads_sync_dist = 100 +endif +execute "syn sync maxlines=" . tads_sync_dist + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_tads_syn_inits") + if version < 508 + let did_tads_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + HiLink tadsFunctionDef Function + HiLink tadsFunction Structure + HiLink tadsClass Structure + HiLink tadsClassDef Identifier + HiLink tadsObjectDef Identifier +" no highlight for tadsEmbedded, so it prints as normal text w/in the string + + HiLink tadsOperator Operator + HiLink tadsStructure Structure + HiLink tadsTodo Todo + HiLink tadsLabel Label + HiLink tadsConditional Conditional + HiLink tadsRepeat Repeat + HiLink tadsException Exception + HiLink tadsStatement Statement + HiLink tadsStorageClass StorageClass + HiLink tadsKeyWord Keyword + HiLink tadsSpecial SpecialChar + HiLink tadsNumber Number + HiLink tadsBoolean Boolean + HiLink tadsDoubleString tadsString + HiLink tadsSingleString tadsString + + HiLink tadsOctalError tadsError + HiLink tadsCommentError tadsError + HiLink tadsBraceError tadsError + HiLink tadsInBrace tadsError + HiLink tadsError Error + + HiLink tadsInclude Include + HiLink tadsPreProc PreProc + HiLink tadsDefine Macro + HiLink tadsIncluded tadsString + HiLink tadsPreCondit PreCondit + + HiLink tadsString String + HiLink tadsComment Comment + + delcommand HiLink +endif + + +let b:current_syntax = "tads" + +" Changes: +" 11/18/99 Added a bunch of TADS functions, tadsException +" 10/22/99 Misspelled Moolenaar (sorry!), c_minlines to tads_minlines +" +" vim: ts=8 diff --git a/runtime/syntax/tags.vim b/runtime/syntax/tags.vim new file mode 100644 index 000000000..8d87c2bee --- /dev/null +++ b/runtime/syntax/tags.vim @@ -0,0 +1,47 @@ +" Language: tags +" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchip@PcampbellAfamily.Mbiz> +" Last Change: Nov 18, 2002 +" Version: 2 +" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match tagName "^[^\t]\+" skipwhite nextgroup=tagPath +syn match tagPath "[^\t]\+" contained skipwhite nextgroup=tagAddr contains=tagBaseFile +syn match tagBaseFile "[a-zA-Z_]\+[\.a-zA-Z_0-9]*\t"me=e-1 contained +syn match tagAddr "\d*" contained skipwhite nextgroup=tagComment +syn region tagAddr matchgroup=tagDelim start="/" skip="\(\\\\\)*\\/" matchgroup=tagDelim end="$\|/" oneline contained skipwhite nextgroup=tagComment +syn match tagComment ";.*$" contained contains=tagField +syn match tagComment "^!_TAG_.*$" +syn match tagField contained "[a-z]*:" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_drchip_tags_inits") + if version < 508 + let did_drchip_tags_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink tagBaseFile PreProc + HiLink tagComment Comment + HiLink tagDelim Delimiter + HiLink tagField Number + HiLink tagName Identifier + HiLink tagPath PreProc + + delcommand HiLink +endif + +let b:current_syntax = "tags" + +" vim: ts=12 diff --git a/runtime/syntax/tak.vim b/runtime/syntax/tak.vim new file mode 100644 index 000000000..20186db14 --- /dev/null +++ b/runtime/syntax/tak.vim @@ -0,0 +1,136 @@ +" Vim syntax file +" Language: TAK2, TAK3, TAK2000 thermal modeling input file +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.tak +" URL: http://www.naglenet.org/vim/syntax/tak.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + + +" Ignore case +syn case ignore + + + +" +" +" Begin syntax definitions for tak input file. +" + +" Force free-form fortran format +let fortran_free_source=1 + +" Load FORTRAN syntax file +if version < 600 + source <sfile>:p:h/fortran.vim +else + runtime! syntax/fortran.vim +endif +unlet b:current_syntax + + + +" Define keywords for TAK and TAKOUT +syn keyword takOptions AUTODAMP CPRINT CSGDUMP GPRINT HPRINT LODTMP +syn keyword takOptions LOGIC LPRINT NCVPRINT PLOTQ QPRINT QDUMP +syn keyword takOptions SUMMARY SOLRTN UID DICTIONARIES + +syn keyword takRoutine SSITER FWDWRD FWDBCK BCKWRD + +syn keyword takControl ABSZRO BACKUP DAMP DTIMEI DTIMEL DTIMEH IFC +syn keyword takControl MAXTEMP NLOOPS NLOOPT NODELIST OUTPUT PLOT +syn keyword takControl SCALE SIGMA SSCRIT TIMEND TIMEN TIMEO TRCRIT +syn keyword takControl PLOT + +syn keyword takSolids PLATE CYL +syn keyword takSolidsArg ID MATNAM NTYPE TEMP XL YL ZL ISTRN ISTRG NNX +syn keyword takSolidsArg NNY NNZ INCX INCY INCZ IAK IAC DIFF ARITH BOUN +syn keyword takSolidsArg RMIN RMAX AXMAX NNR NNTHETA INCR INCTHETA END + +syn case ignore + +syn keyword takMacro fac pstart pstop +syn keyword takMacro takcommon fstart fstop + +syn keyword takIdentifier flq flx gen ncv per sim siv stf stv tvd tvs +syn keyword takIdentifier tvt pro thm + + + +" Define matches for TAK +syn match takFortran "^F[0-9 ]"me=e-1 +syn match takMotran "^M[0-9 ]"me=e-1 + +syn match takComment "^C.*$" +syn match takComment "^R.*$" +syn match takComment "\$.*$" + +syn match takHeader "^header[^,]*" + +syn match takIncludeFile "include \+[^ ]\+"hs=s+8 contains=fortranInclude + +syn match takInteger "-\=\<[0-9]*\>" +syn match takFloat "-\=\<[0-9]*\.[0-9]*" +syn match takScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" + +syn match takEndData "END OF DATA" + +if exists("thermal_todo") + execute 'syn match takTodo ' . '"^'.thermal_todo.'.*$"' +else + syn match takTodo "^?.*$" +endif + + + +" Define the default highlighting +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_tak_syntax_inits") + if version < 508 + let did_tak_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink takMacro Macro + HiLink takOptions Special + HiLink takRoutine Type + HiLink takControl Special + HiLink takSolids Special + HiLink takSolidsArg Statement + HiLink takIdentifier Identifier + + HiLink takFortran PreProc + HiLink takMotran PreProc + + HiLink takComment Comment + HiLink takHeader Typedef + HiLink takIncludeFile Type + HiLink takInteger Number + HiLink takFloat Float + HiLink takScientific Float + + HiLink takEndData Macro + + HiLink takTodo Todo + + delcommand HiLink +endif + + +let b:current_syntax = "tak" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/takcmp.vim b/runtime/syntax/takcmp.vim new file mode 100644 index 000000000..a94609b32 --- /dev/null +++ b/runtime/syntax/takcmp.vim @@ -0,0 +1,82 @@ +" Vim syntax file +" Language: TAK2, TAK3, TAK2000 thermal modeling compare file +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.cmp +" URL: http://www.naglenet.org/vim/syntax/takcmp.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + + +" Ignore case +syn case ignore + + + +" +" +" Begin syntax definitions for compare files. +" +" Define keywords for TAK compare + syn keyword takcmpUnit celsius fahrenheit + + + +" Define matches for TAK compare + syn match takcmpTitle "Steady State Temperature Comparison" + + syn match takcmpLabel "Run Date:" + syn match takcmpLabel "Run Time:" + syn match takcmpLabel "Temp. File \d Units:" + syn match takcmpLabel "Filename:" + syn match takcmpLabel "Output Units:" + + syn match takcmpHeader "^ *Node\( *File \d\)* *Node Description" + + syn match takcmpDate "\d\d\/\d\d\/\d\d" + syn match takcmpTime "\d\d:\d\d:\d\d" + syn match takcmpInteger "^ *-\=\<[0-9]*\>" + syn match takcmpFloat "-\=\<[0-9]*\.[0-9]*" + + + +" Define the default highlighting +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_takcmp_syntax_inits") + if version < 508 + let did_takcmp_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink takcmpTitle Type + HiLink takcmpUnit PreProc + + HiLink takcmpLabel Statement + + HiLink takcmpHeader takHeader + + HiLink takcmpDate Identifier + HiLink takcmpTime Identifier + HiLink takcmpInteger Number + HiLink takcmpFloat Special + + delcommand HiLink +endif + + +let b:current_syntax = "takcmp" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/takout.vim b/runtime/syntax/takout.vim new file mode 100644 index 000000000..774353942 --- /dev/null +++ b/runtime/syntax/takout.vim @@ -0,0 +1,102 @@ +" Vim syntax file +" Language: TAK2, TAK3, TAK2000 thermal modeling output file +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.out +" URL: http://www.naglenet.org/vim/syntax/takout.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + + +" Ignore case +syn case match + + + +" Load TAK syntax file +if version < 600 + source <sfile>:p:h/tak.vim +else + runtime! syntax/tak.vim +endif +unlet b:current_syntax + + + +" +" +" Begin syntax definitions for tak output files. +" + +" Define keywords for TAK output +syn case match + +syn keyword takoutPos ON SI +syn keyword takoutNeg OFF ENG + + + +" Define matches for TAK output +syn match takoutTitle "TAK III" +syn match takoutTitle "Release \d.\d\d" +syn match takoutTitle " K & K Associates *Thermal Analysis Kit III *Serial Number \d\d-\d\d\d" + +syn match takoutFile ": \w*\.TAK"hs=s+2 + +syn match takoutInteger "T\=[0-9]*\>"ms=s+1 + +syn match takoutSectionDelim "[-<>]\{4,}" contains=takoutSectionTitle +syn match takoutSectionDelim ":\=\.\{4,}:\=" contains=takoutSectionTitle +syn match takoutSectionTitle "[-<:] \w[0-9A-Za-z_() ]\+ [->:]"hs=s+1,me=e-1 + +syn match takoutHeaderDelim "=\{5,}" +syn match takoutHeaderDelim "|\{5,}" +syn match takoutHeaderDelim "+\{5,}" + +syn match takoutLabel "Input File:" contains=takoutFile +syn match takoutLabel "Begin Solution: Routine" + +syn match takoutError "<<< Error >>>" + + +" Define the default highlighting +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_takout_syntax_inits") + if version < 508 + let did_takout_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink takoutPos Statement + HiLink takoutNeg PreProc + HiLink takoutTitle Type + HiLink takoutFile takIncludeFile + HiLink takoutInteger takInteger + + HiLink takoutSectionDelim Delimiter + HiLink takoutSectionTitle Exception + HiLink takoutHeaderDelim SpecialComment + HiLink takoutLabel Identifier + + HiLink takoutError Error + + delcommand HiLink +endif + + +let b:current_syntax = "takout" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/tasm.vim b/runtime/syntax/tasm.vim new file mode 100644 index 000000000..1cfc1218a --- /dev/null +++ b/runtime/syntax/tasm.vim @@ -0,0 +1,122 @@ +" Vim syntax file +" Language: TASM: turbo assembler by Borland +" Maintaner: FooLman of United Force <foolman@bigfoot.com> +" Last change: 22 aug 2000 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore +syn match tasmLabel "^[\ \t]*[@a-z_$][a-z0-9_$@]*\ *:" +syn keyword tasmDirective ALIAS ALIGN ARG ASSUME %BIN CATSRT CODESEG +syn match tasmDirective "\<\(byte\|word\|dword\|qword\)\ ptr\>" +" CALL extended syntax +syn keyword tasmDirective COMM %CONDS CONST %CREF %CREFALL %CREFREF +syn keyword tasmDirective %CREFUREF %CTLS DATASEG DB DD %DEPTH DF DISPLAY +syn keyword tasmDirective DOSSEG DP DQ DT DW ELSE EMUL END ENDIF +" IF XXXX +syn keyword tasmDirective ENDM ENDP ENDS ENUM EQU ERR EVEN EVENDATA EXITCODE +syn keyword tasmDirective EXITM EXTRN FARDATA FASTIMUL FLIPFLAG GETFIELD GLOBAL +syn keyword tasmDirective GOTO GROUP IDEAL %INCL INCLUDE INCLUDELIB INSTR IRP +"JMP +syn keyword tasmDirective IRPC JUMPS LABEL LARGESTACK %LINUM %LIST LOCAL +syn keyword tasmDirective LOCALS MACRO %MACS MASKFLAG MASM MASM51 MODEL +syn keyword tasmDirective MULTERRS NAME %NEWPAGE %NOCONDS %NOCREF %NOCTLS +syn keyword tasmDirective NOEMUL %NOINCL NOJUMPS %NOLIST NOLOCALS %NOMACS +syn keyword tasmDirective NOMASM51 NOMULTERRS NOSMART %NOSYMS %NOTRUNC NOWARN +syn keyword tasmDirective %PAGESIZE %PCNT PNO87 %POPLCTL POPSTATE PROC PROCDESC +syn keyword tasmDirective PROCTYPE PUBLIC PUBLICDLL PURGE %PUSHCTL PUSHSTATE +"rept, ret +syn keyword tasmDirective QUIRKS RADIX RECORD RETCODE SEGMENT SETFIELD +syn keyword tasmDirective SETFLAG SIZESTR SMALLSTACK SMART STACK STARTUPCODE +syn keyword tasmDirective STRUC SUBSTR %SUBTTL %SYMS TABLE %TABSIZE TBLINIT +syn keyword tasmDirective TBLINST TBLPTR TESTFLAG %TEXT %TITLE %TRUNC TYPEDEF +syn keyword tasmDirective UDATASEG UFARDATA UNION USES VERSION WAR WHILE ?DEBUG + +syn keyword tasmInstruction AAA AAD AAM AAS ADC ADD AND ARPL BOUND BSF BSR +syn keyword tasmInstruction BSWAP BT BTC BTR BTS CALL CBW CLC CLD CLI CLTS +syn keyword tasmInstruction CMC CMP CMPXCHG CMPXCHG8B CPUID CWD CDQ CWDE +syn keyword tasmInstruction DAA DAS DEC DIV ENTER RETN RETF F2XM1 +syn keyword tasmCoprocInstr FABS FADD FADDP FBLD FBSTP FCHG FCOM FCOM2 FCOMI +syn keyword tasmCoprocInstr FCOMIP FCOMP FCOMP3 FCOMP5 FCOMPP FCOS FDECSTP +syn keyword tasmCoprocInstr FDISI FDIV FDIVP FDIVR FENI FFREE FFREEP FIADD +syn keyword tasmCoprocInstr FICOM FICOMP FIDIV FIDIVR FILD FIMUL FINIT FINCSTP +syn keyword tasmCoprocInstr FIST FISTP FISUB FISUBR FLD FLD1 FLDCW FLDENV +syn keyword tasmCoprocInstr FLDL2E FLDL2T FLDLG2 FLDLN2 FLDPI FLDZ FMUL FMULP +syn keyword tasmCoprocInstr FNCLEX FNINIT FNOP FNSAVE FNSTCW FNSTENV FNSTSW +syn keyword tasmCoprocInstr FPATAN FPREM FPREM1 FPTAN FRNDINT FRSTOR FSCALE +syn keyword tasmCoprocInstr FSETPM FSIN FSINCOM FSQRT FST FSTP FSTP1 FSTP8 +syn keyword tasmCoprocInstr FSTP9 FSUB FSUBP FSUBR FSUBRP FTST FUCOM FUCOMI +syn keyword tasmCoprocInstr FUCOMPP FWAIT FXAM FXCH FXCH4 FXCH7 FXTRACT FYL2X +syn keyword tasmCoprocInstr FYL2XP1 FSTCW FCHS FSINCOS +syn keyword tasmInstruction IDIV IMUL IN INC INT INTO INVD INVLPG IRET JMP +syn keyword tasmInstruction LAHF LAR LDS LEA LEAVE LES LFS LGDT LGS LIDT LLDT +syn keyword tasmInstruction LMSW LOCK LODSB LSL LSS LTR MOV MOVSX MOVZX MUL +syn keyword tasmInstruction NEG NOP NOT OR OUT POP POPA POPAD POPF POPFD PUSH +syn keyword tasmInstruction PUSHA PUSHAD PUSHF PUSHFD RCL RCR RDMSR RDPMC RDTSC +syn keyword tasmInstruction REP RET ROL ROR RSM SAHF SAR SBB SGDT SHL SAL SHLD +syn keyword tasmInstruction SHR SHRD SIDT SMSW STC STD STI STR SUB TEST VERR +syn keyword tasmInstruction VERW WBINVD WRMSR XADD XCHG XLAT XOR +syn keyword tasmMMXinst EMMS MOVD MOVQ PACKSSDW PACKSSWB PACKUSWB PADDB +syn keyword tasmMMXinst PADDD PADDSB PADDSB PADDSW PADDUSB PADDUSW PADDW +syn keyword tasmMMXinst PAND PANDN PCMPEQB PCMPEQD PCMPEQW PCMPGTB PCMPGTD +syn keyword tasmMMXinst PCMPGTW PMADDWD PMULHW PMULLW POR PSLLD PSLLQ +syn keyword tasmMMXinst PSLLW PSRAD PSRAW PSRLD PSRLQ PSRLW PSUBB PSUBD +syn keyword tasmMMXinst PSUBSB PSUBSW PSUBUSB PSUBUSW PSUBW PUNPCKHBW +syn keyword tasmMMXinst PUNPCKHBQ PUNPCKHWD PUNPCKLBW PUNPCKLDQ PUNPCKLWD +syn keyword tasmMMXinst PXOR +"FCMOV +syn match tasmInstruction "\<\(CMPS\|MOVS\|OUTS\|SCAS\|STOS\|LODS\|INS\)[BWD]" +syn match tasmInstruction "\<\(CMOV\|SET\|J\)N\=[ABCGLESXZ]\>" +syn match tasmInstruction "\<\(CMOV\|SET\|J\)N\=[ABGL]E\>" +syn match tasmInstruction "\<\(LOOP\|REP\)N\=[EZ]\=\>" +syn match tasmRegister "\<[A-D][LH]\>" +syn match tasmRegister "\<E\=\([A-D]X\|[SD]I\|[BS]P\)\>" +syn match tasmRegister "\<[C-GS]S\>" +syn region tasmComment start=";" end="$" +"HACK! comment ? ... selection +syn region tasmComment start="comment \+\$" end="\$" +syn region tasmComment start="comment \+\~" end="\~" +syn region tasmComment start="comment \+#" end="#" +syn region tasmString start="'" end="'" +syn region tasmString start='"' end='"' + +syn match tasmDec "\<-\=[0-9]\+\.\=[0-9]*\>" +syn match tasmHex "\<[0-9][0-9A-F]*H\>" +syn match tasmOct "\<[0-7]\+O\>" +syn match tasmBin "\<[01]\+B\>" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_tasm_syntax_inits") + if version < 508 + let did_tasm_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink tasmString String + HiLink tasmDec Number + HiLink tasmHex Number + HiLink tasmOct Number + HiLink tasmBin Number + HiLink tasmInstruction Keyword + HiLink tasmCoprocInstr Keyword + HiLink tasmMMXInst Keyword + HiLink tasmDirective PreProc + HiLink tasmRegister Identifier + HiLink tasmProctype PreProc + HiLink tasmComment Comment + HiLink tasmLabel Label + + delcommand HiLink +endif + +let b:curret_syntax = "tasm" diff --git a/runtime/syntax/tcl.vim b/runtime/syntax/tcl.vim new file mode 100644 index 000000000..145da9087 --- /dev/null +++ b/runtime/syntax/tcl.vim @@ -0,0 +1,235 @@ +" Vim syntax file +" Language: TCL/TK +" Maintainer: Dean Copsey <copsey@cs.ucdavis.edu> +" (previously Matt Neumann <mattneu@purpleturtle.com>) +" (previously Allan Kelly <allan@fruitloaf.co.uk>) +" Original: Robin Becker <robin@jessikat.demon.co.uk> +" Last Change: 2004 May 16 +" +" Keywords TODO: format clock click anchor + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" A bunch of useful keywords +syn keyword tclStatement proc global return lindex +syn keyword tclStatement llength lappend lreplace lrange list concat incr +syn keyword tclStatement upvar set +syn keyword tclLabel case default +syn keyword tclConditional if then else elseif switch +syn keyword tclRepeat while for foreach break continue +syn keyword tcltkSwitch contained insert create polygon fill outline tag + +" WIDGETS +" commands associated with widgets +syn keyword tcltkWidgetSwitch contained background highlightbackground insertontime cget +syn keyword tcltkWidgetSwitch contained selectborderwidth borderwidth highlightcolor insertwidth +syn keyword tcltkWidgetSwitch contained selectforeground cursor highlightthickness padx setgrid +syn keyword tcltkWidgetSwitch contained exportselection insertbackground pady takefocus +syn keyword tcltkWidgetSwitch contained font insertborderwidth relief xscrollcommand +syn keyword tcltkWidgetSwitch contained foreground insertofftime selectbackground yscrollcommand +syn keyword tcltkWidgetSwitch contained height spacing1 spacing2 spacing3 +syn keyword tcltkWidgetSwitch contained state tabs width wrap +" button +syn keyword tcltkWidgetSwitch contained command default +" canvas +syn keyword tcltkWidgetSwitch contained closeenough confine scrollregion xscrollincrement yscrollincrement orient +" checkbutton, radiobutton +syn keyword tcltkWidgetSwitch contained indicatoron offvalue onvalue selectcolor selectimage state variable +" entry, frame +syn keyword tcltkWidgetSwitch contained show class colormap container visual +" listbox, menu +syn keyword tcltkWidgetSwitch contained selectmode postcommand selectcolor tearoff tearoffcommand title type +" menubutton, message +syn keyword tcltkWidgetSwitch contained direction aspect justify +" scale +syn keyword tcltkWidgetSwitch contained bigincrement digits from length resolution showvalue sliderlength sliderrelief tickinterval to +" scrollbar +syn keyword tcltkWidgetSwitch contained activerelief elementborderwidth +" image +syn keyword tcltkWidgetSwitch contained delete names types create +" variable reference + " ::optional::namespaces +syn match tclVarRef "$\(\(::\)\?\([[:alnum:]_.]*::\)*\)\a[a-zA-Z0-9_.]*" + " ${...} may contain any character except '}' +syn match tclVarRef "${[^}]*}" +" menu, mane add +syn keyword tcltkWidgetSwitch contained active end last none cascade checkbutton command radiobutton separator +syn keyword tcltkWidgetSwitch contained activebackground actveforeground accelerator background bitmap columnbreak +syn keyword tcltkWidgetSwitch contained font foreground hidemargin image indicatoron label menu offvalue onvalue +syn keyword tcltkWidgetSwitch contained selectcolor selectimage state underline value variable +syn keyword tcltkWidgetSwitch contained add clone configure delete entrycget entryconfigure index insert invoke +syn keyword tcltkWidgetSwitch contained post postcascade type unpost yposition activate +"syn keyword tcltkWidgetSwitch contained +"syn match tcltkWidgetSwitch contained +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<button\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<scale\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef + +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<canvas\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<checkbutton\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<entry\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<frame\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<image\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<listbox\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<menubutton\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<message\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<radiobutton\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\<scrollbar\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +" These words are dual purpose. +" match switches +"syn match tcltkWidgetSwitch contained "-text"hs=s+1 +syn match tcltkWidgetSwitch contained "-text\(var\)\?"hs=s+1 +syn match tcltkWidgetSwitch contained "-menu"hs=s+1 +syn match tcltkWidgetSwitch contained "-label"hs=s+1 +" match commands - 2 lines for pretty match. +"variable +" Special case - If a number follows a variable region, it must be at the end of +" the pattern, by definition. Therefore, (1) either include a number as the region +" end and exclude tclNumber from the contains list, or (2) make variable +" keepend. As (1) would put variable out of step with everything else, use (2). +syn region tcltkCommand matchgroup=tcltkCommandColor start="^\<variable\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tclString,tclNumber,tclVarRef,tcltkCommand +syn region tcltkCommand matchgroup=tcltkCommandColor start="\s\<variable\>\|\[\<variable\>"hs=s+1 matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tclString,tclNumber,tclVarRef,tcltkCommand +" menu +syn region tcltkWidget matchgroup=tcltkWidgetColor start="^\<menu\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\s\<menu\>\|\[\<menu\>"hs=s+1 matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +" label +syn region tcltkWidget matchgroup=tcltkWidgetColor start="^\<label\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\s\<label\>\|\[\<label\>"hs=s+1 matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef +" text +syn region tcltkWidget matchgroup=tcltkWidgetColor start="^\<text\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidget,tcltkWidgetSwitch,tcltkSwitch,tclNumber,tclVarRef,tclString +syn region tcltkWidget matchgroup=tcltkWidgetColor start="\s\<text\>\|\[\<text\>"hs=s+1 matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidget,tcltkWidgetSwitch,tclString,tcltkSwitch,tclNumber,tclVarRef + +" This isn't contained (I don't think) so it's OK to just associate with the Color group. +" TODO: This could be wrong. +syn keyword tcltkWidgetColor toplevel + + +syn region tcltkPackConf matchgroup=tcltkPackConfColor start="\<configure\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tcltkPackConfSwitch,tclNumber,tclVarRef keepend +syn region tcltkPackConf matchgroup=tcltkPackConfColor start="\<cget\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"me=e-1 contains=tclLineContinue,tcltkWidgetSwitch,tclString,tcltkSwitch,tcltkPackConfSwitch,tclNumber,tclVarRef + + +" NAMESPACE +" commands associated with namespace +syn keyword tcltkNamespaceSwitch contained children code current delete eval +syn keyword tcltkNamespaceSwitch contained export forget import inscope origin +syn keyword tcltkNamespaceSwitch contained parent qualifiers tail which command variable +syn region tcltkCommand matchgroup=tcltkCommandColor start="\<namespace\>" matchgroup=NONE skip="^\s*$" end="{\|}\|]\|\"\|[^\\]*\s*$"me=e-1 contains=tclLineContinue,tcltkNamespaceSwitch + +" EXPR +" commands associated with expr +syn keyword tcltkMaths contained acos cos hypot sinh +syn keyword tcltkMaths contained asin cosh log sqrt +syn keyword tcltkMaths contained atan exp log10 tan +syn keyword tcltkMaths contained atan2 floor pow tanh +syn keyword tcltkMaths contained ceil fmod sin +syn region tcltkCommand matchgroup=tcltkCommandColor start="\<expr\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"me=e-1 contains=tclLineContinue,tcltkMaths,tclNumber,tclVarRef,tclString,tcltlWidgetSwitch,tcltkCommand,tcltkPackConf + +" format +syn region tcltkCommand matchgroup=tcltkCommandColor start="\<format\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"me=e-1 contains=tclLineContinue,tcltkMaths,tclNumber,tclVarRef,tclString,tcltlWidgetSwitch,tcltkCommand,tcltkPackConf + +" PACK +" commands associated with pack +syn keyword tcltkPackSwitch contained forget info propogate slaves +syn keyword tcltkPackConfSwitch contained after anchor before expand fill in ipadx ipady padx pady side +syn region tcltkCommand matchgroup=tcltkCommandColor start="\<pack\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkPackSwitch,tcltkPackConf,tcltkPackConfSwitch,tclNumber,tclVarRef,tclString,tcltkCommand keepend + +" STRING +" commands associated with string +syn keyword tcltkStringSwitch contained compare first index last length match range tolower toupper trim trimleft trimright wordstart wordend +syn region tcltkCommand matchgroup=tcltkCommandColor start="\<string\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkStringSwitch,tclNumber,tclVarRef,tclString,tcltkCommand + +" ARRAY +" commands associated with array +syn keyword tcltkArraySwitch contained anymore donesearch exists get names nextelement size startsearch set +" match from command name to ] or EOL +syn region tcltkCommand matchgroup=tcltkCommandColor start="\<array\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkArraySwitch,tclNumber,tclVarRef,tclString,tcltkCommand + +" LSORT +" switches for lsort +syn keyword tcltkLsortSwitch contained ascii dictionary integer real command increasing decreasing index +" match from command name to ] or EOL +syn region tcltkCommand matchgroup=tcltkCommandColor start="\<lsort\>" matchgroup=NONE skip="^\s*$" end="]\|[^\\]*\s*$"he=e-1 contains=tclLineContinue,tcltkLsortSwitch,tclNumber,tclVarRef,tclString,tcltkCommand + +syn keyword tclTodo contained TODO + + +" String and Character contstants +" Highlight special characters (those which have a backslash) differently +syn match tclSpecial contained "\\\d\d\d\=\|\\." +" A string needs the skip argument as it may legitimately contain \". +" Match at start of line +syn region tclString start=+^"+ end=+"+ contains=tclSpecial skip=+\\\\\|\\"+ +"Match all other legal strings. +syn region tclString start=+[^\\]"+ms=s+1 end=+"+ contains=tclSpecial skip=+\\\\\|\\"+ + +syn match tclLineContinue "\\\s*$" + +"integer number, or floating point number without a dot and with "f". +syn case ignore +syn match tclNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" +"floating point number, with dot, optional exponent +syn match tclNumber "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, starting with a dot, optional exponent +syn match tclNumber "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match tclNumber "\<\d\+e[-+]\=\d\+[fl]\=\>" +"hex number +syn match tclNumber "0x[0-9a-f]\+\(u\=l\=\|lu\)\>" +"syn match tclIdentifier "\<[a-z_][a-z0-9_]*\>" +syn case match + +syn region tclComment start="^\s*\#" skip="\\$" end="$" contains=tclTodo +syn region tclComment start=/;\s*\#/hs=s+1 skip="\\$" end="$" contains=tclTodo + +"syn sync ccomment tclComment + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_tcl_syntax_inits") + if version < 508 + let did_tcl_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink tcltkSwitch Special + HiLink tclLabel Label + HiLink tclConditional Conditional + HiLink tclRepeat Repeat + HiLink tclNumber Number + HiLink tclError Error + HiLink tclStatement Statement + "HiLink tclStatementColor Statement + HiLink tclString String + HiLink tclComment Comment + HiLink tclSpecial Special + HiLink tclTodo Todo + " Below here are the commands and their options. + HiLink tcltkCommandColor Statement + HiLink tcltkWidgetColor Structure + HiLink tclLineContinue WarningMsg + HiLink tcltkStringSwitch Special + HiLink tcltkArraySwitch Special + HiLink tcltkLsortSwitch Special + HiLink tcltkPackSwitch Special + HiLink tcltkPackConfSwitch Special + HiLink tcltkMaths Special + HiLink tcltkNamespaceSwitch Special + HiLink tcltkWidgetSwitch Special + HiLink tcltkPackConfColor Identifier + "HiLink tcltkLsort Statement + HiLink tclVarRef Identifier + + delcommand HiLink +endif + +let b:current_syntax = "tcl" + +" vim: ts=8 diff --git a/runtime/syntax/tcsh.vim b/runtime/syntax/tcsh.vim new file mode 100644 index 000000000..29fbb2e3c --- /dev/null +++ b/runtime/syntax/tcsh.vim @@ -0,0 +1,188 @@ +" Vim syntax file +" Language: C-shell (tcsh) +" Maintainor: Gautam Iyer <gautam@math.uchicago.edu> +" Last Modified: Mon 23 Feb 2004 02:28:51 PM CST +" +" Description: We break up each statement into a "command" and an "end" part. +" All groups are either a "command" or part of the "end" of a statement (ie +" everything after the "command"). This is because blindly highlighting tcsh +" statements as keywords caused way too many false positives. Eg: +" +" set history=200 +" +" causes history to come up as a keyword, which we want to avoid. + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case match + +" ----- Clusters ----- +syn cluster tcshModifiers contains=tcshModifier,tcshModifierError +syn cluster tcshQuoteList contains=tcshDQuote,tcshSQuote,tcshBQuote +syn cluster tcshStatementEnds contains=@tcshQuoteList,tcshComment,tcshUsrVar,TcshArgv,tcshSubst,tcshRedir,tcshMeta,tcshHereDoc,tcshSpecial,tcshArguement +syn cluster tcshStatements contains=tcshBuiltins,tcshCommands,tcshSet,tcshSetEnv,tcshAlias,tcshIf,tcshWhile +syn cluster tcshVarList contains=tcshUsrVar,tcshArgv,tcshSubst + +" ----- Statements ----- +" Tcsh commands: Any filename / modifiable variable (must be first!) +syn match tcshCommands '\v[a-zA-Z0-9\\./_$:-]+' contains=tcshSpecial,tcshUsrVar,tcshArgv,tcshVarError nextgroup=tcshStatementEnd + +" Builtin commands except (un)set(env), (un)alias, if, while, else +syn keyword tcshBuiltins nextgroup=tcshStatementEnd alloc bg bindkey break breaksw builtins bye case cd chdir complete continue default dirs echo echotc end endif endsw eval exec exit fg filetest foreach getspath getxvers glob goto hashstat history hup inlib jobs kill limit log login logout ls ls-F migrate newgrp nice nohup notify onintr popd printenv pushd rehash repeat rootnode sched setpath setspath settc setty setxvers shift source stop suspend switch telltc time umask uncomplete unhash universe unlimit ver wait warp watchlog where which + +" StatementEnd is anything after a builtin / command till the lexical end of a +" statement (;, |, ||, |&, && or end of line) +syn region tcshStatementEnd transparent contained matchgroup=tcshBuiltins start='' end='\v\\@<!(;|\|[|&]?|\&\&|$)' contains=@tcshStatementEnds + +" set expressions (Contains shell variables) +syn keyword tcshShellVar contained afsuser ampm argv autocorrect autoexpand autolist autologout backslash_quote catalog cdpath color colorcat command complete continue continue_args correct cwd dextract dirsfile dirstack dspmbyte dunique echo echo_style edit ellipsis fignore filec gid group histchars histdup histfile histlit history home ignoreeof implicitcd inputmode killdup killring listflags listjobs listlinks listmax listmaxrows loginsh logout mail matchbeep nobeep noclobber noding noglob nokanji nonomatch nostat notify oid owd path printexitvalue prompt prompt2 prompt3 promptchars pushdtohome pushdsilent recexact recognize_only_executables rmstar rprompt savedirs savehist sched shell shlvl status symlinks tcsh term time tperiod tty uid user verbose version visiblebell watch who wordchars +syn keyword tcshSet nextgroup=tcshSetEnd set unset +syn region tcshSetEnd contained transparent matchgroup=tcshBuiltins start='' skip="\\$" end="$\|;" contains=tcshShellVar,@tcshStatementEnds + +" setenv expressions (Contains enviorenment variables) +syn keyword tcshEnvVar contained AFSUSER COLUMNS DISPLAY EDITOR GROUP HOME HOST HOSTTYPE HPATH LANG LC_CTYPE LINES LS_COLORS MACHTYPE NOREBIND OSTYPE PATH PWD REMOTEHOST SHLVL SYSTYPE TERM TERMCAP USER VENDOR VISUAL +syn keyword tcshSetEnv nextgroup=tcshEnvEnd setenv unsetenv +syn region tcshEnvEnd contained transparent matchgroup=tcshBuiltins start='' skip="\\$" end="$\|;" contains=tcshEnvVar,@tcshStatementEnds + +" alias and unalias (contains special aliases) +syn keyword tcshAliases contained beemcmd cwdcmd jobcmd helpcommand periodic precmd postcmd shell +syn keyword tcshAlias nextgroup=tcshAliEnd alias unalias +syn region tcshAliEnd contained transparent matchgroup=tcshBuiltins start='' skip="\\$" end="$\|;" contains=tcshAliases,@tcshStatementEnds + +" if statements (contains expressions / operators) +syn keyword tcshIf nextgroup=tcshIfEnd if +syn region tcshIfEnd contained matchgroup=tcshBuiltins start='' skip="\\$" end="\v<then>|$" contains=tcshOperator,tcshNumber,@tcshStatementEnds + +" else statements (nextgroup if) +syn keyword tcshElse nextgroup=tcshIf skipwhite else + +" while statements (contains expressions / operators) +syn keyword tcshWhile nextgroup=tcshWhEnd while +syn region tcshWhEnd contained transparent matchgroup=tcshBuiltins start='' skip="\\$" end="\v$" contains=tcshOperator,tcshNumber,@tcshStatementEnds + +" Expressions start with @. +syn match tcshExprStart "\v\@\s+" nextgroup=tcshExprVar +syn match tcshExprVar contained "\v\h\w*%(\[\d+\])?" contains=tcshShellVar,tcshEnvVar nextgroup=tcshExprOp +syn match tcshExprOp contained "++\|--" +syn match tcshExprOp contained "\v\s*\=" nextgroup=tcshExprEnd +syn match tcshExprEnd contained "\v.*$"hs=e+1 contains=tcshOperator,tcshNumber,@tcshVarList +syn match tcshExprEnd contained "\v.{-};"hs=e contains=tcshOperator,tcshNumber,@tcshVarList + +" ----- Comments: ----- +syn match tcshComment "#.*" contains=tcshTodo,tcshCommentTi,tcshCommentSp,@Spell +syn match tcshSharpBang "^#! .*$" +syn match tcshCommentTi contained '\v#\s*\u\w*(\s+\u\w*)*:'hs=s+1 contains=tcshTodo +syn match tcshCommentSp contained '\v<\u{3,}>' contains=tcshTodo +syn match tcshTodo contained '\v\c<todo>' + +" ----- Strings ----- +" Tcsh does not allow \" in strings unless the "backslash_quote" shell +" variable is set. Set the vim variable "tcsh_backslash_quote" to 0 if you +" want VIM to assume that no backslash quote constructs exist. + +" Backquotes are treated as commands, and are not contained in anything +if(exists("tcsh_backslash_quote") && tcsh_backslash_quote == 0) + syn region tcshSQuote keepend contained start="\v\\@<!'" end="'" contains=@Spell + syn region tcshDQuote keepend contained start='\v\\@<!"' end='"' contains=@tcshVarList,tcshSpecial,@Spell + syn region tcshBQuote keepend start='\v\\@<!`' end='`' contains=@tcshStatements +else + syn region tcshSQuote contained start="\v\\@<!'" skip="\v\\\\|\\'" end="'" contains=@Spell + syn region tcshDQuote contained start='\v\\@<!"' end='"' contains=@tcshVarList,tcshSpecial,@Spell + syn region tcshBQuote keepend matchgroup=tcshBQuoteGrp start='\v\\@<!`' skip='\v\\\\|\\`' end='`' contains=@tcshStatements +endif + +" ----- Variables ----- +" Variable Errors. Must come first! \$ constructs will be flagged by +" tcshSpecial, so we don't consider them here. +syn match tcshVarError '\v\$\S*' contained + +" Modifiable Variables without {}. +syn match tcshUsrVar contained "\v\$\h\w*%(\[\d+%(-\d+)?\])?" nextgroup=@tcshModifiers contains=tcshShellVar,tcshEnvVar +syn match tcshArgv contained "\v\$%(\d+|\*)" nextgroup=@tcshModifiers + +" Modifiable Variables with {}. +syn match tcshUsrVar contained "\v\$\{\h\w*%(\[\d+%(-\d+)?\])?%(:\S*)?\}" contains=@tcshModifiers,tcshShellVar,tcshEnvVar +syn match tcshArgv contained "\v\$\{%(\d+|\*)%(:\S*)?\}" contains=@tcshModifiers + +" UnModifiable Substitutions. Order is important here. +syn match tcshSubst contained "\v\$[?#$!_<]" nextgroup=tcshModifierError +syn match tcshSubst contained "\v\$[%#?]%(\h\w*|\d+)" nextgroup=tcshModifierError contains=tcshShellVar,tcshEnvVar +syn match tcshSubst contained "\v\$\{[%#?]%(\h\w*|\d+)%(:\S*)?\}" contains=tcshModifierError contains=tcshShellVar,tcshEnvVar + +" Variable Name Expansion Modifiers (order important) +syn match tcshModifierError contained '\v:\S*' +syn match tcshModifier contained '\v:[ag]?[htreuls&qx]' nextgroup=@tcshModifiers + +" ----- Operators / Specials ----- +" Standard redirects (except <<) [<, >, >>, >>&, >>!, >>&!] +syn match tcshRedir contained "\v\<|\>\>?\&?!?" + +" Metachars +syn match tcshMeta contained "\v[]{}*?[]" + +" Here Documents (<<) +syn region tcshHereDoc contained matchgroup=tcshRedir start="\v\<\<\s*\z(\h\w*)" end="^\z1$" contains=@tcshVarList,tcshSpecial +syn region tcshHereDoc contained matchgroup=tcshRedir start="\v\<\<\s*'\z(\h\w*)'" start='\v\<\<\s*"\z(\h\w*)"$' start="\v\<\<\s*\\\z(\h\w*)$" end="^\z1$" + +" Operators +syn match tcshOperator contained "&&\|!\~\|!=\|<<\|<=\|==\|=\~\|>=\|>>\|\*\|\^\|\~\|||\|!\|%\|&\|+\|-\|/\|<\|>\||" +syn match tcshOperator contained "[(){}]" + +" Numbers +syn match tcshNumber contained "\v<-?\d+>" + +" Arguements +syn match tcshArguement contained "\v\s@<=-(\w|-)*" + +" Special charectors +syn match tcshSpecial contained "\v\\@<!\\(\d{3}|.)" + +" ----- Syncronising ----- +if exists("tcsh_minlines") + exec "syn sync minlines=" . tcsh_minlines +else + syn sync minlines=15 " Except 'here' documents, nothing is long +endif + +" Define highlighting of syntax groups +hi def link tcshBuiltins statement +hi def link tcshShellVar preproc +hi def link tcshEnvVar tcshShellVar +hi def link tcshAliases tcshShellVar +hi def link tcshCommands identifier +hi def link tcshSet tcshBuiltins +hi def link tcshSetEnv tcshBuiltins +hi def link tcshAlias tcshBuiltins +hi def link tcshIf tcshBuiltins +hi def link tcshElse tcshBuiltins +hi def link tcshWhile tcshBuiltins +hi def link tcshExprStart tcshBuiltins +hi def link tcshExprVar tcshUsrVar +hi def link tcshExprOp tcshOperator +hi def link tcshExprEnd tcshOperator +hi def link tcshComment comment +hi def link tcshCommentTi preproc +hi def link tcshCommentSp WarningMsg +hi def link tcshSharpBang preproc +hi def link tcshTodo todo +hi def link tcshSQuote constant +hi def link tcshDQuote tcshSQuote +hi def link tcshBQuoteGrp include +hi def link tcshVarError error +hi def link tcshUsrVar type +hi def link tcshArgv tcshUsrVar +hi def link tcshSubst tcshUsrVar +hi def link tcshModifier tcshArguement +hi def link tcshModifierError tcshVarError +hi def link tcshMeta tcshSubst +hi def link tcshRedir tcshOperator +hi def link tcshHereDoc tcshSQuote +hi def link tcshOperator operator +hi def link tcshNumber number +hi def link tcshArguement special +hi def link tcshSpecial specialchar + +let b:current_syntax = "tcsh" diff --git a/runtime/syntax/terminfo.vim b/runtime/syntax/terminfo.vim new file mode 100644 index 000000000..6ac7ffaf3 --- /dev/null +++ b/runtime/syntax/terminfo.vim @@ -0,0 +1,115 @@ +" Vim syntax file +" Language: Terminfo definition +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/terminfo/ +" Latest Revision: 2004-05-22 +" arch-tag: 8464dd47-0c5a-47d5-87ed-a2ad99e1196f + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" keywords (define first as to not mess up comments +syn match terminfoKeywords "[,=#|]" + +" todo +syn keyword terminfoTodo contained TODO FIXME XXX NOTE + +" comments +syn region terminfoComment matchgroup=terminfoComment start="^#" end="$" contains=terminfoTodo + +" numbers +syn match terminfoNumbers "\<[0-9]\+\>" + +" special keys +syn match terminfoSpecialChar "\\\(\o\{3}\|[Eenlrtbfs^\,:0]\)" +syn match terminfoSpecialChar "\^\a" + +" delays +syn match terminfoDelay "$<[0-9]\+>" + +" boolean capabilities +syn keyword terminfoBooleans bw am bce ccc xhp xhpa cpix crxw xt xenl eo gn +syn keyword terminfoBooleans hc chts km daisy hs hls in lpix da db mir msgr +syn keyword terminfoBooleans nxon xsb npc ndscr nrrmc os mc5i xcpa sam eslok +syn keyword terminfoBooleans hz ul xon + +" numeric capabilities +syn keyword terminfoNumerics cols it lh lw lines lm xmc ma colors pairs wnum +syn keyword terminfoNumerics ncv nlab pb vt wsl bitwin bitype bufsz btns +syn keyword terminfoNumerics spinh spinv maddr mjump mcs npins orc orhi orl +syn keyword terminfoNumerics orvi cps widcs + +" string capabilities +syn keyword terminfoStrings acsc cbt bel cr cpi lpi chr cvr csr rmp tbc mgc +syn keyword terminfoStrings clear el1 el ed hpa cmdch cwin cup cud1 home +syn keyword terminfoStrings civis cub1 mrcup cnorm cuf1 ll cuu1 cvvis defc +syn keyword terminfoStrings dch1 dl1 dial dsl dclk hd enacs smacs smam blink +syn keyword terminfoStrings bold smcup smdc dim swidm sdrfq smir sitm slm +syn keyword terminfoStrings smicm snlq snrmq prot rev invis sshm smso ssubm +syn keyword terminfoStrings ssupm smul sum smxon ech rmacs rmam sgr0 rmcup +syn keyword terminfoStrings rmdc rwidm rmir ritm rlm rmicm rshm rmso rsubm +syn keyword terminfoStrings rsupm rmul rum rmxon pause hook flash ff fsl +syn keyword terminfoStrings wingo hup is1 is2 is3 if iprog initc initp ich1 +syn keyword terminfoStrings il1 ip ka1 ka3 kb2 kbs kbeg kcbt kc1 kc3 kcan +syn keyword terminfoStrings ktbc kclr kclo kcmd kcpy kcrt kctab kdch1 kdl1 +syn keyword terminfoStrings kcud1 krmir kend kent kel ked kext +syn match terminfoStrings "\<kf\([0-9]\|[0-5][0-9]\|6[0-3]\)\>" +syn keyword terminfoStrings kfnd khlp khome kich1 kil1 kcub1 kll kmrk +syn keyword terminfoStrings kmsg kmov knxt knp kopn kopt kpp kprv kprt krdo +syn keyword terminfoStrings kref krfr krpl krst kres kcuf1 ksav kBEG kCAN +syn keyword terminfoStrings kCMD kCPY kCRT kDC kDL kslt kEND kEOL kEXT kind +syn keyword terminfoStrings kFND kHLP kHOM kIC kLFT kMSG kMOV kNXT kOPT kPRV +syn keyword terminfoStrings kPRT kri kRDO kRPL kRIT kRES kSAV kSPD khts kUND +syn keyword terminfoStrings kspd kund kcuu1 rmkx smkx lf0 lf1 lf10 lf2 lf3 +syn keyword terminfoStrings lf4 lf5 lf6 lf7 lf8 lf9 fln rmln smln rmm smm +syn keyword terminfoStrings mhpa mcud1 mcub1 mcuf1 mvpa mcuu1 nel porder oc +syn keyword terminfoStrings op pad dch dl cud mcud ich indn il cub mcub cuf +syn keyword terminfoStrings mcuf rin cuu mccu pfkey pfloc pfx pln mc0 mc5p +syn keyword terminfoStrings mc4 mc5 pulse qdial rmclk rep rfi rs1 rs2 rs3 rf +syn keyword terminfoStrings rc vpa sc ind ri scs sgr setbsmgb smgbp sclk scp +syn keyword terminfoStrings setb setf smgl smglp smgr smgrp hts smgt smgtp +syn keyword terminfoStrings wind sbim scsd rbim rcsd subcs supcs ht docr +syn keyword terminfoStrings tsl tone uc hu +syn match terminfoStrings "\<u[0-9]\>" +syn keyword terminfoStrings wait xoffc xonc zerom +syn keyword terminfoStrings scesa bicr binel birep csnm csin colornm defbi +syn keyword terminfoStrings devt dispc endbi smpch smsc rmpch rmsc getm +syn keyword terminfoStrings kmous minfo pctrm pfxl reqmp scesc s0ds s1ds +syn keyword terminfoStrings s2ds s3ds setab setaf setcolor smglr slines +syn keyword terminfoStrings smgtb ehhlm elhlm erhlm ethlm evhlm sgr1 +syn keyword terminfoStrings slengthsL + +" parameterized strings +syn match terminfoParameters "%[%dcspl+*/mAO&|^=<>!~i?te;-]" +syn match terminfoParameters "%\('[A-Z]'\|{[0-9]\{1,2}}\|p[1-9]\|P[a-z]\|g[A-Z]\)" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_terminfo_syn_inits") + if version < 508 + let did_terminfo_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink terminfoComment Comment + HiLink terminfoTodo Todo + HiLink terminfoNumbers Number + HiLink terminfoSpecialChar SpecialChar + HiLink terminfoDelay Special + HiLink terminfoBooleans Type + HiLink terminfoNumerics Type + HiLink terminfoStrings Type + HiLink terminfoParameters Keyword + HiLink terminfoKeywords Keyword + delcommand HiLink +endif + +let b:current_syntax = "terminfo" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim new file mode 100644 index 000000000..6eb134dce --- /dev/null +++ b/runtime/syntax/tex.vim @@ -0,0 +1,480 @@ +" Vim syntax file +" Language: TeX +" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> +" Last Change: Jun 01, 2004 +" Version: 24 +" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax +" +" Notes: {{{1 +" +" 1. If you have a \begin{verbatim} that appears to overrun its boundaries, +" use %stopzone. +" +" 2. Run-on equations ($..$ and $$..$$, particularly) can also be stopped +" by suitable use of %stopzone. +" +" 3. If you have a slow computer, you may wish to modify +" +" syn sync maxlines=200 +" syn sync minlines=50 +" +" to values that are more to your liking. +" +" 4. There is no match-syncing for $...$ and $$...$$; hence large +" equation blocks constructed that way may exhibit syncing problems. +" (there's no difference between begin/end patterns) +" +" 5. If you have the variable "g:tex_no_error" defined then none of the +" lexical error-checking will be done. +" +" ie. let g:tex_no_error=1 + +" Version Clears: {{{1 +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Define the default highlighting. {{{1 +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_tex_syntax_inits") + let did_tex_syntax_inits = 1 + if version < 508 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif +endif +if exists("g:tex_tex") && !exists("g:tex_no_error") + let g:tex_no_error= 1 +endif + +" Determine whether or not to use "*.sty" mode +" The user may override the normal determination by setting +" g:tex_stylish to 1 (for "*.sty" mode) +" or to 0 else (normal "*.tex" mode) +" or on a buffer-by-buffer basis with b:tex_stylish +let b:extfname=expand("%:e") +if exists("g:tex_stylish") + let b:tex_stylish= g:tex_stylish +elseif !exists("b:tex_stylish") + if b:extfname == "sty" || b:extfname == "cls" || b:extfname == "clo" || b:extfname == "dtx" || b:extfname == "ltx" + let b:tex_stylish= 1 + else + let b:tex_stylish= 0 + endif +endif + +" (La)TeX keywords: only use the letters a-zA-Z {{{1 +" but _ is the only one that causes problems. +if version < 600 + set isk-=_ + if b:tex_stylish + set isk+=@ + endif +else + setlocal isk-=_ + if b:tex_stylish + setlocal isk+=@ + endif +endif + +" Clusters: {{{1 +" -------- +syn cluster texCmdGroup contains=texCmdBody,texComment,texDefParm,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texSectionMarker,texSectionName,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle +if !exists("g:tex_no_error") + syn cluster texCmdGroup add=texMathError +endif +syn cluster texEnvGroup contains=texMatcher,texMathDelim,texSpecialChar,texStatement +syn cluster texMatchGroup contains=texAccent,texBadMath,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMatcher,texNewCmd,texNewEnv,texOnlyMath,texParen,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone,texInputFile,texOption +if !exists("tex_no_math") + syn cluster texMathZones contains=texMathZoneV,texMathZoneW,texMathZoneX,texMathZoneY,texMathZoneZ + syn cluster texMatchGroup add=@texMathZones + syn cluster texMathDelimGroup contains=texMathDelimBad,texMathDelimKey,texMathDelimSet1,texMathDelimSet2 + syn cluster texMathMatchGroup contains=@texMathZones,texComment,texDefCmd,texDelimiter,texDocType,texInput,texLength,texLigature,texMathDelim,texMathMatcher,texMathOper,texNewCmd,texNewEnv,texRefZone,texSection,texSpecialChar,texStatement,texString,texTypeSize,texTypeStyle,texZone + syn cluster texMathZoneGroup contains=texComment,texDelimiter,texLength,texMathDelim,texMathMatcher,texMathOper,texRefZone,texSpecialChar,texStatement,texTypeSize,texTypeStyle + if !exists("g:tex_no_error") + syn cluster texMathMatchGroup add=texMathError + syn cluster texMathZoneGroup add=texMathError + endif +endif + +" Try to flag {} and () mismatches: {{{1 +if !exists("g:tex_no_error") + syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup,texError + syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup,texError +else + syn region texMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[{}]" end="}" contains=@texMatchGroup + syn region texMatcher matchgroup=Delimiter start="\[" end="]" contains=@texMatchGroup +endif +syn region texParen start="(" end=")" contains=@texMatchGroup +if !exists("g:tex_no_error") + syn match texError "[}\])]" +endif +if !exists("tex_no_math") + if !exists("g:tex_no_error") + syn match texMathError "}" contained + endif + syn region texMathMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\}" end="}" end="%stopzone\>" contained contains=@texMathMatchGroup +endif + +" TeX/LaTeX keywords: {{{1 +" Instead of trying to be All Knowing, I just match \..alphameric.. +" Note that *.tex files may not have "@" in their \commands +if exists("g:tex_tex") || b:tex_stylish + syn match texStatement "\\[a-zA-Z@]\+" +else + syn match texStatement "\\\a\+" + if !exists("g:tex_no_error") + syn match texError "\\\a*@[a-zA-Z@]*" + endif +endif + +" TeX/LaTeX delimiters: {{{1 +syn match texDelimiter "&" +syn match texDelimiter "\\\\" + +" Tex/Latex Options: {{{1 +syn match texOption "[^\\]\zs#\d\+\|^#\d\+" + +" texAccent (tnx to Karim Belabas) avoids annoying highlighting for accents: {{{1 +if b:tex_stylish + syn match texAccent "\\[bcdvuH][^a-zA-Z@]"me=e-1 + syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)[^a-zA-Z@]"me=e-1 +else + syn match texAccent "\\[bcdvuH]\A"me=e-1 + syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)\A"me=e-1 +endif +syn match texAccent "\\[bcdvuH]$" +syn match texAccent +\\[=^.\~"`']+ +syn match texAccent +\\['=t'.c^ud"vb~Hr]{\a}+ +syn match texLigature "\\\([ijolL]\|ae\|oe\|ss\|AA\|AE\|OE\)$" + +" \begin{}/\end{} section markers: {{{1 +syn match texSectionMarker "\\begin\>\|\\end\>" nextgroup=texSectionName +syn region texSectionName matchgroup=Delimiter start="{" end="}" contained nextgroup=texSectionModifier +syn region texSectionModifier matchgroup=Delimiter start="\[" end="]" contained + +" \documentclass, \documentstyle, \usepackage: {{{1 +syn match texDocType "\\documentclass\>\|\\documentstyle\>\|\\usepackage\>" nextgroup=texSectionName,texDocTypeArgs +syn region texDocTypeArgs matchgroup=Delimiter start="\[" end="]" contained nextgroup=texSectionName + +" TeX input: {{{1 +syn match texInput "\\input\s\+[a-zA-Z/.0-9_^]\+"hs=s+7 contains=texStatement +syn match texInputFile "\\include\(graphics\|list\)\=\(\[.\{-}\]\)\=\s*{.\{-}}" contains=texStatement,texInputCurlies +syn match texInputFile "\\\(epsfig\|input\|usepackage\)\s*\(\[.*\]\)\={.\{-}}" contains=texStatement,texInputCurlies,texInputFileOpt +syn match texInputCurlies "[{}]" contained +syn region texInputFileOpt matchgroup=Delimiter start="\[" end="\]" contained + +" Type Styles (LaTeX 2.09): {{{1 +syn match texTypeStyle "\\rm\>" +syn match texTypeStyle "\\em\>" +syn match texTypeStyle "\\bf\>" +syn match texTypeStyle "\\it\>" +syn match texTypeStyle "\\sl\>" +syn match texTypeStyle "\\sf\>" +syn match texTypeStyle "\\sc\>" +syn match texTypeStyle "\\tt\>" + +" Type Styles: attributes, commands, families, etc (LaTeX2E): {{{1 +syn match texTypeStyle "\\textbf\>" +syn match texTypeStyle "\\textit\>" +syn match texTypeStyle "\\textmd\>" +syn match texTypeStyle "\\textrm\>" +syn match texTypeStyle "\\textsc\>" +syn match texTypeStyle "\\textsf\>" +syn match texTypeStyle "\\textsl\>" +syn match texTypeStyle "\\texttt\>" +syn match texTypeStyle "\\textup\>" +syn match texTypeStyle "\\emph\>" + +syn match texTypeStyle "\\mathbb\>" +syn match texTypeStyle "\\mathbf\>" +syn match texTypeStyle "\\mathcal\>" +syn match texTypeStyle "\\mathfrak\>" +syn match texTypeStyle "\\mathit\>" +syn match texTypeStyle "\\mathnormal\>" +syn match texTypeStyle "\\mathrm\>" +syn match texTypeStyle "\\mathsf\>" +syn match texTypeStyle "\\mathtt\>" + +syn match texTypeStyle "\\rmfamily\>" +syn match texTypeStyle "\\sffamily\>" +syn match texTypeStyle "\\ttfamily\>" + +syn match texTypeStyle "\\itshape\>" +syn match texTypeStyle "\\scshape\>" +syn match texTypeStyle "\\slshape\>" +syn match texTypeStyle "\\upshape\>" + +syn match texTypeStyle "\\bfseries\>" +syn match texTypeStyle "\\mdseries\>" + +" Some type sizes: {{{1 +syn match texTypeSize "\\tiny\>" +syn match texTypeSize "\\scriptsize\>" +syn match texTypeSize "\\footnotesize\>" +syn match texTypeSize "\\small\>" +syn match texTypeSize "\\normalsize\>" +syn match texTypeSize "\\large\>" +syn match texTypeSize "\\Large\>" +syn match texTypeSize "\\LARGE\>" +syn match texTypeSize "\\huge\>" +syn match texTypeSize "\\Huge\>" + +" Spacecodes (TeX'isms): {{{1 +" \mathcode`\^^@="2201 \delcode`\(="028300 \sfcode`\)=0 \uccode`X=`X \lccode`x=`x +syn match texSpaceCode "\\\(math\|cat\|del\|lc\|sf\|uc\)code`"me=e-1 nextgroup=texSpaceCodeChar +syn match texSpaceCodeChar "`\\\=.\(\^.\)\==\(\d\|\"\x\{1,6}\|`.\)" contained + +" Sections, subsections, etc: {{{1 +syn match texSection "\\\(sub\)*section\*\=\>" +syn match texSection "\\\(title\|author\|part\|chapter\|paragraph\|subparagraph\)\>" +syn match texSection "\\begin\s*{\s*abstract\s*}\|\\end\s*{\s*abstract\s*}" + +" Bad Math (mismatched): {{{1 +if !exists("tex_no_math") + syn match texBadMath "\\end\s*{\s*\(array\|gathered\|bBpvV]matrix\|split\|subequations\|smallmatrix\|xxalignat\)\s*}" + syn match texBadMath "\\end\s*{\s*\(align\|alignat\|displaymath\|displaymath\|eqnarray\|equation\|flalign\|gather\|math\|multline\|xalignat\)\*\=\s*}" + syn match texBadMath "\\[\])]" +endif + +" Math Zones: {{{1 +if !exists("tex_no_math") + " TexNewMathZone: creates a mathzone with the given suffix and mathzone name. {{{2 + " Starred forms are created if starform is true. Starred + " forms have syntax group and synchronization groups with a + " "S" appended. Handles: cluster, syntax, sync, and HiLink. + fun! TexNewMathZone(sfx,mathzone,starform) + let grpname = "texMathZone".a:sfx + let syncname = "texSyncMathZone".a:sfx + exe "syn cluster texMathZones add=".grpname + exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\s*}'."'".' keepend contains=@texMathZoneGroup' + exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' + exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' + exe 'HiLink '.grpname.' texMath' + if a:starform + let grpname = "texMathZone".a:sfx.'S' + let syncname = "texSyncMathZone".a:sfx.'S' + exe "syn cluster texMathZones add=".grpname + exe 'syn region '.grpname.' start='."'".'\\begin\s*{\s*'.a:mathzone.'\*\s*}'."'".' end='."'".'\\end\s*{\s*'.a:mathzone.'\*\s*}'."'".' keepend contains=@texMathZoneGroup' + exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' + exe 'syn sync match '.syncname.' grouphere '.grpname.' "\\begin\s*{\s*'.a:mathzone.'\*\s*}"' + exe 'HiLink '.grpname.' texMath' + endif + endfun + + " Standard Math Zones: {{{2 + call TexNewMathZone("A","align",1) + call TexNewMathZone("B","alignat",1) + call TexNewMathZone("C","displaymath",1) + call TexNewMathZone("D","eqnarray",1) + call TexNewMathZone("E","equation",1) + call TexNewMathZone("F","flalign",1) + call TexNewMathZone("G","gather",1) + call TexNewMathZone("H","math",1) + call TexNewMathZone("I","multline",1) + call TexNewMathZone("J","subequations",0) + call TexNewMathZone("K","xalignat",1) + call TexNewMathZone("L","xxalignat",0) + + " Inline Math Zones: {{{2 + syn region texMathZoneV matchgroup=Delimiter start="\\(" matchgroup=Delimiter end="\\)\|%stopzone\>" keepend contains=@texMathZoneGroup + syn region texMathZoneW matchgroup=Delimiter start="\\\[" matchgroup=Delimiter end="\\]\|%stopzone\>" keepend contains=@texMathZoneGroup + syn region texMathZoneX matchgroup=Delimiter start="\$" skip="\\\\\|\\\$" matchgroup=Delimiter end="\$" end="%stopzone\>" contains=@texMathZoneGroup + syn region texMathZoneY matchgroup=Delimiter start="\$\$" matchgroup=Delimiter end="\$\$" end="%stopzone\>" keepend contains=@texMathZoneGroup + syn region texMathZoneZ matchgroup=texStatement start="\\ensuremath\s*{" matchgroup=texStatement end="}" end="%stopzone\>" contains=@texMathZoneGroup + + syn match texMathOper "[_^=]" contained + + " \left..something.. and \right..something.. support: {{{2 + syn match texMathDelimBad contained "\S" + syn match texMathDelim contained "\\\(left\|right\|[bB]igg\=[lr]\)\>" skipwhite nextgroup=texMathDelimSet1,texMathDelimSet2,texMathDelimBad + syn match texMathDelim contained "\\\(left\|right\)arrow\>\|\<\([aA]rrow\|brace\)\=vert\>" + syn match texMathDelim contained "\\lefteqn\>" + syn match texMathDelimSet2 contained "\\" nextgroup=texMathDelimKey,texMathDelimBad + syn match texMathDelimSet1 contained "[<>()[\]|/.]\|\\[{}|]" + syn keyword texMathDelimKey contained backslash lceil lVert rgroup uparrow + syn keyword texMathDelimKey contained downarrow lfloor rangle rmoustache Uparrow + syn keyword texMathDelimKey contained Downarrow lgroup rbrace rvert updownarrow + syn keyword texMathDelimKey contained langle lmoustache rceil rVert Updownarrow + syn keyword texMathDelimKey contained lbrace lvert rfloor +endif + +" Special TeX characters ( \$ \& \% \# \{ \} \_ \S \P ) : {{{1 +syn match texSpecialChar "\\[$&%#{}_]" +if b:tex_stylish + syn match texSpecialChar "\\[SP@][^a-zA-Z@]"me=e-1 +else + syn match texSpecialChar "\\[SP@]\A"me=e-1 +endif +syn match texSpecialChar "\\\\" +if !exists("tex_no_math") + syn match texOnlyMath "[_^]" +endif +syn match texSpecialChar "\^\^[0-9a-f]\{2}\|\^\^\S" + +" Comments: {{{1 +" Normal TeX LaTeX : %.... +" Documented TeX Format: ^^A... -and- leading %s (only) +syn cluster texCommentGroup contains=texTodo,@Spell +syn case ignore +syn keyword texTodo contained combak fixme todo +syn case match +if b:extfname == "dtx" + syn match texComment "\^\^A.*$" contains=@texCommentGroup + syn match texComment "^%\+" contains=@texCommentGroup +else + syn match texComment "%.*$" contains=@texCommentGroup +endif + +" Separate lines used for verb` and verb# so that the end conditions {{{1 +" will appropriately terminate. Ideally vim would let me save a +" character from the start pattern and re-use it in the end-pattern. +syn region texZone start="\\begin{verbatim}" end="\\end{verbatim}\|%stopzone\>" +if version < 600 + syn region texZone start="\\verb\*\=`" end="`\|%stopzone\>" + syn region texZone start="\\verb\*\=#" end="#\|%stopzone\>" +else + if b:tex_stylish + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z@]\)" end="\z1\|%stopzone\>" + else + syn region texZone start="\\verb\*\=\z([^\ta-zA-Z]\)" end="\z1\|%stopzone\>" + endif +endif + +" Tex Reference Zones: {{{1 +syn region texZone start="@samp{" end="}\|%stopzone\>" +syn region texRefZone matchgroup=texStatement start="\\nocite{" keepend end="}\|%stopzone\>" contains=texComment,texDelimiter +syn region texRefZone matchgroup=texStatement start="\\bibliography{" keepend end="}\|%stopzone\>" contains=texComment,texDelimiter +syn region texRefZone matchgroup=texStatement start="\\cite\([tp]\*\=\)\={" keepend end="}\|%stopzone\>" contains=texComment,texDelimiter +syn region texRefZone matchgroup=texStatement start="\\label{" keepend end="}\|%stopzone\>" contains=texComment,texDelimiter +syn region texRefZone matchgroup=texStatement start="\\\(page\|eq\)ref{" keepend end="}\|%stopzone\>" contains=texComment,texDelimiter +syn region texRefZone matchgroup=texStatement start="\\v\=ref{" keepend end="}\|%stopzone\>" contains=texComment,texDelimiter + +" Handle newcommand, newenvironment : {{{1 +syn match texNewCmd "\\newcommand\>" nextgroup=texCmdName skipwhite skipnl +syn region texCmdName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texCmdArgs,texCmdBody skipwhite skipnl +syn region texCmdArgs contained matchgroup=Delimiter start="\["rs=s+1 end="]" nextgroup=texCmdBody skipwhite skipnl +syn region texCmdBody contained matchgroup=Delimiter start="{"rs=s+1 skip="\\\\\|\\[{}]" matchgroup=Delimiter end="}" contains=@texCmdGroup +syn match texNewEnv "\\newenvironment\>" nextgroup=texEnvName skipwhite skipnl +syn region texEnvName contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvBgn skipwhite skipnl +syn region texEnvBgn contained matchgroup=Delimiter start="{"rs=s+1 end="}" nextgroup=texEnvEnd skipwhite skipnl contains=@texEnvGroup +syn region texEnvEnd contained matchgroup=Delimiter start="{"rs=s+1 end="}" skipwhite skipnl contains=@texEnvGroup + +" Definitions/Commands: {{{1 +syn match texDefCmd "\\def\>" nextgroup=texDefName skipwhite skipnl +if b:tex_stylish + syn match texDefName contained "\\[a-zA-Z@]\+" nextgroup=texDefParms,texCmdBody skipwhite skipnl + syn match texDefName contained "\\[^a-zA-Z@]" nextgroup=texDefParms,texCmdBody skipwhite skipnl +else + syn match texDefName contained "\\\a\+" nextgroup=texDefParms,texCmdBody skipwhite skipnl + syn match texDefName contained "\\\A" nextgroup=texDefParms,texCmdBody skipwhite skipnl +endif +syn match texDefParms contained "#[^{]*" contains=texDefParm nextgroup=texCmdBody skipwhite skipnl +syn match texDefParm contained "#\d\+" + +" TeX Lengths: {{{1 +syn match texLength "\<\d\+\(\.\d\+\)\=\s*\(true\)\=\s*\(bp\|cc\|cm\|dd\|em\|ex\|in\|mm\|pc\|pt\|sp\)\>" + +" TeX String Delimiters: {{{1 +syn match texString "\(``\|''\|,,\)" + +" LaTeX synchronization: {{{1 +syn sync maxlines=200 +syn sync minlines=50 + +syn sync match texSyncStop groupthere NONE "%stopzone\>" + +" Synchronization: {{{1 +" The $..$ and $$..$$ make for impossible sync patterns +" (one can't tell if a "$$" starts or stops a math zone by itself) +" The following grouptheres coupled with minlines above +" help improve the odds of good syncing. +if !exists("tex_no_math") + syn sync match texSyncMathZoneA groupthere NONE "\\end{abstract}" + syn sync match texSyncMathZoneA groupthere NONE "\\end{center}" + syn sync match texSyncMathZoneA groupthere NONE "\\end{description}" + syn sync match texSyncMathZoneA groupthere NONE "\\end{enumerate}" + syn sync match texSyncMathZoneA groupthere NONE "\\end{itemize}" + syn sync match texSyncMathZoneA groupthere NONE "\\end{table}" + syn sync match texSyncMathZoneA groupthere NONE "\\end{tabular}" + syn sync match texSyncMathZoneA groupthere NONE "\\\(sub\)*section\>" +endif + +" Highlighting: {{{1 +if did_tex_syntax_inits == 1 + let did_tex_syntax_inits= 2 + " TeX highlighting groups which should share similar highlighting + if !exists("g:tex_no_error") + if !exists("tex_no_math") + HiLink texBadMath texError + HiLink texMathDelimBad texError + HiLink texMathError texError + if !b:tex_stylish + HiLink texOnlyMath texError + endif + endif + HiLink texError Error + endif + + HiLink texDefCmd texDef + HiLink texDefName texDef + HiLink texDocType texCmdName + HiLink texDocTypeArgs texCmdArgs + HiLink texInputFileOpt texCmdArgs + HiLink texInputCurlies texDelimiter + HiLink texLigature texSpecialChar + if !exists("tex_no_math") + HiLink texMathDelimSet1 texMathDelim + HiLink texMathDelimSet2 texMathDelim + HiLink texMathDelimKey texMathDelim + HiLink texMathMatcher texMath + HiLink texMathZoneW texMath + HiLink texMathZoneX texMath + HiLink texMathZoneY texMath + HiLink texMathZoneZ texMath + endif + HiLink texSectionMarker texCmdName + HiLink texSectionName texSection + HiLink texSpaceCode texStatement + HiLink texTypeSize texType + HiLink texTypeStyle texType + + " Basic TeX highlighting groups + HiLink texCmdArgs Number + HiLink texCmdName Statement + HiLink texComment Comment + HiLink texDef Statement + HiLink texDefParm Special + HiLink texDelimiter Delimiter + HiLink texInput Special + HiLink texInputFile Special + HiLink texLength Number + HiLink texMath Special + HiLink texMathDelim Statement + HiLink texMathOper Operator + HiLink texNewCmd Statement + HiLink texNewEnv Statement + HiLink texOption Number + HiLink texRefZone Special + HiLink texSection PreCondit + HiLink texSpaceCodeChar Special + HiLink texSpecialChar SpecialChar + HiLink texStatement Statement + HiLink texString String + HiLink texTodo Todo + HiLink texType Type + HiLink texZone PreCondit + + delcommand HiLink +endif + +" Current Syntax: {{{1 +unlet b:extfname +let b:current_syntax = "tex" +" vim: ts=8 fdm=marker diff --git a/runtime/syntax/texinfo.vim b/runtime/syntax/texinfo.vim new file mode 100644 index 000000000..c7d5d8ec7 --- /dev/null +++ b/runtime/syntax/texinfo.vim @@ -0,0 +1,409 @@ +" Vim syntax file +" Language: Texinfo (macro package for TeX) +" Maintainer: Sandor Kopanyi <sandor.kopanyi@mailbox.hu> +" URL: <-> +" Last Change: 2003 May 11 +" +" the file follows the Texinfo manual structure; this file is based +" on manual for Texinfo version 4.0, 28 September 1999 +" since @ can have special meanings, everything is 'match'-ed and 'region'-ed +" (including @ in 'iskeyword' option has unexpected effects) + +" Remove any old syntax stuff hanging around, if needed +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'texinfo' +endif + +"in Texinfo can be real big things, like tables; sync for that +syn sync lines=200 + +"some general stuff +"syn match texinfoError "\S" contained TODO +syn match texinfoIdent "\k\+" contained "IDENTifier +syn match texinfoAssignment "\k\+\s*=\s*\k\+\s*$" contained "assigment statement ( var = val ) +syn match texinfoSinglePar "\k\+\s*$" contained "single parameter (used for several @-commands) +syn match texinfoIndexPar "\k\k\s*$" contained "param. used for different *index commands (+ @documentlanguage command) + + +"marking words and phrases (chap. 9 in Texinfo manual) +"(almost) everything appears as 'contained' too; is for tables (@table) + +"this chapter is at the beginning of this file to avoid overwritings + +syn match texinfoSpecialChar "@acronym" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@acronym{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@b" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@b{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@cite" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@cite{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@code" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@code{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@command" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@command{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@dfn" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@dfn{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@email" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@email{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@emph" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@emph{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@env" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@env{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@file" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@file{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@i" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@i{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@kbd" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@kbd{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@key" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@key{" end="}" contains=texinfoSpecialChar +syn match texinfoSpecialChar "@option" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@option{" end="}" contains=texinfoSpecialChar +syn match texinfoSpecialChar "@r" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@r{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@samp" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@samp{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@sc" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@sc{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@strong" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@strong{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@t" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@t{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@url" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@url{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoSpecialChar "@var" contained +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@var{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn match texinfoAtCmd "^@kbdinputstyle" nextgroup=texinfoSinglePar skipwhite + + +"overview of Texinfo (chap. 1 in Texinfo manual) +syn match texinfoComment "@c .*" +syn match texinfoComment "@c$" +syn match texinfoComment "@comment .*" +syn region texinfoMltlnAtCmd matchgroup=texinfoComment start="^@ignore\s*$" end="^@end ignore\s*$" contains=ALL + + +"beginning a Texinfo file (chap. 3 in Texinfo manual) +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="@center " skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd oneline +syn region texinfoMltlnDMAtCmd matchgroup=texinfoAtCmd start="^@detailmenu\s*$" end="^@end detailmenu\s*$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@setfilename " skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@settitle " skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@shorttitlepage " skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@title " skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@titlefont{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@titlepage\s*$" end="^@end titlepage\s*$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoMltlnDMAtCmd,texinfoAtCmd,texinfoPrmAtCmd,texinfoMltlnAtCmd +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@vskip " skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn match texinfoAtCmd "^@exampleindent" nextgroup=texinfoSinglePar skipwhite +syn match texinfoAtCmd "^@headings" nextgroup=texinfoSinglePar skipwhite +syn match texinfoAtCmd "^\\input" nextgroup=texinfoSinglePar skipwhite +syn match texinfoAtCmd "^@paragraphindent" nextgroup=texinfoSinglePar skipwhite +syn match texinfoAtCmd "^@setchapternewpage" nextgroup=texinfoSinglePar skipwhite + + +"ending a Texinfo file (chap. 4 in Texinfo manual) +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="@author " skip="\\$" end="$" contains=texinfoSpecialChar oneline +"all below @bye should be comment TODO +syn match texinfoAtCmd "^@bye\s*$" +syn match texinfoAtCmd "^@contents\s*$" +syn match texinfoAtCmd "^@printindex" nextgroup=texinfoIndexPar skipwhite +syn match texinfoAtCmd "^@setcontentsaftertitlepage\s*$" +syn match texinfoAtCmd "^@setshortcontentsaftertitlepage\s*$" +syn match texinfoAtCmd "^@shortcontents\s*$" +syn match texinfoAtCmd "^@summarycontents\s*$" + + +"chapter structuring (chap. 5 in Texinfo manual) +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendix" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsection" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsubsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@appendixsubsubsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@centerchap" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@chapheading" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@chapter" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@heading" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@majorheading" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@section" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subheading " skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subsection" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subsubheading" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subsubsection" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@subtitle" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumbered" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumberedsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumberedsubsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@unnumberedsubsubsec" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn match texinfoAtCmd "^@lowersections\s*$" +syn match texinfoAtCmd "^@raisesections\s*$" + + +"nodes (chap. 6 in Texinfo manual) +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@anchor{" end="}" +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@top" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@node" skip="\\$" end="$" contains=texinfoSpecialChar oneline + + +"menus (chap. 7 in Texinfo manual) +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@menu\s*$" end="^@end menu\s*$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoMltlnDMAtCmd + + +"cross references (chap. 8 in Texinfo manual) +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@inforef{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@pxref{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@ref{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@uref{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@xref{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd + + +"marking words and phrases (chap. 9 in Texinfo manual) +"(almost) everything appears as 'contained' too; is for tables (@table) + +"this chapter is at the beginning of this file to avoid overwritings + + +"quotations and examples (chap. 10 in Texinfo manual) +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@cartouche\s*$" end="^@end cartouche\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@display\s*$" end="^@end display\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@example\s*$" end="^@end example\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@flushleft\s*$" end="^@end flushleft\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@flushright\s*$" end="^@end flushright\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@format\s*$" end="^@end format\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@lisp\s*$" end="^@end lisp\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@quotation\s*$" end="^@end quotation\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smalldisplay\s*$" end="^@end smalldisplay\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smallexample\s*$" end="^@end smallexample\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smallformat\s*$" end="^@end smallformat\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@smalllisp\s*$" end="^@end smalllisp\s*$" contains=ALL +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@exdent" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn match texinfoAtCmd "^@noindent\s*$" +syn match texinfoAtCmd "^@smallbook\s*$" + + +"lists and tables (chap. 11 in Texinfo manual) +syn match texinfoAtCmd "@asis" contained +syn match texinfoAtCmd "@columnfractions" contained +syn match texinfoAtCmd "@item" contained +syn match texinfoAtCmd "@itemx" contained +syn match texinfoAtCmd "@tab" contained +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@enumerate" end="^@end enumerate\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ftable" end="^@end ftable\s*$" contains=ALL +syn region texinfoMltlnNAtCmd matchgroup=texinfoAtCmd start="^@itemize" end="^@end itemize\s*$" contains=ALL +syn region texinfoMltlnNAtCmd matchgroup=texinfoAtCmd start="^@multitable" end="^@end multitable\s*$" contains=ALL +syn region texinfoMltlnNAtCmd matchgroup=texinfoAtCmd start="^@table" end="^@end table\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@vtable" end="^@end vtable\s*$" contains=ALL + + +"indices (chap. 12 in Texinfo manual) +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@\(c\|f\|k\|p\|t\|v\)index" skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@..index" skip="\\$" end="$" contains=texinfoSpecialChar oneline +"@defcodeindex and @defindex is defined after chap. 15's @def* commands (otherwise those ones will overwrite these ones) +syn match texinfoSIPar "\k\k\s*\k\k\s*$" contained +syn match texinfoAtCmd "^@syncodeindex" nextgroup=texinfoSIPar skipwhite +syn match texinfoAtCmd "^@synindex" nextgroup=texinfoSIPar skipwhite + +"special insertions (chap. 13 in Texinfo manual) +syn match texinfoSpecialChar "@\(!\|?\|@\|\s\)" +syn match texinfoSpecialChar "@{" +syn match texinfoSpecialChar "@}" +"accents +syn match texinfoSpecialChar "@=." +syn match texinfoSpecialChar "@\('\|\"\|\^\|`\)[aeiouyAEIOUY]" +syn match texinfoSpecialChar "@\~[aeinouyAEINOUY]" +syn match texinfoSpecialChar "@dotaccent{.}" +syn match texinfoSpecialChar "@H{.}" +syn match texinfoSpecialChar "@,{[cC]}" +syn match texinfoSpecialChar "@AA{}" +syn match texinfoSpecialChar "@aa{}" +syn match texinfoSpecialChar "@L{}" +syn match texinfoSpecialChar "@l{}" +syn match texinfoSpecialChar "@O{}" +syn match texinfoSpecialChar "@o{}" +syn match texinfoSpecialChar "@ringaccent{.}" +syn match texinfoSpecialChar "@tieaccent{..}" +syn match texinfoSpecialChar "@u{.}" +syn match texinfoSpecialChar "@ubaraccent{.}" +syn match texinfoSpecialChar "@udotaccent{.}" +syn match texinfoSpecialChar "@v{.}" +"ligatures +syn match texinfoSpecialChar "@AE{}" +syn match texinfoSpecialChar "@ae{}" +syn match texinfoSpecialChar "@copyright{}" +syn match texinfoSpecialChar "@bullet" contained "for tables and lists +syn match texinfoSpecialChar "@bullet{}" +syn match texinfoSpecialChar "@dotless{i}" +syn match texinfoSpecialChar "@dotless{j}" +syn match texinfoSpecialChar "@dots{}" +syn match texinfoSpecialChar "@enddots{}" +syn match texinfoSpecialChar "@equiv" contained "for tables and lists +syn match texinfoSpecialChar "@equiv{}" +syn match texinfoSpecialChar "@error{}" +syn match texinfoSpecialChar "@exclamdown{}" +syn match texinfoSpecialChar "@expansion{}" +syn match texinfoSpecialChar "@minus" contained "for tables and lists +syn match texinfoSpecialChar "@minus{}" +syn match texinfoSpecialChar "@OE{}" +syn match texinfoSpecialChar "@oe{}" +syn match texinfoSpecialChar "@point" contained "for tables and lists +syn match texinfoSpecialChar "@point{}" +syn match texinfoSpecialChar "@pounds{}" +syn match texinfoSpecialChar "@print{}" +syn match texinfoSpecialChar "@questiondown{}" +syn match texinfoSpecialChar "@result" contained "for tables and lists +syn match texinfoSpecialChar "@result{}" +syn match texinfoSpecialChar "@ss{}" +syn match texinfoSpecialChar "@TeX{}" +"other +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@dmn{" end="}" +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@footnote{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@image{" end="}" +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@math{" end="}" +syn match texinfoAtCmd "@footnotestyle" nextgroup=texinfoSinglePar skipwhite + + +"making and preventing breaks (chap. 14 in Texinfo manual) +syn match texinfoSpecialChar "@\(\*\|-\|\.\)" +syn match texinfoAtCmd "^@need" nextgroup=texinfoSinglePar skipwhite +syn match texinfoAtCmd "^@page\s*$" +syn match texinfoAtCmd "^@sp" nextgroup=texinfoSinglePar skipwhite +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@group\s*$" end="^@end group\s*$" contains=ALL +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@hyphenation{" end="}" +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@w{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd + + +"definition commands (chap. 15 in Texinfo manual) +syn match texinfoMltlnAtCmdFLine "^@def\k\+" contained +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@def\k\+" end="^@end def\k\+$" contains=ALL + +"next 2 commands are from chap. 12; must be defined after @def* commands above to overwrite them +syn match texinfoAtCmd "@defcodeindex" nextgroup=texinfoIndexPar skipwhite +syn match texinfoAtCmd "@defindex" nextgroup=texinfoIndexPar skipwhite + + +"conditionally visible text (chap. 16 in Texinfo manual) +syn match texinfoAtCmd "^@clear" nextgroup=texinfoSinglePar skipwhite +syn region texinfoMltln2AtCmd matchgroup=texinfoAtCmd start="^@html\s*$" end="^@end html\s*$" +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifclear" end="^@end ifclear\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifhtml" end="^@end ifhtml\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifinfo" end="^@end ifinfo\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifnothtml" end="^@end ifnothtml\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifnotinfo" end="^@end ifnotinfo\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifnottex" end="^@end ifnottex\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@ifset" end="^@end ifset\s*$" contains=ALL +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@iftex" end="^@end iftex\s*$" contains=ALL +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@set " skip="\\$" end="$" contains=texinfoSpecialChar oneline +syn region texinfoTexCmd start="\$\$" end="\$\$" contained +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@tex" end="^@end tex\s*$" contains=texinfoTexCmd +syn region texinfoBrcPrmAtCmd matchgroup=texinfoAtCmd start="@value{" end="}" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd + + +"internationalization (chap. 17 in Texinfo manual) +syn match texinfoAtCmd "@documentencoding" nextgroup=texinfoSinglePar skipwhite +syn match texinfoAtCmd "@documentlanguage" nextgroup=texinfoIndexPar skipwhite + + +"defining new texinfo commands (chap. 18 in Texinfo manual) +syn match texinfoAtCmd "@alias" nextgroup=texinfoAssignment skipwhite +syn match texinfoDIEPar "\S*\s*,\s*\S*\s*,\s*\S*\s*$" contained +syn match texinfoAtCmd "@definfoenclose" nextgroup=texinfoDIEPar skipwhite +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@macro" end="^@end macro\s*$" contains=ALL + + +"formatting hardcopy (chap. 19 in Texinfo manual) +syn match texinfoAtCmd "^@afourlatex\s*$" +syn match texinfoAtCmd "^@afourpaper\s*$" +syn match texinfoAtCmd "^@afourwide\s*$" +syn match texinfoAtCmd "^@finalout\s*$" +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@pagesizes" end="$" oneline + + +"creating and installing Info Files (chap. 20 in Texinfo manual) +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@dircategory" skip="\\$" end="$" oneline +syn region texinfoMltlnAtCmd matchgroup=texinfoAtCmd start="^@direntry\s*$" end="^@end direntry\s*$" contains=texinfoSpecialChar +syn match texinfoAtCmd "^@novalidate\s*$" + + +"include files (appendix E in Texinfo manual) +syn match texinfoAtCmd "^@include" nextgroup=texinfoSinglePar skipwhite + + +"page headings (appendix F in Texinfo manual) +syn match texinfoHFSpecialChar "@|" contained +syn match texinfoThisAtCmd "@thischapter" contained +syn match texinfoThisAtCmd "@thischaptername" contained +syn match texinfoThisAtCmd "@thisfile" contained +syn match texinfoThisAtCmd "@thispage" contained +syn match texinfoThisAtCmd "@thistitle" contained +syn match texinfoThisAtCmd "@today{}" contained +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@evenfooting" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@evenheading" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@everyfooting" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@everyheading" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@oddfooting" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline +syn region texinfoPrmAtCmd matchgroup=texinfoAtCmd start="^@oddheading" skip="\\$" end="$" contains=texinfoSpecialChar,texinfoBrcPrmAtCmd,texinfoThisAtCmd,texinfoHFSpecialChar oneline + + +"refilling paragraphs (appendix H in Texinfo manual) +syn match texinfoAtCmd "@refill" + + +syn cluster texinfoAll contains=ALLBUT,{texinfoThisAtCmd,texinfoHFSpecialChar} +syn cluster texinfoReducedAll contains=texinfoSpecialChar,texinfoBrcPrmAtCmd +"============================================================================== +" highlighting + +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_texinfo_syn_inits") + + if version < 508 + let did_texinfo_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink texinfoSpecialChar Special + HiLink texinfoHFSpecialChar Special + + HiLink texinfoError Error + HiLink texinfoIdent Identifier + HiLink texinfoAssignment Identifier + HiLink texinfoSinglePar Identifier + HiLink texinfoIndexPar Identifier + HiLink texinfoSIPar Identifier + HiLink texinfoDIEPar Identifier + HiLink texinfoTexCmd PreProc + + + HiLink texinfoAtCmd Statement "@-command + HiLink texinfoPrmAtCmd String "@-command in one line with unknown nr. of parameters + "is String because is found as a region and is 'matchgroup'-ed + "to texinfoAtCmd + HiLink texinfoBrcPrmAtCmd String "@-command with parameter(s) in braces ({}) + "is String because is found as a region and is 'matchgroup'-ed to texinfoAtCmd + HiLink texinfoMltlnAtCmdFLine texinfoAtCmd "repeated embedded First lines in @-commands + HiLink texinfoMltlnAtCmd String "@-command in multiple lines + "is String because is found as a region and is 'matchgroup'-ed to texinfoAtCmd + HiLink texinfoMltln2AtCmd PreProc "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors) + HiLink texinfoMltlnDMAtCmd PreProc "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors; used for @detailmenu, which can be included in @menu) + HiLink texinfoMltlnNAtCmd Normal "@-command in multiple lines (same as texinfoMltlnAtCmd, just with other colors) + HiLink texinfoThisAtCmd Statement "@-command used in headers and footers (@this... series) + + HiLink texinfoComment Comment + + delcommand HiLink +endif + + +let b:current_syntax = "texinfo" + +if main_syntax == 'texinfo' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/runtime/syntax/texmf.vim b/runtime/syntax/texmf.vim new file mode 100644 index 000000000..7b91168f0 --- /dev/null +++ b/runtime/syntax/texmf.vim @@ -0,0 +1,86 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: Web2C TeX texmf.cnf configuration file +" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> +" Last Change: 2001-05-13 +" URL: http://physics.muni.cz/~yeti/download/syntax/texmf.vim + +" Setup +if version >= 600 + if exists("b:current_syntax") + finish + endif +else + syntax clear +endif + +syn case match + +" Comments +syn match texmfComment "%..\+$" contains=texmfTodo +syn match texmfComment "%\s*$" contains=texmfTodo +syn keyword texmfTodo TODO FIXME XXX NOT contained + +" Constants and parameters +syn match texmfPassedParameter "[-+]\=%\w\W" +syn match texmfPassedParameter "[-+]\=%\w$" +syn match texmfNumber "\<\d\+\>" +syn match texmfVariable "\$\(\w\k*\|{\w\k*}\)" +syn match texmfSpecial +\\"\|\\$+ +syn region texmfString start=+"+ end=+"+ skip=+\\"\\\\+ contains=texmfVariable,texmfSpecial,texmfPassedParameter + +" Assignments +syn match texmfLHSStart "^\s*\w\k*" nextgroup=texmfLHSDot,texmfEquals +syn match texmfLHSVariable "\w\k*" contained nextgroup=texmfLHSDot,texmfEquals +syn match texmfLHSDot "\." contained nextgroup=texmfLHSVariable +syn match texmfEquals "\s*=" contained + +" Specialities +syn match texmfComma "," contained +syn match texmfColons ":\|;" +syn match texmfDoubleExclam "!!" contained + +" Catch errors caused by wrong parenthesization +syn region texmfBrace matchgroup=texmfBraceBrace start="{" end="}" contains=ALLBUT,texmfTodo,texmfBraceError,texmfLHSVariable,texmfLHSDot transparent +syn match texmfBraceError "}" + +" Define the default highlighting +if version >= 508 || !exists("did_texmf_syntax_inits") + if version < 508 + let did_texmf_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink texmfComment Comment + HiLink texmfTodo Todo + + HiLink texmfPassedParameter texmfVariable + HiLink texmfVariable Identifier + + HiLink texmfNumber Number + HiLink texmfString String + + HiLink texmfLHSStart texmfLHS + HiLink texmfLHSVariable texmfLHS + HiLink texmfLHSDot texmfLHS + HiLink texmfLHS Type + + HiLink texmfEquals Normal + + HiLink texmfBraceBrace texmfDelimiter + HiLink texmfComma texmfDelimiter + HiLink texmfColons texmfDelimiter + HiLink texmfDelimiter Preproc + + HiLink texmfDoubleExclam Statement + HiLink texmfSpecial Special + + HiLink texmfBraceError texmfError + HiLink texmfError Error + + delcommand HiLink +endif + +let b:current_syntax = "texmf" diff --git a/runtime/syntax/tf.vim b/runtime/syntax/tf.vim new file mode 100644 index 000000000..2a9a99988 --- /dev/null +++ b/runtime/syntax/tf.vim @@ -0,0 +1,209 @@ +" Vim syntax file +" Language: tf +" Maintainer: Lutz Eymers <ixtab@polzin.com> +" URL: http://www.isp.de/data/tf.vim +" Email: send syntax_vim.tgz +" Last Change: 2001 May 10 +" +" Options lite_minlines = x to sync at least x lines backwards + +" Remove any old syntax stuff hanging around + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case match + +if !exists("main_syntax") + let main_syntax = 'tf' +endif + +" Special global variables +syn keyword tfVar HOME LANG MAIL SHELL TERM TFHELP TFLIBDIR TFLIBRARY TZ contained +syn keyword tfVar background backslash contained +syn keyword tfVar bamf bg_output borg clearfull cleardone clock connect contained +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 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 +syn keyword tfVar watch_dog watchname wordpunct wrap wraplog wrapsize contained +syn keyword tfVar wrapspace contained + +" Worldvar +syn keyword tfWorld world_name world_character world_password world_host contained +syn keyword tfWorld world_port world_mfile world_type contained + +" Number +syn match tfNumber "-\=\<\d\+\>" + +" Float +syn match tfFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" + +" Operator +syn match tfOperator "[-+=?:&|!]" +syn match tfOperator "/[^*~@]"he=e-1 +syn match tfOperator ":=" +syn match tfOperator "[^/%]\*"hs=s+1 +syn match tfOperator "$\+[([{]"he=e-1,me=e-1 +syn match tfOperator "\^\[\+"he=s+1 contains=tfSpecialCharEsc + +" Relational +syn match tfRelation "&&" +syn match tfRelation "||" +syn match tfRelation "[<>/!=]=" +syn match tfRelation "[<>]" +syn match tfRelation "[!=]\~" +syn match tfRelation "[=!]/" + + +" Readonly Var +syn match tfReadonly "[#*]" contained +syn match tfReadonly "\<-\=L\=\d\{-}\>" contained +syn match tfReadonly "\<P\(\d\+\|R\|L\)\>" contained +syn match tfReadonly "\<R\>" contained + +" Identifier +syn match tfIdentifier "%\+[a-zA-Z_#*-0-9]\w*" contains=tfVar,tfReadonly +syn match tfIdentifier "%\+[{]"he=e-1,me=e-1 +syn match tfIdentifier "\$\+{[a-zA-Z_#*-0-9]\w*}" contains=tfWorld + +" Function names +syn keyword tfFunctions ascii char columns echo filename ftime fwrite getopts +syn keyword tfFunctions getpid idle kbdel kbgoto kbhead kblen kbmatch kbpoint +syn keyword tfFunctions kbtail kbwordleft kbwordright keycode lines mod +syn keyword tfFunctions moresize pad rand read regmatch send strcat strchr +syn keyword tfFunctions strcmp strlen strncmp strrchr strrep strstr substr +syn keyword tfFunctions systype time tolower toupper + +syn keyword tfStatement addworld bamf beep bind break cat changes connect contained +syn keyword tfStatement dc def dokey echo edit escape eval export expr fg for contained +syn keyword tfStatement gag getfile grab help hilite histsize hook if input contained +syn keyword tfStatement kill lcd let list listsockets listworlds load contained +syn keyword tfStatement localecho log nohilite not partial paste ps purge contained +syn keyword tfStatement purgeworld putfile quit quote recall recordline save contained +syn keyword tfStatement saveworld send sh shift sub substitute contained +syn keyword tfStatement suspend telnet test time toggle trig trigger unbind contained +syn keyword tfStatement undef undefn undeft unhook untrig unworld contained +syn keyword tfStatement version watchdog watchname while world contained + +" Hooks +syn keyword tfHook ACTIVITY BACKGROUND BAMF CONFAIL CONFLICT CONNECT DISCONNECT +syn keyword tfHook KILL LOAD LOADFAIL LOG LOGIN MAIL MORE PENDING PENDING +syn keyword tfHook PROCESS PROMPT PROXY REDEF RESIZE RESUME SEND SHADOW SHELL +syn keyword tfHook SIGHUP SIGTERM SIGUSR1 SIGUSR2 WORLD + +" Conditional +syn keyword tfConditional if endif then else elseif contained + +" Repeat +syn keyword tfRepeat while do done repeat for contained + +" Statement +syn keyword tfStatement break quit contained + +" Include +syn keyword tfInclude require load save loaded contained + +" Define +syn keyword tfDefine bind unbind def undef undefn undefn purge hook unhook trig untrig contained +syn keyword tfDefine set unset setenv contained + +" Todo +syn keyword tfTodo TODO Todo todo contained + +" SpecialChar +syn match tfSpecialChar "\\[abcfnrtyv\\]" contained +syn match tfSpecialChar "\\\d\{3}" contained contains=tfOctalError +syn match tfSpecialChar "\\x[0-9a-fA-F]\{2}" contained +syn match tfSpecialCharEsc "\[\+" contained + +syn match tfOctalError "[89]" contained + +" Comment +syn region tfComment start="^;" end="$" contains=tfTodo + +" String +syn region tfString oneline matchgroup=None start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=tfIdentifier,tfSpecialChar,tfEscape +syn region tfString matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=tfIdentifier,tfSpecialChar,tfEscape + +syn match tfParentError "[)}\]]" + +" Parents +syn region tfParent matchgroup=Delimiter start="(" end=")" contains=ALLBUT,tfReadonly +syn region tfParent matchgroup=Delimiter start="\[" end="\]" contains=ALL +syn region tfParent matchgroup=Delimiter start="{" end="}" contains=ALL + +syn match tfEndCommand "%%\{-};" +syn match tfJoinLines "\\$" + +" Types + +syn match tfType "/[a-zA-Z_~@][a-zA-Z0-9_]*" contains=tfConditional,tfRepeat,tfStatement,tfInclude,tfDefine,tfStatement + +" Catch /quote .. ' +syn match tfQuotes "/quote .\{-}'" contains=ALLBUT,tfString +" Catch $(/escape ) +syn match tfEscape "(/escape .*)" + +" sync +if exists("tf_minlines") + exec "syn sync minlines=" . tf_minlines +else + syn sync minlines=100 +endif + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_tf_syn_inits") + if version < 508 + let did_tf_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink tfComment Comment + HiLink tfString String + HiLink tfNumber Number + HiLink tfFloat Float + HiLink tfIdentifier Identifier + HiLink tfVar Identifier + HiLink tfWorld Identifier + HiLink tfReadonly Identifier + HiLink tfHook Identifier + HiLink tfFunctions Function + HiLink tfRepeat Repeat + HiLink tfConditional Conditional + HiLink tfLabel Label + HiLink tfStatement Statement + HiLink tfType Type + HiLink tfInclude Include + HiLink tfDefine Define + HiLink tfSpecialChar SpecialChar + HiLink tfSpecialCharEsc SpecialChar + HiLink tfParentError Error + HiLink tfTodo Todo + HiLink tfEndCommand Delimiter + HiLink tfJoinLines Delimiter + HiLink tfOperator Operator + HiLink tfRelation Operator + + delcommand HiLink +endif + +let b:current_syntax = "tf" + +if main_syntax == 'tf' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/runtime/syntax/tidy.vim b/runtime/syntax/tidy.vim new file mode 100644 index 000000000..06518033b --- /dev/null +++ b/runtime/syntax/tidy.vim @@ -0,0 +1,153 @@ +" Vim syntax file +" Filename: tidy.vim +" Language: HMTL Tidy configuration file ( /etc/tidyrc ~/.tidyrc ) +" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au> +" URL: http://mugca.its.monash.edu.au/~djkea2/vim/syntax/tidy.vim +" Last Change: 2002 Oct 24 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +if version < 600 + set iskeyword=@,48-57,- +else + setlocal iskeyword=@,48-57,- +endif + +syn match tidyComment "^\s*//.*$" contains=tidyTodo +syn match tidyComment "^\s*#.*$" contains=tidyTodo +syn keyword tidyTodo TODO NOTE FIXME XXX contained + +syn match tidyAssignment "^[a-z0-9-]\+:\s*.*$" contains=tidyOption,@tidyValue,tidyDelimiter +syn match tidyDelimiter ":" contained + +syn match tidyNewTagAssignment "^new-\l\+-tags:\s*.*$" contains=tidyNewTagOption,tidyNewTagDelimiter,tidyNewTagValue,tidyDelimiter +syn match tidyNewTagDelimiter "," contained +syn match tidyNewTagValue "\<\w\+\>" contained + +syn case ignore +syn keyword tidyBoolean t[rue] f[alse] y[es] n[o] contained +syn case match +syn match tidyDoctype "\<omit\|auto\|strict\|loose\|transitional\>" contained +" NOTE: use match rather than keyword here so that tidyEncoding raw does not always have precedence over tidyOption raw +syn match tidyEncoding "\<\(ascii\|latin1\|raw\|utf8\|iso2022\|mac\|utf16le\|utf16be\|utf16\|win1252\|big5\|shiftjis\)\>" contained +syn match tidyNumber "\<\d\+\>" contained +syn match tidyRepeat "\<keep-first\|keep-last\>" contained +syn region tidyString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline +syn region tidyString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline +syn cluster tidyValue contains=tidyBoolean,tidyDoctype,tidyEncoding,tidyNumber,tidyRepeat,tidyString + +syn match tidyOption "^accessibility-check" contained +syn match tidyOption "^add-xml-decl" contained +syn match tidyOption "^add-xml-pi" contained +syn match tidyOption "^add-xml-space" contained +syn match tidyOption "^alt-text" contained +syn match tidyOption "^ascii-chars" contained +syn match tidyOption "^assume-xml-procins" contained +syn match tidyOption "^bare" contained +syn match tidyOption "^break-before-br" contained +syn match tidyOption "^char-encoding" contained +syn match tidyOption "^clean" contained +syn match tidyOption "^css-prefix" contained +syn match tidyOption "^doctype" contained +syn match tidyOption "^drop-empty-paras" contained +syn match tidyOption "^drop-font-tags" contained +syn match tidyOption "^drop-proprietary-attributes" contained +syn match tidyOption "^enclose-block-text" contained +syn match tidyOption "^enclose-text" contained +syn match tidyOption "^error-file" contained +syn match tidyOption "^escape-cdata" contained +syn match tidyOption "^fix-backslash" contained +syn match tidyOption "^fix-bad-comments" contained +syn match tidyOption "^fix-uri" contained +syn match tidyOption "^force-output" contained +syn match tidyOption "^gnu-emacs" contained +syn match tidyOption "^hide-comments" contained +syn match tidyOption "^hide-endtags" contained +syn match tidyOption "^indent" contained +syn match tidyOption "^indent-attributes" contained +syn match tidyOption "^indent-cdata" contained +syn match tidyOption "^indent-spaces" contained +syn match tidyOption "^input-encoding" contained +syn match tidyOption "^input-xml" contained +syn match tidyOption "^join-classes" contained +syn match tidyOption "^join-styles" contained +syn match tidyOption "^keep-time" contained +syn match tidyOption "^language" contained +syn match tidyOption "^literal-attributes" contained +syn match tidyOption "^logical-emphasis" contained +syn match tidyOption "^lower-literals" contained +syn match tidyOption "^markup" contained +syn match tidyOption "^ncr" contained +syn match tidyOption "^numeric-entities" contained +syn match tidyOption "^output-bom" contained +syn match tidyOption "^output-encoding" contained +syn match tidyOption "^output-html" contained +syn match tidyOption "^output-xhtml" contained +syn match tidyOption "^output-xml" contained +syn match tidyOption "^quiet" contained +syn match tidyOption "^quote-ampersand" contained +syn match tidyOption "^quote-marks" contained +syn match tidyOption "^quote-nbsp" contained +syn match tidyOption "^raw" contained +syn match tidyOption "^repeated-attributes" contained +syn match tidyOption "^replace-color" contained +syn match tidyOption "^show-body-only" contained +syn match tidyOption "^show-errors" contained +syn match tidyOption "^show-warnings" contained +syn match tidyOption "^slide-style" contained +syn match tidyOption "^split" contained +syn match tidyOption "^tab-size" contained +syn match tidyOption "^tidy-mark" contained +syn match tidyOption "^uppercase-attributes" contained +syn match tidyOption "^uppercase-tags" contained +syn match tidyOption "^word-2000" contained +syn match tidyOption "^wrap" contained +syn match tidyOption "^wrap-asp" contained +syn match tidyOption "^wrap-attributes" contained +syn match tidyOption "^wrap-jste" contained +syn match tidyOption "^wrap-php" contained +syn match tidyOption "^wrap-script-literals" contained +syn match tidyOption "^wrap-sections" contained +syn match tidyOption "^write-back" contained +syn match tidyNewTagOption "^new-blocklevel-tags" contained +syn match tidyNewTagOption "^new-empty-tags" contained +syn match tidyNewTagOption "^new-inline-tags" contained +syn match tidyNewTagOption "^new-pre-tags" contained + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_tidy_syn_inits") + if version < 508 + let did_tidy_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink tidyBoolean Boolean + HiLink tidyComment Comment + HiLink tidyDelimiter Special + HiLink tidyDoctype Constant + HiLink tidyEncoding Constant + HiLink tidyNewTagDelimiter Special + HiLink tidyNewTagOption Identifier + HiLink tidyNewTagValue Constant + HiLink tidyNumber Number + HiLink tidyOption Identifier + HiLink tidyRepeat Constant + HiLink tidyString String + HiLink tidyTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "tidy" + +" vim: ts=8 diff --git a/runtime/syntax/tilde.vim b/runtime/syntax/tilde.vim new file mode 100644 index 000000000..568805013 --- /dev/null +++ b/runtime/syntax/tilde.vim @@ -0,0 +1,41 @@ +" Vim syntax file +" This file works only for Vim6.x +" Language: Tilde +" Maintainer: Tobias Rundström <tobi@tildesoftware.net> +" URL: http://www.tildesoftware.net +" CVS: $Id$ + +if exists("b:current_syntax") + finish +endif + +"tilde dosent care ... +syn case ignore + +syn match tildeFunction "\~[a-z_0-9]\+"ms=s+1 +syn region tildeParen start="(" end=")" contains=tildeString,tildeNumber,tildeVariable,tildeField,tildeSymtab,tildeFunction,tildeParen,tildeHexNumber,tildeOperator +syn region tildeString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ keepend +syn region tildeString contained start=+'+ skip=+\\\\\|\\"+ end=+'+ keepend +syn match tildeNumber "\d" contained +syn match tildeOperator "or\|and" contained +syn match tildeHexNumber "0x[a-z0-9]\+" contained +syn match tildeVariable "$[a-z_0-9]\+" contained +syn match tildeField "%[a-z_0-9]\+" contained +syn match tildeSymtab "@[a-z_0-9]\+" contained +syn match tildeComment "^#.*" +syn region tildeCurly start=+{+ end=+}+ contained contains=tildeLG,tildeString,tildeNumber,tildeVariable,tildeField,tildeFunction,tildeSymtab,tildeHexNumber +syn match tildeLG "=>" contained + + +hi def link tildeComment Comment +hi def link tildeFunction Operator +hi def link tildeOperator Operator +hi def link tildeString String +hi def link tildeNumber Number +hi def link tildeHexNumber Number +hi def link tildeVariable Identifier +hi def link tildeField Identifier +hi def link tildeSymtab Identifier +hi def link tildeError Error + +let b:current_syntax = "tilde" diff --git a/runtime/syntax/tli.vim b/runtime/syntax/tli.vim new file mode 100644 index 000000000..5685a6cbf --- /dev/null +++ b/runtime/syntax/tli.vim @@ -0,0 +1,71 @@ +" Vim syntax file +" Language: TealInfo source files (*.tli) +" Maintainer: Kurt W. Andrews <kandrews@fastrans.net> +" Last Change: 2001 May 10 +" Version: 1.0 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" TealInfo Objects + +syn keyword tliObject LIST POPLIST WINDOW POPWINDOW OUTLINE CHECKMARK GOTO +syn keyword tliObject LABEL IMAGE RECT TRES PASSWORD POPEDIT POPIMAGE CHECKLIST + +" TealInfo Fields + +syn keyword tliField X Y W H BX BY BW BH SX SY FONT BFONT CYCLE DELAY TABS +syn keyword tliField STYLE BTEXT RECORD DATABASE KEY TARGET DEFAULT TEXT +syn keyword tliField LINKS MAXVAL + +" TealInfo Styles + +syn keyword tliStyle INVERTED HORIZ_RULE VERT_RULE NO_SCROLL NO_BORDER BOLD_BORDER +syn keyword tliStyle ROUND_BORDER ALIGN_RIGHT ALIGN_CENTER ALIGN_LEFT_START ALIGN_RIGHT_START +syn keyword tliStyle ALIGN_CENTER_START ALIGN_LEFT_END ALIGN_RIGHT_END ALIGN_CENTER_END +syn keyword tliStyle LOCKOUT BUTTON_SCROLL BUTTON_SELECT STROKE_FIND FILLED REGISTER + +" String and Character constants + +syn match tliSpecial "@" +syn region tliString start=+"+ end=+"+ + +"TealInfo Numbers, identifiers and comments + +syn case ignore +syn match tliNumber "\d*" +syn match tliIdentifier "\<\h\w*\>" +syn match tliComment "#.*" +syn case match + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_tli_syntax_inits") + if version < 508 + let did_tli_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink tliNumber Number + HiLink tliString String + HiLink tliComment Comment + HiLink tliSpecial SpecialChar + HiLink tliIdentifier Identifier + HiLink tliObject Statement + HiLink tliField Type + HiLink tliStyle PreProc + + delcommand HiLink +endif + +let b:current_syntax = "tli" + +" vim: ts=8 diff --git a/runtime/syntax/trasys.vim b/runtime/syntax/trasys.vim new file mode 100644 index 000000000..cfecc1c1f --- /dev/null +++ b/runtime/syntax/trasys.vim @@ -0,0 +1,177 @@ +" Vim syntax file +" Language: TRASYS input file +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.inp +" URL: http://www.naglenet.org/vim/syntax/trasys.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + +" Force free-form fortran format +let fortran_free_source=1 + +" Load FORTRAN syntax file +if version < 600 + source <sfile>:p:h/fortran.vim +else + runtime! syntax/fortran.vim +endif +unlet b:current_syntax + + +" Ignore case +syn case ignore + + + +" Define keywords for TRASYS +syn keyword trasysOptions model rsrec info maxfl nogo dmpdoc +syn keyword trasysOptions rsi rti rso rto bcdou cmerg emerg +syn keyword trasysOptions user1 nnmin erplot + +syn keyword trasysSurface icsn tx ty tz rotx roty rotz inc bcsn +syn keyword trasysSurface nnx nny nnz nnax nnr nnth unnx +syn keyword trasysSurface unny unnz unnax unnr unnth type idupsf +syn keyword trasysSurface imagsf act active com shade bshade axmin +syn keyword trasysSurface axmax zmin zmax rmin rmax thmin thmin +syn keyword trasysSurface thmax alpha emiss trani trans spri sprs +syn keyword trasysSurface refno posit com dupbcs dimensions +syn keyword trasysSurface dimension position prop surfn + +syn keyword trasysSurfaceType rect trap disk cyl cone sphere parab +syn keyword trasysSurfaceType box5 box6 shpero tor ogiv elem tape poly + +syn keyword trasysSurfaceArgs ff di top bottom in out both no only + +syn keyword trasysArgs fig smn nodea zero only ir sol +syn keyword trasysArgs both wband stepn initl + +syn keyword trasysOperations orbgen build + +"syn keyword trasysSubRoutine call +syn keyword trasysSubRoutine chgblk ndata ndatas odata odatas +syn keyword trasysSubRoutine pldta ffdata cmdata adsurf rbdata +syn keyword trasysSubRoutine rtdata pffshd orbit1 orbit2 orient +syn keyword trasysSubRoutine didt1 didt1s didt2 didt2s spin +syn keyword trasysSubRoutine spinav dicomp distab drdata gbdata +syn keyword trasysSubRoutine gbaprx rkdata rcdata aqdata stfaq +syn keyword trasysSubRoutine qodata qoinit modar modpr modtr +syn keyword trasysSubRoutine modprs modshd moddat rstoff rston +syn keyword trasysSubRoutine rsmerg ffread diread ffusr1 diusr1 +syn keyword trasysSubRoutine surfp didt3 didt3s romain stfrc +syn keyword trasysSubRoutine rornt rocstr romove flxdata title + +syn keyword trassyPrcsrSegm nplot oplot plot cmcal ffcal rbcal +syn keyword trassyPrcsrSegm rtcal dical drcal sfcal gbcal rccal +syn keyword trassyPrcsrSegm rkcal aqcal qocal + + + +" Define matches for TRASYS +syn match trasysOptions "list source" +syn match trasysOptions "save source" +syn match trasysOptions "no print" + +"syn match trasysSurface "^K *.* [^$]" +"syn match trasysSurface "^D *[0-9]*\.[0-9]\+" +"syn match trasysSurface "^I *.*[0-9]\+\.\=" +"syn match trasysSurface "^N *[0-9]\+" +"syn match trasysSurface "^M *[a-z[A-Z0-9]\+" +"syn match trasysSurface "^B[C][S] *[a-zA-Z0-9]*" +"syn match trasysSurface "^S *SURFN.*[0-9]" +syn match trasysSurface "P[0-9]* *="he=e-1 + +syn match trasysIdentifier "^L "he=e-1 +syn match trasysIdentifier "^K "he=e-1 +syn match trasysIdentifier "^D "he=e-1 +syn match trasysIdentifier "^I "he=e-1 +syn match trasysIdentifier "^N "he=e-1 +syn match trasysIdentifier "^M "he=e-1 +syn match trasysIdentifier "^B[C][S]" +syn match trasysIdentifier "^S "he=e-1 + +syn match trasysComment "^C.*$" +syn match trasysComment "^R.*$" +syn match trasysComment "\$.*$" + +syn match trasysHeader "^header[^,]*" + +syn match trasysMacro "^FAC" + +syn match trasysInteger "-\=\<[0-9]*\>" +syn match trasysFloat "-\=\<[0-9]*\.[0-9]*" +syn match trasysScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" + +syn match trasysBlank "' \+'"hs=s+1,he=e-1 + +syn match trasysEndData "^END OF DATA" + +if exists("thermal_todo") + execute 'syn match trasysTodo ' . '"^'.thermal_todo.'.*$"' +else + syn match trasysTodo "^?.*$" +endif + + + +" Define regions for TRASYS +syn region trasysComment matchgroup=trasysHeader start="^HEADER DOCUMENTATION DATA" end="^HEADER[^,]*" + + + +" Define synchronizing patterns for TRASYS +syn sync maxlines=500 +syn sync match trasysSync grouphere trasysComment "^HEADER DOCUMENTATION DATA" + + + +" Define the default highlighting +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_trasys_syntax_inits") + if version < 508 + let did_trasys_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink trasysOptions Special + HiLink trasysSurface Special + HiLink trasysSurfaceType Constant + HiLink trasysSurfaceArgs Constant + HiLink trasysArgs Constant + HiLink trasysOperations Statement + HiLink trasysSubRoutine Statement + HiLink trassyPrcsrSegm PreProc + HiLink trasysIdentifier Identifier + HiLink trasysComment Comment + HiLink trasysHeader Typedef + HiLink trasysMacro Macro + HiLink trasysInteger Number + HiLink trasysFloat Float + HiLink trasysScientific Float + + HiLink trasysBlank SpecialChar + + HiLink trasysEndData Macro + + HiLink trasysTodo Todo + + delcommand HiLink +endif + + +let b:current_syntax = "trasys" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/tsalt.vim b/runtime/syntax/tsalt.vim new file mode 100644 index 000000000..56f17558b --- /dev/null +++ b/runtime/syntax/tsalt.vim @@ -0,0 +1,214 @@ +" Vim syntax file +" Language: Telix (Modem Comm Program) SALT Script +" Maintainer: Sean M. McKee <mckee@misslink.net> +" Last Change: 2001 May 09 +" Version Info: @(#)tsalt.vim 1.5 97/12/16 08:11:15 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" turn case matching off +syn case ignore + +"FUNCTIONS +" Character Handling Functions +syn keyword tsaltFunction IsAscii IsAlNum IsAlpha IsCntrl IsDigit +syn keyword tsaltFunction IsLower IsUpper ToLower ToUpper + +" Connect Device Operations +syn keyword tsaltFunction Carrier cInp_Cnt cGetC cGetCT cPutC cPutN +syn keyword tsaltFunction cPutS cPutS_TR FlushBuf Get_Baud +syn keyword tsaltFunction Get_DataB Get_Port Get_StopB Hangup +syn keyword tsaltFunction KillConnectDevice MakeConnectDevice +syn keyword tsaltFunction Send_Brk Set_ConnectDevice Set_Port + +" File Input/Output Operations +syn keyword tsaltFunction fClearErr fClose fDelete fError fEOF fFlush +syn keyword tsaltFunction fGetC fGetS FileAttr FileFind FileSize +syn keyword tsaltFunction FileTime fnStrip fOpen fPutC fPutS fRead +syn keyword tsaltFunction fRename fSeek fTell fWrite + +" File Transfers and Logs +syn keyword tsaltFunction Capture Capture_Stat Printer Receive Send +syn keyword tsaltFunction Set_DefProt UsageLog Usage_Stat UStamp + +" Input String Matching +syn keyword tsaltFunction Track Track_AddChr Track_Free Track_Hit +syn keyword tsaltFunction WaitFor + +" Keyboard Operations +syn keyword tsaltFunction InKey InKeyW KeyGet KeyLoad KeySave KeySet + +" Miscellaneous Functions +syn keyword tsaltFunction ChatMode Dos Dial DosFunction ExitTelix +syn keyword tsaltFunction GetEnv GetFon HelpScreen LoadFon NewDir +syn keyword tsaltFunction Randon Redial RedirectDOS Run +syn keyword tsaltFunction Set_Terminal Show_Directory TelixVersion +syn keyword tsaltFunction Terminal TransTab Update_Term + +" Script Management +syn keyword tsaltFunction ArgCount Call CallD CompileScript GetRunPath +syn keyword tsaltFunction Is_Loaded Load_Scr ScriptVersion +syn keyword tsaltFunction TelixForWindows Unload_Scr + +" Sound Functions +syn keyword tsaltFunction Alarm PlayWave Tone + +" String Handling +syn keyword tsaltFunction CopyChrs CopyStr DelChrs GetS GetSXY +syn keyword tsaltFunction InputBox InsChrs ItoS SetChr StoI StrCat +syn keyword tsaltFunction StrChr StrCompI StrLen StrLower StrMaxLen +syn keyword tsaltFunction StrPos StrPosI StrUpper SubChr SubChrs +syn keyword tsaltFunction SubStr + +" Time, Date, and Timer Operations +syn keyword tsaltFunction CurTime Date Delay Delay_Scr Get_OnlineTime +syn keyword tsaltFunction tDay tHour tMin tMonth tSec tYear Time +syn keyword tsaltFunction Time_Up Timer_Free Time_Restart +syn keyword tsaltFunction Time_Start Time_Total + +" Video Operations +syn keyword tsaltFunction Box CNewLine Cursor_OnOff Clear_Scr +syn keyword tsaltFunction GetTermHeight GetTermWidth GetX GetY +syn keyword tsaltFunction GotoXY MsgBox NewLine PrintC PrintC_Trm +syn keyword tsaltFunction PrintN PrintN_Trm PrintS PrintS_Trm +syn keyword tsaltFunction PrintSC PRintSC_Trm +syn keyword tsaltFunction PStrA PStrAXY Scroll Status_Wind vGetChr +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 DDETerminate DDETerminateAll +"END FUNCTIONS + +"PREDEFINED VARAIABLES +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 +syn keyword tsaltSysVar _asc_spacechr _asc_striph _back_color +syn keyword tsaltSysVar _capture_fname _connect_str _dest_bs +syn keyword tsaltSysVar _dial_pause _dial_time _dial_post +syn keyword tsaltSysVar _dial_pref1 _dial_pref2 _dial_pref3 +syn keyword tsaltSysVar _dial_pref4 _dir_prog _down_dir +syn keyword tsaltSysVar _entry_bbstype _entry_comment _entry_enum +syn keyword tsaltSysVar _entry_name _entry_num _entry_logonname +syn keyword tsaltSysVar _entry_pass _fore_color _image_file +syn keyword tsaltSysVar _local_echo _mdm_hang_str _mdm_init_str +syn keyword tsaltSysVar _no_connect1 _no_connect2 _no_connect3 +syn keyword tsaltSysVar _no_connect4 _no_connect5 _redial_stop +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 + +"TYPE +syn keyword tsaltType str int +"END TYPE + +"KEYWORDS +syn keyword tsaltStatement goto break return continue +syn keyword tsaltConditional if then else +syn keyword tsaltRepeat while for do +"END KEYWORDS + +syn keyword tsaltTodo contained TODO + +" the rest is pretty close to C ----------------------------------------- + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match tsaltSpecial contained "\^\d\d\d\|\^." +syn region tsaltString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=tsaltSpecial +syn match tsaltCharacter "'[^\\]'" +syn match tsaltSpecialCharacter "'\\.'" + +"catch errors caused by wrong parenthesis +syn region tsaltParen transparent start='(' end=')' contains=ALLBUT,tsaltParenError,tsaltIncluded,tsaltSpecial,tsaltTodo +syn match tsaltParenError ")" +syn match tsaltInParen contained "[{}]" + +hi link tsaltParenError tsaltError +hi link tsaltInParen tsaltError + +"integer number, or floating point number without a dot and with "f". +syn match tsaltNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" +"floating point number, with dot, optional exponent +syn match tsaltFloat "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, starting with a dot, optional exponent +syn match tsaltFloat "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" +"floating point number, without dot, with exponent +syn match tsaltFloat "\<\d\+e[-+]\=\d\+[fl]\=\>" +"hex number +syn match tsaltNumber "0x[0-9a-f]\+\(u\=l\=\|lu\)\>" +"syn match cIdentifier "\<[a-z_][a-z0-9_]*\>" + +syn region tsaltComment start="/\*" end="\*/" contains=cTodo +syn match tsaltComment "//.*" contains=cTodo +syn match tsaltCommentError "\*/" + +syn region tsaltPreCondit start="^[ \t]*#[ \t]*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=tsaltComment,tsaltString,tsaltCharacter,tsaltNumber,tsaltCommentError +syn region tsaltIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match tsaltIncluded contained "<[^>]*>" +syn match tsaltInclude "^[ \t]*#[ \t]*include\>[ \t]*["<]" contains=tsaltIncluded +"syn match TelixSalyLineSkip "\\$" +syn region tsaltDefine start="^[ \t]*#[ \t]*\(define\>\|undef\>\)" skip="\\$" end="$" contains=ALLBUT,tsaltPreCondit,tsaltIncluded,tsaltInclude,tsaltDefine,tsaltInParen +syn region tsaltPreProc start="^[ \t]*#[ \t]*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" contains=ALLBUT,tsaltPreCondit,tsaltIncluded,tsaltInclude,tsaltDefine,tsaltInParen + +" Highlight User Labels +syn region tsaltMulti transparent start='?' end=':' contains=ALLBUT,tsaltIncluded,tsaltSpecial,tsaltTodo + +syn sync ccomment tsaltComment + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_tsalt_syntax_inits") + if version < 508 + let did_tsalt_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink tsaltFunction Statement + HiLink tsaltSysVar Type + "HiLink tsaltLibFunc UserDefFunc + "HiLink tsaltConstants Type + "HiLink tsaltFuncArg Type + "HiLink tsaltOperator Operator + "HiLink tsaltLabel Label + "HiLink tsaltUserLabel Label + HiLink tsaltConditional Conditional + HiLink tsaltRepeat Repeat + HiLink tsaltCharacter SpecialChar + HiLink tsaltSpecialCharacter SpecialChar + HiLink tsaltNumber Number + HiLink tsaltFloat Float + HiLink tsaltCommentError tsaltError + HiLink tsaltInclude Include + HiLink tsaltPreProc PreProc + HiLink tsaltDefine Macro + HiLink tsaltIncluded tsaltString + HiLink tsaltError Error + HiLink tsaltStatement Statement + HiLink tsaltPreCondit PreCondit + HiLink tsaltType Type + HiLink tsaltString String + HiLink tsaltComment Comment + HiLink tsaltSpecial Special + HiLink tsaltTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "tsalt" + +" vim: ts=8 diff --git a/runtime/syntax/tsscl.vim b/runtime/syntax/tsscl.vim new file mode 100644 index 000000000..3fc18c684 --- /dev/null +++ b/runtime/syntax/tsscl.vim @@ -0,0 +1,217 @@ +" Vim syntax file +" Language: TSS (Thermal Synthesizer System) Command Line +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.tsscl +" URL: http://www.naglenet.org/vim/syntax/tsscl.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + + +" Ignore case +syn case ignore + + + +" +" +" Begin syntax definitions for tss geomtery file. +" + +" Load TSS geometry syntax file +"source $VIM/myvim/tssgm.vim +"source $VIMRUNTIME/syntax/c.vim + +" Define keywords for TSS +syn keyword tssclCommand begin radk list heatrates attr draw + +syn keyword tssclKeyword cells rays error nodes levels objects cpu +syn keyword tssclKeyword units length positions energy time unit solar +syn keyword tssclKeyword solar_constant albedo planet_power + +syn keyword tssclEnd exit + +syn keyword tssclUnits cm feet meters inches +syn keyword tssclUnits Celsius Kelvin Fahrenheit Rankine + + + +" Define matches for TSS +syn match tssclString /"[^"]\+"/ contains=ALLBUT,tssInteger,tssclKeyword,tssclCommand,tssclEnd,tssclUnits + +syn match tssclComment "#.*$" + +" rational and logical operators +" < Less than +" > Greater than +" <= Less than or equal +" >= Greater than or equal +" == or = Equal to +" != Not equal to +" && or & Logical AND +" || or | Logical OR +" ! Logical NOT +" +" algebraic operators: +" ^ or ** Exponentation +" * Multiplication +" / Division +" % Remainder +" + Addition +" - Subtraction +" +syn match tssclOper "||\||\|&&\|&\|!=\|!\|>=\|<=\|>\|<\|+\|-\|^\|\*\*\|\*\|/\|%\|==\|=\|\." skipwhite + +" CLI Directive Commands, with arguments +" +" BASIC COMMAND LIST +" *ADD input_source +" *ARITHMETIC { [ON] | OFF } +" *CLOSE unit_number +" *CPU +" *DEFINE +" *ECHO[/qualifiers] { [ON] | OFF } +" *ELSE [IF { 0 | 1 } ] +" *END { IF | WHILE } +" *EXIT +" *IF { 0 | 1 } +" *LIST/n list variable +" *OPEN[/r | /r+ | /w | /w+ ] unit_number file_name +" *PROMPT prompt_string sybol_name +" *READ/unit=unit_number[/LOCAL | /GLOBAL ] sym1 [sym2, [sym3 ...]] +" *REWIND +" *STOP +" *STRCMP string_1 string_2 difference +" *SYSTEM command +" *UNDEFINE[/LOCAL][/GLOBAL] symbol_name +" *WHILE { 0 | 1 } +" *WRITE[/unit=unit_number] output text +" +syn match tssclDirective "\*ADD" +syn match tssclDirective "\*ARITHMETIC \+\(ON\|OFF\)" +syn match tssclDirective "\*CLOSE" +syn match tssclDirective "\*CPU" +syn match tssclDirective "\*DEFINE" +syn match tssclDirective "\*ECHO" +syn match tssclConditional "\*ELSE" +syn match tssclConditional "\*END \+\(IF\|WHILE\)" +syn match tssclDirective "\*EXIT" +syn match tssclConditional "\*IF" +syn match tssclDirective "\*LIST" +syn match tssclDirective "\*OPEN" +syn match tssclDirective "\*PROMPT" +syn match tssclDirective "\*READ" +syn match tssclDirective "\*REWIND" +syn match tssclDirective "\*STOP" +syn match tssclDirective "\*STRCMP" +syn match tssclDirective "\*SYSTEM" +syn match tssclDirective "\*UNDEFINE" +syn match tssclConditional "\*WHILE" +syn match tssclDirective "\*WRITE" + +syn match tssclContChar "-$" + +" C library functoins +" Bessel functions (jn, yn) +" Error and complementary error fuctions (erf, erfc) +" Exponential functions (exp) +" Logrithm (log, log10) +" Power (pow) +" Square root (sqrt) +" Floor (floor) +" Ceiling (ceil) +" Floating point remainder (fmod) +" Floating point absolute value (fabs) +" Gamma (gamma) +" Euclidean distance function (hypot) +" Hperbolic functions (sinh, cosh, tanh) +" Trigometric functions in radians (sin, cos, tan, asin, acos, atan, atan2) +" Trigometric functions in degrees (sind, cosd, tand, asind, acosd, atand, +" atan2d) +" +" local varialbles: cl_arg1, cl_arg2, etc. (cl_arg is an array of arguments) +" cl_args is the number of arguments +" +" +" I/O: *PROMPT, *WRITE, *READ +" +" Conditional branching: +" IF, ELSE IF, END +" *IF value *IF I==10 +" *ELSE IF value *ELSE IF I<10 +" *ELSE *ELSE +" *ENDIF *ENDIF +" +" +" Iterative looping: +" WHILE +" *WHILE test +" ..... +" *END WHILE +" +" +" EXAMPLE: +" *DEFINE I = 1 +" *WHILE (I <= 10) +" *WRITE I = 'I' +" *DEFINE I = (I + 1) +" *END WHILE +" + +syn match tssclQualifier "/[^/ ]\+"hs=s+1 +syn match tssclSymbol "'\S\+'" +"syn match tssclSymbol2 " \S\+ " contained + +syn match tssclInteger "-\=\<[0-9]*\>" +syn match tssclFloat "-\=\<[0-9]*\.[0-9]*" +syn match tssclScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" + + + +" Define the default highlighting +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_tsscl_syntax_inits") + if version < 508 + let did_tsscl_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink tssclCommand Statement + HiLink tssclKeyword Special + HiLink tssclEnd Macro + HiLink tssclUnits Special + + HiLink tssclComment Comment + HiLink tssclDirective Statement + HiLink tssclConditional Conditional + HiLink tssclContChar Macro + HiLink tssclQualifier Typedef + HiLink tssclSymbol Identifier + HiLink tssclSymbol2 Symbol + HiLink tssclString String + HiLink tssclOper Operator + + HiLink tssclInteger Number + HiLink tssclFloat Number + HiLink tssclScientific Number + + delcommand HiLink +endif + + +let b:current_syntax = "tsscl" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/tssgm.vim b/runtime/syntax/tssgm.vim new file mode 100644 index 000000000..b8182d48e --- /dev/null +++ b/runtime/syntax/tssgm.vim @@ -0,0 +1,111 @@ +" Vim syntax file +" Language: TSS (Thermal Synthesizer System) Geometry +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.tssgm +" URL: http://www.naglenet.org/vim/syntax/tssgm.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + + +" Ignore case +syn case ignore + + + +" +" +" Begin syntax definitions for tss geomtery file. +" + +" Define keywords for TSS +syn keyword tssgmParam units mirror param active sides submodel include +syn keyword tssgmParam iconductor nbeta ngamma optics material thickness color +syn keyword tssgmParam initial_temp +syn keyword tssgmParam initial_id node_ids node_add node_type +syn keyword tssgmParam gamma_boundaries gamma_add beta_boundaries +syn keyword tssgmParam p1 p2 p3 p4 p5 p6 rot1 rot2 rot3 tx ty tz + +syn keyword tssgmSurfType rectangle trapezoid disc ellipse triangle +syn keyword tssgmSurfType polygon cylinder cone sphere ellipic-cone +syn keyword tssgmSurfType ogive torus box paraboloid hyperboloid ellipsoid +syn keyword tssgmSurfType quadrilateral trapeziod + +syn keyword tssgmArgs OUT IN DOWN BOTH DOUBLE NONE SINGLE RADK CC FECC +syn keyword tssgmArgs white red blue green yellow orange violet pink +syn keyword tssgmArgs turquoise grey black +syn keyword tssgmArgs Arithmetic Boundary Heater + +syn keyword tssgmDelim assembly + +syn keyword tssgmEnd end + +syn keyword tssgmUnits cm feet meters inches +syn keyword tssgmUnits Celsius Kelvin Fahrenheit Rankine + + + +" Define matches for TSS +syn match tssgmDefault "^DEFAULT/LENGTH = \(ft\|in\|cm\|m\)" +syn match tssgmDefault "^DEFAULT/TEMP = [CKFR]" + +syn match tssgmComment /comment \+= \+".*"/ contains=tssParam,tssgmCommentString +syn match tssgmCommentString /".*"/ contained + +syn match tssgmSurfIdent " \S\+\.\d\+ \=$" + +syn match tssgmString /"[^" ]\+"/ms=s+1,me=e-1 contains=ALLBUT,tssInteger + +syn match tssgmArgs / = [xyz],"/ms=s+3,me=e-2 + +syn match tssgmInteger "-\=\<[0-9]*\>" +syn match tssgmFloat "-\=\<[0-9]*\.[0-9]*" +syn match tssgmScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" + + + +" Define the default highlighting +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_tssgm_syntax_inits") + if version < 508 + let did_tssgm_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink tssgmParam Statement + HiLink tssgmSurfType Type + HiLink tssgmArgs Special + HiLink tssgmDelim Typedef + HiLink tssgmEnd Macro + HiLink tssgmUnits Special + + HiLink tssgmDefault SpecialComment + HiLink tssgmComment Statement + HiLink tssgmCommentString Comment + HiLink tssgmSurfIdent Identifier + HiLink tssgmString Delimiter + + HiLink tssgmInteger Number + HiLink tssgmFloat Float + HiLink tssgmScientific Float + + delcommand HiLink +endif + + +let b:current_syntax = "tssgm" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/tssop.vim b/runtime/syntax/tssop.vim new file mode 100644 index 000000000..d416df054 --- /dev/null +++ b/runtime/syntax/tssop.vim @@ -0,0 +1,87 @@ +" Vim syntax file +" Language: TSS (Thermal Synthesizer System) Optics +" Maintainer: Adrian Nagle, anagle@ball.com +" Last Change: 2003 May 11 +" Filenames: *.tssop +" URL: http://www.naglenet.org/vim/syntax/tssop.vim +" MAIN URL: http://www.naglenet.org/vim/ + + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + + + +" Ignore case +syn case ignore + + + +" +" +" Begin syntax definitions for tss optics file. +" + +" Define keywords for TSS +syn keyword tssopParam ir_eps ir_trans ir_spec ir_tspec ir_refract +syn keyword tssopParam sol_eps sol_trans sol_spec sol_tspec sol_refract +syn keyword tssopParam color + +"syn keyword tssopProp property + +syn keyword tssopArgs white red blue green yellow orange violet pink +syn keyword tssopArgs turquoise grey black + + + +" Define matches for TSS +syn match tssopComment /comment \+= \+".*"/ contains=tssopParam,tssopCommentString +syn match tssopCommentString /".*"/ contained + +syn match tssopProp "property " +syn match tssopProp "edit/optic " +syn match tssopPropName "^property \S\+" contains=tssopProp +syn match tssopPropName "^edit/optic \S\+$" contains=tssopProp + +syn match tssopInteger "-\=\<[0-9]*\>" +syn match tssopFloat "-\=\<[0-9]*\.[0-9]*" +syn match tssopScientific "-\=\<[0-9]*\.[0-9]*E[-+]\=[0-9]\+\>" + + + +" Define the default highlighting +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_tssop_syntax_inits") + if version < 508 + let did_tssop_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink tssopParam Statement + HiLink tssopProp Identifier + HiLink tssopArgs Special + + HiLink tssopComment Statement + HiLink tssopCommentString Comment + HiLink tssopPropName Typedef + + HiLink tssopInteger Number + HiLink tssopFloat Float + HiLink tssopScientific Float + + delcommand HiLink +endif + + +let b:current_syntax = "tssop" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/uc.vim b/runtime/syntax/uc.vim new file mode 100644 index 000000000..7eab1d48a --- /dev/null +++ b/runtime/syntax/uc.vim @@ -0,0 +1,178 @@ +" Vim syntax file +" Language: UnrealScript +" Maintainer: Mark Ferrell <major@chaoticdreams.org> +" URL: ftp://ftp.chaoticdreams.org/pub/ut/vim/uc.vim +" Credits: Based on the java.vim syntax file by Claudio Fleiner +" Last change: 2003 May 31 + +" Please check :help uc.vim for comments on some of the options available. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" some characters that cannot be in a UnrealScript program (outside a string) +syn match ucError "[\\@`]" +syn match ucError "<<<\|\.\.\|=>\|<>\|||=\|&&=\|[^-]->\|\*\/" + +" we define it here so that included files can test for it +if !exists("main_syntax") + let main_syntax='uc' +endif + +syntax case ignore + +" keyword definitions +syn keyword ucBranch break continue +syn keyword ucConditional if else switch +syn keyword ucRepeat while for do foreach +syn keyword ucBoolean true false +syn keyword ucConstant null +syn keyword ucOperator new instanceof +syn keyword ucType boolean char byte short int long float double +syn keyword ucType void Pawn sound state auto exec function ipaddr +syn keyword ucType ELightType actor ammo defaultproperties bool +syn keyword ucType native noexport var out vector name local string +syn keyword ucType event +syn keyword ucStatement return +syn keyword ucStorageClass static synchronized transient volatile final +syn keyword ucMethodDecl synchronized throws + +" UnrealScript defines classes in sorta fscked up fashion +syn match ucClassDecl "^[Cc]lass[\s$]*\S*[\s$]*expands[\s$]*\S*;" contains=ucSpecial,ucSpecialChar,ucClassKeys +syn keyword ucClassKeys class expands extends +syn match ucExternal "^\#exec.*" contains=ucCommentString,ucNumber +syn keyword ucScopeDecl public protected private abstract + +" UnrealScript Functions +syn match ucFuncDef "^.*function\s*[\(]*" contains=ucType,ucStorageClass +syn match ucEventDef "^.*event\s*[\(]*" contains=ucType,ucStorageClass +syn match ucClassLabel "[a-zA-Z0-9]*\'[a-zA-Z0-9]*\'" contains=ucCharacter + +syn region ucLabelRegion transparent matchgroup=ucLabel start="\<case\>" matchgroup=NONE end=":" contains=ucNumber +syn match ucUserLabel "^\s*[_$a-zA-Z][_$a-zA-Z0-9_]*\s*:"he=e-1 contains=ucLabel +syn keyword ucLabel default + +" The following cluster contains all java groups except the contained ones +syn cluster ucTop contains=ucExternal,ucError,ucError,ucBranch,ucLabelRegion,ucLabel,ucConditional,ucRepeat,ucBoolean,ucConstant,ucTypedef,ucOperator,ucType,ucType,ucStatement,ucStorageClass,ucMethodDecl,ucClassDecl,ucClassDecl,ucClassDecl,ucScopeDecl,ucError,ucError2,ucUserLabel,ucClassLabel + +" Comments +syn keyword ucTodo contained TODO FIXME XXX +syn region ucCommentString contained start=+"+ end=+"+ end=+\*/+me=s-1,he=s-1 contains=ucSpecial,ucCommentStar,ucSpecialChar +syn region ucComment2String contained start=+"+ end=+$\|"+ contains=ucSpecial,ucSpecialChar +syn match ucCommentCharacter contained "'\\[^']\{1,6\}'" contains=ucSpecialChar +syn match ucCommentCharacter contained "'\\''" contains=ucSpecialChar +syn match ucCommentCharacter contained "'[^\\]'" +syn region ucComment start="/\*" end="\*/" contains=ucCommentString,ucCommentCharacter,ucNumber,ucTodo +syn match ucCommentStar contained "^\s*\*[^/]"me=e-1 +syn match ucCommentStar contained "^\s*\*$" +syn match ucLineComment "//.*" contains=ucComment2String,ucCommentCharacter,ucNumber,ucTodo +hi link ucCommentString ucString +hi link ucComment2String ucString +hi link ucCommentCharacter ucCharacter + +syn cluster ucTop add=ucComment,ucLineComment + +" match the special comment /**/ +syn match ucComment "/\*\*/" + +" Strings and constants +syn match ucSpecialError contained "\\." +"syn match ucSpecialCharError contained "[^']" +syn match ucSpecialChar contained "\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\)" +syn region ucString start=+"+ end=+"+ contains=ucSpecialChar,ucSpecialError +syn match ucStringError +"\([^"\\]\|\\.\)*$+ +syn match ucCharacter "'[^']*'" contains=ucSpecialChar,ucSpecialCharError +syn match ucCharacter "'\\''" contains=ucSpecialChar +syn match ucCharacter "'[^\\]'" +syn match ucNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>" +syn match ucNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\=" +syn match ucNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>" +syn match ucNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>" + +" unicode characters +syn match ucSpecial "\\u\d\{4\}" + +syn cluster ucTop add=ucString,ucCharacter,ucNumber,ucSpecial,ucStringError + +" catch errors caused by wrong parenthesis +syn region ucParen transparent start="(" end=")" contains=@ucTop,ucParen +syn match ucParenError ")" +hi link ucParenError ucError + +if !exists("uc_minlines") + let uc_minlines = 10 +endif +exec "syn sync ccomment ucComment minlines=" . uc_minlines + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_uc_syntax_inits") + if version < 508 + let did_uc_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink ucFuncDef Conditional + HiLink ucEventDef Conditional + HiLink ucBraces Function + HiLink ucBranch Conditional + HiLink ucLabel Label + HiLink ucUserLabel Label + HiLink ucConditional Conditional + HiLink ucRepeat Repeat + HiLink ucStorageClass StorageClass + HiLink ucMethodDecl ucStorageClass + HiLink ucClassDecl ucStorageClass + HiLink ucScopeDecl ucStorageClass + HiLink ucBoolean Boolean + HiLink ucSpecial Special + HiLink ucSpecialError Error + HiLink ucSpecialCharError Error + HiLink ucString String + HiLink ucCharacter Character + HiLink ucSpecialChar SpecialChar + HiLink ucNumber Number + HiLink ucError Error + HiLink ucStringError Error + HiLink ucStatement Statement + HiLink ucOperator Operator + HiLink ucOverLoaded Operator + HiLink ucComment Comment + HiLink ucDocComment Comment + HiLink ucLineComment Comment + HiLink ucConstant ucBoolean + HiLink ucTypedef Typedef + HiLink ucTodo Todo + + HiLink ucCommentTitle SpecialComment + HiLink ucDocTags Special + HiLink ucDocParam Function + HiLink ucCommentStar ucComment + + HiLink ucType Type + HiLink ucExternal Include + + HiLink ucClassKeys Conditional + HiLink ucClassLabel Conditional + + HiLink htmlComment Special + HiLink htmlCommentPart Special + + delcommand HiLink +endif + +let b:current_syntax = "uc" + +if main_syntax == 'uc' + unlet main_syntax +endif + +" vim: ts=8 diff --git a/runtime/syntax/uil.vim b/runtime/syntax/uil.vim new file mode 100644 index 000000000..bdc4e95b6 --- /dev/null +++ b/runtime/syntax/uil.vim @@ -0,0 +1,85 @@ +" Vim syntax file +" Language: Motif UIL (User Interface Language) +" Maintainer: Thomas Koehler <jean-luc@picard.franken.de> +" Last Change: 2002 Sep 20 +" URL: http://jeanluc-picard.de/vim/syntax/uil.vim + +" Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" A bunch of useful keywords +syn keyword uilType arguments callbacks color +syn keyword uilType compound_string controls end +syn keyword uilType exported file include +syn keyword uilType module object procedure +syn keyword uilType user_defined xbitmapfile + +syn keyword uilTodo contained TODO + +" String and Character contstants +" Highlight special characters (those which have a backslash) differently +syn match uilSpecial contained "\\\d\d\d\|\\." +syn region uilString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=uilSpecial +syn match uilCharacter "'[^\\]'" +syn region uilString start=+'+ skip=+\\\\\|\\"+ end=+'+ contains=uilSpecial +syn match uilSpecialCharacter "'\\.'" +syn match uilSpecialStatement "Xm[^ =(){}]*" +syn match uilSpecialFunction "MrmNcreateCallback" +syn match uilRessource "XmN[^ =(){}]*" + +syn match uilNumber "-\=\<\d*\.\=\d\+\(e\=f\=\|[uU]\=[lL]\=\)\>" +syn match uilNumber "0[xX][0-9a-fA-F]\+\>" + +syn region uilComment start="/\*" end="\*/" contains=uilTodo +syn match uilComment "!.*" contains=uilTodo +syn match uilCommentError "\*/" + +syn region uilPreCondit start="^#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)" skip="\\$" end="$" contains=uilComment,uilString,uilCharacter,uilNumber,uilCommentError +syn match uilIncluded contained "<[^>]*>" +syn match uilInclude "^#\s*include\s\+." contains=uilString,uilIncluded +syn match uilLineSkip "\\$" +syn region uilDefine start="^#\s*\(define\>\|undef\>\)" end="$" contains=uilLineSkip,uilComment,uilString,uilCharacter,uilNumber,uilCommentError + +syn sync ccomment uilComment + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_uil_syn_inits") + if version < 508 + let did_uil_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default highlighting. + HiLink uilCharacter uilString + HiLink uilSpecialCharacter uilSpecial + HiLink uilNumber uilString + HiLink uilCommentError uilError + HiLink uilInclude uilPreCondit + HiLink uilDefine uilPreCondit + HiLink uilIncluded uilString + HiLink uilSpecialFunction uilRessource + HiLink uilRessource Identifier + HiLink uilSpecialStatement Keyword + HiLink uilError Error + HiLink uilPreCondit PreCondit + HiLink uilType Type + HiLink uilString String + HiLink uilComment Comment + HiLink uilSpecial Special + HiLink uilTodo Todo + + delcommand HiLink +endif + + +let b:current_syntax = "uil" + +" vim: ts=8 diff --git a/runtime/syntax/valgrind.vim b/runtime/syntax/valgrind.vim new file mode 100644 index 000000000..f23b7924b --- /dev/null +++ b/runtime/syntax/valgrind.vim @@ -0,0 +1,99 @@ +" Vim syntax file +" Language: Valgrind Memory Debugger Output +" Maintainer: Roger Luethi <rl@hellgate.ch> +" Program URL: http://devel-home.kde.org/~sewardj/ +" Last Change: 2002 Apr 07 +" +" Notes: mostly based on strace.vim and xml.vim + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syn case match +syn sync minlines=50 + +syn match valgrindSpecLine "^[+-]\{2}\d\+[+-]\{2}.*$" + +syn region valgrindRegion + \ start=+^==\z(\d\+\)== \w.*$+ + \ skip=+^==\z1==\( \| .*\)$+ + \ end=+^+ + \ fold + \ keepend + \ contains=valgrindPidChunk,valgrindLine + +syn region valgrindPidChunk + \ start=+\(^==\)\@<=+ + \ end=+\(==\)\@=+ + \ contained + \ contains=valgrindPid0,valgrindPid1,valgrindPid2,valgrindPid3,valgrindPid4,valgrindPid5,valgrindPid6,valgrindPid7,valgrindPid8,valgrindPid9 + \ keepend + +syn match valgrindPid0 "\d\+0=" contained +syn match valgrindPid1 "\d\+1=" contained +syn match valgrindPid2 "\d\+2=" contained +syn match valgrindPid3 "\d\+3=" contained +syn match valgrindPid4 "\d\+4=" contained +syn match valgrindPid5 "\d\+5=" contained +syn match valgrindPid6 "\d\+6=" contained +syn match valgrindPid7 "\d\+7=" contained +syn match valgrindPid8 "\d\+8=" contained +syn match valgrindPid9 "\d\+9=" contained + +syn region valgrindLine + \ start=+\(^==\d\+== \)\@<=+ + \ end=+$+ + \ keepend + \ contained + \ contains=valgrindOptions,valgrindMsg,valgrindLoc + +syn match valgrindOptions "[ ]\{3}-.*$" contained + +syn match valgrindMsg "\S.*$" contained + \ contains=valgrindError,valgrindNote,valgrindSummary +syn match valgrindError "\(Invalid\|\d\+ errors\|.* definitely lost\).*$" contained +syn match valgrindNote ".*still reachable.*" contained +syn match valgrindSummary ".*SUMMARY:" contained + +syn match valgrindLoc "\s\+\(by\|at\|Address\).*$" contained + \ contains=valgrindAt,valgrindAddr,valgrindFunc,valgrindBin,valgrindSrc +syn match valgrindAt "at\s\@=" contained +syn match valgrindAddr "\(\W\)\@<=0x\x\+" contained +syn match valgrindFunc "\(: \)\@<=\w\+" contained +syn match valgrindBin "\((\(with\|\)in \)\@<=\S\+\()\)\@=" contained +syn match valgrindSrc "\((\)\@<=.*:\d\+\()\)\@=" contained + +" Define the default highlighting + +hi def link valgrindSpecLine Type +"hi def link valgrindRegion Special + +hi def link valgrindPid0 Special +hi def link valgrindPid1 Comment +hi def link valgrindPid2 Type +hi def link valgrindPid3 Constant +hi def link valgrindPid4 Number +hi def link valgrindPid5 Identifier +hi def link valgrindPid6 Statement +hi def link valgrindPid7 Error +hi def link valgrindPid8 LineNr +hi def link valgrindPid9 Normal +"hi def link valgrindLine Special + +hi def link valgrindOptions Type +"hi def link valgrindMsg Special +"hi def link valgrindLoc Special + +hi def link valgrindError Special +hi def link valgrindNote Comment +hi def link valgrindSummary Type + +hi def link valgrindAt Special +hi def link valgrindAddr Number +hi def link valgrindFunc Type +hi def link valgrindBin Comment +hi def link valgrindSrc Statement + +let b:current_syntax = "valgrind" diff --git a/runtime/syntax/vb.vim b/runtime/syntax/vb.vim new file mode 100644 index 000000000..a107e7d9f --- /dev/null +++ b/runtime/syntax/vb.vim @@ -0,0 +1,273 @@ +" Vim syntax file +" Language: Visual Basic +" Maintainer: Tim Chase <vb.vim@tim.thechases.com> +" Former Maintainer: Robert M. Cortopassi <cortopar@mindspring.com> +" (tried multiple times to contact, but email bounced) +" Last Change: 2004 May 25 +" 2004 May 30 Added a few keywords + +" This was thrown together after seeing numerous requests on the +" VIM and VIM-DEV mailing lists. It is by no means complete. +" Send comments, suggestions and requests to the maintainer. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" VB is case insensitive +syn case ignore + +syn keyword vbStatement Alias AppActivate As Base Beep Call Case +syn keyword vbStatement ChDir ChDrive Const Declare DefBool DefByte +syn keyword vbStatement DefCur DefDate DefDbl DefDec DefInt +syn keyword vbStatement DefLng DefObj DefSng DefStr Deftype +syn keyword vbStatement DefVar DeleteSetting Dim Do Each Else +syn keyword vbStatement ElseIf End Enum Erase Event Exit Explicit +syn keyword vbStatement FileCopy For ForEach Function Get GoSub +syn keyword vbStatement GoTo If Implements Kill Let Lib LineInput +syn keyword vbStatement Lock Loop LSet MkDir Name Next OnError On +syn keyword vbStatement Option Preserve Private Property Public Put +syn keyword vbStatement RaiseEvent Randomize ReDim Reset Resume +syn keyword vbStatement Return RmDir RSet SavePicture SaveSetting +syn keyword vbStatement SendKeys Select SetAttr Static Step Sub +syn keyword vbStatement Then Type Unlock Until Wend While Width +syn keyword vbStatement With Write + +syn keyword vbFunction Abs Array Asc AscB AscW Atn Avg CBool +syn keyword vbFunction CByte CCur CDate CDbl Cdec Choose Chr +syn keyword vbFunction ChrB ChrW CInt CLng Command Cos Count +syn keyword vbFunction CreateObject CSng CStr CurDir CVar +syn keyword vbFunction CVDate CVErr DateAdd DateDiff DatePart +syn keyword vbFunction DateSerial DateValue Day DDB Dir +syn keyword vbFunction DoEvents Environ EOF Error Exp FileAttr +syn keyword vbFunction FileDateTime FileLen Fix Format FreeFile +syn keyword vbFunction FV GetAllStrings GetAttr +syn keyword vbFunction GetAutoServerSettings GetObject +syn keyword vbFunction GetSetting Hex Hour IIf IMEStatus Input +syn keyword vbFunction InputB InputBox InStr InstB Int IPmt +syn keyword vbFunction IsArray IsDate IsEmpty IsError IsMissing +syn keyword vbFunction IsNull IsNumeric IsObject LBound LCase +syn keyword vbFunction Left LeftB Len LenB LoadPicture Loc LOF +syn keyword vbFunction Log LTrim Max Mid MidB Min Minute MIRR +syn keyword vbFunction Month MsgBox Now NPer NPV Oct Partition +syn keyword vbFunction Pmt PPmt PV QBColor Rate RGB Right +syn keyword vbFunction RightB Rnd RTrim Second Seek Sgn Shell +syn keyword vbFunction Sin SLN Space Spc Sqr StDev StDevP Str +syn keyword vbFunction StrComp StrConv String Switch Sum SYD +syn keyword vbFunction Tab Tan Time Timer TimeSerial TimeValue +syn keyword vbFunction Trim TypeName UBound UCase Val Var VarP +syn keyword vbFunction VarType Weekday Year + +syn keyword vbMethods Accept Activate Add AddCustom AddFile +syn keyword vbMethods AddFromFile AddFromTemplate AddItem +syn keyword vbMethods AddNew AddToAddInToolbar +syn keyword vbMethods AddToolboxProgID Append AppendChunk +syn keyword vbMethods Arrange Assert AsyncRead BatchUpdate +syn keyword vbMethods BeginTrans Bind Cancel CancelAsyncRead +syn keyword vbMethods CancelBatch CancelUpdate +syn keyword vbMethods CanPropertyChange CaptureImage CellText +syn keyword vbMethods CellValue Circle Clear ClearFields +syn keyword vbMethods ClearSel ClearSelCols Clone Close Cls +syn keyword vbMethods ColContaining ColumnSize CommitTrans +syn keyword vbMethods CompactDatabase Compose Connect Copy +syn keyword vbMethods CopyQueryDef CreateDatabase +syn keyword vbMethods CreateDragImage CreateEmbed CreateField +syn keyword vbMethods CreateGroup CreateIndex CreateLink +syn keyword vbMethods CreatePreparedStatement CreatePropery +syn keyword vbMethods CreateQuery CreateQueryDef +syn keyword vbMethods CreateRelation CreateTableDef CreateUser +syn keyword vbMethods CreateWorkspace Customize Delete +syn keyword vbMethods DeleteColumnLabels DeleteColumns +syn keyword vbMethods DeleteRowLabels DeleteRows DoVerb Drag +syn keyword vbMethods Draw Edit EditCopy EditPaste EndDoc +syn keyword vbMethods EnsureVisible EstablishConnection +syn keyword vbMethods Execute ExtractIcon Fetch FetchVerbs +syn keyword vbMethods Files FillCache Find FindFirst FindItem +syn keyword vbMethods FindLast FindNext FindPrevious Forward +syn keyword vbMethods GetBookmark GetChunk GetClipString +syn keyword vbMethods GetData GetFirstVisible GetFormat +syn keyword vbMethods GetHeader GetLineFromChar GetNumTicks +syn keyword vbMethods GetRows GetSelectedPart GetText +syn keyword vbMethods GetVisibleCount GoBack GoForward Hide +syn keyword vbMethods HitTest HoldFields Idle InitializeLabels +syn keyword vbMethods InsertColumnLabels InsertColumns +syn keyword vbMethods InsertObjDlg InsertRowLabels InsertRows +syn keyword vbMethods Item KillDoc Layout Line LinkExecute +syn keyword vbMethods LinkPoke LinkRequest LinkSend Listen +syn keyword vbMethods LoadFile LoadResData LoadResPicture +syn keyword vbMethods LoadResString LogEvent MakeCompileFile +syn keyword vbMethods MakeReplica MoreResults Move MoveData +syn keyword vbMethods MoveFirst MoveLast MoveNext MovePrevious +syn keyword vbMethods NavigateTo NewPage NewPassword +syn keyword vbMethods NextRecordset OLEDrag OnAddinsUpdate +syn keyword vbMethods OnConnection OnDisconnection +syn keyword vbMethods OnStartupComplete Open OpenConnection +syn keyword vbMethods OpenDatabase OpenQueryDef OpenRecordset +syn keyword vbMethods OpenResultset OpenURL Overlay +syn keyword vbMethods PaintPicture Paste PastSpecialDlg +syn keyword vbMethods PeekData Play Point PopulatePartial +syn keyword vbMethods PopupMenu Print PrintForm +syn keyword vbMethods PropertyChanged PSet Quit Raise +syn keyword vbMethods RandomDataFill RandomFillColumns +syn keyword vbMethods RandomFillRows rdoCreateEnvironment +syn keyword vbMethods rdoRegisterDataSource ReadFromFile +syn keyword vbMethods ReadProperty Rebind ReFill Refresh +syn keyword vbMethods RefreshLink RegisterDatabase Reload +syn keyword vbMethods Remove RemoveAddInFromToolbar RemoveItem +syn keyword vbMethods Render RepairDatabase Reply ReplyAll +syn keyword vbMethods Requery ResetCustom ResetCustomLabel +syn keyword vbMethods ResolveName RestoreToolbar Resync +syn keyword vbMethods Rollback RollbackTrans RowBookmark +syn keyword vbMethods RowContaining RowTop Save SaveAs +syn keyword vbMethods SaveFile SaveToFile SaveToolbar +syn keyword vbMethods SaveToOle1File Scale ScaleX ScaleY +syn keyword vbMethods Scroll SelectAll SelectPart SelPrint +syn keyword vbMethods Send SendData Set SetAutoServerSettings +syn keyword vbMethods SetData SetFocus SetOption SetSize +syn keyword vbMethods SetText SetViewport Show ShowColor +syn keyword vbMethods ShowFont ShowHelp ShowOpen ShowPrinter +syn keyword vbMethods ShowSave ShowWhatsThis SignOff SignOn +syn keyword vbMethods Size Span SplitContaining StartLabelEdit +syn keyword vbMethods StartLogging Stop Synchronize TextHeight +syn keyword vbMethods TextWidth ToDefaults TwipsToChartPart +syn keyword vbMethods TypeByChartType Update UpdateControls +syn keyword vbMethods UpdateRecord UpdateRow Upto +syn keyword vbMethods WhatsThisMode WriteProperty ZOrder + +syn keyword vbEvents AccessKeyPress AfterAddFile +syn keyword vbEvents AfterChangeFileName AfterCloseFile +syn keyword vbEvents AfterColEdit AfterColUpdate AfterDelete +syn keyword vbEvents AfterInsert AfterLabelEdit +syn keyword vbEvents AfterRemoveFile AfterUpdate +syn keyword vbEvents AfterWriteFile AmbienChanged +syn keyword vbEvents ApplyChanges Associate AsyncReadComplete +syn keyword vbEvents AxisActivated AxisLabelActivated +syn keyword vbEvents AxisLabelSelected AxisLabelUpdated +syn keyword vbEvents AxisSelected AxisTitleActivated +syn keyword vbEvents AxisTitleSelected AxisTitleUpdated +syn keyword vbEvents AxisUpdated BeforeClick BeforeColEdit +syn keyword vbEvents BeforeColUpdate BeforeConnect +syn keyword vbEvents BeforeDelete BeforeInsert +syn keyword vbEvents BeforeLabelEdit BeforeLoadFile +syn keyword vbEvents BeforeUpdate ButtonClick ButtonCompleted +syn keyword vbEvents ButtonGotFocus ButtonLostFocus Change +syn keyword vbEvents ChartActivated ChartSelected +syn keyword vbEvents ChartUpdated Click ColEdit Collapse +syn keyword vbEvents ColResize ColumnClick Compare +syn keyword vbEvents ConfigChageCancelled ConfigChanged +syn keyword vbEvents ConnectionRequest DataArrival +syn keyword vbEvents DataChanged DataUpdated DblClick +syn keyword vbEvents Deactivate DeviceArrival +syn keyword vbEvents DeviceOtherEvent DeviceQueryRemove +syn keyword vbEvents DeviceQueryRemoveFailed +syn keyword vbEvents DeviceRemoveComplete DeviceRemovePending +syn keyword vbEvents DevModeChange Disconnect DisplayChanged +syn keyword vbEvents Dissociate DoGetNewFileName Done +syn keyword vbEvents DonePainting DownClick DragDrop DragOver +syn keyword vbEvents DropDown EditProperty EnterCell +syn keyword vbEvents EnterFocus ExitFocus Expand +syn keyword vbEvents FootnoteActivated FootnoteSelected +syn keyword vbEvents FootnoteUpdated GotFocus HeadClick +syn keyword vbEvents InfoMessage Initialize IniProperties +syn keyword vbEvents ItemActivated ItemAdded ItemCheck +syn keyword vbEvents ItemClick ItemReloaded ItemRemoved +syn keyword vbEvents ItemRenamed ItemSeletected KeyDown +syn keyword vbEvents KeyPress KeyUp LeaveCell LegendActivated +syn keyword vbEvents LegendSelected LegendUpdated LinkClose +syn keyword vbEvents LinkError LinkNotify LinkOpen Load +syn keyword vbEvents LostFocus MouseDown MouseMove MouseUp +syn keyword vbEvents NodeClick ObjectMove OLECompleteDrag +syn keyword vbEvents OLEDragDrop OLEDragOver OLEGiveFeedback +syn keyword vbEvents OLESetData OLEStartDrag OnAddNew OnComm +syn keyword vbEvents Paint PanelClick PanelDblClick +syn keyword vbEvents PathChange PatternChange PlotActivated +syn keyword vbEvents PlotSelected PlotUpdated PointActivated +syn keyword vbEvents PointLabelActivated PointLabelSelected +syn keyword vbEvents PointLabelUpdated PointSelected +syn keyword vbEvents PointUpdated PowerQuerySuspend +syn keyword vbEvents PowerResume PowerStatusChanged +syn keyword vbEvents PowerSuspend QueryChangeConfig +syn keyword vbEvents QueryComplete QueryCompleted +syn keyword vbEvents QueryTimeout QueryUnload ReadProperties +syn keyword vbEvents Reposition RequestChangeFileName +syn keyword vbEvents RequestWriteFile Resize ResultsChanged +syn keyword vbEvents RowColChange RowCurrencyChange RowResize +syn keyword vbEvents RowStatusChanged SelChange +syn keyword vbEvents SelectionChanged SendComplete +syn keyword vbEvents SendProgress SeriesActivated +syn keyword vbEvents SeriesSelected SeriesUpdated +syn keyword vbEvents SettingChanged SplitChange StateChanged +syn keyword vbEvents StatusUpdate SysColorsChanged Terminate +syn keyword vbEvents TimeChanged TitleActivated TitleSelected +syn keyword vbEvents TitleActivated UnboundAddData +syn keyword vbEvents UnboundDeleteRow +syn keyword vbEvents UnboundGetRelativeBookmark +syn keyword vbEvents UnboundReadData UnboundWriteData Unload +syn keyword vbEvents UpClick Updated Validate ValidationError +syn keyword vbEvents WillAssociate WillChangeData +syn keyword vbEvents WillDissociate WillExecute +syn keyword vbEvents WillUpdateRows WriteProperties + +syn keyword vbTypes Boolean Byte Currency Date Decimal +syn keyword vbTypes Double Empty Integer Long Single String + +syn match vbOperator "[()+.,\-/*=&]" +syn match vbOperator "[<>]=\=" +syn match vbOperator "<>" +syn match vbOperator "\s\+_$" +syn keyword vbOperator And Or Not Xor Mod In Is Imp Eqv +syn keyword vbOperator To ByVal ByRef +syn keyword vbConst True False Null Nothing + +syn keyword vbTodo contained TODO + +"integer number, or floating point number without a dot. +syn match vbNumber "\<\d\+\>" +"floating point number, with dot +syn match vbNumber "\<\d\+\.\d*\>" +"floating point number, starting with a dot +syn match vbNumber "\.\d\+\>" + +" String and Character contstants +syn region vbString start=+"+ end=+"+ +syn region vbComment start="\<REM\>" end="$" contains=vbTodo +syn region vbComment start="'" end="$" contains=vbTodo +syn region vbLineNumber start="^\d" end="\s" +syn match vbTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_vb_syntax_inits") + if version < 508 + let did_vb_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink vbLineNumber Comment + HiLink vbNumber Number + HiLink vbConst Constant + HiLink vbError Error + HiLink vbStatement Statement + HiLink vbString String + HiLink vbComment Comment + HiLink vbTodo Todo + HiLink vbFunction Identifier + HiLink vbMethods PreProc + HiLink vbEvents Special + HiLink vbTypeSpecifier Type + HiLink vbTypes Type + HiLink vbOperator Operator + + delcommand HiLink +endif + +let b:current_syntax = "vb" + +" vim: ts=8 diff --git a/runtime/syntax/verilog.vim b/runtime/syntax/verilog.vim new file mode 100644 index 000000000..2e0179942 --- /dev/null +++ b/runtime/syntax/verilog.vim @@ -0,0 +1,134 @@ +" Vim syntax file +" Language: Verilog +" Maintainer: Mun Johl <mun_johl@sierralogic.com> +" Last Update: Tue Nov 4 09:39:40 PST 2003 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Set the local value of the 'iskeyword' option +if version >= 600 + setlocal iskeyword=@,48-57,_,192-255 +else + set iskeyword=@,48-57,_,192-255 +endif + +" A bunch of useful Verilog keywords + +syn keyword verilogStatement always and assign automatic buf +syn keyword verilogStatement bufif0 bufif1 cell cmos +syn keyword verilogStatement config deassign defparam design +syn keyword verilogStatement disable edge endconfig +syn keyword verilogStatement endfunction endgenerate endmodule +syn keyword verilogStatement endprimitive endspecify endtable endtask +syn keyword verilogStatement event force function +syn keyword verilogStatement generate genvar highz0 highz1 ifnone +syn keyword verilogStatement incdir include initial inout input +syn keyword verilogStatement instance integer large liblist +syn keyword verilogStatement library localparam macromodule medium +syn keyword verilogStatement module nand negedge nmos nor +syn keyword verilogStatement noshowcancelled not notif0 notif1 or +syn keyword verilogStatement output parameter pmos posedge primitive +syn keyword verilogStatement pull0 pull1 pulldown pullup +syn keyword verilogStatement pulsestyle_onevent pulsestyle_ondetect +syn keyword verilogStatement rcmos real realtime reg release +syn keyword verilogStatement rnmos rpmos rtran rtranif0 rtranif1 +syn keyword verilogStatement scalared showcancelled signed small +syn keyword verilogStatement specify specparam strong0 strong1 +syn keyword verilogStatement supply0 supply1 table task time tran +syn keyword verilogStatement tranif0 tranif1 tri tri0 tri1 triand +syn keyword verilogStatement trior trireg unsigned use vectored wait +syn keyword verilogStatement wand weak0 weak1 wire wor xnor xor +syn keyword verilogLabel begin end fork join +syn keyword verilogConditional if else case casex casez default endcase +syn keyword verilogRepeat forever repeat while for + +syn keyword verilogTodo contained TODO + +syn match verilogOperator "[&|~><!)(*#%@+/=?:;}{,.\^\-\[\]]" + +syn region verilogComment start="/\*" end="\*/" contains=verilogTodo +syn match verilogComment "//.*" contains=verilogTodo + +"syn match verilogGlobal "`[a-zA-Z0-9_]\+\>" +syn match verilogGlobal "`celldefine" +syn match verilogGlobal "`default_nettype" +syn match verilogGlobal "`define" +syn match verilogGlobal "`else" +syn match verilogGlobal "`elsif" +syn match verilogGlobal "`endcelldefine" +syn match verilogGlobal "`endif" +syn match verilogGlobal "`ifdef" +syn match verilogGlobal "`ifndef" +syn match verilogGlobal "`include" +syn match verilogGlobal "`line" +syn match verilogGlobal "`nounconnected_drive" +syn match verilogGlobal "`resetall" +syn match verilogGlobal "`timescale" +syn match verilogGlobal "`unconnected_drive" +syn match verilogGlobal "`undef" +syn match verilogGlobal "$[a-zA-Z0-9_]\+\>" + +syn match verilogConstant "\<[A-Z][A-Z0-9_]\+\>" + +syn match verilogNumber "\(\<\d\+\|\)'[bB]\s*[0-1_xXzZ?]\+\>" +syn match verilogNumber "\(\<\d\+\|\)'[oO]\s*[0-7_xXzZ?]\+\>" +syn match verilogNumber "\(\<\d\+\|\)'[dD]\s*[0-9_xXzZ?]\+\>" +syn match verilogNumber "\(\<\d\+\|\)'[hH]\s*[0-9a-fA-F_xXzZ?]\+\>" +syn match verilogNumber "\<[+-]\=[0-9_]\+\(\.[0-9_]*\|\)\(e[0-9_]*\|\)\>" + +syn region verilogString start=+"+ skip=+\\"+ end=+"+ contains=verilogEscape +syn match verilogEscape +\\[nt"\\]+ contained +syn match verilogEscape "\\\o\o\=\o\=" contained + +" Directives +syn match verilogDirective "//\s*synopsys\>.*$" +syn region verilogDirective start="/\*\s*synopsys\>" end="\*/" +syn region verilogDirective start="//\s*synopsys dc_script_begin\>" end="//\s*synopsys dc_script_end\>" + +syn match verilogDirective "//\s*\$s\>.*$" +syn region verilogDirective start="/\*\s*\$s\>" end="\*/" +syn region verilogDirective start="//\s*\$s dc_script_begin\>" end="//\s*\$s dc_script_end\>" + +"Modify the following as needed. The trade-off is performance versus +"functionality. +syn sync lines=50 + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_verilog_syn_inits") + if version < 508 + let did_verilog_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default highlighting. + HiLink verilogCharacter Character + HiLink verilogConditional Conditional + HiLink verilogRepeat Repeat + HiLink verilogString String + HiLink verilogTodo Todo + HiLink verilogComment Comment + HiLink verilogConstant Constant + HiLink verilogLabel Label + HiLink verilogNumber Number + HiLink verilogOperator Special + HiLink verilogStatement Statement + HiLink verilogGlobal Define + HiLink verilogDirective SpecialComment + HiLink verilogEscape Special + + delcommand HiLink +endif + +let b:current_syntax = "verilog" + +" vim: ts=8 diff --git a/runtime/syntax/vgrindefs.vim b/runtime/syntax/vgrindefs.vim new file mode 100644 index 000000000..a4b81b7ef --- /dev/null +++ b/runtime/syntax/vgrindefs.vim @@ -0,0 +1,61 @@ +" Vim syntax file +" Language: Vgrindefs +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last Change: 2001 Apr 25 + +" The Vgrindefs file is used to specify a language for vgrind + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Comments +syn match vgrindefsComment "^#.*" + +" The fields that vgrind recognizes +syn match vgrindefsField ":ab=" +syn match vgrindefsField ":ae=" +syn match vgrindefsField ":pb=" +syn match vgrindefsField ":bb=" +syn match vgrindefsField ":be=" +syn match vgrindefsField ":cb=" +syn match vgrindefsField ":ce=" +syn match vgrindefsField ":sb=" +syn match vgrindefsField ":se=" +syn match vgrindefsField ":lb=" +syn match vgrindefsField ":le=" +syn match vgrindefsField ":nc=" +syn match vgrindefsField ":tl" +syn match vgrindefsField ":oc" +syn match vgrindefsField ":kw=" + +" Also find the ':' at the end of the line, so all ':' are highlighted +syn match vgrindefsField ":\\$" +syn match vgrindefsField ":$" +syn match vgrindefsField "\\$" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_vgrindefs_syntax_inits") + if version < 508 + let did_vgrindefs_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + HiLink vgrindefsField Statement + HiLink vgrindefsComment Comment + + delcommand HiLink +endif + +let b:current_syntax = "vgrindefs" + +" vim: ts=8 diff --git a/runtime/syntax/vhdl.vim b/runtime/syntax/vhdl.vim new file mode 100644 index 000000000..96fbcd620 --- /dev/null +++ b/runtime/syntax/vhdl.vim @@ -0,0 +1,184 @@ +" Vim syntax file +" Language: VHDL +" Maintainer: Czo <Olivier.Sirol@lip6.fr> +" Credits: Stephan Hegel <stephan.hegel@snc.siemens.com.cn> +" $Id$ + +" VHSIC Hardware Description Language +" Very High Scale Integrated Circuit + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" This is not VHDL. I use the C-Preprocessor cpp to generate different binaries +" from one VHDL source file. Unfortunately there is no preprocessor for VHDL +" available. If you don't like this, please remove the following lines. +syn match cDefine "^#ifdef[ ]\+[A-Za-z_]\+" +syn match cDefine "^#endif" + +" case is not significant +syn case ignore + +" VHDL keywords +syn keyword vhdlStatement access after alias all assert +syn keyword vhdlStatement architecture array attribute +syn keyword vhdlStatement begin block body buffer bus +syn keyword vhdlStatement case component configuration constant +syn keyword vhdlStatement disconnect downto +syn keyword vhdlStatement elsif end entity exit +syn keyword vhdlStatement file for function +syn keyword vhdlStatement generate generic group guarded +syn keyword vhdlStatement impure in inertial inout is +syn keyword vhdlStatement label library linkage literal loop +syn keyword vhdlStatement map +syn keyword vhdlStatement new next null +syn keyword vhdlStatement of on open others out +syn keyword vhdlStatement package port postponed procedure process pure +syn keyword vhdlStatement range record register reject report return +syn keyword vhdlStatement select severity signal shared +syn keyword vhdlStatement subtype +syn keyword vhdlStatement then to transport type +syn keyword vhdlStatement unaffected units until use +syn keyword vhdlStatement variable wait when while with +syn keyword vhdlStatement note warning error failure + +" Special match for "if" and "else" since "else if" shouldn't be highlighted. +" The right keyword is "elsif" +syn match vhdlStatement "\<\(if\|else\)\>" +syn match vhdlNone "\<else\s\+if\>$" +syn match vhdlNone "\<else\s\+if\>\s" + +" Predifined VHDL types +syn keyword vhdlType bit bit_vector +syn keyword vhdlType character boolean integer real time +syn keyword vhdlType string severity_level +" Predifined standard ieee VHDL types +syn keyword vhdlType positive natural signed unsigned +syn keyword vhdlType line text +syn keyword vhdlType std_logic std_logic_vector +syn keyword vhdlType std_ulogic std_ulogic_vector +" Predefined non standard VHDL types for Mentor Graphics Sys1076/QuickHDL +syn keyword vhdlType qsim_state qsim_state_vector +syn keyword vhdlType qsim_12state qsim_12state_vector +syn keyword vhdlType qsim_strength +" Predefined non standard VHDL types for Alliance VLSI CAD +syn keyword vhdlType mux_bit mux_vector reg_bit reg_vector wor_bit wor_vector + +" array attributes +syn match vhdlAttribute "\'high" +syn match vhdlAttribute "\'left" +syn match vhdlAttribute "\'length" +syn match vhdlAttribute "\'low" +syn match vhdlAttribute "\'range" +syn match vhdlAttribute "\'reverse_range" +syn match vhdlAttribute "\'right" +syn match vhdlAttribute "\'ascending" +" block attributes +syn match vhdlAttribute "\'behaviour" +syn match vhdlAttribute "\'structure" +syn match vhdlAttribute "\'simple_name" +syn match vhdlAttribute "\'instance_name" +syn match vhdlAttribute "\'path_name" +syn match vhdlAttribute "\'foreign" +" signal attribute +syn match vhdlAttribute "\'active" +syn match vhdlAttribute "\'delayed" +syn match vhdlAttribute "\'event" +syn match vhdlAttribute "\'last_active" +syn match vhdlAttribute "\'last_event" +syn match vhdlAttribute "\'last_value" +syn match vhdlAttribute "\'quiet" +syn match vhdlAttribute "\'stable" +syn match vhdlAttribute "\'transaction" +syn match vhdlAttribute "\'driving" +syn match vhdlAttribute "\'driving_value" +" type attributes +syn match vhdlAttribute "\'base" +syn match vhdlAttribute "\'high" +syn match vhdlAttribute "\'left" +syn match vhdlAttribute "\'leftof" +syn match vhdlAttribute "\'low" +syn match vhdlAttribute "\'pos" +syn match vhdlAttribute "\'pred" +syn match vhdlAttribute "\'rightof" +syn match vhdlAttribute "\'succ" +syn match vhdlAttribute "\'val" +syn match vhdlAttribute "\'image" +syn match vhdlAttribute "\'value" + +syn keyword vhdlBoolean true false + +" for this vector values case is significant +syn case match +" Values for standard VHDL types +syn match vhdlVector "\'[0L1HXWZU\-\?]\'" +" Values for non standard VHDL types qsim_12state for Mentor Graphics Sys1076/QuickHDL +syn keyword vhdlVector S0S S1S SXS S0R S1R SXR S0Z S1Z SXZ S0I S1I SXI +syn case ignore + +syn match vhdlVector "B\"[01_]\+\"" +syn match vhdlVector "O\"[0-7_]\+\"" +syn match vhdlVector "X\"[0-9a-f_]\+\"" +syn match vhdlCharacter "'.'" +syn region vhdlString start=+"+ end=+"+ + +" floating numbers +syn match vhdlNumber "-\=\<\d\+\.\d\+\(E[+\-]\=\d\+\)\>" +syn match vhdlNumber "-\=\<\d\+\.\d\+\>" +syn match vhdlNumber "0*2#[01_]\+\.[01_]\+#\(E[+\-]\=\d\+\)\=" +syn match vhdlNumber "0*16#[0-9a-f_]\+\.[0-9a-f_]\+#\(E[+\-]\=\d\+\)\=" +" integer numbers +syn match vhdlNumber "-\=\<\d\+\(E[+\-]\=\d\+\)\>" +syn match vhdlNumber "-\=\<\d\+\>" +syn match vhdlNumber "0*2#[01_]\+#\(E[+\-]\=\d\+\)\=" +syn match vhdlNumber "0*16#[0-9a-f_]\+#\(E[+\-]\=\d\+\)\=" +" operators +syn keyword vhdlOperator and nand or nor xor xnor +syn keyword vhdlOperator rol ror sla sll sra srl +syn keyword vhdlOperator mod rem abs not +syn match vhdlOperator "[&><=:+\-*\/|]" +syn match vhdlSpecial "[().,;]" +" time +syn match vhdlTime "\<\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>" +syn match vhdlTime "\<\d\+\.\d\+\s\+\(\([fpnum]s\)\|\(sec\)\|\(min\)\|\(hr\)\)\>" + +syn match vhdlComment "--.*$" +" syn match vhdlGlobal "[\'$#~!%@?\^\[\]{}\\]" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_vhdl_syntax_inits") + if version < 508 + let did_vhdl_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink cDefine PreProc + HiLink vhdlSpecial Special + HiLink vhdlStatement Statement + HiLink vhdlCharacter String + HiLink vhdlString String + HiLink vhdlVector String + HiLink vhdlBoolean String + HiLink vhdlComment Comment + HiLink vhdlNumber String + HiLink vhdlTime String + HiLink vhdlType Type + HiLink vhdlOperator Type + HiLink vhdlGlobal Error + HiLink vhdlAttribute Type + + delcommand HiLink +endif + +let b:current_syntax = "vhdl" + +" vim: ts=8 diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim new file mode 100644 index 000000000..bfad112a1 --- /dev/null +++ b/runtime/syntax/vim.vim @@ -0,0 +1,642 @@ +" Vim syntax file +" Language: Vim 6.3 script +" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> +" Last Change: May 25, 2004 +" Version: 6.3-04 +" Automatically generated keyword lists: {{{1 + +" Quit when a syntax file was already loaded {{{2 +if exists("b:current_syntax") + finish +endif + +" vimTodo: contains common special-notices for comments {{{2 +" Use the vimCommentGroup cluster to add your own. +syn keyword vimTodo contained COMBAK NOT RELEASED TODO WIP +syn cluster vimCommentGroup contains=vimTodo,@Spell + +" regular vim commands {{{2 +syn keyword vimCommand contained ab[breviate] abc[lear] abo[veleft] al[l] arga[dd] argd[elete] argdo arge[dit] argg[lobal] argl[ocal] ar[gs] argu[ment] as[cii] bad[d] ba[ll] bd[elete] be bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bN[ext] bo[tright] bp[revious] brea[k] breaka[dd] breakd[el] breakl[ist] br[ewind] bro[wse] bufdo b[uffer] buffers bun[load] bw[ipeout] ca[bbrev] cabc[lear] cal[l] cat[ch] cc ccl[ose] cd ce[nter] cf[ile] cfir[st] cg[etfile] c[hange] changes chd[ir] che[ckpath] checkt[ime] cla[st] cl[ist] clo[se] cmapc[lear] cnew[er] cn[ext] cN[ext] cnf[ile] cNf[ile] cnorea[bbrev] col[der] colo[rscheme] comc[lear] comp[iler] conf[irm] con[tinue] cope[n] co[py] cpf[ile] cp[revious] cq[uit] cr[ewind] cuna[bbrev] cu[nmap] cw[indow] debugg[reedy] delc[ommand] d[elete] DeleteFirst delf[unction] delm[ark] diffg[et] diffpatch diffpu[t] diffsplit diffthis dig[raphs] di[splay] dj[ump] dl[ist] dr[op] ds[earch] dsp[lit] echoe[rr] echom[sg] echon e[dit] el[se] elsei[f] em[enu] emenu* endf[unction] en[dif] endt[ry] endw[hile] ene[w] ex exi[t] f[ile] files filetype fina[lly] fin[d] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] folddoc[losed] foldd[oopen] foldo[pen] fu[nction] g[lobal] go[to] gr[ep] grepa[dd] ha[rdcopy] h[elp] helpf[ind] helpg[rep] helpt[ags] hid[e] his[tory] I ia[bbrev] iabc[lear] if ij[ump] il[ist] imapc[lear] inorea[bbrev] is[earch] isp[lit] iuna[bbrev] iu[nmap] j[oin] ju[mps] k keepj[umps] kee[pmarks] lan[guage] la[st] lc[d] lch[dir] le[ft] lefta[bove] l[ist] lm[ap] lmapc[lear] ln[oremap] lo[adview] loc[kmarks] ls lu[nmap] mak[e] ma[rk] marks mat[ch] menut[ranslate] mk[exrc] mks[ession] mkvie[w] mkv[imrc] mod[e] m[ove] new n[ext] N[ext] nmapc[lear] noh[lsearch] norea[bbrev] norm[al] Nread nu[mber] nun[map] Nw omapc[lear] on[ly] o[pen] opt[ions] ou[nmap] pc[lose] ped[it] pe[rl] perld[o] po[p] popu popu[p] pp[op] pre[serve] prev[ious] p[rint] P[rint] prompt promptf[ind] promptr[epl] ps[earch] pta[g] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptN[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pw[d] pyf[ile] py[thon] qa[ll] q[uit] quita[ll] r[ead] rec[over] redi[r] red[o] redr[aw] redraws[tatus] reg[isters] res[ize] ret[ab] retu[rn] rew[ind] ri[ght] rightb[elow] rub[y] rubyd[o] rubyf[ile] ru[ntime] rv[iminfo] sal[l] sa[rgument] sav[eas] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbN[ext] sbp[revious] sbr[ewind] sb[uffer] scripte[ncoding] scrip[tnames] se[t] setf[iletype] setg[lobal] setl[ocal] sf[ind] sfir[st sh[ell] sign sil[ent] sim[alt] sla[st] sl[eep] sm[agic] sn[ext] sN[ext] sni[ff] sno[magic] so[urce] sp[lit] spr[evious] sre[wind] sta[g] star[tinsert] startr[eplace] stj[ump] st[op] stopi[nsert] sts[elect] sun[hide] sus[pend] sv[iew] syncbind t ta[g] tags tc[l] tcld[o] tclf[ile] te[aroff] tf[irst] the th[row] tj[ump] tl[ast] tm tm[enu] tn[ext] tN[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] tu tu[nmenu] una[bbreviate] u[ndo] unh[ide] unm[ap] up[date] verb[ose] ve[rsion] vert[ical] v[global] vie[w] vi[sual] vmapc[lear] vne[w] vs[plit] vu[nmap] wa[ll] wh[ile] winc[md] windo winp[os] winpos* win[size] wn[ext] wN[ext] wp[revous] wq wqa[ll] w[rite] ws[verb] wv[iminfo] X xa[ll] x[it] y[ank] +syn match vimCommand contained "\<z[-+^.=]" + +" vimOptions are caught only when contained in a vimSet {{{2 +syn keyword vimOption contained : acd ai akm al aleph allowrevins altkeymap ambiwidth ambw anti antialias ar arab arabic arabicshape ari arshape autochdir autoindent autoread autowrite autowriteall aw awa background backspace backup backupcopy backupdir backupext backupskip balloondelay ballooneval bdir bdlay beval bex bg bh bin binary biosk bioskey bk bkc bl bomb breakat brk browsedir bs bsdir bsk bt bufhidden buflisted buftype casemap cb ccv cd cdpath cedit cf ch charconvert ci cin cindent cink cinkeys cino cinoptions cinw cinwords clipboard cmdheight cmdwinheight cmp cms co columns com comments commentstring compatible complete conc conceallevel confirm consk conskey copyindent cp cpo cpoptions cpt crb cscopepathcomp cscopeprg cscopequickfix cscopetag cscopetagorder cscopeverbose cspc csprg csqf cst csto csverb cursorbind cwh debug deco def define delcombine dex dg dict dictionary diff diffexpr diffopt digraph dip dir directory display dy ea ead eadirection eb ed edcompatible ef efm ei ek enc encoding endofline eol ep equalalways equalprg errorbells errorfile errorformat esckeys et eventignore ex expandtab exrc fcl fcs fdc fde fdi fdl fdls fdm fdn fdo fdt fen fenc fencs ff ffs fileencoding fileencodings fileformat fileformats filetype fillchars fk fkmap fml fmr fo foldclose foldcolumn foldenable foldexpr foldignore foldlevel foldlevelstart foldmarker foldmethod foldminlines foldnestmax foldopen foldtext formatoptions formatprg fp ft gcr gd gdefault gfm gfn gfs gfw ghr go gp grepformat grepprg guicursor guifont guifontset guifontwide guiheadroom guioptions guipty helpfile helpheight helplang hf hh hi hid hidden highlight history hk hkmap hkmapp hkp hl hlg hls hlsearch ic icon iconstring ignorecase im imactivatekey imak imc imcmdline imd imdisable imi iminsert ims imsearch inc include includeexpr incsearch inde indentexpr indentkeys indk inex inf infercase insertmode is isf isfname isi isident isk iskeyword isp isprint joinspaces js key keymap keymodel keywordprg km kmp kp langmap langmenu laststatus lazyredraw lbr lcs linebreak lines linespace lisp lispwords list listchars lm lmap loadplugins lpl ls lsp lw lz ma magic makeef makeprg mat matchpairs matchtime maxfuncdepth maxmapdepth maxmem maxmemtot mef menuitems mfd mh mis ml mls mm mmd mmt mod modeline modelines modifiable modified more mouse mousef mousefocus mousehide mousem mousemodel mouses mouseshape mouset mousetime mp mps nf nrformats nu number oft osfiletype pa para paragraphs paste pastetoggle patchexpr patchmode path pdev penc pex pexpr pfn pheader pi pm popt preserveindent previewheight previewwindow printdevice printencoding printexpr printfont printheader printoptions pt pvh pvw readonly remap report restorescreen revins ri rightleft rightleftcmd rl rlc ro rs rtp ru ruf ruler rulerformat runtimepath sb sbo sbr sc scb scr scroll scrollbind scrolljump scrolloff scrollopt scs sect sections secure sel selection selectmode sessionoptions sft sh shcf shell shellcmdflag shellpipe shellquote shellredir shellslash shelltype shellxquote shiftround shiftwidth shm shortmess shortname showbreak showcmd showfulltag showmatch showmode shq si sidescroll sidescrolloff siso sj slm sm smartcase smartindent smarttab smd sn so softtabstop sol sp splitbelow splitright spr sr srr ss ssl ssop st sta startofline statusline stl sts su sua suffixes suffixesadd sw swapfile swapsync swb swf switchbuf sws sxq syn syntax ta tabstop tag tagbsearch taglength tagrelative tags tagstack tb tbi tbidi tbis tbs tenc term termbidi termencoding terse textauto textmode textwidth tf tgst thesaurus tildeop timeout timeoutlen title titlelen titleold titlestring tl tm to toolbar toolbariconsize top tr ts tsl tsr ttimeout ttimeoutlen ttm tty ttybuiltin ttyfast ttym ttymouse ttyscroll ttytype tw tx uc ul undolevels updatecount updatetime ut vb vbs vdir ve verbose vi viewdir viewoptions viminfo virtualedit visualbell vop wa wak warn wb wc wcm wd weirdinvert wfh wh whichwrap wig wildchar wildcharm wildignore wildmenu wildmode wim winaltkeys winfixheight winheight winminheight winminwidth winwidth wiv wiw wm wmh wmnu wmw wrap wrapmargin wrapscan write writeany writebackup writedelay ws ww + +" vimOptions: These are the turn-off setting variants {{{2 +syn keyword vimOption contained noacd noai noakm noallowrevins noaltkeymap noanti noantialias noar noarab noarabic noarabicshape noari noarshape noautochdir noautoindent noautoread noautowrite noautowriteall noaw noawa nobackup noballooneval nobeval nobin nobinary nobiosk nobioskey nobk nobl nobomb nobuflisted nocf noci nocin nocindent nocompatible noconfirm noconsk noconskey nocopyindent nocp nocrb nocscopetag nocscopeverbose nocst nocsverb nocursorbind nodeco nodelcombine nodg nodiff nodigraph nodisable noea noeb noed noedcompatible noek noendofline noeol noequalalways noerrorbells noesckeys noet noex noexpandtab noexrc nofen nofk nofkmap nofoldenable nogd nogdefault noguipty nohid nohidden nohk nohkmap nohkmapp nohkp nohls nohlsearch noic noicon noignorecase noim noimc noimcmdline noimd noincsearch noinf noinfercase noinsertmode nois nojoinspaces nojs nolazyredraw nolbr nolinebreak nolisp nolist noloadplugins nolpl nolz noma nomagic nomh noml nomod nomodeline nomodifiable nomodified nomore nomousef nomousefocus nomousehide nonu nonumber nopaste nopi nopreserveindent nopreviewwindow nopvw noreadonly noremap norestorescreen norevins nori norightleft norightleftcmd norl norlc noro nors noru noruler nosb nosc noscb noscrollbind noscs nosecure nosft noshellslash noshiftround noshortname noshowcmd noshowfulltag noshowmatch noshowmode nosi nosm nosmartcase nosmartindent nosmarttab nosmd nosn nosol nosplitbelow nosplitright nospr nosr nossl nosta nostartofline noswapfile noswf nota notagbsearch notagrelative notagstack notbi notbidi notbs notermbidi noterse notextauto notextmode notf notgst notildeop notimeout notitle noto notop notr nottimeout nottybuiltin nottyfast notx novb novisualbell nowa nowarn nowb noweirdinvert nowfh nowildmenu nowinfixheight nowiv nowmnu nowrap nowrapscan nowrite nowriteany nowritebackup nows + +" vimOptions: These are the invertible variants {{{2 +syn keyword vimOption contained invacd invai invakm invallowrevins invaltkeymap invanti invantialias invar invarab invarabic invarabicshape invari invarshape invautochdir invautoindent invautoread invautowrite invautowriteall invaw invawa invbackup invballooneval invbeval invbin invbinary invbiosk invbioskey invbk invbl invbomb invbuflisted invcf invci invcin invcindent invcompatible invconfirm invconsk invconskey invcopyindent invcp invcrb invcscopetag invcscopeverbose invcst invcsverb invcursorbind invdeco invdelcombine invdg invdiff invdigraph invdisable invea inveb inved invedcompatible invek invendofline inveol invequalalways inverrorbells invesckeys invet invex invexpandtab invexrc invfen invfk invfkmap invfoldenable invgd invgdefault invguipty invhid invhidden invhk invhkmap invhkmapp invhkp invhls invhlsearch invic invicon invignorecase invim invimc invimcmdline invimd invincsearch invinf invinfercase invinsertmode invis invjoinspaces invjs invlazyredraw invlbr invlinebreak invlisp invlist invloadplugins invlpl invlz invma invmagic invmh invml invmod invmodeline invmodifiable invmodified invmore invmousef invmousefocus invmousehide invnu invnumber invpaste invpi invpreserveindent invpreviewwindow invpvw invreadonly invremap invrestorescreen invrevins invri invrightleft invrightleftcmd invrl invrlc invro invrs invru invruler invsb invsc invscb invscrollbind invscs invsecure invsft invshellslash invshiftround invshortname invshowcmd invshowfulltag invshowmatch invshowmode invsi invsm invsmartcase invsmartindent invsmarttab invsmd invsn invsol invsplitbelow invsplitright invspr invsr invssl invsta invstartofline invswapfile invswf invta invtagbsearch invtagrelative invtagstack invtbi invtbidi invtbs invtermbidi invterse invtextauto invtextmode invtf invtgst invtildeop invtimeout invtitle invto invtop invtr invttimeout invttybuiltin invttyfast invtx invvb invvisualbell invwa invwarn invwb invweirdinvert invwfh invwildmenu invwinfixheight invwiv invwmnu invwrap invwrapscan invwrite invwriteany invwritebackup invws + +" termcap codes (which can also be set) {{{2 +syn keyword vimOption contained t_AB t_AF t_al t_AL t_bc t_cd t_ce t_cl t_cm t_Co t_cs t_CS t_CV t_da t_db t_dl t_DL t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RI t_RV t_Sb t_se t_Sf t_so t_sr t_te t_ti t_ts t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xs t_ZH t_ZR +syn match vimOption contained "t_%1" +syn match vimOption contained "t_#2" +syn match vimOption contained "t_#4" +syn match vimOption contained "t_@7" +syn match vimOption contained "t_*7" +syn match vimOption contained "t_&8" +syn match vimOption contained "t_%i" +syn match vimOption contained "t_k;" + +" unsupported settings: these are supported by vi but don't do anything in vim {{{2 +syn keyword vimErrSetting contained hardtabs ht w1200 w300 w9600 wi window + +" AutoBuf Events {{{2 +syn case ignore +syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave CursorHold E135 E143 E200 E201 E203 E204 EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter RemoteReply StdinReadPost StdinReadPre Syntax TermChanged TermResponse User UserGettingBored VimEnter VimLeave VimLeavePre WinEnter WinLeave + +" Highlight commonly used Groupnames {{{2 +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 Conceal Cursor CursorIM DiffAdd DiffChange DiffDelete DiffText Directory ErrorMsg FoldColumn Folded IncSearch LineNr Menu ModeMsg MoreMsg NonText Normal Question Scrollbar Search SignColumn SpecialKey StatusLine StatusLineNC Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu +syn case match + +" Function Names {{{2 +syn keyword vimFuncName contained append argc argidx argv browse bufexists buflisted bufloaded bufname bufnr bufwinnr byte2line char2nr cindent col confirm cscope_connection cursor delete did_filetype escape eventhandler executable exists expand filereadable filewritable fnamemodify foldclosed foldclosedend foldlevel foldtext foreground function getbufvar getchar getcharmod getcmdline getcmdpos getcwd getfsize getftime getline getreg getregtype getwinposx getwinposy getwinvar glob globpath has hasmapto histadd histdel histget histnr hlexists hlID hostname iconv indent input inputdialog inputrestore inputsave inputsecret isdirectory libcall libcallnr line line2byte lispindent localtime maparg mapcheck match matchend matchstr mode nextnonblank nr2char prevnonblank remote_expr remote_foreground remote_peek remote_read remote_send rename resolve search searchpair server2client serverlist setbufvar setcmdpos setline setreg setwinvar simplify strftime stridx strlen strpart strridx strtrans submatch substitute synID synIDattr synIDtrans system tempname tolower toupper type virtcol visualmode winbufnr wincol winheight winline winnr winrestcmd winwidth + +"--- syntax above generated by mkvimvim --- + +" Special Vim Highlighting {{{1 + +" Numbers {{{1 +" ======= +syn match vimNumber "\<\d\+\([lL]\|\.\d\+\)\=" +syn match vimNumber "-\d\+\([lL]\|\.\d\+\)\=" +syn match vimNumber "\<0[xX]\x\+" +syn match vimNumber "#\x\{6}" + +" All vimCommands are contained by vimIsCommands. {{{1 +syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd +syn match vimIsCommand "\<\a\+\>" contains=vimCommand +syn match vimVar "\<[bwglsav]:\K\k*\>" +syn match vimVar contained "\<\K\k*\>" + +" Insertions And Appends: insert append {{{1 +" ======================= +syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$"" +syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$"" +syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$"" + +" Behave! {{{1 +" ======= +syn match vimBehave "\<be\%[have]\>" skipwhite nextgroup=vimBehaveModel,vimBehaveError +syn keyword vimBehaveModel contained mswin xterm +syn match vimBehaveError contained "[^ ]\+" + +" Filetypes {{{1 +" ========= +syn match vimFiletype "\<filet\%[ype]\(\s\+\I\i*\)*\(|\|$\)" skipwhite contains=vimFTCmd,vimFTOption,vimFTError +syn match vimFTError contained "\I\i*" +syn keyword vimFTCmd contained filet[ype] +syn keyword vimFTOption contained detect indent off on plugin + +" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{1 +" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking. +syn cluster vimAugroupList contains=vimIsCommand,vimFunction,vimFunctionError,vimLineComment,vimSpecFile,vimOper,vimNumber,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue +syn region vimAugroup start="\<aug\%[roup]\>\s\+\K\k*" end="\<aug\%[roup]\>\s\+[eE][nN][dD]\>" contains=vimAugroupKey,vimAutoCmd,@vimAugroupList keepend +syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>" +syn keyword vimAugroupKey contained aug[roup] + +" Functions : Tag is provided for those who wish to highlight tagged functions {{{1 +" ========= +syn cluster vimFuncList contains=vimFuncKey,Tag,vimFuncSID +syn cluster vimFuncBodyList contains=vimIsCommand,vimFunction,vimFunctionError,vimFuncBody,vimLineComment,vimSpecFile,vimOper,vimNumber,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue +syn match vimFunctionError "\<fu\%[nction]!\=\s\+\zs\U\i\{-}\ze\s*(" contains=vimFuncKey,vimFuncBlank nextgroup=vimFuncBody +syn match vimFunction "\<fu\%[nction]!\=\s\+\(<[sS][iI][dD]>\|[Ss]:\|\u\)\i*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody +syn region vimFuncBody contained start=")" end="\<endf\%[unction]" contains=@vimFuncBodyList +syn match vimFuncVar contained "a:\(\I\i*\|\d\+\)" +syn match vimFuncSID contained "\c<sid>\|\<s:" +syn keyword vimFuncKey contained fu[nction] +syn match vimFuncBlank contained "\s\+" + +syn keyword vimPattern contained start skip end + +" Operators: {{{1 +" ========= +syn cluster vimOperGroup contains=vimOper,vimOperParen,vimNumber,vimString +syn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile +syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile +syn region vimOperParen matchgroup=vimOper start="(" end=")" contains=@vimOperGroup +syn match vimOperError ")" + +" Special Filenames, Modifiers, Extension Removal: {{{1 +" =============================================== +syn match vimSpecFile "<c\(word\|WORD\)>" nextgroup=vimSpecFileMod,vimSubst +syn match vimSpecFile "<\([acs]file\|amatch\|abuf\)>" nextgroup=vimSpecFileMod,vimSubst +syn match vimSpecFile "\s%[ \t:]"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst +syn match vimSpecFile "\s%$"ms=s+1 nextgroup=vimSpecFileMod,vimSubst +syn match vimSpecFile "\s%<"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst +syn match vimSpecFile "#\d\+\|[#%]<\>" nextgroup=vimSpecFileMod,vimSubst +syn match vimSpecFileMod "\(:[phtre]\)\+" contained + +" User-Specified Commands: {{{1 +" ======================= +syn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vimCtrlChar,vimEscapeBrace,vimFilter,vimFunc,vimFunction,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine +syn keyword vimUserCommand contained com[mand] +syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserCommand,@vimUserCmdList +syn match vimUserAttrb contained "-n\%[args]=[01*?+]" contains=vimUserAttrbKey,vimOper +syn match vimUserAttrb contained "-com\%[plete]=" contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError +syn match vimUserAttrb contained "-ra\%[nge]\(=%\|=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey +syn match vimUserAttrb contained "-cou\%[nt]=\d\+" contains=vimNumber,vimOper,vimUserAttrbKey +syn match vimUserAttrb contained "-bang\=\>" contains=vimOper,vimUserAttrbKey +syn match vimUserAttrb contained "-bar\>" contains=vimOper,vimUserAttrbKey +syn match vimUserAttrb contained "-re\%[gister]\>" contains=vimOper,vimUserAttrbKey +syn match vimUserCmdError contained "\S\+\>" +syn case ignore +syn keyword vimUserAttrbKey contained bar ban[g] cou[nt] ra[nge] com[plete] n[args] re[gister] +syn keyword vimUserAttrbCmplt contained augroup buffer command dir environment event expression file function help highlight mapping menu option tag tag_listfiles var +syn case match +syn match vimUserAttrbCmplt contained "custom,\u\w*" + +" Errors: {{{1 +" ====== +syn match vimElseIfErr "\<else\s\+if\>" + +" Lower Priority Comments: after some vim commands... {{{1 +" ======================= +syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString +syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentString +syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString +syn region vimCommentString contained oneline start='\S\s\+"'ms=s+1 end='"' + +" Environment Variables: {{{1 +" ===================== +syn match vimEnvvar "\$\I\i*" +syn match vimEnvvar "\${\I\i*}" + +" In-String Specials: {{{1 +" Try to catch strings, if nothing else matches (therefore it must precede the others!) +" vimEscapeBrace handles ["] []"] (ie. "s don't terminate string inside []) +syn region vimEscapeBrace oneline contained transparent start="[^\\]\(\\\\\)*\[\^\=\]\=" skip="\\\\\|\\\]" end="\]"me=e-1 +syn match vimPatSepErr contained "\\)" +syn match vimPatSep contained "\\|" +syn region vimPatSepZone oneline contained transparent matchgroup=vimPatSep start="\\%\=(" skip="\\\\" end="\\)" contains=@vimStringGroup +syn region vimPatSepZone oneline contained matchgroup=vimPatSep start="\\%\=(" skip="\\\\" end="\\)" contains=@vimStringGroup +syn region vimPatRegion contained transparent matchgroup=vimPatSep start="\\[z%]\=(" end="\\)" contains=@vimSubstList oneline +syn match vimNotPatSep contained "\\\\" +syn cluster vimStringGroup contains=vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone +syn region vimString oneline keepend start=+[^:a-zA-Z>!\\]"+lc=1 skip=+\\\\\|\\"+ end=+"+ contains=@vimStringGroup +syn region vimString oneline keepend start=+[^:a-zA-Z>!\\]'+lc=1 end=+'+ contains=@vimStringGroup +syn region vimString oneline start=+=!+lc=1 skip=+\\\\\|\\!+ end=+!+ contains=@vimStringGroup +syn region vimString oneline start="=+"lc=1 skip="\\\\\|\\+" end="+" contains=@vimStringGroup +syn region vimString oneline start="[^\\]+\s*[^a-zA-Z0-9. \t]"lc=1 skip="\\\\\|\\+" end="+" contains=@vimStringGroup +syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup +syn match vimString contained +"[^"]*\\$+ skipnl nextgroup=vimStringCont +syn match vimStringCont contained +\(\\\\\|.\)\{-}[^\\]"+ + +" Substitutions: {{{1 +" ============= +syn cluster vimSubstList contains=vimPatSep,vimPatRegion,vimPatSepErr,vimSubstTwoBS,vimSubstRange,vimNotation +syn cluster vimSubstRepList contains=vimSubstSubstr,vimSubstTwoBS,vimNotation +syn cluster vimSubstList add=vimCollection +syn match vimSubst "\(:\+\s*\|^\s*\||\s*\)\<s\%[ubstitute][:[:alpha:]]\@!" nextgroup=vimSubstPat +syn match vimSubst "s\%[ubstitute][:[:alpha:]]\@!" nextgroup=vimSubstPat contained +syn match vimSubst "/\zss\%[ubstitute]\ze/" nextgroup=vimSubstPat +syn match vimSubst1 contained "s\%[ubstitute]\>" nextgroup=vimSubstPat +syn region vimSubstPat contained matchgroup=vimSubstDelim start="\z([^a-zA-Z( \t[\]&]\)"rs=s+1 skip="\\\\\|\\\z1" end="\z1"re=e-1,me=e-1 contains=@vimSubstList nextgroup=vimSubstRep4 oneline +syn region vimSubstRep4 contained matchgroup=vimSubstDelim start="\z(.\)" skip="\\\\\|\\\z1" end="\z1" matchgroup=vimNotation end="<[cC][rR]>" contains=@vimSubstRepList nextgroup=vimSubstFlagErr oneline +syn region vimCollection contained transparent start="\\\@<!\[" skip="\\\[" end="\]" contains=vimCollClass +syn match vimCollClassErr contained "\[:.\{-\}:\]" +syn match vimCollClass contained transparent "\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|return\|tab\|escape\|backspace\):\]" +syn match vimSubstSubstr contained "\\z\=\d" +syn match vimSubstTwoBS contained "\\\\" +syn match vimSubstFlagErr contained "[^< \t\r]\+" contains=vimSubstFlags +syn match vimSubstFlags contained "[&cegiIpr]\+" + +" 'String': {{{1 +syn match vimString "[^(,]'[^']\{-}'"lc=1 contains=@vimStringGroup + +" Marks, Registers, Addresses, Filters: {{{1 +syn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimOper,vimMarkNumber,vimSubst +syn match vimMark "'[<>]\ze[-+,!]" nextgroup=vimOper,vimMarkNumber,vimSubst +syn match vimMark ",\zs'[<>]\ze" nextgroup=vimOper,vimMarkNumber,vimSubst +syn match vimMark "[!,:]\zs'[a-zA-Z0-9]" nextgroup=vimOper,vimMarkNumber,vimSubst +syn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimOper,vimMarkNumber,vimSubst +syn match vimMarkNumber "[-+]\d\+" nextgroup=vimSubst contained contains=vimOper +syn match vimPlainMark contained "'[a-zA-Z0-9]" + +syn match vimRegister '[^(,;.]"[a-zA-Z0-9.%#:_\-/][^a-zA-Z_"]'lc=1,me=e-1 +syn match vimRegister '\<norm\s\+"[a-zA-Z0-9]'lc=5 +syn match vimRegister '\<normal\s\+"[a-zA-Z0-9]'lc=7 +syn match vimPlainRegister contained '"[a-zA-Z0-9\-:.%#*+=]' + +syn match vimAddress ",[.$]"lc=1 skipwhite nextgroup=vimSubst1 +syn match vimAddress "%\a"me=e-1 skipwhite nextgroup=vimString,vimSubst1 + +syn match vimFilter contained "^!.\{-}\(|\|$\)" contains=vimSpecFile +syn match vimFilter contained "\A!.\{-}\(|\|$\)"ms=s+1 contains=vimSpecFile + +" Complex repeats (:h complex-repeat) {{{1 +syn match vimCmplxRepeat '[^a-zA-Z_/\\]q[0-9a-zA-Z"]'lc=1 +syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\)' + +" Set command and associated set-options (vimOptions) with comment {{{1 +syn region vimSet matchgroup=vimCommand start="\<setlocal\|set\>" end="|"me=e-1 end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod +syn region vimSetEqual contained start="=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation +syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar +syn match vimSetSep contained "[,:]" +syn match vimSetMod contained "&vim\|[!&]\|all&" + +" Let {{{1 +" === +syn keyword vimLet let unl[et] skipwhite nextgroup=vimVar + +" Autocmd {{{1 +" ======= +syn match vimAutoEventList contained "\(!\s\+\)\=\(\a\+,\)*\a\+" contains=vimAutoEvent nextgroup=vimAutoCmdSpace +syn match vimAutoCmdSpace contained "\s\+" nextgroup=vimAutoCmdSfxList +syn match vimAutoCmdSfxList contained "\S*" +syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList + +" Echo and Execute -- prefer strings! {{{1 +" ================ +syn region vimEcho oneline excludenl matchgroup=vimCommand start="\<ec\%[ho]\>" skip="\(\\\\\)*\\|" end="$\||" contains=vimFunc,vimString,varVar +syn region vimExecute oneline excludenl matchgroup=vimCommand start="\<exe\%[cute]\>" skip="\(\\\\\)*\\|" end="$\||\|<[cC][rR]>" contains=vimIsCommand,vimString,vimOper,vimVar,vimNotation +syn match vimEchoHL "echohl\=" skipwhite nextgroup=vimGroup,vimHLGroup,vimEchoHLNone +syn case ignore +syn keyword vimEchoHLNone none +syn case match + +" Maps {{{1 +" ==== +syn cluster vimMapGroup contains=vimMapBang,vimMapLhs,vimMapMod +syn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] map nm[ap] nn[oremap] no[remap] om[ap] ono[remap] vm[ap] vn[oremap] skipwhite nextgroup=@vimMapGroup +syn match vimMapLhs contained "\S\+" contains=vimNotation,vimCtrlChar +syn match vimMapBang contained "!" skipwhite nextgroup=vimMapLhs +syn match vimMapMod contained "\c<\(buffer\|\(local\)\=leader\|plug\|script\|sid\|unique\|silent\)\+>" skipwhite contains=vimMapModKey,vimMapModErr nextgroup=@vimMapGroup +syn case ignore +syn keyword vimMapModKey contained buffer leader localleader plug script sid silent unique +syn case match + +" Menus {{{1 +" ===== +syn cluster vimMenuList contains=vimMenuBang,vimMenuPriority,vimMenuName,vimMenuMod +syn keyword vimCommand am[enu] an[oremenu] aun[menu] cme[nu] cnoreme[nu] cunme[nu] ime[nu] inoreme[nu] iunme[nu] me[nu] nme[nu] nnoreme[nu] noreme[nu] nunme[nu] ome[nu] onoreme[nu] ounme[nu] unme[nu] vme[nu] vnoreme[nu] vunme[nu] skipwhite nextgroup=@vimMenuList +syn match vimMenuName "[^ \t\\<]\+" contained nextgroup=vimMenuNameMore,vimMenuMap +syn match vimMenuPriority "\d\+\(\.\d\+\)*" contained skipwhite nextgroup=vimMenuName +syn match vimMenuNameMore "\c\\\s\|<tab>\|\\\." contained nextgroup=vimMenuName,vimMenuNameMore contains=vimNotation +syn match vimMenuMod contained "\c<\(script\|silent\)\+>" skipwhite contains=vimMapModKey,vimMapModErr nextgroup=@vimMenuList +syn match vimMenuMap "\s" contained skipwhite nextgroup=vimMenuRhs +syn match vimMenuRhs ".*$" contained contains=vimString,vimComment,vimIsCommand +syn match vimMenuBang "!" contained skipwhite nextgroup=@vimMenuList + +" Angle-Bracket Notation (tnx to Michael Geddes) {{{1 +" ====================== +syn case ignore +syn match vimNotation "\(\\\|<lt>\)\=<\([scam]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cr\|lf\|linefeed\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|space\|k\=\(page\)\=\(\|down\|up\)\)>" contains=vimBracket +syn match vimNotation "\(\\\|<lt>\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>" contains=vimBracket +syn match vimNotation "\(\\\|<lt>\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>" contains=vimBracket +syn match vimNotation '\(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket +syn match vimNotation '\(\\\|<lt>\)\=<\(line[12]\|count\|bang\|reg\|args\|lt\|[qf]-args\)>' contains=vimBracket +syn match vimNotation "\(\\\|<lt>\)\=<\([cas]file\|abuf\|amatch\|cword\|cWORD\|client\)>" contains=vimBracket +syn match vimBracket contained "[\\<>]" +syn case match + +" User Function Highlighting (following Gautam Iyer's suggestion) +" ========================== +syn match vimFunc "\%([sS]:\|<[sS][iI][dD]>\)\=\I\i*\ze\s*(" contains=vimUserFunc,vimFuncName +syn match vimUserFunc "\%([sS]:\|<[sS][iI][dD]>\)\i\+\|\<\u\i*\>\|\<if\>" contained contains=vimNotation,vimCommand + +" Syntax {{{1 +"======= +syn match vimGroupList contained "@\=[^ \t,]*" contains=vimGroupSpecial,vimPatSep +syn match vimGroupList contained "@\=[^ \t,]*," nextgroup=vimGroupList contains=vimGroupSpecial,vimPatSep +syn keyword vimGroupSpecial contained ALL ALLBUT +syn match vimSynError contained "\i\+" +syn match vimSynError contained "\i\+=" nextgroup=vimGroupList +syn match vimSynContains contained "\<contain\(s\|edin\)=" nextgroup=vimGroupList +syn match vimSynKeyContainedin contained "\<containedin=" nextgroup=vimGroupList +syn match vimSynNextgroup contained "nextgroup=" nextgroup=vimGroupList + +syn match vimSyntax "\<sy\%[ntax]\>" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment +syn match vimAuSyntax contained "\s+sy\%[ntax]" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment + +" Syntax: case {{{1 +syn keyword vimSynType contained case skipwhite nextgroup=vimSynCase,vimSynCaseError +syn match vimSynCaseError contained "\i\+" +syn keyword vimSynCase contained ignore match + +" Syntax: clear {{{1 +syn keyword vimSynType contained clear skipwhite nextgroup=vimGroupList + +" Syntax: cluster {{{1 +syn keyword vimSynType contained cluster skipwhite nextgroup=vimClusterName +syn region vimClusterName contained matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" matchgroup=vimSep end="$\||" contains=vimGroupAdd,vimGroupRem,vimSynContains,vimSynError +syn match vimGroupAdd contained "add=" nextgroup=vimGroupList +syn match vimGroupRem contained "remove=" nextgroup=vimGroupList + +" Syntax: include {{{1 +syn keyword vimSynType contained include skipwhite nextgroup=vimGroupList + +" Syntax: keyword {{{1 +syn cluster vimSynKeyGroup contains=vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin +syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion +syn region vimSynKeyRegion contained keepend matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" matchgroup=vimSep end="|\|$" contains=@vimSynKeyGroup +syn match vimSynKeyOpt contained "\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>" + +" Syntax: match {{{1 +syn cluster vimSynMtchGroup contains=vimMtchComment,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation +syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion +syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\k\+" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup +syn match vimSynMtchOpt contained "\<\(conceal\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>" +if has("conceal") + syn match vimSynMtchOpt contained "\<cchar=" nextgroup=VimSynMtchCchar + syn match vimSynMtchCchar contained "." +endif + +" Syntax: off and on {{{1 +syn keyword vimSynType contained enable list manual off on reset + +" Syntax: region {{{1 +syn cluster vimSynRegPatGroup contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange,vimSubstSubstr,vimPatRegion,vimPatSepErr,vimNotation +syn cluster vimSynRegGroup contains=vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp +syn keyword vimSynType contained region skipwhite nextgroup=vimSynRegion +syn region vimSynRegion contained keepend matchgroup=vimGroupName start="\k\+" skip="\\\\\|\\|" end="|\|$" contains=@vimSynRegGroup +syn match vimSynRegOpt contained "\<\(conceal\(ends\)\=\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>" +syn match vimSynReg contained "\(start\|skip\|end\)="he=e-1 nextgroup=vimSynRegPat +syn match vimSynMtchGrp contained "matchgroup=" nextgroup=vimGroup,vimHLGroup +syn region vimSynRegPat contained extend start="\z([-`~!@#$%^&*_=+;:'",./?]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSynRegPatGroup skipwhite nextgroup=vimSynPatMod,vimSynReg +syn match vimSynPatMod contained "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=" +syn match vimSynPatMod contained "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=," nextgroup=vimSynPatMod +syn match vimSynPatMod contained "lc=\d\+" +syn match vimSynPatMod contained "lc=\d\+," nextgroup=vimSynPatMod +syn region vimSynPatRange contained start="\[" skip="\\\\\|\\]" end="]" +syn match vimSynNotPatRange contained "\\\\\|\\\[" +syn match vimMtchComment contained '"[^"]\+$' + +" Syntax: sync {{{1 +" ============ +syn keyword vimSynType contained sync skipwhite nextgroup=vimSyncC,vimSyncLines,vimSyncMatch,vimSyncError,vimSyncLinecont,vimSyncRegion +syn match vimSyncError contained "\i\+" +syn keyword vimSyncC contained ccomment clear fromstart +syn keyword vimSyncMatch contained match skipwhite nextgroup=vimSyncGroupName +syn keyword vimSyncRegion contained region skipwhite nextgroup=vimSynReg +syn keyword vimSyncLinecont contained linecont skipwhite nextgroup=vimSynRegPat +syn match vimSyncLines contained "\(min\|max\)\=lines=" nextgroup=vimNumber +syn match vimSyncGroupName contained "\k\+" skipwhite nextgroup=vimSyncKey +syn match vimSyncKey contained "\<groupthere\|grouphere\>" skipwhite nextgroup=vimSyncGroup +syn match vimSyncGroup contained "\k\+" skipwhite nextgroup=vimSynRegPat,vimSyncNone +syn keyword vimSyncNone contained NONE + +" Additional IsCommand, here by reasons of precedence {{{1 +" ==================== +syn match vimIsCommand "<Bar>\s*\a\+" transparent contains=vimCommand,vimNotation + +" Highlighting {{{1 +" ============ +syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,vimComment +syn match vimHighlight "\<hi\%[ghlight]\>" skipwhite nextgroup=vimHiBang,@vimHighlightCluster +syn match vimHiBang contained "!" skipwhite nextgroup=@vimHighlightCluster + +syn match vimHiGroup contained "\i\+" +syn case ignore +syn keyword vimHiAttrib contained none bold inverse italic reverse standout underline +syn keyword vimFgBgAttrib contained none bg background fg foreground +syn case match +syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib +syn match vimHiAttribList contained "\i\+,"he=e-1 contains=vimHiAttrib nextgroup=vimHiAttribList +syn case ignore +syn keyword vimHiCtermColor contained black blue brown cyan darkBlue darkcyan darkgray darkgreen darkgrey darkmagenta darkred darkyellow gray green grey lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightred magenta red white yellow + +syn case match +syn match vimHiFontname contained "[a-zA-Z\-*]\+" +syn match vimHiGuiFontname contained "'[a-zA-Z\-* ]\+'" +syn match vimHiGuiRgb contained "#\x\{6}" +syn match vimHiCtermError contained "[^0-9]\i*" + +" Highlighting: hi group key=arg ... {{{1 +syn cluster vimHiCluster contains=vimHiGroup,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError,vimNotation +syn region vimHiKeyList contained oneline start="\i\+" skip="\\\\\|\\|" end="$\||" contains=@vimHiCluster +syn match vimHiKeyError contained "\i\+="he=e-1 +syn match vimHiTerm contained "\cterm="he=e-1 nextgroup=vimHiAttribList +syn match vimHiStartStop contained "\c\(start\|stop\)="he=e-1 nextgroup=vimHiTermcap,vimOption +syn match vimHiCTerm contained "\ccterm="he=e-1 nextgroup=vimHiAttribList +syn match vimHiCtermFgBg contained "\ccterm[fb]g="he=e-1 nextgroup=vimNumber,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError +syn match vimHiGui contained "\cgui="he=e-1 nextgroup=vimHiAttribList +syn match vimHiGuiFont contained "\cfont="he=e-1 nextgroup=vimHiFontname +syn match vimHiGuiFgBg contained "\cgui[fb]g="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib +syn match vimHiTermcap contained "\S\+" contains=vimNotation + +" Highlight: clear {{{1 +syn keyword vimHiClear contained clear nextgroup=vimHiGroup + +" Highlight: link {{{1 +syn region vimHiLink contained oneline matchgroup=vimCommand start="\<\(def\s\+\)\=link\>\|\<def\>" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation + +" Control Characters {{{1 +" ================== +syn match vimCtrlChar "[--]" + +" Beginners - Patterns that involve ^ {{{1 +" ========= +syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle +syn match vimCommentTitle '"\s*\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup +syn match vimContinue "^\s*\\" +syn region vimString start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue +syn match vimCommentTitleLeader '"\s\+'ms=s+1 contained + +" Scripts : perl,ruby : Benoit Cerrina {{{1 +" ======= python,tcl: Johannes Zellner + +" allow users to prevent embedded script syntax highlighting +" when vim doesn't have perl/python/ruby/tcl support. Do +" so by setting g:vimembedscript= 0 in the user's <.vimrc>. +if !exists("g:vimembedscript") + let g:vimembedscript= 1 +endif + +" [-- perl --] {{{2 +if (has("perl") || g:vimembedscript) && filereadable(expand("<sfile>:p:h")."/perl.vim") + unlet! b:current_syntax + syn include @vimPerlScript <sfile>:p:h/perl.vim + syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPerlScript + syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ contains=@vimPerlScript +endif + +" [-- ruby --] {{{2 +if (has("ruby") || g:vimembedscript) && filereadable(expand("<sfile>:p:h")."/ruby.vim") + unlet! b:current_syntax + syn include @vimRubyScript <sfile>:p:h/ruby.vim + syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimRubyScript + syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*$+ end=+\.$+ contains=@vimRubyScript +endif + +" [-- python --] {{{2 +if (has("python") || g:vimembedscript) && filereadable(expand("<sfile>:p:h")."/python.vim") + unlet! b:current_syntax + syn include @vimPythonScript <sfile>:p:h/python.vim + syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript + syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript +endif + +" [-- tcl --] {{{2 +if (has("tcl") || g:vimembedscript) && filereadable(expand("<sfile>:p:h")."/tcl.vim") + unlet! b:current_syntax + syn include @vimTclScript <sfile>:p:h/tcl.vim + syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimTclScript + syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+ contains=@vimTclScript +endif + +" Synchronize (speed) {{{1 +"============ +if exists("g:vim_minlines") + exe "syn sync minlines=".g:vim_minlines +endif +if exists("g:vim_maxlines") + exe "syn sync maxlines=".g:vim_maxlines +else + syn sync maxlines=60 +endif +syn sync linecont "^\s\+\\" +syn sync match vimAugroupSyncA groupthere NONE "\<aug\%[roup]\>\s\+[eE][nN][dD]" + +" Highlighting Settings {{{1 +" ==================== + +hi def link vimAuHighlight vimHighlight +hi def link vimSubst1 vimSubst +hi def link vimBehaveModel vimBehave + +hi def link vimAddress vimMark +" hi def link vimAugroupError vimError +hi def link vimAugroupKey vimCommand +hi def link vimAutoCmdOpt vimOption +hi def link vimAutoCmd vimCommand +hi def link vimAutoSet vimCommand +hi def link vimBehaveError vimError +hi def link vimBehave vimCommand +hi def link vimCollClassErr vimError +hi def link vimCommentString vimString +hi def link vimCondHL vimCommand +hi def link vimEchoHLNone vimGroup +hi def link vimEchoHL vimCommand +hi def link vimElseif vimCondHL +hi def link vimErrSetting vimError +hi def link vimFgBgAttrib vimHiAttrib +hi def link vimFTCmd vimCommand +hi def link vimFTError vimError +hi def link vimFTOption vimSynType +hi def link VimFunc vimError +hi def link vimFuncKey vimCommand +hi def link vimFunctionError vimError +hi def link vimGroupAdd vimSynOption +hi def link vimGroupRem vimSynOption +hi def link vimHiAttribList vimError +hi def link vimHiCtermError vimError +hi def link vimHiCtermFgBg vimHiTerm +hi def link vimHiCTerm vimHiTerm +hi def link vimHighlight vimCommand +hi def link vimHiGroup vimGroupName +hi def link vimHiGuiFgBg vimHiTerm +hi def link vimHiGuiFont vimHiTerm +hi def link vimHiGuiRgb vimNumber +hi def link vimHiGui vimHiTerm +hi def link vimHiKeyError vimError +hi def link vimHiStartStop vimHiTerm +hi def link vimHLGroup vimGroup +hi def link vimInsert vimString +hi def link vimKeyCodeError vimError +hi def link vimKeyCode vimSpecFile +hi def link vimLet vimCommand +hi def link vimLineComment vimComment +hi def link vimMapBang vimCommand +hi def link vimMapModErr vimError +hi def link vimMapModKey vimFuncSID +hi def link vimMapMod vimBracket +hi def link vimMap vimCommand +hi def link vimMarkNumber vimNumber +hi def link vimMenuMod vimMapMod +hi def link vimMenuNameMore vimMenuName +hi def link vimMtchComment vimComment +hi def link vimNotFunc vimCommand +hi def link vimNotPatSep vimString +hi def link vimPatSepErr vimPatSep +hi def link vimPatSepZone vimString +hi def link vimPlainMark vimMark +hi def link vimPlainRegister vimRegister +hi def link vimSetMod vimOption +hi def link vimSetString vimString +hi def link vimSpecFileMod vimSpecFile +hi def link vimStringCont vimString +hi def link vimSubstFlagErr vimError +hi def link vimSubstTwoBS vimString +hi def link vimSubst vimCommand +hi def link vimSynCaseError vimError +hi def link vimSyncGroupName vimGroupName +hi def link vimSyncGroup vimGroupName +hi def link vimSynContains vimSynOption +hi def link vimSynKeyContainedin vimSynContains +hi def link vimSynKeyOpt vimSynOption +hi def link vimSynMtchGrp vimSynOption +hi def link vimSynMtchOpt vimSynOption +hi def link vimSynNextgroup vimSynOption +hi def link vimSynNotPatRange vimSynRegPat +hi def link vimSynPatRange vimString +hi def link vimSynRegOpt vimSynOption +hi def link vimSynRegPat vimString +hi def link vimSyntax vimCommand +hi def link vimSynType vimSpecial +hi def link vimUserAttrbCmplt vimSpecial +hi def link vimUserAttrbKey vimOption +hi def link vimUserAttrb vimSpecial +hi def link vimUserCommand vimCommand +hi def link vimUserFunc Normal + +hi def link vimAutoEvent Type +hi def link vimBracket Delimiter +hi def link vimCmplxRepeat SpecialChar +hi def link vimCommand Statement +hi def link vimComment Comment +hi def link vimCommentTitle PreProc +hi def link vimContinue Special +hi def link vimCtrlChar SpecialChar +hi def link vimElseIfErr Error +hi def link vimEnvvar PreProc +hi def link vimError Error +hi def link vimFold Folded +hi def link vimFuncName Function +hi def link vimFuncSID Special +hi def link vimFuncVar Identifier +hi def link vimGroup Type +hi def link vimGroupSpecial Special +hi def link vimHLMod PreProc +hi def link vimHiAttrib PreProc +hi def link vimHiTerm Type +hi def link vimKeyword Statement +hi def link vimMark Number +hi def link vimMenuName PreProc +hi def link vimNotation Special +hi def link vimNumber Number +hi def link vimOper Operator +hi def link vimOption PreProc +hi def link vimOperError Error +hi def link vimPatSep SpecialChar +hi def link vimPattern Type +hi def link vimRegister SpecialChar +hi def link vimScriptDelim Comment +hi def link vimSep Delimiter +hi def link vimSetSep Statement +hi def link vimSpecFile Identifier +hi def link vimSpecial Type +hi def link vimStatement Statement +hi def link vimString String +hi def link vimSubstDelim Delimiter +hi def link vimSubstFlags Special +hi def link vimSubstSubstr SpecialChar +hi def link vimSynCase Type +hi def link vimSynCaseError Error +hi def link vimSynError Error +hi def link vimSynOption Special +hi def link vimSynReg Type +hi def link vimSyncC Type +hi def link vimSyncError Error +hi def link vimSyncKey Type +hi def link vimSyncNone Type +hi def link vimTodo Todo +hi def link vimUserCmdError Error + +" Current Syntax Variable: {{{1 +let b:current_syntax = "vim" +" vim:ts=18 fdm=marker diff --git a/runtime/syntax/viminfo.vim b/runtime/syntax/viminfo.vim new file mode 100644 index 000000000..46d5b892a --- /dev/null +++ b/runtime/syntax/viminfo.vim @@ -0,0 +1,53 @@ +" Vim syntax file +" Language: Vim .viminfo file +" Maintainer: Bram Moolenaar <Bram@vim.org> +" Last Change: 2001 Apr 25 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" The lines that are NOT recognized +syn match viminfoError "^[^\t].*" + +" The one-character one-liners that are recognized +syn match viminfoStatement "^[/&$@:?=%!<]" + +" The two-character one-liners that are recognized +syn match viminfoStatement "^[-'>"]." +syn match viminfoStatement +^"".+ +syn match viminfoStatement "^\~[/&]" +syn match viminfoStatement "^\~[hH]" +syn match viminfoStatement "^\~[mM][sS][lL][eE]\d\+\~\=[/&]" + +syn match viminfoOption "^\*.*=" contains=viminfoOptionName +syn match viminfoOptionName "\*\a*"ms=s+1 contained + +" Comments +syn match viminfoComment "^#.*" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_viminfo_syntax_inits") + if version < 508 + let did_viminfo_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink viminfoComment Comment + HiLink viminfoError Error + HiLink viminfoStatement Statement + + delcommand HiLink +endif + +let b:current_syntax = "viminfo" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/virata.vim b/runtime/syntax/virata.vim new file mode 100644 index 000000000..e597b8e31 --- /dev/null +++ b/runtime/syntax/virata.vim @@ -0,0 +1,219 @@ +" Vim syntax file +" Language: Virata AConfig Configuration Script +" Maintainer: Manuel M.H. Stol <mmh.stol@gmx.net> +" Last Change: 2003 May 11 +" Vim URL: http://www.vim.org/lang.html +" Virata URL: http://www.globespanvirata.com/ + + +" Virata AConfig Configuration Script syntax +" Can be detected by: 1) Extension .hw, .sw, .pkg and .module +" 2) The file name pattern "mk.*\.cfg" +" 3) The string "Virata" in the first 5 lines + + +" Setup Syntax: +if version < 600 + " Clear old syntax settings + syn clear +elseif exists("b:current_syntax") + finish +endif +" Virata syntax is case insensitive (mostly) +syn case ignore + + + +" Comments: +" Virata comments start with %, but % is not a keyword character +syn region virataComment start="^%" start="\s%"lc=1 keepend end="$" contains=@virataGrpInComments +syn region virataSpclComment start="^%%" start="\s%%"lc=1 keepend end="$" contains=@virataGrpInComments +syn keyword virataInCommentTodo contained TODO FIXME XXX[XXXXX] REVIEW TBD +syn cluster virataGrpInComments contains=virataInCommentTodo +syn cluster virataGrpComments contains=@virataGrpInComments,virataComment,virataSpclComment + + +" Constants: +syn match virataStringError +["]+ +syn region virataString start=+"+ skip=+\(\\\\\|\\"\)+ end=+"+ oneline contains=virataSpclCharError,virataSpclChar,@virataGrpDefSubsts +syn match virataCharacter +'[^']\{-}'+ contains=virataSpclCharError,virataSpclChar +syn match virataSpclChar contained +\\\(x\x\+\|\o\{1,3}\|['\"?\\abefnrtv]\)+ +syn match virataNumberError "\<\d\{-1,}\I\{-1,}\>" +syn match virataNumberError "\<0x\x*\X\x*\>" +syn match virataNumberError "\<\d\+\.\d*\(e[+-]\=\d\+\)\=\>" +syn match virataDecNumber "\<\d\+U\=L\=\>" +syn match virataHexNumber "\<0x\x\+U\=L\=\>" +syn match virataSizeNumber "\<\d\+[BKM]\>"he=e-1 +syn match virataSizeNumber "\<\d\+[KM]B\>"he=e-2 +syn cluster virataGrpNumbers contains=virataNumberError,virataDecNumber,virataHexNumber,virataSizeNumber +syn cluster virataGrpConstants contains=@virataGrpNumbers,virataStringError,virataString,virataCharacter,virataSpclChar + + +" Identifiers: +syn match virataIdentError contained "\<\D\S*\>" +syn match virataIdentifier contained "\<\I\i\{-}\(\-\i\{-1,}\)*\>" contains=@virataGrpDefSubsts +syn match virataFileIdent contained "\F\f*" contains=@virataGrpDefSubsts +syn cluster virataGrpIdents contains=virataIdentifier,virataIdentError +syn cluster virataGrpFileIdents contains=virataFileIdent,virataIdentError + + +" Statements: +syn match virataStatement "^\s*Config\(\(/Kernel\)\=\.\(hs\=\|s\)\)\=\>" +syn match virataStatement "^\s*Config\s\+\I\i\{-}\(\-\i\{-1,}\)*\.\(hs\=\|s\)\>" +syn match virataStatement "^\s*Make\.\I\i\{-}\(\-\i\{-1}\)*\>" skipwhite nextgroup=@virataGrpIdents +syn match virataStatement "^\s*Make\.c\(at\)\=++\s"me=e-1 skipwhite nextgroup=@virataGrpIdents +syn match virataStatement "^\s*\(Architecture\|GetEnv\|Reserved\|\(Un\)\=Define\|Version\)\>" skipwhite nextgroup=@virataGrpIdents +syn match virataStatement "^\s*\(Hardware\|ModuleSource\|\(Release\)\=Path\|Software\)\>" skipwhite nextgroup=@virataGrpFileIdents +syn match virataStatement "^\s*\(DefaultPri\|Hydrogen\)\>" skipwhite nextgroup=virataDecNumber,virataNumberError +syn match virataStatement "^\s*\(NoInit\|PCI\|SysLink\)\>" +syn match virataStatement "^\s*Allow\s\+\(ModuleConfig\)\>" +syn match virataStatement "^\s*NoWarn\s\+\(Export\|Parse\=able\|Relative]\)\>" +syn match virataStatement "^\s*Debug\s\+O\(ff\|n\)\>" + +" Import (Package <exec>|Module <name> from <dir>) +syn region virataImportDef transparent matchgroup=virataStatement start="^\s*Import\>" keepend end="$" contains=virataInImport,virataModuleDef,virataNumberError,virataStringError,@virataGrpDefSubsts +syn match virataInImport contained "\<\(Module\|Package\|from\)\>" skipwhite nextgroup=@virataGrpFileIdents +" Export (Header <header file>|SLibrary <obj file>) +syn region virataExportDef transparent matchgroup=virataStatement start="^\s*Export\>" keepend end="$" contains=virataInExport,virataNumberError,virataStringError,@virataGrpDefSubsts +syn match virataInExport contained "\<\(Header\|[SU]Library\)\>" skipwhite nextgroup=@virataGrpFileIdents +" Process <name> is <dir/exec> +syn region virataProcessDef transparent matchgroup=virataStatement start="^\s*Process\>" keepend end="$" contains=virataInProcess,virataInExec,virataNumberError,virataStringError,@virataGrpDefSubsts,@virataGrpIdents +syn match virataInProcess contained "\<is\>" +" Instance <name> of <module> +syn region virataInstanceDef transparent matchgroup=virataStatement start="^\s*Instance\>" keepend end="$" contains=virataInInstance,virataNumberError,virataStringError,@virataGrpDefSubsts,@virataGrpIdents +syn match virataInInstance contained "\<of\>" +" Module <name> from <dir> +syn region virataModuleDef transparent matchgroup=virataStatement start="^\s*\(Package\|Module\)\>" keepend end="$" contains=virataInModule,virataNumberError,virataStringError,@virataGrpDefSubsts +syn match virataInModule contained "^\s*Package\>"hs=e-7 skipwhite nextgroup=@virataGrpIdents +syn match virataInModule contained "^\s*Module\>"hs=e-6 skipwhite nextgroup=@virataGrpIdents +syn match virataInModule contained "\<from\>" skipwhite nextgroup=@virataGrpFileIdents +" Colour <name> from <dir> +syn region virataColourDef transparent matchgroup=virataStatement start="^\s*Colour\>" keepend end="$" contains=virataInColour,virataNumberError,virataStringError,@virataGrpDefSubsts +syn match virataInColour contained "^\s*Colour\>"hs=e-6 skipwhite nextgroup=@virataGrpIdents +syn match virataInColour contained "\<from\>" skipwhite nextgroup=@virataGrpFileIdents +" Link {<link cmds>} +" Object {Executable [<ExecOptions>]} +syn match virataStatement "^\s*\(Link\|Object\)" +" Executable <name> [<ExecOptions>] +syn region virataExecDef transparent matchgroup=virataStatement start="^\s*Executable\>" keepend end="$" contains=virataInExec,virataNumberError,virataStringError +syn match virataInExec contained "^\s*Executable\>" skipwhite nextgroup=@virataGrpDefSubsts,@virataGrpIdents +syn match virataInExec contained "\<\(epilogue\|pro\(logue\|cess\)\|qhandler\)\>" skipwhite nextgroup=@virataGrpDefSubsts,@virataGrpIdents +syn match virataInExec contained "\<\(priority\|stack\)\>" skipwhite nextgroup=@virataGrpDefSubsts,@virataGrpNumbers +" Message <name> {<msg format>} +" MessageId <number> +syn match virataStatement "^\s*Message\(Id\)\=\>" skipwhite nextgroup=@virataGrpNumbers +" MakeRule <make suffix=file> {<make cmds>} +syn region virataMakeDef transparent matchgroup=virataStatement start="^\s*MakeRule\>" keepend end="$" contains=virataInMake,@virataGrpDefSubsts +syn case match +syn match virataInMake contained "\<N\>" +syn case ignore +" (Append|Edit|Copy)Rule <make suffix=file> <subst cmd> +syn match virataStatement "^\s*\(Append\|Copy\|Edit\)Rule\>" +" AlterRules in <file> <subst cmd> +syn region virataAlterDef transparent matchgroup=virataStatement start="^\s*AlterRules\>" keepend end="$" contains=virataInAlter,@virataGrpDefSubsts +syn match virataInAlter contained "\<in\>" skipwhite nextgroup=@virataGrpIdents +" Clustering +syn cluster virataGrpInStatmnts contains=virataInImport,virataInExport,virataInExec,virataInProcess,virataInAlter,virataInInstance,virataInModule,virataInColour +syn cluster virataGrpStatements contains=@virataGrpInStatmnts,virataStatement,virataImportDef,virataExportDef,virataExecDef,virataProcessDef,virataAlterDef,virataInstanceDef,virataModuleDef,virataColourDef + + +" MkFlash.Cfg File Statements: +syn region virataCfgFileDef transparent matchgroup=virataCfgStatement start="^\s*Dir\>" start="^\s*\a\{-}File\>" start="^\s*OutputFile\d\d\=\>" start="^\s*\a\w\{-}[NP]PFile\>" keepend end="$" contains=@virataGrpFileIdents +syn region virataCfgSizeDef transparent matchgroup=virataCfgStatement start="^\s*\a\{-}Size\>" start="^\s*ConfigInfo\>" keepend end="$" contains=@virataGrpNumbers,@virataGrpDefSubsts,virataIdentError +syn region virataCfgNumberDef transparent matchgroup=virataCfgStatement start="^\s*FlashchipNum\(b\(er\=\)\=\)\=\>" start="^\s*Granularity\>" keepend end="$" contains=@virataGrpNumbers,@virataGrpDefSubsts +syn region virataCfgMacAddrDef transparent matchgroup=virataCfgStatement start="^\s*MacAddress\>" keepend end="$" contains=virataNumberError,virataStringError,virataIdentError,virataInMacAddr,@virataGrpDefSubsts +syn match virataInMacAddr contained "\x[:]\x\{1,2}\>"lc=2 +syn match virataInMacAddr contained "\s\x\{1,2}[:]\x"lc=1,me=e-1,he=e-2 nextgroup=virataInMacAddr +syn match virataCfgStatement "^\s*Target\>" skipwhite nextgroup=@virataGrpIdents +syn cluster virataGrpCfgs contains=virataCfgStatement,virataCfgFileDef,virataCfgSizeDef,virataCfgNumberDef,virataCfgMacAddrDef,virataInMacAddr + + + +" PreProcessor Instructions: +" Defines +syn match virataDefine "^\s*\(Un\)\=Set\>" skipwhite nextgroup=@virataGrpIdents +syn match virataInclude "^\s*Include\>" skipwhite nextgroup=@virataGrpFileIdents +syn match virataDefSubstError "[^$]\$"lc=1 +syn match virataDefSubstError "\$\(\w\|{\(.\{-}}\)\=\)" +syn case match +syn match virataDefSubst "\$\(\d\|[DINORS]\|{\I\i\{-}\(\-\i\{-1,}\)*}\)" +syn case ignore +" Conditionals +syn cluster virataGrpCntnPreCon contains=ALLBUT,@virataGrpInComments,@virataGrpFileIdents,@virataGrpInStatmnts +syn region virataPreConDef transparent matchgroup=virataPreCondit start="^\s*If\>" end="^\s*Endif\>" contains=@virataGrpCntnPreCon +syn match virataPreCondit contained "^\s*Else\(\s\+If\)\=\>" +syn region virataPreConDef transparent matchgroup=virataPreCondit start="^\s*ForEach\>" end="^\s*Done\>" contains=@virataGrpCntnPreCon +" Pre-Processors +syn region virataPreProc start="^\s*Error\>" start="^\s*Warning\>" oneline end="$" contains=@virataGrpConstants,@virataGrpDefSubsts +syn cluster virataGrpDefSubsts contains=virataDefSubstError,virataDefSubst +syn cluster virataGrpPreProcs contains=@virataGrpDefSubsts,virataDefine,virataInclude,virataPreConDef,virataPreCondit,virataPreProc + + +" Synchronize Syntax: +syn sync clear +syn sync minlines=50 "for multiple region nesting + + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later : only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_virata_syntax_inits") + if version < 508 + let did_virata_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " Sub Links: + HiLink virataDefSubstError virataPreProcError + HiLink virataDefSubst virataPreProc + HiLink virataInAlter virataOperator + HiLink virataInExec virataOperator + HiLink virataInExport virataOperator + HiLink virataInImport virataOperator + HiLink virataInInstance virataOperator + HiLink virataInMake virataOperator + HiLink virataInModule virataOperator + HiLink virataInProcess virataOperator + HiLink virataInMacAddr virataHexNumber + + " Comment Group: + HiLink virataComment Comment + HiLink virataSpclComment SpecialComment + HiLink virataInCommentTodo Todo + + " Constant Group: + HiLink virataString String + HiLink virataStringError Error + HiLink virataCharacter Character + HiLink virataSpclChar Special + HiLink virataDecNumber Number + HiLink virataHexNumber Number + HiLink virataSizeNumber Number + HiLink virataNumberError Error + + " Identifier Group: + HiLink virataIdentError Error + + " PreProc Group: + HiLink virataPreProc PreProc + HiLink virataDefine Define + HiLink virataInclude Include + HiLink virataPreCondit PreCondit + HiLink virataPreProcError Error + HiLink virataPreProcWarn Todo + + " Directive Group: + HiLink virataStatement Statement + HiLink virataCfgStatement Statement + HiLink virataOperator Operator + HiLink virataDirective Keyword + + delcommand HiLink +endif + +let b:current_syntax = "virata" + +" vim:ts=8:sw=2:noet: diff --git a/runtime/syntax/vmasm.vim b/runtime/syntax/vmasm.vim new file mode 100644 index 000000000..85d044125 --- /dev/null +++ b/runtime/syntax/vmasm.vim @@ -0,0 +1,251 @@ +" Vim syntax file +" Language: (VAX) Macro Assembly +" Maintainer: Tom Uijldert <tom.uijldert [at] cmg.nl> +" Last change: 2004 May 16 +" +" This is incomplete. Feel free to contribute... +" + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" Partial list of register symbols +syn keyword vmasmReg r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 +syn keyword vmasmReg ap fp sp pc iv dv + +" All matches - order is important! +syn keyword vmasmOpcode adawi adwc ashl ashq bitb bitw bitl decb decw decl +syn keyword vmasmOpcode ediv emul incb incw incl mcomb mcomw mcoml +syn keyword vmasmOpcode movzbw movzbl movzwl popl pushl rotl sbwc +syn keyword vmasmOpcode cmpv cmpzv cmpc3 cmpc5 locc matchc movc3 movc5 +syn keyword vmasmOpcode movtc movtuc scanc skpc spanc crc extv extzv +syn keyword vmasmOpcode ffc ffs insv aobleq aoblss bbc bbs bbcci bbssi +syn keyword vmasmOpcode blbc blbs brb brw bsbb bsbw caseb casew casel +syn keyword vmasmOpcode jmp jsb rsb sobgeq sobgtr callg calls ret +syn keyword vmasmOpcode bicpsw bispsw bpt halt index movpsl nop popr pushr xfc +syn keyword vmasmOpcode insqhi insqti insque remqhi remqti remque +syn keyword vmasmOpcode addp4 addp6 ashp cmpp3 cmpp4 cvtpl cvtlp cvtps cvtpt +syn keyword vmasmOpcode cvtsp cvttp divp movp mulp subp4 subp6 editpc +syn keyword vmasmOpcode prober probew rei ldpctx svpctx mfpr mtpr bugw bugl +syn keyword vmasmOpcode vldl vldq vgathl vgathq vstl vstq vscatl vscatq +syn keyword vmasmOpcode vvcvt iota mfvp mtvp vsync +syn keyword vmasmOpcode beql[u] bgtr[u] blss[u] +syn match vmasmOpcode "\<add[bwlfdgh][23]\>" +syn match vmasmOpcode "\<bi[cs][bwl][23]\>" +syn match vmasmOpcode "\<clr[bwlqofdgh]\>" +syn match vmasmOpcode "\<cmp[bwlfdgh]\>" +syn match vmasmOpcode "\<cvt[bwlfdgh][bwlfdgh]\>" +syn match vmasmOpcode "\<cvtr[fdgh]l\>" +syn match vmasmOpcode "\<div[bwlfdgh][23]\>" +syn match vmasmOpcode "\<emod[fdgh]\>" +syn match vmasmOpcode "\<mneg[bwlfdgh]\>" +syn match vmasmOpcode "\<mov[bwlqofdgh]\>" +syn match vmasmOpcode "\<mul[bwlfdgh][23]\>" +syn match vmasmOpcode "\<poly[fdgh]\>" +syn match vmasmOpcode "\<sub[bwlfdgh][23]\>" +syn match vmasmOpcode "\<tst[bwlfdgh]\>" +syn match vmasmOpcode "\<xor[bwl][23]\>" +syn match vmasmOpcode "\<mova[bwlfqdgho]\>" +syn match vmasmOpcode "\<push[bwlfqdgho]\>" +syn match vmasmOpcode "\<acb[bwlfgdh]\>" +syn match vmasmOpcode "\<b[lng]equ\=\>" +syn match vmasmOpcode "\<b[cv][cs]\>" +syn match vmasmOpcode "\<bb[cs][cs]\>" +syn match vmasmOpcode "\<v[vs]add[lfdg]\>" +syn match vmasmOpcode "\<v[vs]cmp[lfdg]\>" +syn match vmasmOpcode "\<v[vs]div[fdg]\>" +syn match vmasmOpcode "\<v[vs]mul[lfdg]\>" +syn match vmasmOpcode "\<v[vs]sub[lfdg]\>" +syn match vmasmOpcode "\<v[vs]bi[cs]l\>" +syn match vmasmOpcode "\<v[vs]xorl\>" +syn match vmasmOpcode "\<v[vs]merge\>" +syn match vmasmOpcode "\<v[vs]s[rl]ll\>" + +" Various number formats +syn match vmasmdecNumber "[+-]\=[0-9]\+\>" +syn match vmasmdecNumber "^d[0-9]\+\>" +syn match vmasmhexNumber "^x[0-9a-f]\+\>" +syn match vmasmoctNumber "^o[0-7]\+\>" +syn match vmasmbinNumber "^b[01]\+\>" +syn match vmasmfloatNumber "[-+]\=[0-9]\+E[-+]\=[0-9]\+" +syn match vmasmfloatNumber "[-+]\=[0-9]\+\.[0-9]*\(E[-+]\=[0-9]\+\)\=" + +" Valid labels +syn match vmasmLabel "^[a-z_$.][a-z0-9_$.]\{,30}::\=" +syn match vmasmLabel "\<[0-9]\{1,5}\$:\=" " Local label + +" Character string constants +" Too complex really. Could be "<...>" but those could also be +" expressions. Don't know how to handle chosen delimiters +" ("^<sep>...<sep>") +" syn region vmasmString start="<" end=">" oneline + +" Operators +syn match vmasmOperator "[-+*/@&!\\]" +syn match vmasmOperator "=" +syn match vmasmOperator "==" " Global assignment +syn match vmasmOperator "%length(.*)" +syn match vmasmOperator "%locate(.*)" +syn match vmasmOperator "%extract(.*)" +syn match vmasmOperator "^[amfc]" +syn match vmasmOperator "[bwlg]^" + +syn match vmasmOperator "\<\(not_\)\=equal\>" +syn match vmasmOperator "\<less_equal\>" +syn match vmasmOperator "\<greater\(_equal\)\=\>" +syn match vmasmOperator "\<less_than\>" +syn match vmasmOperator "\<\(not_\)\=defined\>" +syn match vmasmOperator "\<\(not_\)\=blank\>" +syn match vmasmOperator "\<identical\>" +syn match vmasmOperator "\<different\>" +syn match vmasmOperator "\<eq\>" +syn match vmasmOperator "\<[gl]t\>" +syn match vmasmOperator "\<n\=df\>" +syn match vmasmOperator "\<n\=b\>" +syn match vmasmOperator "\<idn\>" +syn match vmasmOperator "\<[nlg]e\>" +syn match vmasmOperator "\<dif\>" + +" Special items for comments +syn keyword vmasmTodo contained todo + +" Comments +syn match vmasmComment ";.*" contains=vmasmTodo + +" Include +syn match vmasmInclude "\.library\>" + +" Macro definition +syn match vmasmMacro "\.macro\>" +syn match vmasmMacro "\.mexit\>" +syn match vmasmMacro "\.endm\>" +syn match vmasmMacro "\.mcall\>" +syn match vmasmMacro "\.mdelete\>" + +" Conditional assembly +syn match vmasmPreCond "\.iff\=\>" +syn match vmasmPreCond "\.if_false\>" +syn match vmasmPreCond "\.iftf\=\>" +syn match vmasmPreCond "\.if_true\(_false\)\=\>" +syn match vmasmPreCond "\.iif\>" + +" Loop control +syn match vmasmRepeat "\.irpc\=\>" +syn match vmasmRepeat "\.repeat\>" +syn match vmasmRepeat "\.rept\>" +syn match vmasmRepeat "\.endr\>" + +" Directives +syn match vmasmDirective "\.address\>" +syn match vmasmDirective "\.align\>" +syn match vmasmDirective "\.asci[cdiz]\>" +syn match vmasmDirective "\.blk[abdfghloqw]\>" +syn match vmasmDirective "\.\(signed_\)\=byte\>" +syn match vmasmDirective "\.\(no\)\=cross\>" +syn match vmasmDirective "\.debug\>" +syn match vmasmDirective "\.default displacement\>" +syn match vmasmDirective "\.[dfgh]_floating\>" +syn match vmasmDirective "\.disable\>" +syn match vmasmDirective "\.double\>" +syn match vmasmDirective "\.dsabl\>" +syn match vmasmDirective "\.enable\=\>" +syn match vmasmDirective "\.endc\=\>" +syn match vmasmDirective "\.entry\>" +syn match vmasmDirective "\.error\>" +syn match vmasmDirective "\.even\>" +syn match vmasmDirective "\.external\>" +syn match vmasmDirective "\.extrn\>" +syn match vmasmDirective "\.float\>" +syn match vmasmDirective "\.globa\=l\>" +syn match vmasmDirective "\.ident\>" +syn match vmasmDirective "\.link\>" +syn match vmasmDirective "\.list\>" +syn match vmasmDirective "\.long\>" +syn match vmasmDirective "\.mask\>" +syn match vmasmDirective "\.narg\>" +syn match vmasmDirective "\.nchr\>" +syn match vmasmDirective "\.nlist\>" +syn match vmasmDirective "\.ntype\>" +syn match vmasmDirective "\.octa\>" +syn match vmasmDirective "\.odd\>" +syn match vmasmDirective "\.opdef\>" +syn match vmasmDirective "\.packed\>" +syn match vmasmDirective "\.page\>" +syn match vmasmDirective "\.print\>" +syn match vmasmDirective "\.psect\>" +syn match vmasmDirective "\.quad\>" +syn match vmasmDirective "\.ref[1248]\>" +syn match vmasmDirective "\.ref16\>" +syn match vmasmDirective "\.restore\(_psect\)\=\>" +syn match vmasmDirective "\.save\(_psect\)\=\>" +syn match vmasmDirective "\.sbttl\>" +syn match vmasmDirective "\.\(no\)\=show\>" +syn match vmasmDirective "\.\(sub\)\=title\>" +syn match vmasmDirective "\.transfer\>" +syn match vmasmDirective "\.warn\>" +syn match vmasmDirective "\.weak\>" +syn match vmasmDirective "\.\(signed_\)\=word\>" + +syn case match + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_macro_syntax_inits") + if version < 508 + let did_macro_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " The default methods for highlighting. Can be overridden later + " Comment Constant Error Identifier PreProc Special Statement Todo Type + " + " Constant Boolean Character Number String + " Identifier Function + " PreProc Define Include Macro PreCondit + " Special Debug Delimiter SpecialChar SpecialComment Tag + " Statement Conditional Exception Keyword Label Operator Repeat + " Type StorageClass Structure Typedef + + HiLink vmasmComment Comment + HiLink vmasmTodo Todo + + HiLink vmasmhexNumber Number " Constant + HiLink vmasmoctNumber Number " Constant + HiLink vmasmbinNumber Number " Constant + HiLink vmasmdecNumber Number " Constant + HiLink vmasmfloatNumber Number " Constant + +" HiLink vmasmString String " Constant + + HiLink vmasmReg Identifier + HiLink vmasmOperator Identifier + + HiLink vmasmInclude Include " PreProc + HiLink vmasmMacro Macro " PreProc + " HiLink vmasmMacroParam Keyword " Statement + + HiLink vmasmDirective Special + HiLink vmasmPreCond Special + + + HiLink vmasmOpcode Statement + HiLink vmasmCond Conditional " Statement + HiLink vmasmRepeat Repeat " Statement + + HiLink vmasmLabel Type + delcommand HiLink +endif + +let b:current_syntax = "vmasm" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/vrml.vim b/runtime/syntax/vrml.vim new file mode 100644 index 000000000..651a39b91 --- /dev/null +++ b/runtime/syntax/vrml.vim @@ -0,0 +1,239 @@ +" Vim syntax file +" Language: VRML97 +" Modified from: VRML 1.0C by David Brown <dbrown@cgs.c4.gmeds.com> +" Maintainer: Gregory Seidman <gseidman@acm.org> +" URL: http://www.cs.brown.edu/~gss/vim/syntax/vrml.vim +" Last change: 2003 May 11 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" keyword definitions + +syn keyword VRMLFields ambientIntensity appearance attenuation +syn keyword VRMLFields autoOffset avatarSize axisOfRotation backUrl +syn keyword VRMLFields bboxCenter bboxSize beamWidth beginCap +syn keyword VRMLFields bottom bottomRadius bottomUrl ccw center +syn keyword VRMLFields children choice collide color colorIndex +syn keyword VRMLFields colorPerVertex convex coord coordIndex +syn keyword VRMLFields creaseAngle crossSection cutOffAngle +syn keyword VRMLFields cycleInterval description diffuseColor +syn keyword VRMLFields directOutput direction diskAngle +syn keyword VRMLFields emissiveColor enabled endCap family +syn keyword VRMLFields fieldOfView fogType fontStyle frontUrl +syn keyword VRMLFields geometry groundAngle groundColor headlight +syn keyword VRMLFields height horizontal info intensity jump +syn keyword VRMLFields justify key keyValue language leftToRight +syn keyword VRMLFields leftUrl length level location loop material +syn keyword VRMLFields maxAngle maxBack maxExtent maxFront +syn keyword VRMLFields maxPosition minAngle minBack minFront +syn keyword VRMLFields minPosition mustEvaluate normal normalIndex +syn keyword VRMLFields normalPerVertex offset on orientation +syn keyword VRMLFields parameter pitch point position priority +syn keyword VRMLFields proxy radius range repeatS repeatT rightUrl +syn keyword VRMLFields rotation scale scaleOrientation shininess +syn keyword VRMLFields side size skyAngle skyColor solid source +syn keyword VRMLFields spacing spatialize specularColor speed spine +syn keyword VRMLFields startTime stopTime string style texCoord +syn keyword VRMLFields texCoordIndex texture textureTransform title +syn keyword VRMLFields top topToBottom topUrl translation +syn keyword VRMLFields transparency type url vector visibilityLimit +syn keyword VRMLFields visibilityRange whichChoice xDimension +syn keyword VRMLFields xSpacing zDimension zSpacing +syn match VRMLFields "\<[A-Za-z_][A-Za-z0-9_]*\>" contains=VRMLComment,VRMLProtos,VRMLfTypes +" syn match VRMLFields "\<[A-Za-z_][A-Za-z0-9_]*\>\(,\|\s\)*\(#.*$\)*\<IS\>\(#.*$\)*\(,\|\s\)*\<[A-Za-z_][A-Za-z0-9_]*\>\(,\|\s\)*\(#.*$\)*" contains=VRMLComment,VRMLProtos +" syn region VRMLFields start="\<[A-Za-z_][A-Za-z0-9_]*\>" end=+\(,\|#\|\s\)+me=e-1 contains=VRMLComment,VRMLProtos + +syn keyword VRMLEvents addChildren ambientIntensity_changed +syn keyword VRMLEvents appearance_changed attenuation_changed +syn keyword VRMLEvents autoOffset_changed avatarSize_changed +syn keyword VRMLEvents axisOfRotation_changed backUrl_changed +syn keyword VRMLEvents beamWidth_changed bindTime bottomUrl_changed +syn keyword VRMLEvents center_changed children_changed +syn keyword VRMLEvents choice_changed collideTime collide_changed +syn keyword VRMLEvents color_changed coord_changed +syn keyword VRMLEvents cutOffAngle_changed cycleInterval_changed +syn keyword VRMLEvents cycleTime description_changed +syn keyword VRMLEvents diffuseColor_changed direction_changed +syn keyword VRMLEvents diskAngle_changed duration_changed +syn keyword VRMLEvents emissiveColor_changed enabled_changed +syn keyword VRMLEvents enterTime exitTime fogType_changed +syn keyword VRMLEvents fontStyle_changed fraction_changed +syn keyword VRMLEvents frontUrl_changed geometry_changed +syn keyword VRMLEvents groundAngle_changed headlight_changed +syn keyword VRMLEvents hitNormal_changed hitPoint_changed +syn keyword VRMLEvents hitTexCoord_changed intensity_changed +syn keyword VRMLEvents isActive isBound isOver jump_changed +syn keyword VRMLEvents keyValue_changed key_changed leftUrl_changed +syn keyword VRMLEvents length_changed level_changed +syn keyword VRMLEvents location_changed loop_changed +syn keyword VRMLEvents material_changed maxAngle_changed +syn keyword VRMLEvents maxBack_changed maxExtent_changed +syn keyword VRMLEvents maxFront_changed maxPosition_changed +syn keyword VRMLEvents minAngle_changed minBack_changed +syn keyword VRMLEvents minFront_changed minPosition_changed +syn keyword VRMLEvents normal_changed offset_changed on_changed +syn keyword VRMLEvents orientation_changed parameter_changed +syn keyword VRMLEvents pitch_changed point_changed position_changed +syn keyword VRMLEvents priority_changed radius_changed +syn keyword VRMLEvents removeChildren rightUrl_changed +syn keyword VRMLEvents rotation_changed scaleOrientation_changed +syn keyword VRMLEvents scale_changed set_ambientIntensity +syn keyword VRMLEvents set_appearance set_attenuation +syn keyword VRMLEvents set_autoOffset set_avatarSize +syn keyword VRMLEvents set_axisOfRotation set_backUrl set_beamWidth +syn keyword VRMLEvents set_bind set_bottomUrl set_center +syn keyword VRMLEvents set_children set_choice set_collide +syn keyword VRMLEvents set_color set_colorIndex set_coord +syn keyword VRMLEvents set_coordIndex set_crossSection +syn keyword VRMLEvents set_cutOffAngle set_cycleInterval +syn keyword VRMLEvents set_description set_diffuseColor +syn keyword VRMLEvents set_direction set_diskAngle +syn keyword VRMLEvents set_emissiveColor set_enabled set_fogType +syn keyword VRMLEvents set_fontStyle set_fraction set_frontUrl +syn keyword VRMLEvents set_geometry set_groundAngle set_headlight +syn keyword VRMLEvents set_height set_intensity set_jump set_key +syn keyword VRMLEvents set_keyValue set_leftUrl set_length +syn keyword VRMLEvents set_level set_location set_loop set_material +syn keyword VRMLEvents set_maxAngle set_maxBack set_maxExtent +syn keyword VRMLEvents set_maxFront set_maxPosition set_minAngle +syn keyword VRMLEvents set_minBack set_minFront set_minPosition +syn keyword VRMLEvents set_normal set_normalIndex set_offset set_on +syn keyword VRMLEvents set_orientation set_parameter set_pitch +syn keyword VRMLEvents set_point set_position set_priority +syn keyword VRMLEvents set_radius set_rightUrl set_rotation +syn keyword VRMLEvents set_scale set_scaleOrientation set_shininess +syn keyword VRMLEvents set_size set_skyAngle set_skyColor +syn keyword VRMLEvents set_source set_specularColor set_speed +syn keyword VRMLEvents set_spine set_startTime set_stopTime +syn keyword VRMLEvents set_string set_texCoord set_texCoordIndex +syn keyword VRMLEvents set_texture set_textureTransform set_topUrl +syn keyword VRMLEvents set_translation set_transparency set_type +syn keyword VRMLEvents set_url set_vector set_visibilityLimit +syn keyword VRMLEvents set_visibilityRange set_whichChoice +syn keyword VRMLEvents shininess_changed size_changed +syn keyword VRMLEvents skyAngle_changed skyColor_changed +syn keyword VRMLEvents source_changed specularColor_changed +syn keyword VRMLEvents speed_changed startTime_changed +syn keyword VRMLEvents stopTime_changed string_changed +syn keyword VRMLEvents texCoord_changed textureTransform_changed +syn keyword VRMLEvents texture_changed time topUrl_changed +syn keyword VRMLEvents touchTime trackPoint_changed +syn keyword VRMLEvents translation_changed transparency_changed +syn keyword VRMLEvents type_changed url_changed value_changed +syn keyword VRMLEvents vector_changed visibilityLimit_changed +syn keyword VRMLEvents visibilityRange_changed whichChoice_changed +syn region VRMLEvents start="\S+[^0-9]+\.[A-Za-z_]+"ms=s+1 end="\(,\|$\|\s\)"me=e-1 + +syn keyword VRMLNodes Anchor Appearance AudioClip Background +syn keyword VRMLNodes Billboard Box Collision Color +syn keyword VRMLNodes ColorInterpolator Cone Coordinate +syn keyword VRMLNodes CoordinateInterpolator Cylinder +syn keyword VRMLNodes CylinderSensor DirectionalLight +syn keyword VRMLNodes ElevationGrid Extrusion Fog FontStyle +syn keyword VRMLNodes Group ImageTexture IndexedFaceSet +syn keyword VRMLNodes IndexedLineSet Inline LOD Material +syn keyword VRMLNodes MovieTexture NavigationInfo Normal +syn keyword VRMLNodes NormalInterpolator OrientationInterpolator +syn keyword VRMLNodes PixelTexture PlaneSensor PointLight +syn keyword VRMLNodes PointSet PositionInterpolator +syn keyword VRMLNodes ProximitySensor ScalarInterpolator +syn keyword VRMLNodes Script Shape Sound Sphere SphereSensor +syn keyword VRMLNodes SpotLight Switch Text TextureCoordinate +syn keyword VRMLNodes TextureTransform TimeSensor TouchSensor +syn keyword VRMLNodes Transform Viewpoint VisibilitySensor +syn keyword VRMLNodes WorldInfo + +" the following line doesn't catch <node><newline><openbrace> since \n +" doesn't match as an atom yet :-( +syn match VRMLNodes "[A-Za-z_][A-Za-z0-9_]*\(,\|\s\)*{"me=e-1 +syn region VRMLNodes start="\<EXTERNPROTO\>\(,\|\s\)*[A-Za-z_]"ms=e start="\<EXTERNPROTO\>\(,\|\s\)*" end="[\s]*\["me=e-1 contains=VRMLProtos,VRMLComment +syn region VRMLNodes start="PROTO\>\(,\|\s\)*[A-Za-z_]"ms=e start="PROTO\>\(,\|\s\)*" end="[\s]*\["me=e-1 contains=VRMLProtos,VRMLComment + +syn keyword VRMLTypes SFBool SFColor MFColor SFFloat MFFloat +syn keyword VRMLTypes SFImage SFInt32 MFInt32 SFNode MFNode +syn keyword VRMLTypes SFRotation MFRotation SFString MFString +syn keyword VRMLTypes SFTime MFTime SFVec2f MFVec2f SFVec3f MFVec3f + +syn keyword VRMLfTypes field exposedField eventIn eventOut + +syn keyword VRMLValues TRUE FALSE NULL + +syn keyword VRMLProtos contained EXTERNPROTO PROTO IS + +syn keyword VRMLRoutes contained ROUTE TO + +if version >= 502 +"containment! + syn include @jscript $VIMRUNTIME/syntax/javascript.vim + syn region VRMLjScriptString contained start=+"\(\(javascript\)\|\(vrmlscript\)\|\(ecmascript\)\):+ms=e+1 skip=+\\\\\|\\"+ end=+"+me=e-1 contains=@jscript +endif + +" match definitions. +syn match VRMLSpecial contained "\\[0-9][0-9][0-9]\|\\." +syn region VRMLString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=VRMLSpecial,VRMLjScriptString +syn match VRMLCharacter "'[^\\]'" +syn match VRMLSpecialCharacter "'\\.'" +syn match VRMLNumber "[-+]\=\<[0-9]\+\(\.[0-9]\+\)\=\([eE]\{1}[-+]\=[0-9]\+\)\=\>\|0[xX][0-9a-fA-F]\+\>" +syn match VRMLNumber "0[xX][0-9a-fA-F]\+\>" +syn match VRMLComment "#.*$" + +" newlines should count as whitespace, but they can't be matched yet :-( +syn region VRMLRouteNode start="[^O]TO\(,\|\s\)*" end="\."me=e-1 contains=VRMLRoutes,VRMLComment +syn region VRMLRouteNode start="ROUTE\(,\|\s\)*" end="\."me=e-1 contains=VRMLRoutes,VRMLComment +syn region VRMLInstName start="DEF\>"hs=e+1 skip="DEF\(,\|\s\)*" end="[A-Za-z0-9_]\(\s\|$\|,\)"me=e contains=VRMLInstances,VRMLComment +syn region VRMLInstName start="USE\>"hs=e+1 skip="USE\(,\|\s\)*" end="[A-Za-z0-9_]\(\s\|$\|,\)"me=e contains=VRMLInstances,VRMLComment + +syn keyword VRMLInstances contained DEF USE +syn sync minlines=1 + +if version >= 600 +"FOLDS! + syn sync fromstart + setlocal foldmethod=syntax + syn region braceFold start="{" end="}" transparent fold contains=TOP + syn region bracketFold start="\[" end="]" transparent fold contains=TOP + syn region VRMLString start=+"+ skip=+\\\\\|\\"+ end=+"+ fold contains=VRMLSpecial,VRMLjScriptString +endif + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_VRML_syntax_inits") + if version < 508 + let did_VRML_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink VRMLCharacter VRMLString + HiLink VRMLSpecialCharacter VRMLSpecial + HiLink VRMLNumber VRMLString + HiLink VRMLValues VRMLString + HiLink VRMLString String + HiLink VRMLSpecial Special + HiLink VRMLComment Comment + HiLink VRMLNodes Statement + HiLink VRMLFields Type + HiLink VRMLEvents Type + HiLink VRMLfTypes LineNr +" hi VRMLfTypes ctermfg=6 guifg=Brown + HiLink VRMLInstances PreCondit + HiLink VRMLRoutes PreCondit + HiLink VRMLProtos PreProc + HiLink VRMLRouteNode Identifier + HiLink VRMLInstName Identifier + HiLink VRMLTypes Identifier + + delcommand HiLink +endif + +let b:current_syntax = "vrml" + +" vim: ts=8 diff --git a/runtime/syntax/vsejcl.vim b/runtime/syntax/vsejcl.vim new file mode 100644 index 000000000..f4f00c65e --- /dev/null +++ b/runtime/syntax/vsejcl.vim @@ -0,0 +1,49 @@ +" Vim syntax file +" Language: JCL job control language - DOS/VSE +" Maintainer: Davyd Ondrejko <david.ondrejko@safelite.com> +" URL: +" Last change: 2001 May 10 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" tags +syn keyword vsejclKeyword DLBL EXEC JOB ASSGN EOJ +syn keyword vsejclField JNM CLASS DISP USER SYSID JSEP SIZE +syn keyword vsejclField VSAM +syn region vsejclComment start="^/\*" end="$" +syn region vsejclComment start="^[\* ]\{}$" end="$" +syn region vsejclMisc start="^ " end="$" contains=Jparms +syn match vsejclString /'.\{-}'/ +syn match vsejclParms /(.\{-})/ contained + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_vsejcl_syntax") + if version < 508 + let did_vsejcl_syntax = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink vsejclComment Comment + HiLink vsejclField Type + HiLink vsejclKeyword Statement + HiLink vsejclObject Constant + HiLink vsejclString Constant + HiLink vsejclMisc Special + HiLink vsejclParms Constant + + delcommand HiLink +endif + +let b:current_syntax = "vsejcl" + +" vim: ts=4 diff --git a/runtime/syntax/wdiff.vim b/runtime/syntax/wdiff.vim new file mode 100644 index 000000000..9cd061181 --- /dev/null +++ b/runtime/syntax/wdiff.vim @@ -0,0 +1,43 @@ +" Vim syntax file +" Language: wDiff (wordwise diff) +" Maintainer: Gerfried Fuchs <alfie@ist.org> +" Last Change: 25 Apr 2001 +" URL: http://alfie.ist.org/vim/syntax/wdiff.vim +" +" Comments are very welcome - but please make sure that you are commenting on +" the latest version of this file. +" SPAM is _NOT_ welcome - be ready to be reported! + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + + +syn region wdiffOld start=+\[-+ end=+-]+ +syn region wdiffNew start="{+" end="+}" + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_wdiff_syn_inits") + let did_wdiff_syn_inits = 1 + if version < 508 + let did_wdiff_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink wdiffOld Special + HiLink wdiffNew Identifier + + delcommand HiLink +endif + +let b:current_syntax = "wdiff" diff --git a/runtime/syntax/web.vim b/runtime/syntax/web.vim new file mode 100644 index 000000000..f7a7fdfdc --- /dev/null +++ b/runtime/syntax/web.vim @@ -0,0 +1,39 @@ +" Vim syntax file +" Language: WEB +" Maintainer: Andreas Scherer <andreas.scherer@pobox.com> +" Last Change: April 30, 2001 + +" Details of the WEB language can be found in the article by Donald E. Knuth, +" "The WEB System of Structured Documentation", included as "webman.tex" in +" the standard WEB distribution, available for anonymous ftp at +" ftp://labrea.stanford.edu/pub/tex/web/. + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Although WEB is the ur-language for the "Literate Programming" paradigm, +" we base this syntax file on the modern superset, CWEB. Note: This shortcut +" may introduce some illegal constructs, e.g., CWEB's "@c" does _not_ start a +" code section in WEB. Anyway, I'm not a WEB programmer. +if version < 600 + source <sfile>:p:h/cweb.vim +else + runtime! syntax/cweb.vim + unlet b:current_syntax +endif + +" Replace C/C++ syntax by Pascal syntax. +syntax include @webIncludedC <sfile>:p:h/pascal.vim + +" Double-@ means single-@, anywhere in the WEB source (as in CWEB). +" Don't misinterpret "@'" as the start of a Pascal string. +syntax match webIgnoredStuff "@[@']" + +let b:current_syntax = "web" + +" vim: ts=8 diff --git a/runtime/syntax/webmacro.vim b/runtime/syntax/webmacro.vim new file mode 100644 index 000000000..3b863f7c3 --- /dev/null +++ b/runtime/syntax/webmacro.vim @@ -0,0 +1,82 @@ +" WebMacro syntax file +" Language: WebMacro +" Maintainer: Claudio Fleiner <claudio@fleiner.com> +" URL: http://www.fleiner.com/vim/syntax/webmacro.vim +" Last Change: 2003 May 11 + +" webmacro is a nice little language that you should +" check out if you use java servlets. +" webmacro: http://www.webmacro.org + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if !exists("main_syntax") + if version < 600 + syntax clear + elseif exists("b:current_syntax") + finish + endif + let main_syntax = 'webmacro' +endif + + +if version < 600 + source <sfile>:p:h/html.vim +else + runtime! syntax/html.vim + unlet b:current_syntax +endif + +syn cluster htmlPreProc add=webmacroIf,webmacroUse,webmacroBraces,webmacroParse,webmacroInclude,webmacroSet,webmacroForeach,webmacroComment + +syn match webmacroVariable "\$[a-zA-Z0-9.()]*;\=" +syn match webmacroNumber "[-+]\=\d\+[lL]\=" contained +syn keyword webmacroBoolean true false contained +syn match webmacroSpecial "\\." contained +syn region webmacroString contained start=+"+ end=+"+ contains=webmacroSpecial,webmacroVariable +syn region webmacroString contained start=+'+ end=+'+ contains=webmacroSpecial,webmacroVariable +syn region webmacroList contained matchgroup=Structure start="\[" matchgroup=Structure end="\]" contains=webmacroString,webmacroVariable,webmacroNumber,webmacroBoolean,webmacroList + +syn region webmacroIf start="#if" start="#else" end="{"me=e-1 contains=webmacroVariable,webmacroNumber,webmacroString,webmacroBoolean,webmacroList nextgroup=webmacroBraces +syn region webmacroForeach start="#foreach" end="{"me=e-1 contains=webmacroVariable,webmacroNumber,webmacroString,webmacroBoolean,webmacroList nextgroup=webmacroBraces +syn match webmacroSet "#set .*$" contains=webmacroVariable,webmacroNumber,webmacroNumber,webmacroBoolean,webmacroString,webmacroList +syn match webmacroInclude "#include .*$" contains=webmacroVariable,webmacroNumber,webmacroNumber,webmacroBoolean,webmacroString,webmacroList +syn match webmacroParse "#parse .*$" contains=webmacroVariable,webmacroNumber,webmacroNumber,webmacroBoolean,webmacroString,webmacroList +syn region webmacroUse matchgroup=PreProc start="#use .*" matchgroup=PreProc end="^-.*" contains=webmacroHash,@HtmlTop +syn region webmacroBraces matchgroup=Structure start="{" matchgroup=Structure end="}" contained transparent +syn match webmacroBracesError "[{}]" +syn match webmacroComment "##.*$" +syn match webmacroHash "[#{}\$]" contained + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_webmacro_syn_inits") + if version < 508 + let did_webmacro_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink webmacroComment CommentTitle + HiLink webmacroVariable PreProc + HiLink webmacroIf webmacroStatement + HiLink webmacroForeach webmacroStatement + HiLink webmacroSet webmacroStatement + HiLink webmacroInclude webmacroStatement + HiLink webmacroParse webmacroStatement + HiLink webmacroStatement Function + HiLink webmacroNumber Number + HiLink webmacroBoolean Boolean + HiLink webmacroSpecial Special + HiLink webmacroString String + HiLink webmacroBracesError Error + delcommand HiLink +endif + +let b:current_syntax = "webmacro" + +if main_syntax == 'webmacro' + unlet main_syntax +endif diff --git a/runtime/syntax/wget.vim b/runtime/syntax/wget.vim new file mode 100644 index 000000000..801f76d8d --- /dev/null +++ b/runtime/syntax/wget.vim @@ -0,0 +1,159 @@ +" Wget syntax file +" Filename: wget.vim +" Language: Wget configuration file ( /etc/wgetrc ~/.wgetrc ) +" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au> +" URL: http://mugca.its.monash.edu.au/~djkea2/vim/syntax/wget.vim +" Last Change: 2003 May 11 + +" TODO: all commands are actually underscore and hyphen insensitive, though +" they are normally named as listed below + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match wgetComment "^\s*#.*$" contains=wgetTodo + +syn keyword wgetTodo TODO NOTE FIXME XXX contained + +syn match wgetAssignment "^\s*[A-Za-z_-]\+\s*=\s*.*$" contains=wgetCommand,wgetAssignmentOperator,wgetString,wgetBoolean,wgetNumber,wgetValue,wgetQuota + +syn match wgetAssignmentOperator "=" contained + +syn region wgetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline +syn region wgetString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline + +" Make this a match so that always_rest matches properly +syn case ignore +syn match wgetBoolean "\<on\|off\|always\|never\|1\|0\>" contained +syn case match + +syn match wgetNumber "\<\d\+\|inf\>" contained + +syn match wgetQuota "\<\d\+[kKmM]\?\>" contained + +syn case ignore +syn keyword wgetValue default binary mega giga micro contained +syn case match + +syn case ignore +syn match wgetCommand "^\s*accept" contained +syn match wgetCommand "^\s*add[-_]\=hostdir" contained +syn match wgetCommand "^\s*always[-_]\=rest" contained +syn match wgetCommand "^\s*background" contained +syn match wgetCommand "^\s*backup[-_]\=converted" contained +syn match wgetCommand "^\s*backups" contained +syn match wgetCommand "^\s*base" contained +syn match wgetCommand "^\s*bind[-_]\=address" contained +syn match wgetCommand "^\s*cache" contained +syn match wgetCommand "^\s*continue" contained +syn match wgetCommand "^\s*convert[-_]\=links" contained +syn match wgetCommand "^\s*cookies" contained +syn match wgetCommand "^\s*cut[-_]\=dirs" contained +syn match wgetCommand "^\s*debug" contained +syn match wgetCommand "^\s*delete[-_]\=after" contained +syn match wgetCommand "^\s*dir[-_]\=prefix" contained +syn match wgetCommand "^\s*dir[-_]\=struct" contained +syn match wgetCommand "^\s*domains" contained +syn match wgetCommand "^\s*dot[-_]\=bytes" contained +syn match wgetCommand "^\s*dots[-_]\=in[-_]\=line" contained +syn match wgetCommand "^\s*dot[-_]\=spacing" contained +syn match wgetCommand "^\s*dot[-_]\=style" contained +syn match wgetCommand "^\s*egd[-_]\=file" contained +syn match wgetCommand "^\s*exclude[-_]\=directories" contained +syn match wgetCommand "^\s*exclude[-_]\=domains" contained +syn match wgetCommand "^\s*follow[-_]\=ftp" contained +syn match wgetCommand "^\s*follow[-_]\=tags" contained +syn match wgetCommand "^\s*force[-_]\=html" contained +syn match wgetCommand "^\s*ftp[-_]\=proxy" contained +syn match wgetCommand "^\s*glob" contained +syn match wgetCommand "^\s*header" contained +syn match wgetCommand "^\s*html[-_]\=extension" contained +syn match wgetCommand "^\s*htmlify" contained +syn match wgetCommand "^\s*http[-_]\=keep[-_]\=alive" contained +syn match wgetCommand "^\s*http[-_]\=passwd" contained +syn match wgetCommand "^\s*http[-_]\=proxy" contained +syn match wgetCommand "^\s*https[-_]\=proxy" contained +syn match wgetCommand "^\s*http[-_]\=user" contained +syn match wgetCommand "^\s*ignore[-_]\=length" contained +syn match wgetCommand "^\s*ignore[-_]\=tags" contained +syn match wgetCommand "^\s*include[-_]\=directories" contained +syn match wgetCommand "^\s*input" contained +syn match wgetCommand "^\s*kill[-_]\=longer" contained +syn match wgetCommand "^\s*limit[-_]\=rate" contained +syn match wgetCommand "^\s*load[-_]\=cookies" contained +syn match wgetCommand "^\s*logfile" contained +syn match wgetCommand "^\s*login" contained +syn match wgetCommand "^\s*mirror" contained +syn match wgetCommand "^\s*netrc" contained +syn match wgetCommand "^\s*no[-_]\=clobber" contained +syn match wgetCommand "^\s*no[-_]\=parent" contained +syn match wgetCommand "^\s*no[-_]\=proxy" contained +" Note: this option is deprecated, use 'tries' instead +syn match wgetCommand "^\s*numtries" contained +syn match wgetCommand "^\s*output[-_]\=document" contained +syn match wgetCommand "^\s*page[-_]\=requisites" contained +syn match wgetCommand "^\s*passive[-_]\=ftp" contained +syn match wgetCommand "^\s*passwd" contained +syn match wgetCommand "^\s*progress" contained +syn match wgetCommand "^\s*proxy[-_]\=passwd" contained +syn match wgetCommand "^\s*proxy[-_]\=user" contained +syn match wgetCommand "^\s*quiet" contained +syn match wgetCommand "^\s*quota" contained +syn match wgetCommand "^\s*random[-_]\=wait" contained +syn match wgetCommand "^\s*reclevel" contained +syn match wgetCommand "^\s*recursive" contained +syn match wgetCommand "^\s*referer" contained +syn match wgetCommand "^\s*reject" contained +syn match wgetCommand "^\s*relative[-_]\=only" contained +syn match wgetCommand "^\s*remove[-_]\=listing" contained +syn match wgetCommand "^\s*retr[-_]\=symlinks" contained +syn match wgetCommand "^\s*robots" contained +syn match wgetCommand "^\s*save[-_]\=cookies" contained +syn match wgetCommand "^\s*save[-_]\=headers" contained +syn match wgetCommand "^\s*server[-_]\=response" contained +" Note: this option was removed in wget 1.8 +syn match wgetCommand "^\s*simple[-_]\=host[-_]\=check" contained +syn match wgetCommand "^\s*span[-_]\=hosts" contained +syn match wgetCommand "^\s*spider" contained +syn match wgetCommand "^\s*sslcertfile" contained +syn match wgetCommand "^\s*sslcertkey" contained +syn match wgetCommand "^\s*timeout" contained +syn match wgetCommand "^\s*time[-_]\=stamping" contained +syn match wgetCommand "^\s*tries" contained +syn match wgetCommand "^\s*use[-_]\=proxy" contained +syn match wgetCommand "^\s*user[-_]\=agent" contained +syn match wgetCommand "^\s*verbose" contained +syn match wgetCommand "^\s*wait" contained +syn match wgetCommand "^\s*wait[-_]\=retry" contained +syn case match + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_wget_syn_inits") + if version < 508 + let did_wget_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink wgetAssignmentOperator Special + HiLink wgetBoolean Boolean + HiLink wgetCommand Identifier + HiLink wgetComment Comment + HiLink wgetNumber Number + HiLink wgetQuota Number + HiLink wgetString String + HiLink wgetTodo Todo + HiLink wgetValue Constant + + delcommand HiLink +endif + +let b:current_syntax = "wget" diff --git a/runtime/syntax/whitespace.vim b/runtime/syntax/whitespace.vim new file mode 100644 index 000000000..4d2e32eb7 --- /dev/null +++ b/runtime/syntax/whitespace.vim @@ -0,0 +1,13 @@ +" Simplistic way to make spaces and Tabs visible + +" This can be added to an already active syntax. + +syn match Space " " +syn match Tab "\t" +if &background == "dark" + hi def Space ctermbg=darkred guibg=#500000 + hi def Tab ctermbg=darkgreen guibg=#003000 +else + hi def Space ctermbg=lightred guibg=#ffd0d0 + hi def Tab ctermbg=lightgreen guibg=#d0ffd0 +endif diff --git a/runtime/syntax/winbatch.vim b/runtime/syntax/winbatch.vim new file mode 100644 index 000000000..aea2cdebc --- /dev/null +++ b/runtime/syntax/winbatch.vim @@ -0,0 +1,187 @@ +" Vim syntax file +" Language: WinBatch/Webbatch (*.wbt, *.web) +" Maintainer: dominique@mggen.com +" URL: http://www.mggen.com/vim/syntax/winbatch.zip +" Last change: 2001 May 10 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +syn keyword winbatchCtl if then else endif break end return exit next +syn keyword winbatchCtl while for gosub goto switch select to case +syn keyword winbatchCtl endselect endwhile endselect endswitch + +" String +syn region winbatchVar start=+%+ end=+%+ +" %var% in strings +syn region winbatchString start=+"+ end=+"+ contains=winbatchVar + +syn match winbatchComment ";.*$" +syn match winbatchLabel "^\ *:[0-9a-zA-Z_\-]\+\>" + +" constant (bezgin by @) +syn match winbatchConstant "@[0_9a-zA-Z_\-]\+" + +" number +syn match winbatchNumber "\<[0-9]\+\(u\=l\=\|lu\|f\)\>" + +syn keyword winbatchImplicit aboveicons acc_attrib acc_chng_nt acc_control acc_create +syn keyword winbatchImplicit acc_delete acc_full_95 acc_full_nt acc_list acc_pfull_nt +syn keyword winbatchImplicit acc_pmang_nt acc_print_nt acc_read acc_read_95 acc_read_nt +syn keyword winbatchImplicit acc_write amc arrange ascending attr_a attr_a attr_ci attr_ci +syn keyword winbatchImplicit attr_dc attr_dc attr_di attr_di attr_dm attr_dm attr_h attr_h +syn keyword winbatchImplicit attr_ic attr_ic attr_p attr_p attr_ri attr_ri attr_ro attr_ro +syn keyword winbatchImplicit attr_sh attr_sh attr_sy attr_sy attr_t attr_t attr_x attr_x +syn keyword winbatchImplicit avogadro backscan boltzmann cancel capslock check columns +syn keyword winbatchImplicit commonformat cr crlf ctrl default default deg2rad descending +syn keyword winbatchImplicit disable drive electric enable eulers false faraday float8 +syn keyword winbatchImplicit fwdscan gftsec globalgroup gmtsec goldenratio gravitation hidden +syn keyword winbatchImplicit icon lbutton lclick ldblclick lf lightmps lightmtps localgroup +syn keyword winbatchImplicit magfield major mbokcancel mbutton mbyesno mclick mdblclick minor +syn keyword winbatchImplicit msformat multiple ncsaformat no none none noresize normal +syn keyword winbatchImplicit notify nowait numlock off on open parsec parseonly pi +syn keyword winbatchImplicit planckergs planckjoules printer rad2deg rbutton rclick rdblclick +syn keyword winbatchImplicit regclasses regcurrent regmachine regroot regusers rows save +syn keyword winbatchImplicit scrolllock server shift single sorted stack string tab tile +syn keyword winbatchImplicit true uncheck unsorted wait wholesection word1 word2 word4 yes +syn keyword winbatchImplicit zoomed about abs acos addextender appexist appwaitclose asin +syn keyword winbatchImplicit askfilename askfiletext askitemlist askline askpassword askyesno +syn keyword winbatchImplicit atan average beep binaryalloc binarycopy binaryeodget binaryeodset +syn keyword winbatchImplicit binaryfree binaryhashrec binaryincr binaryincr2 binaryincr4 +syn keyword winbatchImplicit binaryincrflt binaryindex binaryindexnc binaryoletype binarypeek +syn keyword winbatchImplicit binarypeek2 binarypeek4 binarypeekflt binarypeekstr binarypoke +syn keyword winbatchImplicit binarypoke2 binarypoke4 binarypokeflt binarypokestr binaryread +syn keyword winbatchImplicit binarysort binarystrcnt binarywrite boxbuttondraw boxbuttonkill +syn keyword winbatchImplicit boxbuttonstat boxbuttonwait boxcaption boxcolor +syn keyword winbatchImplicit boxdataclear boxdatatag +syn keyword winbatchImplicit boxdestroy boxdrawcircle boxdrawline boxdrawrect boxdrawtext +syn keyword winbatchImplicit boxesup boxmapmode boxnew boxopen boxpen boxshut boxtext boxtextcolor +syn keyword winbatchImplicit boxtextfont boxtitle boxupdates break buttonnames by call +syn keyword winbatchImplicit callext ceiling char2num clipappend clipget clipput +syn keyword winbatchImplicit continue cos cosh datetime +syn keyword winbatchImplicit ddeexecute ddeinitiate ddepoke dderequest ddeterminate +syn keyword winbatchImplicit ddetimeout debug debugdata decimals delay dialog +syn keyword winbatchImplicit dialogbox dirattrget dirattrset dirchange direxist +syn keyword winbatchImplicit dirget dirhome diritemize dirmake dirremove dirrename +syn keyword winbatchImplicit dirwindows diskexist diskfree diskinfo diskscan disksize +syn keyword winbatchImplicit diskvolinfo display dllcall dllfree dllhinst dllhwnd dllload +syn keyword winbatchImplicit dosboxcursorx dosboxcursory dosboxgetall dosboxgetdata +syn keyword winbatchImplicit dosboxheight dosboxscrmode dosboxversion dosboxwidth dosversion +syn keyword winbatchImplicit drop edosgetinfo edosgetvar edoslistvars edospathadd edospathchk +syn keyword winbatchImplicit edospathdel edossetvar +syn keyword winbatchImplicit endsession envgetinfo envgetvar environment +syn keyword winbatchImplicit environset envitemize envlistvars envpathadd envpathchk +syn keyword winbatchImplicit envpathdel envsetvar errormode exclusive execute exetypeinfo +syn keyword winbatchImplicit exp fabs fileappend fileattrget fileattrset fileclose +syn keyword winbatchImplicit filecompare filecopy filedelete fileexist fileextension filefullname +syn keyword winbatchImplicit fileitemize filelocate filemapname filemove filenameeval1 +syn keyword winbatchImplicit filenameeval2 filenamelong filenameshort fileopen filepath +syn keyword winbatchImplicit fileread filerename fileroot filesize filetimecode filetimeget +syn keyword winbatchImplicit filetimeset filetimetouch fileverinfo filewrite fileymdhms +syn keyword winbatchImplicit findwindow floor getexacttime gettickcount +syn keyword winbatchImplicit iconarrange iconreplace ignoreinput inidelete inideletepvt +syn keyword winbatchImplicit iniitemize iniitemizepvt iniread inireadpvt iniwrite iniwritepvt +syn keyword winbatchImplicit installfile int intcontrol isdefined isfloat isint iskeydown +syn keyword winbatchImplicit islicensed isnumber itemcount itemextract iteminsert itemlocate +syn keyword winbatchImplicit itemremove itemselect itemsort keytoggleget keytoggleset +syn keyword winbatchImplicit lasterror log10 logdisk loge max message min mod mouseclick +syn keyword winbatchImplicit mouseclickbtn mousedrag mouseinfo mousemove msgtextget n3attach +syn keyword winbatchImplicit n3captureend n3captureprt n3chgpassword n3detach n3dirattrget +syn keyword winbatchImplicit n3dirattrset n3drivepath n3drivepath2 n3drivestatus n3fileattrget +syn keyword winbatchImplicit n3fileattrset n3getloginid n3getmapped n3getnetaddr n3getuser +syn keyword winbatchImplicit n3getuserid n3logout n3map n3mapdelete n3mapdir n3maproot n3memberdel +syn keyword winbatchImplicit n3memberget n3memberset n3msgsend n3msgsendall n3serverinfo +syn keyword winbatchImplicit n3serverlist n3setsrchdrv n3usergroups n3version n4attach +syn keyword winbatchImplicit n4captureend n4captureprt n4chgpassword n4detach n4dirattrget +syn keyword winbatchImplicit n4dirattrset n4drivepath n4drivestatus n4fileattrget n4fileattrset +syn keyword winbatchImplicit n4getloginid n4getmapped n4getnetaddr n4getuser n4getuserid +syn keyword winbatchImplicit n4login n4logout n4map n4mapdelete n4mapdir n4maproot n4memberdel +syn keyword winbatchImplicit n4memberget n4memberset n4msgsend n4msgsendall n4serverinfo +syn keyword winbatchImplicit n4serverlist n4setsrchdrv n4usergroups n4version netadddrive +syn keyword winbatchImplicit netaddprinter netcancelcon netdirdialog netgetcon netgetuser +syn keyword winbatchImplicit netinfo netresources netversion num2char objectclose +syn keyword winbatchImplicit objectopen parsedata pause playmedia playmidi playwaveform +syn keyword winbatchImplicit print random regapp regclosekey regconnect regcreatekey +syn keyword winbatchImplicit regdeletekey regdelvalue regentrytype regloadhive regopenkey +syn keyword winbatchImplicit regquerybin regquerydword regqueryex regqueryexpsz regqueryitem +syn keyword winbatchImplicit regquerykey regquerymulsz regqueryvalue regsetbin +syn keyword winbatchImplicit regsetdword regsetex regsetexpsz regsetmulsz regsetvalue +syn keyword winbatchImplicit regunloadhive reload reload rtstatus run runenviron +syn keyword winbatchImplicit runexit runhide runhidewait runicon runiconwait runshell runwait +syn keyword winbatchImplicit runzoom runzoomwait sendkey sendkeyschild sendkeysto +syn keyword winbatchImplicit sendmenusto shellexecute shortcutedit shortcutextra shortcutinfo +syn keyword winbatchImplicit shortcutmake sin sinh snapshot sounds sqrt +syn keyword winbatchImplicit srchfree srchinit srchnext strcat strcharcount strcmp +syn keyword winbatchImplicit strfill strfix strfixchars stricmp strindex strlen +syn keyword winbatchImplicit strlower strreplace strscan strsub strtrim strupper +syn keyword winbatchImplicit tan tanh tcpaddr2host tcpftpchdir tcpftpclose tcpftpget +syn keyword winbatchImplicit tcpftplist tcpftpmode tcpftpopen tcpftpput tcphost2addr tcphttpget +syn keyword winbatchImplicit tcphttppost tcpparmget tcpparmset tcpping tcpsmtp terminate +syn keyword winbatchImplicit textbox textboxsort textoutbufdel textoutbuffer textoutdebug +syn keyword winbatchImplicit textoutfree textoutinfo textoutreset textouttrack textouttrackb +syn keyword winbatchImplicit textouttrackp textoutwait textselect timeadd timedate +syn keyword winbatchImplicit timedelay timediffdays timediffsecs timejulianday timejultoymd +syn keyword winbatchImplicit timesubtract timewait timeymdhms version versiondll +syn keyword winbatchImplicit w3addcon w3cancelcon w3dirbrowse w3getcaps w3getcon w3netdialog +syn keyword winbatchImplicit w3netgetuser w3prtbrowse w3version w95accessadd w95accessdel +syn keyword winbatchImplicit w95adddrive w95addprinter w95cancelcon w95dirdialog w95getcon +syn keyword winbatchImplicit w95getuser w95resources w95shareadd w95sharedel w95shareset +syn keyword winbatchImplicit w95version waitforkey wallpaper webbaseconv webcloselog +syn keyword winbatchImplicit webcmddata webcondata webcounter webdatdata webdumperror webhashcode +syn keyword winbatchImplicit webislocal weblogline webopenlog webout weboutfile webparamdata +syn keyword winbatchImplicit webparamnames websettimeout webverifycard winactivate +syn keyword winbatchImplicit winactivchild winarrange winclose winclosenot winconfig winexename +syn keyword winbatchImplicit winexist winparset winparget winexistchild wingetactive +syn keyword winbatchImplicit winhelp winhide winiconize winidget winisdos winitemchild +syn keyword winbatchImplicit winitemize winitemnameid winmetrics winname winparmget +syn keyword winbatchImplicit winparmset winplace winplaceget winplaceset +syn keyword winbatchImplicit winposition winresources winshow winstate winsysinfo +syn keyword winbatchImplicit wintitle winversion winwaitchild winwaitclose winwaitexist +syn keyword winbatchImplicit winzoom wnaddcon wncancelcon wncmptrinfo wndialog +syn keyword winbatchImplicit wndlgbrowse wndlgcon wndlgcon2 wndlgcon3 +syn keyword winbatchImplicit wndlgcon4 wndlgdiscon wndlgnoshare wndlgshare wngetcaps +syn keyword winbatchImplicit wngetcon wngetuser wnnetnames wnrestore wnservers wnsharecnt +syn keyword winbatchImplicit wnsharename wnsharepath wnshares wntaccessadd wntaccessdel +syn keyword winbatchImplicit wntaccessget wntadddrive wntaddprinter wntcancelcon wntdirdialog +syn keyword winbatchImplicit wntgetcon wntgetuser wntlistgroups wntmemberdel wntmemberget +syn keyword winbatchImplicit wntmembergrps wntmemberlist wntmemberset wntresources wntshareadd +syn keyword winbatchImplicit wntsharedel wntshareset wntversion wnversion wnwrkgroups wwenvunload +syn keyword winbatchImplicit xbaseconvert xcursorset xdisklabelget xdriveready xextenderinfo +syn keyword winbatchImplicit xgetchildhwnd xgetelapsed xhex xmemcompact xmessagebox +syn keyword winbatchImplicit xsendmessage xverifyccard yield + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_winbatch_syntax_inits") + if version < 508 + let did_winbatch_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink winbatchLabel PreProc + HiLink winbatchCtl Operator + HiLink winbatchStatement Statement + HiLink winbatchTodo Todo + HiLink winbatchString String + HiLink winbatchVar Type + HiLink winbatchComment Comment + HiLink winbatchImplicit Special + HiLink winbatchNumber Number + HiLink winbatchConstant StorageClass + + delcommand HiLink +endif + +let b:current_syntax = "winbatch" + +" vim: ts=8 diff --git a/runtime/syntax/wml.vim b/runtime/syntax/wml.vim new file mode 100644 index 000000000..5957930c8 --- /dev/null +++ b/runtime/syntax/wml.vim @@ -0,0 +1,172 @@ +" Vim syntax file +" Language: WML - Website MetaLanguage +" Maintainer: Gerfried Fuchs <alfie@ist.org> +" Filenames: *.wml +" Last Change: 07 Feb 2002 +" URL: http://alfie.ist.org/software/vim/syntax/wml.vim +" +" Original Version: Craig Small <csmall@eye-net.com.au> + +" Comments are very welcome - but please make sure that you are commenting on +" the latest version of this file. +" SPAM is _NOT_ welcome - be ready to be reported! + +" If you are looking for the "Wireless Markup Language" syntax file, +" please take a look at the wap.vim file done by Ralf Schandl, soon in a +" vim-package around your corner :) + + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syn clear +elseif exists("b:current_syntax") + finish +endif + + +" A lot of the web stuff looks like HTML so we load that first +if version < 600 + so <sfile>:p:h/html.vim +else + runtime! syntax/html.vim +endif +unlet b:current_syntax + +if !exists("main_syntax") + let main_syntax = 'wml' +endif + +" special character +syn match wmlNextLine "\\$" + +" Redfine htmlTag +syn clear htmlTag +syn region htmlTag start=+<[^/<]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition + +" +" Add in extra Arguments used by wml +syn keyword htmlTagName contained gfont imgbg imgdot lowsrc +syn keyword htmlTagName contained navbar:define navbar:header +syn keyword htmlTagName contained navbar:footer navbar:prolog +syn keyword htmlTagName contained navbar:epilog navbar:button +syn keyword htmlTagName contained navbar:filter navbar:debug +syn keyword htmlTagName contained navbar:render +syn keyword htmlTagName contained preload rollover +syn keyword htmlTagName contained space hspace vspace over +syn keyword htmlTagName contained ps ds pi ein big sc spaced headline +syn keyword htmlTagName contained ue subheadline zwue verbcode +syn keyword htmlTagName contained isolatin pod sdf text url verbatim +syn keyword htmlTagName contained xtable +syn keyword htmlTagName contained csmap fsview import box +syn keyword htmlTagName contained case:upper case:lower +syn keyword htmlTagName contained grid cell info lang: logo page +syn keyword htmlTagName contained set-var restore +syn keyword htmlTagName contained array:push array:show set-var ifdef +syn keyword htmlTagName contained say m4 symbol dump enter divert +syn keyword htmlTagName contained toc +syn keyword htmlTagName contained wml card do refresh oneevent catch spawn + +" +" The wml arguments +syn keyword htmlArg contained adjust background base bdcolor bdspace +syn keyword htmlArg contained bdwidth complete copyright created crop +syn keyword htmlArg contained direction description domainname eperlfilter +syn keyword htmlArg contained file hint imgbase imgstar interchar interline +syn keyword htmlArg contained keephr keepindex keywords layout spacing +syn keyword htmlArg contained padding nonetscape noscale notag notypo +syn keyword htmlArg contained onload oversrc pos select slices style +syn keyword htmlArg contained subselected txtcol_select txtcol_normal +syn keyword htmlArg contained txtonly via +syn keyword htmlArg contained mode columns localsrc ordered + + +" Lines starting with an # are usually comments +syn match wmlComment "^\s*#.*" +" The different exceptions to comments +syn match wmlSharpBang "^#!.*" +syn match wmlUsed contained "\s\s*[A-Za-z:_-]*" +syn match wmlUse "^\s*#\s*use\s\+" contains=wmlUsed +syn match wmlInclude "^\s*#\s*include.+" + +syn region wmlBody contained start=+<<+ end=+>>+ + +syn match wmlLocationId contained "[A-Za-z]\+" +syn region wmlLocation start=+<<+ end=+>>+ contains=wmlLocationId +"syn region wmlLocation start=+{#+ end=+#}+ contains=wmlLocationId +"syn region wmlLocationed contained start=+<<+ end=+>>+ contains=wmlLocationId + +syn match wmlDivert "\.\.[a-zA-Z_]\+>>" +syn match wmlDivertEnd "<<\.\." +" new version +"syn match wmlDivert "{#[a-zA-Z_]\+#:" +"syn match wmlDivertEnd ":##}" + +syn match wmlDefineName contained "\s\+[A-Za-z-]\+" +syn region htmlTagName start="\<\(define-tag\|define-region\)" end="\>" contains=wmlDefineName + +" The perl include stuff +if main_syntax != 'perl' + " Perl script + if version < 600 + syn include @wmlPerlScript <sfile>:p:h/perl.vim + else + syn include @wmlPerlScript syntax/perl.vim + endif + unlet b:current_syntax + + syn region perlScript start=+<perl>+ keepend end=+</perl>+ contains=@wmlPerlScript,wmlPerlTag +" eperl between '<:' and ':>' -- Alfie [1999-12-26] + syn region perlScript start=+<:+ keepend end=+:>+ contains=@wmlPerlScript,wmlPerlTag + syn match wmlPerlTag contained "</*perl>" contains=wmlPerlTagN + syn keyword wmlPerlTagN contained perl + + hi link wmlPerlTag htmlTag + hi link wmlPerlTagN htmlStatement +endif + +" verbatim tags -- don't highlight anything in between -- Alfie [2002-02-07] +syn region wmlVerbatimText start=+<verbatim>+ keepend end=+</verbatim>+ contains=wmlVerbatimTag +syn match wmlVerbatimTag contained "</*verbatim>" contains=wmlVerbatimTagN +syn keyword wmlVerbatimTagN contained verbatim +hi link wmlVerbatimTag htmlTag +hi link wmlVerbatimTagN htmlStatement + +if main_syntax == "html" + syn sync match wmlHighlight groupthere NONE "</a-zA-Z]" + syn sync match wmlHighlight groupthere perlScript "<perl>" + syn sync match wmlHighlightSkip "^.*['\"].*$" + syn sync minlines=10 +endif + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_wml_syn_inits") + let did_wml_syn_inits = 1 + if version < 508 + let did_wml_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink wmlNextLine Special + HiLink wmlUse Include + HiLink wmlUsed String + HiLink wmlBody Special + HiLink wmlDiverted Label + HiLink wmlDivert Delimiter + HiLink wmlDivertEnd Delimiter + HiLink wmlLocationId Label + HiLink wmlLocation Delimiter +" HiLink wmlLocationed Delimiter + HiLink wmlDefineName String + HiLink wmlComment Comment + HiLink wmlInclude Include + HiLink wmlSharpBang PreProc + + delcommand HiLink +endif + +let b:current_syntax = "wml" diff --git a/runtime/syntax/wsh.vim b/runtime/syntax/wsh.vim new file mode 100644 index 000000000..98ba105a7 --- /dev/null +++ b/runtime/syntax/wsh.vim @@ -0,0 +1,45 @@ +" Vim syntax file +" Language: Windows Scripting Host +" Maintainer: Paul Moore <gustav@morpheus.demon.co.uk> +" Last Change: Fre, 24 Nov 2000 21:54:09 +0100 + +" This reuses the XML, VB and JavaScript syntax files. While VB is not +" VBScript, it's close enough for us. No attempt is made to handle +" other languages. +" Send comments, suggestions and requests to the maintainer. + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:wsh_cpo_save = &cpo +set cpo&vim + +runtime! syntax/xml.vim +unlet b:current_syntax + +syn case ignore +syn include @wshVBScript <sfile>:p:h/vb.vim +unlet b:current_syntax +syn include @wshJavaScript <sfile>:p:h/javascript.vim +unlet b:current_syntax +syn region wshVBScript + \ matchgroup=xmlTag start="<script[^>]*VBScript\(>\|[^>]*[^/>]>\)" + \ matchgroup=xmlEndTag end="</script>" + \ fold + \ contains=@wshVBScript + \ keepend +syn region wshJavaScript + \ matchgroup=xmlTag start="<script[^>]*J\(ava\)\=Script\(>\|[^>]*[^/>]>\)" + \ matchgroup=xmlEndTag end="</script>" + \ fold + \ contains=@wshJavaScript + \ keepend + +syn cluster xmlRegionHook add=wshVBScript,wshJavaScript + +let b:current_syntax = "wsh" + +let &cpo = s:wsh_cpo_save +unlet s:wsh_cpo_save diff --git a/runtime/syntax/wvdial.vim b/runtime/syntax/wvdial.vim new file mode 100644 index 000000000..035138b65 --- /dev/null +++ b/runtime/syntax/wvdial.vim @@ -0,0 +1,28 @@ +" Vim syntax file +" Language: Configuration file for WvDial +" Maintainer: Prahlad Vaidyanathan <slime@vsnl.net> +" Last Update: Mon, 15 Oct 2001 09:39:03 Indian Standard Time + +" Quit if syntax file is already loaded +if exists("b:current_syntax") + finish +endif + +syn match wvdialComment "^;.*$"lc=1 +syn match wvdialComment "[^\\];.*$"lc=1 +syn match wvdialSection "^\s*\[.*\]" +syn match wvdialValue "=.*$"ms=s+1 +syn match wvdialValue "\s*[^ ;"' ]\+"lc=1 +syn match wvdialVar "^\s*\(Inherits\|Modem\|Baud\|Init.\|Phone\|Area\ Code\|Dial\ Prefix\|Dial\ Command\|Login\|Login\| Prompt\|Password\|Password\ Prompt\|PPPD\ Path\|Force\ Address\|Remote\ Name\|Carrier\ Check\|Stupid\ [Mm]ode\|New\ PPPD\|Default\ Reply\|Auto\ Reconnect\|SetVolume\|Username\)" +syn match wvdialEqual "=" + +" The default highlighting +hi def link wvdialComment Comment +hi def link wvdialSection PreProc +hi def link wvdialVar Identifier +hi def link wvdialValue String +hi def link wvdialEqual Statement + +let b:current_syntax = "wvdial" + +"EOF vim: tw=78:ft=vim:ts=8 diff --git a/runtime/syntax/xdefaults.vim b/runtime/syntax/xdefaults.vim new file mode 100644 index 000000000..64d3b6953 --- /dev/null +++ b/runtime/syntax/xdefaults.vim @@ -0,0 +1,145 @@ +" Vim syntax file +" Language: X resources files like ~/.Xdefaults (xrdb) +" Maintainer: Johannes Zellner <johannes@zellner.org> +" Author and previous maintainer: +" Gautam H. Mudunuri <gmudunur@informatica.com> +" Last Change: Tue, 27 Apr 2004 14:54:59 CEST +" $Id$ +" +" REFERENCES: +" xrdb manual page +" xrdb source: ftp://ftp.x.org/pub/R6.4/xc/programs/xrdb/xrdb.c + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" turn case on +syn case match + + +if !exists("xdefaults_no_colon_errors") + " mark lines which do not contain a colon as errors. + " This does not really catch all errors but only lines + " which contain at least two WORDS and no colon. This + " was done this way so that a line is not marked as + " error while typing (which would be annoying). + syntax match xdefaultsErrorLine "^\s*[a-zA-Z.*]\+\s\+[^: ]\+" +endif + + +" syn region xdefaultsLabel start=+^[^:]\{-}:+he=e-1 skip=+\\+ end="$" +syn match xdefaultsLabel +[^:]\{-}:+he=e-1 contains=xdefaultsPunct,xdefaultsSpecial,xdefaultsLineEnd +syn region xdefaultsValue keepend start=+:+lc=1 skip=+\\+ end=+$+ contains=xdefaultsSpecial,xdefaultsLabel,xdefaultsLineEnd + +syn match xdefaultsSpecial contained +#override+ +syn match xdefaultsSpecial contained +#augment+ +syn match xdefaultsPunct contained +[.*:]+ +syn match xdefaultsLineEnd contained +\\$+ +syn match xdefaultsLineEnd contained +\\n\\$+ +syn match xdefaultsLineEnd contained +\\n$+ + + + +" COMMENTS + +" note, that the '!' must be at the very first position of the line +syn match xdefaultsComment "^!.*$" contains=xdefaultsTodo + +" lines starting with a '#' mark and which are not preprocessor +" lines are skipped. This is not part of the xrdb documentation. +" It was reported by Bram Moolenaar and could be confirmed by +" having a look at xrdb.c:GetEntries() +syn match xdefaultsCommentH "^#.*$" +"syn region xdefaultsComment start="^#" end="$" keepend contains=ALL +syn region xdefaultsComment start="/\*" end="\*/" contains=xdefaultsTodo + +syntax match xdefaultsCommentError "\*/" + +syn keyword xdefaultsTodo contained TODO FIXME XXX display + + + +" PREPROCESSOR STUFF + +syn region xdefaultsPreProc start="^\s*#\s*\(if\|ifdef\|ifndef\|elif\|else\|endif\)\>" skip="\\$" end="$" contains=xdefaultsSymbol +if !exists("xdefaults_no_if0") + syn region xdefaultsCppOut start="^\s*#\s*if\s\+0\>" end=".\|$" contains=xdefaultsCppOut2 + syn region xdefaultsCppOut2 contained start="0" end="^\s*#\s*\(endif\>\|else\>\|elif\>\)" contains=xdefaultsCppSkip + syn region xdefaultsCppSkip contained start="^\s*#\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*#\s*endif\>" contains=xdefaultsCppSkip +endif +syn region xdefaultsIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ +syn match xdefaultsIncluded contained "<[^>]*>" +syn match xdefaultsInclude "^\s*#\s*include\>\s*["<]" contains=xdefaultsIncluded +syn cluster xdefaultsPreProcGroup contains=xdefaultsPreProc,xdefaultsIncluded,xdefaultsInclude,xdefaultsDefine +syn region xdefaultsDefine start="^\s*#\s*\(define\|undef\)\>" skip="\\$" end="$" contains=ALLBUT,@xdefaultsPreProcGroup,xdefaultsCommentH,xdefaultsErrorLine +syn region xdefaultsPreProc start="^\s*#\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@xdefaultsPreProcGroup,xdefaultsCommentH,xdefaultsErrorLine + + + +" symbols as defined by xrdb +syn keyword xdefaultsSymbol contained SERVERHOST +syn match xdefaultsSymbol contained "SRVR_[a-zA-Z0-9_]\+" +syn keyword xdefaultsSymbol contained HOST +syn keyword xdefaultsSymbol contained DISPLAY_NUM +syn keyword xdefaultsSymbol contained CLIENTHOST +syn match xdefaultsSymbol contained "CLNT_[a-zA-Z0-9_]\+" +syn keyword xdefaultsSymbol contained RELEASE +syn keyword xdefaultsSymbol contained REVISION +syn keyword xdefaultsSymbol contained VERSION +syn keyword xdefaultsSymbol contained VENDOR +syn match xdefaultsSymbol contained "VNDR_[a-zA-Z0-9_]\+" +syn match xdefaultsSymbol contained "EXT_[a-zA-Z0-9_]\+" +syn keyword xdefaultsSymbol contained NUM_SCREENS +syn keyword xdefaultsSymbol contained SCREEN_NUM +syn keyword xdefaultsSymbol contained BITS_PER_RGB +syn keyword xdefaultsSymbol contained CLASS +syn keyword xdefaultsSymbol contained StaticGray GrayScale StaticColor PseudoColor TrueColor DirectColor +syn match xdefaultsSymbol contained "CLASS_\(StaticGray\|GrayScale\|StaticColor\|PseudoColor\|TrueColor\|DirectColor\)" +syn keyword xdefaultsSymbol contained COLOR +syn match xdefaultsSymbol contained "CLASS_\(StaticGray\|GrayScale\|StaticColor\|PseudoColor\|TrueColor\|DirectColor\)_[0-9]\+" +syn keyword xdefaultsSymbol contained HEIGHT +syn keyword xdefaultsSymbol contained WIDTH +syn keyword xdefaultsSymbol contained PLANES +syn keyword xdefaultsSymbol contained X_RESOLUTION +syn keyword xdefaultsSymbol contained Y_RESOLUTION + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_xdefaults_syntax_inits") + if version < 508 + let did_xdefaults_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + HiLink xdefaultsLabel Type + HiLink xdefaultsValue Constant + HiLink xdefaultsComment Comment + HiLink xdefaultsCommentH xdefaultsComment + HiLink xdefaultsPreProc PreProc + HiLink xdefaultsInclude xdefaultsPreProc + HiLink xdefaultsCppSkip xdefaultsCppOut + HiLink xdefaultsCppOut2 xdefaultsCppOut + HiLink xdefaultsCppOut Comment + HiLink xdefaultsIncluded String + HiLink xdefaultsDefine Macro + HiLink xdefaultsSymbol Statement + HiLink xdefaultsSpecial Statement + HiLink xdefaultsErrorLine Error + HiLink xdefaultsCommentError Error + HiLink xdefaultsPunct Normal + HiLink xdefaultsLineEnd Special + HiLink xdefaultsTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "xdefaults" + +" vim:ts=8 diff --git a/runtime/syntax/xf86conf.vim b/runtime/syntax/xf86conf.vim new file mode 100644 index 000000000..8d0f60638 --- /dev/null +++ b/runtime/syntax/xf86conf.vim @@ -0,0 +1,209 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: XF86Config (XFree86 configuration file) +" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> +" Last Change: 2003-05-01 +" URL: http://trific.ath.cx/Ftp/vim/syntax/xf86conf.vim +" Required Vim Version: 6.0 +" +" Options: let xf86conf_xfree86_version = 3 or 4 +" to force XFree86 3.x or 4.x XF86Config syntax + +" Setup +if version >= 600 + if exists("b:current_syntax") + finish + endif +else + echo "Sorry, but this syntax file relies on Vim 6 features. Either upgrade Vim or usea version of " . expand("<sfile>:t:r") . " syntax file appropriate for Vim " . version/100 . "." . version %100 . "." + finish +endif + +if !exists("b:xf86conf_xfree86_version") + if exists("xf86conf_xfree86_version") + let b:xf86conf_xfree86_version = xf86conf_xfree86_version + else + let b:xf86conf_xfree86_version = 4 + endif +endif + +syn case ignore + +" Comments +syn match xf86confComment "#.*$" contains=xf86confTodo +syn case match +syn keyword xf86confTodo FIXME TODO XXX NOT contained +syn case ignore +syn match xf86confTodo "???" contained + +" Sectioning errors +syn keyword xf86confSectionError Section contained +syn keyword xf86confSectionError EndSection +syn keyword xf86confSubSectionError SubSection +syn keyword xf86confSubSectionError EndSubSection +syn keyword xf86confModeSubSectionError Mode +syn keyword xf86confModeSubSectionError EndMode +syn cluster xf86confSectionErrors contains=xf86confSectionError,xf86confSubSectionError,xf86confModeSubSectionError + +" Values +if b:xf86conf_xfree86_version >= 4 + syn region xf86confString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=xf86confSpecialChar,xf86confConstant,xf86confOptionName oneline keepend nextgroup=xf86confValue skipwhite +else + syn region xf86confString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=xf86confSpecialChar,xf86confOptionName oneline keepend +endif +syn match xf86confSpecialChar "\\\d\d\d\|\\." contained +syn match xf86confDecimalNumber "\(\s\|-\)\zs\d*\.\=\d\+\>" +syn match xf86confFrequency "\(\s\|-\)\zs\d\+\.\=\d*\(Hz\|k\|kHz\|M\|MHz\)" +syn match xf86confOctalNumber "\<0\o\+\>" +syn match xf86confOctalNumberError "\<0\o\+[89]\d*\>" +syn match xf86confHexadecimalNumber "\<0x\x\+\>" +syn match xf86confValue "\s\+.*$" contained contains=xf86confComment,xf86confString,xf86confFrequency,xf86conf\w\+Number,xf86confConstant +syn keyword xf86confOption Option nextgroup=xf86confString skipwhite +syn match xf86confModeLineValue "\"[^\"]\+\"\(\_s\+[0-9.]\+\)\{9}" nextgroup=xf86confSync skipwhite skipnl + +" Sections and subsections +if b:xf86conf_xfree86_version >= 4 + syn region xf86confSection matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Vendor\|Keyboard\|Pointer\)\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,xf86confSectionError + syn region xf86confSectionModule matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Module\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionAny,xf86confComment,xf86confOption,xf86confKeyword + syn region xf86confSectionMonitor matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Monitor\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment,xf86confOption,xf86confKeyword + syn region xf86confSectionModes matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Modes\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment + syn region xf86confSectionScreen matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Screen\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionDisplay,xf86confComment,xf86confOption,xf86confKeyword + syn region xf86confSubSectionAny matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"[^\"]\+\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,@xf86confSectionErrors + syn region xf86confSubSectionMode matchgroup=xf86confSectionDelim start="^\s*Mode\s\+\"[^\"]\+\"" end="^\s*EndMode\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confKeyword,@xf86confSectionErrors + syn region xf86confSubSectionDisplay matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"Display\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOption,xf86confKeyword,@xf86confSectionErrors +else + syn region xf86confSection matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Device\|Keyboard\|Pointer\)\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword + syn region xf86confSectionMX matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"\(Module\|Xinput\)\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionAny,xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword + syn region xf86confSectionMonitor matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Monitor\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionMode,xf86confModeLine,xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword + syn region xf86confSectionScreen matchgroup=xf86confSectionDelim start="^\s*Section\s\+\"Screen\"" end="^\s*EndSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confSubsectionDisplay,xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword + syn region xf86confSubSectionAny matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"[^\"]\+\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword,@xf86confSectionErrors + syn region xf86confSubSectionMode matchgroup=xf86confSectionDelim start="^\s*Mode\s\+\"[^\"]\+\"" end="^\s*EndMode\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword,@xf86confSectionErrors + syn region xf86confSubSectionDisplay matchgroup=xf86confSectionDelim start="^\s*SubSection\s\+\"Display\"" end="^\s*EndSubSection\>" skip="#.*$\|\"[^\"]*\"" contains=xf86confComment,xf86confOptionName,xf86confOption,xf86confKeyword,@xf86confSectionErrors +endif + +" Options +if b:xf86conf_xfree86_version >= 4 + command -nargs=+ Xf86confdeclopt syn keyword xf86confOptionName <args> contained +else + command -nargs=+ Xf86confdeclopt syn keyword xf86confOptionName <args> contained nextgroup=xf86confValue,xf86confComment skipwhite +endif + +Xf86confdeclopt 18bitBus AGPFastWrite AGPMode Accel AllowClosedownGrabs AllowDeactivateGrabs +Xf86confdeclopt AllowMouseOpenFail AllowNonLocalModInDev AllowNonLocalXvidtune AlwaysCore +Xf86confdeclopt AngleOffset AutoRepeat BaudRate BeamTimeout Beep BlankTime BlockWrite BottomX +Xf86confdeclopt BottomY ButtonNumber ButtonThreshold Buttons ByteSwap CacheLines ChordMiddle +Xf86confdeclopt ClearDTR ClearDTS ClickMode CloneDisplay CloneHSync CloneMode CloneVRefresh +Xf86confdeclopt ColorKey Composite CompositeSync CoreKeyboard CorePointer Crt2Memory CrtScreen +Xf86confdeclopt CrtcNumber CyberShadow CyberStretch DDC DDCMode DMAForXv DPMS Dac6Bit DacSpeed +Xf86confdeclopt DataBits Debug DebugLevel DefaultServerLayout DeltaX DeltaY Device DeviceName +Xf86confdeclopt DisableModInDev DisableVidModeExtension Display Display1400 DontVTSwitch +Xf86confdeclopt DontZap DontZoom DoubleScan DozeMode DozeScan DozeTime DragLockButtons +Xf86confdeclopt DualCount DualRefresh EarlyRasPrecharge Emulate3Buttons Emulate3Timeout +Xf86confdeclopt EmulateWheel EmulateWheelButton EmulateWheelInertia EnablePageFlip EnterCount +Xf86confdeclopt EstimateSizesAggressively ExternDisp FPClock16 FPClock24 FPClock32 +Xf86confdeclopt FPClock8 FPDither FastDram FifoAggresive FifoConservative FifoModerate +Xf86confdeclopt FireGL3000 FixPanelSize FlatPanel FlipXY FlowControl ForceCRT1 ForceCRT2Type +Xf86confdeclopt ForceLegacyCRT ForcePCIMode FpmVRAM FrameBufferWC FullMMIO GammaBrightness +Xf86confdeclopt HWClocks HWCursor HandleSpecialKeys HistorySize Interlace Interlaced InternDisp +Xf86confdeclopt InvX InvY InvertX InvertY KeepShape LCDClock LateRasPrecharge LcdCenter +Xf86confdeclopt LeftAlt Linear MGASDRAM MMIO MMIOCache MTTR MaxX MaxY MaximumXPosition +Xf86confdeclopt MaximumYPosition MinX MinY MinimumXPosition MinimumYPosition NoAccel +Xf86confdeclopt NoAllowMouseOpenFail NoAllowNonLocalModInDev NoAllowNonLocalXvidtune +Xf86confdeclopt NoBlockWrite NoCompositeSync NoCompression NoCrtScreen NoCyberShadow NoDCC +Xf86confdeclopt NoDDC NoDac6Bit NoDebug NoDisableModInDev NoDisableVidModeExtension NoDontZap +Xf86confdeclopt NoDontZoom NoFireGL3000 NoFixPanelSize NoFpmVRAM NoFrameBufferWC NoHWClocks +Xf86confdeclopt NoHWCursor NoHal NoLcdCenter NoLinear NoMGASDRAM NoMMIO NoMMIOCache NoMTTR +Xf86confdeclopt NoOverClockMem NoOverlay NoPC98 NoPM NoPciBurst NoPciRetry NoProbeClock +Xf86confdeclopt NoSTN NoSWCursor NoShadowFb NoShowCache NoSlowEDODRAM NoStretch NoSuspendHack +Xf86confdeclopt NoTexturedVideo NoTrapSignals NoUseFBDev NoUseModeline NoUseVclk1 NoVTSysReq +Xf86confdeclopt NoXVideo NvAGP OSMImageBuffers OffTime Origin OverClockMem Overlay +Xf86confdeclopt PC98 PCIBurst PM PWMActive PWMSleep PanelDelayCompensation PanelHeight +Xf86confdeclopt PanelOff PanelWidth Parity PciBurst PciRetry Pixmap Port PressDur PressPitch +Xf86confdeclopt PressVol ProbeClocks ProgramFPRegs Protocol RGBBits ReleaseDur ReleasePitch +Xf86confdeclopt ReportingMode Resolution RightAlt RightCtl Rotate STN SWCursor SampleRate +Xf86confdeclopt ScreenNumber ScrollLock SendCoreEvents SendDragEvents Serial ServerNumLock +Xf86confdeclopt SetLcdClk SetMClk SetRefClk ShadowFb ShadowStatus ShowCache SleepMode +Xf86confdeclopt SleepScan SleepTime SlowDram SlowEDODRAM StandbyTime StopBits Stretch +Xf86confdeclopt SuspendHack SuspendTime SwapXY SyncOnGreen TV TVOutput TVOverscan TVStandard +Xf86confdeclopt TVXPosOffset TVYPosOffset TexturedVideo Threshold Tilt TopX TopY TouchTime +Xf86confdeclopt TrapSignals Type USB UseBIOS UseFB UseFBDev UseFlatPanel UseModeline +Xf86confdeclopt UseROMData UseVclk1 VTInit VTSysReq VTime VideoKey Vmin XAxisMapping +Xf86confdeclopt XLeds XVideo XaaNoCPUToScreenColorExpandFill XaaNoColor8x8PatternFillRect +Xf86confdeclopt XaaNoColor8x8PatternFillTrap XaaNoDashedBresenhamLine XaaNoDashedTwoPointLine +Xf86confdeclopt XaaNoImageWriteRect XaaNoMono8x8PatternFillRect XaaNoMono8x8PatternFillTrap +Xf86confdeclopt XaaNoOffscreenPixmaps XaaNoPixmapCache XaaNoScanlineCPUToScreenColorExpandFill +Xf86confdeclopt XaaNoScanlineImageWriteRect XaaNoScreenToScreenColorExpandFill +Xf86confdeclopt XaaNoScreenToScreenCopy XaaNoSolidBresenhamLine XaaNoSolidFillRect +Xf86confdeclopt XaaNoSolidFillTrap XaaNoSolidHorVertLine XaaNoSolidTwoPointLine Xinerama +Xf86confdeclopt XkbCompat XkbDisable XkbGeometry XkbKeycodes XkbKeymap XkbLayout XkbModel +Xf86confdeclopt XkbOptions XkbRules XkbSymbols XkbTypes XkbVariant XvBskew XvHsync XvOnCRT2 +Xf86confdeclopt XvRskew XvVsync YAxisMapping ZAxisMapping ZoomOnLCD + +delcommand Xf86confdeclopt + +" Keywords +syn keyword xf86confKeyword Device Driver FontPath Group Identifier Load ModelName ModulePath Monitor RGBPath VendorName VideoAdaptor Visual nextgroup=xf86confComment,xf86confString skipwhite +syn keyword xf86confKeyword BiosBase Black BoardName BusID ChipID ChipRev Chipset nextgroup=xf86confComment,xf86confValue +syn keyword xf86confKeyword ClockChip Clocks DacSpeed DefaultDepth DefaultFbBpp nextgroup=xf86confComment,xf86confValue +syn keyword xf86confKeyword DefaultColorDepth nextgroup=xf86confComment,xf86confValue +syn keyword xf86confKeyword Depth DisplaySize DotClock FbBpp Flags Gamma HorizSync nextgroup=xf86confComment,xf86confValue +syn keyword xf86confKeyword Hskew HTimings InputDevice IOBase MemBase Mode nextgroup=xf86confComment,xf86confValue +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 xf86confModeLine ModeLine nextgroup=xf86confComment,xf86confModeLineValue skipwhite skipnl + +" Constants +if b:xf86conf_xfree86_version >= 4 + syn keyword xf86confConstant true false on off yes no omit contained +else + syn keyword xf86confConstant Meta Compose Control +endif +syn keyword xf86confConstant StaticGray GrayScale StaticColor PseudoColor TrueColor DirectColor contained +syn keyword xf86confConstant Absolute RightOf LeftOf Above Below Relative StaticGray GrayScale StaticColor PseudoColor TrueColor DirectColor contained +syn match xf86confSync "\(\s\+[+-][CHV]_*Sync\)\+" contained + +" Synchronization +if b:xf86conf_xfree86_version >= 4 + syn sync match xf86confSyncSection grouphere xf86confSection "^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Input[_ ]*Device\|Device\|Video[_ ]*Adaptor\|Server[_ ]*Layout\|DRI\|Vendor\|Keyboard\|Pointer\)\"" + syn sync match xf86confSyncSectionModule grouphere xf86confSectionModule "^\s*Section\s\+\"Module\"" + syn sync match xf86confSyncSectionModes groupthere xf86confSectionModes "^\s*Section\s\+\"Modes\"" +else + syn sync match xf86confSyncSection grouphere xf86confSection "^\s*Section\s\+\"\(Files\|Server[_ ]*Flags\|Device\|Keyboard\|Pointer\)\"" + syn sync match xf86confSyncSectionMX grouphere xf86confSectionMX "^\s*Section\s\+\"\(Module\|Xinput\)\"" +endif +syn sync match xf86confSyncSectionMonitor groupthere xf86confSectionMonitor "^\s*Section\s\+\"Monitor\"" +syn sync match xf86confSyncSectionScreen groupthere xf86confSectionScreen "^\s*Section\s\+\"Screen\"" +syn sync match xf86confSyncEndSection groupthere NONE "^\s*End_*Section\s*$" + +" Define the default highlighting +hi def link xf86confComment Comment +hi def link xf86confTodo Todo +hi def link xf86confSectionDelim Statement +hi def link xf86confOptionName Identifier + +hi def link xf86confSectionError xf86confError +hi def link xf86confSubSectionError xf86confError +hi def link xf86confModeSubSectionError xf86confError +hi def link xf86confOctalNumberError xf86confError +hi def link xf86confError Error + +hi def link xf86confOption xf86confKeyword +hi def link xf86confModeLine xf86confKeyword +hi def link xf86confKeyword Type + +hi def link xf86confDecimalNumber xf86confNumber +hi def link xf86confOctalNumber xf86confNumber +hi def link xf86confHexadecimalNumber xf86confNumber +hi def link xf86confFrequency xf86confNumber +hi def link xf86confModeLineValue Constant +hi def link xf86confNumber Constant + +hi def link xf86confSync xf86confConstant +hi def link xf86confConstant Special +hi def link xf86confSpecialChar Special +hi def link xf86confString String + +hi def link xf86confValue Constant + +let b:current_syntax = "xf86conf" diff --git a/runtime/syntax/xhtml.vim b/runtime/syntax/xhtml.vim new file mode 100644 index 000000000..0c6ea7340 --- /dev/null +++ b/runtime/syntax/xhtml.vim @@ -0,0 +1,11 @@ +" Vim syntax file +" Language: XHTML +" Maintainer: noone +" Last Change: 2003 Feb 04 + +" Load the HTML syntax for now. +runtime! syntax/html.vim + +let b:current_syntax = "xhtml" + +" vim: ts=8 diff --git a/runtime/syntax/xkb.vim b/runtime/syntax/xkb.vim new file mode 100644 index 000000000..ff9bfd0da --- /dev/null +++ b/runtime/syntax/xkb.vim @@ -0,0 +1,91 @@ +" Vim syntax file +" This is a GENERATED FILE. Please always refer to source file at the URI below. +" Language: XKB (X Keyboard Extension) components +" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> +" Last Change: 2003-04-13 +" URL: http://trific.ath.cx/Ftp/vim/syntax/xkb.vim + +" Setup +if version >= 600 + if exists("b:current_syntax") + finish + endif +else + syntax clear +endif + +syn case match +syn sync minlines=100 + +" Comments +syn region xkbComment start="//" skip="\\$" end="$" keepend contains=xkbTodo +syn region xkbComment start="/\*" matchgroup=NONE end="\*/" contains=xkbCommentStartError,xkbTodo +syn match xkbCommentError "\*/" +syntax match xkbCommentStartError "/\*" contained +syn sync ccomment xkbComment +syn keyword xkbTodo TODO FIXME contained + +" Literal strings +syn match xkbSpecialChar "\\\d\d\d\|\\." contained +syn region xkbString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=xkbSpecialChar oneline + +" Catch errors caused by wrong parenthesization +syn region xkbParen start='(' end=')' contains=ALLBUT,xkbParenError,xkbSpecial,xkbTodo transparent +syn match xkbParenError ")" +syn region xkbBrace start='{' end='}' contains=ALLBUT,xkbBraceError,xkbSpecial,xkbTodo transparent +syn match xkbBraceError "}" +syn region xkbBracket start='\[' end='\]' contains=ALLBUT,xkbBracketError,xkbSpecial,xkbTodo transparent +syn match xkbBracketError "\]" + +" Physical keys +syn match xkbPhysicalKey "<\w\+>" + +" Keywords +syn keyword xkbPreproc augment include replace +syn keyword xkbConstant False True +syn keyword xkbModif override replace +syn keyword xkbIdentifier action affect alias allowExplicit approx baseColor button clearLocks color controls cornerRadius count ctrls description driveskbd font fontSize gap group groups height indicator indicatorDrivesKeyboard interpret key keys labelColor latchToLock latchMods left level_name map maximum minimum modifier_map modifiers name offColor onColor outline preserve priority repeat row section section setMods shape slant solid symbols text top type useModMapMods virtualModifier virtualMods virtual_modifiers weight whichModState width +syn keyword xkbFunction AnyOf ISOLock LatchGroup LatchMods LockControls LockGroup LockMods LockPointerButton MovePtr NoAction PointerButton SetControls SetGroup SetMods SetPtrDflt Terminate +syn keyword xkbTModif default hidden partial virtual +syn keyword xkbSect alphanumeric_keys alternate_group function_keys keypad_keys modifier_keys xkb_compatibility xkb_geometry xkb_keycodes xkb_keymap xkb_semantics xkb_symbols xkb_types + +" Define the default highlighting +if version >= 508 || !exists("did_xkb_syntax_inits") + if version < 508 + let did_xkb_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink xkbModif xkbPreproc + HiLink xkbTModif xkbPreproc + HiLink xkbPreproc Preproc + + HiLink xkbIdentifier Keyword + HiLink xkbFunction Function + HiLink xkbSect Type + HiLink xkbPhysicalKey Identifier + HiLink xkbKeyword Keyword + + HiLink xkbComment Comment + HiLink xkbTodo Todo + + HiLink xkbConstant Constant + HiLink xkbString String + + HiLink xkbSpecialChar xkbSpecial + HiLink xkbSpecial Special + + HiLink xkbParenError xkbBalancingError + HiLink xkbBraceError xkbBalancingError + HiLink xkbBraketError xkbBalancingError + HiLink xkbBalancingError xkbError + HiLink xkbCommentStartError xkbCommentError + HiLink xkbCommentError xkbError + HiLink xkbError Error + + delcommand HiLink +endif + +let b:current_syntax = "xkb" diff --git a/runtime/syntax/xmath.vim b/runtime/syntax/xmath.vim new file mode 100644 index 000000000..21962fb42 --- /dev/null +++ b/runtime/syntax/xmath.vim @@ -0,0 +1,235 @@ +" Vim syntax file +" Language: xmath (a simulation tool) +" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> +" Last Change: Sep 02, 2003 +" Version: 3 +" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" parenthesis sanity checker +syn region xmathZone matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" transparent contains=ALLBUT,xmathError,xmathBraceError,xmathCurlyError +syn region xmathZone matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" transparent contains=ALLBUT,xmathError,xmathBraceError,xmathParenError +syn region xmathZone matchgroup=Delimiter start="\[" matchgroup=Delimiter end="]" transparent contains=ALLBUT,xmathError,xmathCurlyError,xmathParenError +syn match xmathError "[)\]}]" +syn match xmathBraceError "[)}]" contained +syn match xmathCurlyError "[)\]]" contained +syn match xmathParenError "[\]}]" contained +syn match xmathComma "[,;:]" +syn match xmathComma "\.\.\.$" + +" A bunch of useful xmath keywords +syn case ignore +syn keyword xmathFuncCmd function endfunction command endcommand +syn keyword xmathStatement abort beep debug default define +syn keyword xmathStatement execute exit pause return undefine +syn keyword xmathConditional if else elseif endif +syn keyword xmathRepeat while for endwhile endfor +syn keyword xmathCmd anigraph deletedatastore keep renamedatastore +syn keyword xmathCmd autocode deletestd linkhyper renamestd +syn keyword xmathCmd build deletesuperblock linksim renamesuperblock +syn keyword xmathCmd comment deletetransition listusertype save +syn keyword xmathCmd copydatastore deleteusertype load sbadisplay +syn keyword xmathCmd copystd detailmodel lock set +syn keyword xmathCmd copysuperblock display minmax_display setsbdefault +syn keyword xmathCmd createblock documentit modifyblock show +syn keyword xmathCmd createbubble editcatalog modifybubble showlicense +syn keyword xmathCmd createconnection erase modifystd showsbdefault +syn keyword xmathCmd creatertf expandsuperbubble modifysuperblock stop +syn keyword xmathCmd createstd for modifytransition stopcosim +syn keyword xmathCmd createsuperblock go modifyusertype syntax +syn keyword xmathCmd createsuperbubble goto new unalias +syn keyword xmathCmd createtransition hardcopy next unlock +syn keyword xmathCmd createusertype help polargraph usertype +syn keyword xmathCmd delete hyperbuild print whatis +syn keyword xmathCmd deleteblock if printmodel while +syn keyword xmathCmd deletebubble ifilter quit who +syn keyword xmathCmd deleteconnection ipcwc remove xgraph + +syn keyword xmathFunc abcd eye irea querystdoptions +syn keyword xmathFunc abs eyepattern is querysuperblock +syn keyword xmathFunc acos feedback ISID querysuperblockopt +syn keyword xmathFunc acosh fft ISID Models querytransition +syn keyword xmathFunc adconversion fftpdm kronecker querytransitionopt +syn keyword xmathFunc afeedback filter length qz +syn keyword xmathFunc all find limit rampinvar +syn keyword xmathFunc ambiguity firparks lin random +syn keyword xmathFunc amdemod firremez lin30 randpdm +syn keyword xmathFunc analytic firwind linearfm randpert +syn keyword xmathFunc analyze fmdemod linfnorm randsys +syn keyword xmathFunc any forwdiff lintodb rank +syn keyword xmathFunc append fprintf list rayleigh +syn keyword xmathFunc argn frac log rcepstrum +syn keyword xmathFunc argv fracred log10 rcond +syn keyword xmathFunc arma freq logm rdintegrate +syn keyword xmathFunc arma2ss freqcircle lognormal read +syn keyword xmathFunc armax freqcont logspace real +syn keyword xmathFunc ascii frequencyhop lowpass rectify +syn keyword xmathFunc asin fsesti lpopt redschur +syn keyword xmathFunc asinh fslqgcomp lqgcomp reflect +syn keyword xmathFunc atan fsregu lqgltr regulator +syn keyword xmathFunc atan2 fwls ls residue +syn keyword xmathFunc atanh gabor ls2unc riccati +syn keyword xmathFunc attach_ac100 garb ls2var riccati_eig +syn keyword xmathFunc backdiff gaussian lsjoin riccati_schur +syn keyword xmathFunc balance gcexp lu ricean +syn keyword xmathFunc balmoore gcos lyapunov rifd +syn keyword xmathFunc bandpass gdfileselection makecontinuous rlinfo +syn keyword xmathFunc bandstop gdmessage makematrix rlocus +syn keyword xmathFunc bj gdselection makepoly rms +syn keyword xmathFunc blknorm genconv margin rootlocus +syn keyword xmathFunc bode get markoff roots +syn keyword xmathFunc bpm get_info30 matchedpz round +syn keyword xmathFunc bpm2inn get_inn max rref +syn keyword xmathFunc bpmjoin gfdm maxlike rve_get +syn keyword xmathFunc bpmsplit gfsk mean rve_info +syn keyword xmathFunc bst gfskernel mergeseg rve_reset +syn keyword xmathFunc buttconstr gfunction min rve_update +syn keyword xmathFunc butterworth ggauss minimal samplehold +syn keyword xmathFunc cancel giv mkpert schur +syn keyword xmathFunc canform giv2var mkphase sdf +syn keyword xmathFunc ccepstrum givjoin mma sds +syn keyword xmathFunc char gpsk mmaget sdtrsp +syn keyword xmathFunc chebconstr gpulse mmaput sec +syn keyword xmathFunc chebyshev gqam mod sech +syn keyword xmathFunc check gqpsk modal siginterp +syn keyword xmathFunc cholesky gramp modalstate sign +syn keyword xmathFunc chop gsawtooth modcarrier sim +syn keyword xmathFunc circonv gsigmoid mreduce sim30 +syn keyword xmathFunc circorr gsin mtxplt simin +syn keyword xmathFunc clock gsinc mu simin30 +syn keyword xmathFunc clocus gsqpsk mulhank simout +syn keyword xmathFunc clsys gsquarewave multipath simout30 +syn keyword xmathFunc coherence gstep musynfit simtransform +syn keyword xmathFunc colorind GuiDialogCreate mxstr2xmstr sin +syn keyword xmathFunc combinepf GuiDialogDestroy mxstring2xmstring singriccati +syn keyword xmathFunc commentof GuiFlush names sinh +syn keyword xmathFunc compare GuiGetValue nichols sinm +syn keyword xmathFunc complementaryerf GuiManage noisefilt size +syn keyword xmathFunc complexenvelope GuiPlot none smargin +syn keyword xmathFunc complexfreqshift GuiPlotGet norm sns2sys +syn keyword xmathFunc concatseg GuiSetValue numden sort +syn keyword xmathFunc condition GuiShellCreate nyquist spectrad +syn keyword xmathFunc conj GuiShellDeiconify obscf spectrum +syn keyword xmathFunc conmap GuiShellDestroy observable spline +syn keyword xmathFunc connect GuiShellIconify oe sprintf +syn keyword xmathFunc conpdm GuiShellLower ones sqrt +syn keyword xmathFunc constellation GuiShellRaise ophank sqrtm +syn keyword xmathFunc consys GuiShellRealize optimize sresidualize +syn keyword xmathFunc controllable GuiShellUnrealize optscale ss2arma +syn keyword xmathFunc convolve GuiTimer orderfilt sst +syn keyword xmathFunc correlate GuiToolCreate orderstate ssv +syn keyword xmathFunc cos GuiToolDestroy orth stable +syn keyword xmathFunc cosh GuiToolExist oscmd stair +syn keyword xmathFunc cosm GuiUnmanage oscope starp +syn keyword xmathFunc cot GuiWidgetExist osscale step +syn keyword xmathFunc coth h2norm padcrop stepinvar +syn keyword xmathFunc covariance h2syn partialsum string +syn keyword xmathFunc csc hadamard pdm stringex +syn keyword xmathFunc csch hankelsv pdmslice substr +syn keyword xmathFunc csum hessenberg pem subsys +syn keyword xmathFunc ctrcf highpass perfplots sum +syn keyword xmathFunc ctrlplot hilbert period svd +syn keyword xmathFunc daug hilberttransform pfscale svplot +syn keyword xmathFunc dbtolin hinfcontr phaseshift sweep +syn keyword xmathFunc dct hinfnorm pinv symbolmap +syn keyword xmathFunc decimate hinfsyn plot sys2sns +syn keyword xmathFunc defFreqRange histogram plot30 sysic +syn keyword xmathFunc defTimeRange idfreq pmdemod Sysid +syn keyword xmathFunc delay idimpulse poisson system +syn keyword xmathFunc delsubstr idsim poissonimpulse tan +syn keyword xmathFunc det ifft poleplace tanh +syn keyword xmathFunc detrend imag poles taper +syn keyword xmathFunc dht impinvar polezero tfid +syn keyword xmathFunc diagonal impplot poltrend toeplitz +syn keyword xmathFunc differentiate impulse polyfit trace +syn keyword xmathFunc directsequence index polynomial tril +syn keyword xmathFunc discretize indexlist polyval trim +syn keyword xmathFunc divide initial polyvalm trim30 +syn keyword xmathFunc domain initmodel prbs triu +syn keyword xmathFunc dst initx0 product trsp +syn keyword xmathFunc eig inn2bpm psd truncate +syn keyword xmathFunc ellipconstr inn2pe put_inn tustin +syn keyword xmathFunc elliptic inn2unc qpopt uniform +syn keyword xmathFunc erf insertseg qr val +syn keyword xmathFunc error int quantize variance +syn keyword xmathFunc estimator integrate queryblock videolines +syn keyword xmathFunc etfe integratedump queryblockoptions wcbode +syn keyword xmathFunc exist interp querybubble wcgain +syn keyword xmathFunc exp interpolate querybubbleoptionswindow +syn keyword xmathFunc expm inv querycatalog wtbalance +syn keyword xmathFunc extractchan invhilbert queryconnection zeros +syn keyword xmathFunc extractseg iqmix querystd + +syn case match + +" Labels (supports xmath's goto) +syn match xmathLabel "^\s*<[a-zA-Z_][a-zA-Z0-9]*>" + +" String and Character constants +" Highlight special characters (those which have a backslash) differently +syn match xmathSpecial contained "\\\d\d\d\|\\." +syn region xmathString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=xmathSpecial +syn match xmathCharacter "'[^\\]'" +syn match xmathSpecialChar "'\\.'" + +syn match xmathNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" + +" Comments: +" xmath supports #... (like Unix shells) +" and #{ ... }# comment blocks +syn keyword xmathTodo contained TODO Todo DEBUG +syn match xmathComment "#.*$" contains=xmathString,xmathTodo,@Spell +syn region xmathCommentBlock start="#{" end="}#" contains=xmathString,xmathTodo + +" synchronizing +syn sync match xmathSyncComment grouphere xmathCommentBlock "#{" +syn sync match xmathSyncComment groupthere NONE "}#" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_xmath_syntax_inits") + if version < 508 + let did_xmath_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink xmathBraceError xmathError + HiLink xmathCmd xmathStatement + HiLink xmathCommentBlock xmathComment + HiLink xmathCurlyError xmathError + HiLink xmathFuncCmd xmathStatement + HiLink xmathParenError xmathError + + " The default methods for highlighting. Can be overridden later + HiLink xmathCharacter Character + HiLink xmathComma Delimiter + HiLink xmathComment Comment + HiLink xmathCommentBlock Comment + HiLink xmathConditional Conditional + HiLink xmathError Error + HiLink xmathFunc Function + HiLink xmathLabel PreProc + HiLink xmathNumber Number + HiLink xmathRepeat Repeat + HiLink xmathSpecial Type + HiLink xmathSpecialChar SpecialChar + HiLink xmathStatement Statement + HiLink xmathString String + HiLink xmathTodo Todo + + delcommand HiLink +endif + +let b:current_syntax = "xmath" + +" vim: ts=17 diff --git a/runtime/syntax/xml.vim b/runtime/syntax/xml.vim new file mode 100644 index 000000000..af6c626cf --- /dev/null +++ b/runtime/syntax/xml.vim @@ -0,0 +1,344 @@ +" Vim syntax file +" Language: XML +" Maintainer: Johannes Zellner <johannes@zellner.org> +" Author and previous maintainer: +" Paul Siegmann <pauls@euronet.nl> +" Last Change: Fri, 04 Jun 2004 10:41:54 CEST +" Filenames: *.xml +" $Id$ + +" CONFIGURATION: +" syntax folding can be turned on by +" +" let g:xml_syntax_folding = 1 +" +" before the syntax file gets loaded (e.g. in ~/.vimrc). +" This might slow down syntax highlighting significantly, +" especially for large files. +" +" CREDITS: +" The original version was derived by Paul Siegmann from +" Claudio Fleiner's html.vim. +" +" REFERENCES: +" [1] http://www.w3.org/TR/2000/REC-xml-20001006 +" [2] http://www.w3.org/XML/1998/06/xmlspec-report-19980910.htm +" +" as <hirauchi@kiwi.ne.jp> pointed out according to reference [1] +" +" 2.3 Common Syntactic Constructs +" [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender +" [5] Name ::= (Letter | '_' | ':') (NameChar)* +" +" NOTE: +" 1) empty tag delimiters "/>" inside attribute values (strings) +" confuse syntax highlighting. +" 2) for large files, folding can be pretty slow, especially when +" loading a file the first time and viewoptions contains 'folds' +" so that folds of previous sessions are applied. +" Don't use 'foldmethod=syntax' in this case. + + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +let s:xml_cpo_save = &cpo +set cpo&vim + +syn case match + +" mark illegal characters +syn match xmlError "[<&]" + +" strings (inside tags) aka VALUES +" +" EXAMPLE: +" +" <tag foo.attribute = "value"> +" ^^^^^^^ +syn region xmlString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=xmlEntity display +syn region xmlString contained start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=xmlEntity display + + +" punctuation (within attributes) e.g. <tag xml:foo.attribute ...> +" ^ ^ +" syn match xmlAttribPunct +[-:._]+ contained display +syn match xmlAttribPunct +[:.]+ contained display + +" no highlighting for xmlEqual (xmlEqual has no highlighting group) +syn match xmlEqual +=+ display + + +" attribute, everything before the '=' +" +" PROVIDES: @xmlAttribHook +" +" EXAMPLE: +" +" <tag foo.attribute = "value"> +" ^^^^^^^^^^^^^ +" +syn match xmlAttrib + \ +[-'"<]\@<!\<[a-zA-Z:_][-.0-9a-zA-Z0-9:_]*\>\(['">]\@!\|$\)+ + \ contained + \ contains=xmlAttribPunct,@xmlAttribHook + \ display + + +" namespace spec +" +" PROVIDES: @xmlNamespaceHook +" +" EXAMPLE: +" +" <xsl:for-each select = "lola"> +" ^^^ +" +if exists("g:xml_namespace_transparent") +syn match xmlNamespace + \ +\(<\|</\)\@<=[^ /!?<>"':]\+[:]\@=+ + \ contained + \ contains=@xmlNamespaceHook + \ transparent + \ display +else +syn match xmlNamespace + \ +\(<\|</\)\@<=[^ /!?<>"':]\+[:]\@=+ + \ contained + \ contains=@xmlNamespaceHook + \ display +endif + + +" tag name +" +" PROVIDES: @xmlTagHook +" +" EXAMPLE: +" +" <tag foo.attribute = "value"> +" ^^^ +" +syn match xmlTagName + \ +[<]\@<=[^ /!?<>"']\++ + \ contained + \ contains=xmlNamespace,xmlAttribPunct,@xmlTagHook + \ display + + +if exists('g:xml_syntax_folding') + + " start tag + " use matchgroup=xmlTag to skip over the leading '<' + " + " PROVIDES: @xmlStartTagHook + " + " EXAMPLE: + " + " <tag id="whoops"> + " s^^^^^^^^^^^^^^^e + " + syn region xmlTag + \ matchgroup=xmlTag start=+<[^ /!?<>"']\@=+ + \ matchgroup=xmlTag end=+>+ + \ contained + \ contains=xmlError,xmlTagName,xmlAttrib,xmlEqual,xmlString,@xmlStartTagHook + + + " highlight the end tag + " + " PROVIDES: @xmlTagHook + " (should we provide a separate @xmlEndTagHook ?) + " + " EXAMPLE: + " + " </tag> + " ^^^^^^ + " + syn match xmlEndTag + \ +</[^ /!?<>"']\+>+ + \ contained + \ contains=xmlNamespace,xmlAttribPunct,@xmlTagHook + + + " tag elements with syntax-folding. + " NOTE: NO HIGHLIGHTING -- highlighting is done by contained elements + " + " PROVIDES: @xmlRegionHook + " + " EXAMPLE: + " + " <tag id="whoops"> + " <!-- comment --> + " <another.tag></another.tag> + " <empty.tag/> + " some data + " </tag> + " + syn region xmlRegion + \ start=+<\z([^ /!?<>"']\+\)+ + \ skip=+<!--\_.\{-}-->+ + \ end=+</\z1\_\s\{-}>+ + \ matchgroup=xmlEndTag end=+/>+ + \ fold + \ contains=xmlTag,xmlEndTag,xmlCdata,xmlRegion,xmlComment,xmlEntity,xmlProcessing,@xmlRegionHook + \ keepend + \ extend + +else + + " no syntax folding: + " - contained attribute removed + " - xmlRegion not defined + " + syn region xmlTag + \ matchgroup=xmlTag start=+<[^ /!?<>"']\@=+ + \ matchgroup=xmlTag end=+>+ + \ contains=xmlError,xmlTagName,xmlAttrib,xmlEqual,xmlString,@xmlStartTagHook + + syn match xmlEndTag + \ +</[^ /!?<>"']\+>+ + \ contains=xmlNamespace,xmlAttribPunct,@xmlTagHook + +endif + + +" &entities; compare with dtd +syn match xmlEntity "&[^; \t]*;" contains=xmlEntityPunct +syn match xmlEntityPunct contained "[&.;]" + +if exists('g:xml_syntax_folding') + + " The real comments (this implements the comments as defined by xml, + " but not all xml pages actually conform to it. Errors are flagged. + syn region xmlComment + \ start=+<!+ + \ end=+>+ + \ contains=xmlCommentPart,xmlCommentError + \ extend + \ fold + +else + + " no syntax folding: + " - fold attribute removed + " + syn region xmlComment + \ start=+<!+ + \ end=+>+ + \ contains=xmlCommentPart,xmlCommentError + \ extend + +endif + +syn keyword xmlTodo contained TODO FIXME XXX display +syn match xmlCommentError contained "[^><!]" +syn region xmlCommentPart + \ start=+--+ + \ end=+--+ + \ contained + \ contains=xmlTodo,@xmlCommentHook + + +" CData sections +" +" PROVIDES: @xmlCdataHook +" +syn region xmlCdata + \ start=+<!\[CDATA\[+ + \ end=+]]>+ + \ contains=xmlCdataStart,xmlCdataEnd,@xmlCdataHook + \ keepend + \ extend + +" using the following line instead leads to corrupt folding at CDATA regions +" syn match xmlCdata +<!\[CDATA\[\_.\{-}]]>+ contains=xmlCdataStart,xmlCdataEnd,@xmlCdataHook +syn match xmlCdataStart +<!\[CDATA\[+ contained contains=xmlCdataCdata +syn keyword xmlCdataCdata CDATA contained +syn match xmlCdataEnd +]]>+ contained + + +" Processing instructions +" This allows "?>" inside strings -- good idea? +syn region xmlProcessing matchgroup=xmlProcessingDelim start="<?" end="?>" contains=xmlAttrib,xmlEqual,xmlString + + +if exists('g:xml_syntax_folding') + + " DTD -- we use dtd.vim here + syn region xmlDocType matchgroup=xmlDocTypeDecl + \ start="<!DOCTYPE"he=s+2,rs=s+2 end=">" + \ fold + \ contains=xmlDocTypeKeyword,xmlInlineDTD,xmlString +else + + " no syntax folding: + " - fold attribute removed + " + syn region xmlDocType matchgroup=xmlDocTypeDecl + \ start="<!DOCTYPE"he=s+2,rs=s+2 end=">" + \ contains=xmlDocTypeKeyword,xmlInlineDTD,xmlString + +endif + +syn keyword xmlDocTypeKeyword contained DOCTYPE PUBLIC SYSTEM +syn region xmlInlineDTD contained matchgroup=xmlDocTypeDecl start="\[" end="]" contains=@xmlDTD +syn include @xmlDTD <sfile>:p:h/dtd.vim +unlet b:current_syntax + + +" synchronizing +" TODO !!! to be improved !!! + +syn sync match xmlSyncDT grouphere xmlDocType +\_.\(<!DOCTYPE\)\@=+ +" syn sync match xmlSyncDT groupthere NONE +]>+ + +if exists('g:xml_syntax_folding') + syn sync match xmlSync grouphere xmlRegion +\_.\(<[^ /!?<>"']\+\)\@=+ + " syn sync match xmlSync grouphere xmlRegion "<[^ /!?<>"']*>" + syn sync match xmlSync groupthere xmlRegion +</[^ /!?<>"']\+>+ +endif + +syn sync minlines=100 + + +" The default highlighting. +hi def link xmlTodo Todo +hi def link xmlTag Function +hi def link xmlTagName Function +hi def link xmlEndTag Identifier +if !exists("g:xml_namespace_transparent") + hi def link xmlNamespace Tag +endif +hi def link xmlEntity Statement +hi def link xmlEntityPunct Type + +hi def link xmlAttribPunct Comment +hi def link xmlAttrib Type + +hi def link xmlString String +hi def link xmlComment Comment +hi def link xmlCommentPart Comment +hi def link xmlCommentError Error +hi def link xmlError Error + +hi def link xmlProcessingDelim Comment +hi def link xmlProcessing Type + +hi def link xmlCdata String +hi def link xmlCdataCdata Statement +hi def link xmlCdataStart Type +hi def link xmlCdataEnd Type + +hi def link xmlDocTypeDecl Function +hi def link xmlDocTypeKeyword Statement +hi def link xmlInlineDTD Function + +let b:current_syntax = "xml" + +let &cpo = s:xml_cpo_save +unlet s:xml_cpo_save + +" vim: ts=8 diff --git a/runtime/syntax/xmodmap.vim b/runtime/syntax/xmodmap.vim new file mode 100644 index 000000000..77218845c --- /dev/null +++ b/runtime/syntax/xmodmap.vim @@ -0,0 +1,172 @@ +" Vim syntax file +" Language: xmodmap definition file +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/xmodmap/ +" Latest Revision: 2004-05-22 +" arch-tag: 8c37ed41-655a-479d-8050-e15dc6770338 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" comments +syn region xmodmapComment display oneline matchgroup=xmodmapComment start=/^!/ end=/$/ contains=xmodmapTodo + +" todo +syn keyword xmodmapTodo contained TODO FIXME XXX NOTE + +" numbers +syn case ignore +syn match xmodmapInt display "\<\d\+\>" +syn match xmodmapHex display "\<0x\x\+\>" +syn match xmodmapOctal display "\<0\o\+\>" +syn match xmodmapOctalError display "\<0\o*[89]\d*" +syn case match + +" keysyms (taken from <X11/keysymdef.h>) +syn keyword xmodmapKeySym VoidSymbol BackSpace Tab Linefeed Clear Return Pause Scroll_Lock Sys_Req Escape Delete Multi_key Codeinput SingleCandidate MultipleCandidate +syn keyword xmodmapKeySym PreviousCandidate Kanji Muhenkan Henkan_Mode Henkan Romaji Hiragana Katakana Hiragana_Katakana Zenkaku Hankaku Zenkaku_Hankaku Touroku Massyo Kana_Lock +syn keyword xmodmapKeySym Kana_Shift Eisu_Shift Eisu_toggle Kanji_Bangou Zen_Koho Mae_Koho Home Left Up Right Down Prior Page_Up Next Page_Down +syn keyword xmodmapKeySym End Begin Select Print Execute Insert Undo Redo Menu Find Cancel Help Break Mode_switch script_switch +syn keyword xmodmapKeySym Num_Lock KP_Space KP_Tab KP_Enter KP_F1 KP_F2 KP_F3 KP_F4 KP_Home KP_Left KP_Up KP_Right KP_Down KP_Prior KP_Page_Up +syn keyword xmodmapKeySym KP_Next KP_Page_Down KP_End KP_Begin KP_Insert KP_Delete KP_Equal KP_Multiply KP_Add KP_Separator KP_Subtract KP_Decimal KP_Divide KP_0 KP_1 +syn keyword xmodmapKeySym KP_2 KP_3 KP_4 KP_5 KP_6 KP_7 KP_8 KP_9 F1 F2 F3 F4 F5 F6 F7 +syn keyword xmodmapKeySym F8 F9 F10 F11 L1 F12 L2 F13 L3 F14 L4 F15 L5 F16 L6 +syn keyword xmodmapKeySym F17 L7 F18 L8 F19 L9 F20 L10 F21 R1 F22 R2 F23 R3 F24 +syn keyword xmodmapKeySym R4 F25 R5 F26 R6 F27 R7 F28 R8 F29 R9 F30 R10 F31 R11 +syn keyword xmodmapKeySym F32 R12 F33 R13 F34 R14 F35 R15 Shift_L Shift_R Control_L Control_R Caps_Lock Shift_Lock Meta_L +syn keyword xmodmapKeySym Meta_R Alt_L Alt_R Super_L Super_R Hyper_L Hyper_R ISO_Lock ISO_Level2_Latch ISO_Level3_Shift ISO_Level3_Latch ISO_Level3_Lock ISO_Group_Shift ISO_Group_Latch ISO_Group_Lock +syn keyword xmodmapKeySym ISO_Next_Group ISO_Next_Group_Lock ISO_Prev_Group ISO_Prev_Group_Lock ISO_First_Group ISO_First_Group_Lock ISO_Last_Group ISO_Last_Group_Lock ISO_Left_Tab ISO_Move_Line_Up ISO_Move_Line_Down ISO_Partial_Line_Up ISO_Partial_Line_Down ISO_Partial_Space_Left ISO_Partial_Space_Right +syn keyword xmodmapKeySym ISO_Set_Margin_Left ISO_Set_Margin_Right ISO_Release_Margin_Left ISO_Release_Margin_Right ISO_Release_Both_Margins ISO_Fast_Cursor_Left ISO_Fast_Cursor_Right ISO_Fast_Cursor_Up ISO_Fast_Cursor_Down ISO_Continuous_Underline ISO_Discontinuous_Underline ISO_Emphasize ISO_Center_Object ISO_Enter dead_grave +syn keyword xmodmapKeySym dead_acute dead_circumflex dead_tilde dead_macron dead_breve dead_abovedot dead_diaeresis dead_abovering dead_doubleacute dead_caron dead_cedilla dead_ogonek dead_iota dead_voiced_sound dead_semivoiced_sound +syn keyword xmodmapKeySym dead_belowdot dead_hook dead_horn First_Virtual_Screen Prev_Virtual_Screen Next_Virtual_Screen Last_Virtual_Screen Terminate_Server AccessX_Enable AccessX_Feedback_Enable RepeatKeys_Enable SlowKeys_Enable BounceKeys_Enable StickyKeys_Enable MouseKeys_Enable +syn keyword xmodmapKeySym MouseKeys_Accel_Enable Overlay1_Enable Overlay2_Enable AudibleBell_Enable Pointer_Left Pointer_Right Pointer_Up Pointer_Down Pointer_UpLeft Pointer_UpRight Pointer_DownLeft Pointer_DownRight Pointer_Button_Dflt Pointer_Button1 Pointer_Button2 +syn keyword xmodmapKeySym Pointer_Button3 Pointer_Button4 Pointer_Button5 Pointer_DblClick_Dflt Pointer_DblClick1 Pointer_DblClick2 Pointer_DblClick3 Pointer_DblClick4 Pointer_DblClick5 Pointer_Drag_Dflt Pointer_Drag1 Pointer_Drag2 Pointer_Drag3 Pointer_Drag4 Pointer_Drag5 +syn keyword xmodmapKeySym Pointer_EnableKeys Pointer_Accelerate Pointer_DfltBtnNext Pointer_DfltBtnPrev 3270_Duplicate 3270_FieldMark 3270_Right2 3270_Left2 3270_BackTab 3270_EraseEOF 3270_EraseInput 3270_Reset 3270_Quit 3270_PA1 3270_PA2 +syn keyword xmodmapKeySym 3270_PA3 3270_Test 3270_Attn 3270_CursorBlink 3270_AltCursor 3270_KeyClick 3270_Jump 3270_Ident 3270_Rule 3270_Copy 3270_Play 3270_Setup 3270_Record 3270_ChangeScreen 3270_DeleteWord +syn keyword xmodmapKeySym 3270_ExSelect 3270_CursorSelect 3270_PrintScreen 3270_Enter space exclam quotedbl numbersign dollar percent ampersand apostrophe quoteright parenleft parenright +syn keyword xmodmapKeySym asterisk plus comma minus period slash 0 1 2 3 4 5 6 7 8 +syn keyword xmodmapKeySym 9 colon semicolon less equal greater question at A B C D E F G +syn keyword xmodmapKeySym H I J K L M N O P Q R S T U V +syn keyword xmodmapKeySym W X Y Z bracketleft backslash bracketright asciicircum underscore grave quoteleft a b c d +syn keyword xmodmapKeySym e f g h i j k l m n o p q r s +syn keyword xmodmapKeySym t u v w x y z braceleft bar braceright asciitilde nobreakspace exclamdown cent sterling +syn keyword xmodmapKeySym currency yen brokenbar section diaeresis copyright ordfeminine guillemotleft notsign hyphen registered macron degree plusminus twosuperior +syn keyword xmodmapKeySym threesuperior acute mu paragraph periodcentered cedilla onesuperior masculine guillemotright onequarter onehalf threequarters questiondown Agrave Aacute +syn keyword xmodmapKeySym Acircumflex Atilde Adiaeresis Aring AE Ccedilla Egrave Eacute Ecircumflex Ediaeresis Igrave Iacute Icircumflex Idiaeresis ETH +syn keyword xmodmapKeySym Eth Ntilde Ograve Oacute Ocircumflex Otilde Odiaeresis multiply Ooblique Oslash Ugrave Uacute Ucircumflex Udiaeresis Yacute +syn keyword xmodmapKeySym THORN Thorn ssharp agrave aacute acircumflex atilde adiaeresis aring ae ccedilla egrave eacute ecircumflex ediaeresis +syn keyword xmodmapKeySym igrave iacute icircumflex idiaeresis eth ntilde ograve oacute ocircumflex otilde odiaeresis division oslash ooblique ugrave +syn keyword xmodmapKeySym uacute ucircumflex udiaeresis yacute thorn ydiaeresis Aogonek breve Lstroke Lcaron Sacute Scaron Scedilla Tcaron Zacute +syn keyword xmodmapKeySym Zcaron Zabovedot aogonek ogonek lstroke lcaron sacute caron scaron scedilla tcaron zacute doubleacute zcaron zabovedot +syn keyword xmodmapKeySym Racute Abreve Lacute Cacute Ccaron Eogonek Ecaron Dcaron Dstroke Nacute Ncaron Odoubleacute Rcaron Uring Udoubleacute +syn keyword xmodmapKeySym Tcedilla racute abreve lacute cacute ccaron eogonek ecaron dcaron dstroke nacute ncaron odoubleacute udoubleacute rcaron +syn keyword xmodmapKeySym uring tcedilla abovedot Hstroke Hcircumflex Iabovedot Gbreve Jcircumflex hstroke hcircumflex idotless gbreve jcircumflex Cabovedot Ccircumflex +syn keyword xmodmapKeySym Gabovedot Gcircumflex Ubreve Scircumflex cabovedot ccircumflex gabovedot gcircumflex ubreve scircumflex kra kappa Rcedilla Itilde Lcedilla +syn keyword xmodmapKeySym Emacron Gcedilla Tslash rcedilla itilde lcedilla emacron gcedilla tslash ENG eng Amacron Iogonek Eabovedot Imacron +syn keyword xmodmapKeySym Ncedilla Omacron Kcedilla Uogonek Utilde Umacron amacron iogonek eabovedot imacron ncedilla omacron kcedilla uogonek utilde +syn keyword xmodmapKeySym umacron Babovedot babovedot Dabovedot Wgrave Wacute dabovedot Ygrave Fabovedot fabovedot Mabovedot mabovedot Pabovedot wgrave pabovedot +syn keyword xmodmapKeySym wacute Sabovedot ygrave Wdiaeresis wdiaeresis sabovedot Wcircumflex Tabovedot Ycircumflex wcircumflex tabovedot ycircumflex OE oe Ydiaeresis +syn keyword xmodmapKeySym overline kana_fullstop kana_openingbracket kana_closingbracket kana_comma kana_conjunctive kana_middledot kana_WO kana_a kana_i kana_u kana_e kana_o kana_ya kana_yu +syn keyword xmodmapKeySym kana_yo kana_tsu kana_tu prolongedsound kana_A kana_I kana_U kana_E kana_O kana_KA kana_KI kana_KU kana_KE kana_KO kana_SA +syn keyword xmodmapKeySym kana_SHI kana_SU kana_SE kana_SO kana_TA kana_CHI kana_TI kana_TSU kana_TU kana_TE kana_TO kana_NA kana_NI kana_NU kana_NE +syn keyword xmodmapKeySym kana_NO kana_HA kana_HI kana_FU kana_HU kana_HE kana_HO kana_MA kana_MI kana_MU kana_ME kana_MO kana_YA kana_YU kana_YO +syn keyword xmodmapKeySym kana_RA kana_RI kana_RU kana_RE kana_RO kana_WA kana_N voicedsound semivoicedsound kana_switch Farsi_0 Farsi_1 Farsi_2 Farsi_3 Farsi_4 +syn keyword xmodmapKeySym Farsi_5 Farsi_6 Farsi_7 Farsi_8 Farsi_9 Arabic_percent Arabic_superscript_alef Arabic_tteh Arabic_peh Arabic_tcheh Arabic_ddal Arabic_rreh Arabic_comma Arabic_fullstop Arabic_0 +syn keyword xmodmapKeySym Arabic_1 Arabic_2 Arabic_3 Arabic_4 Arabic_5 Arabic_6 Arabic_7 Arabic_8 Arabic_9 Arabic_semicolon Arabic_question_mark Arabic_hamza Arabic_maddaonalef Arabic_hamzaonalef Arabic_hamzaonwaw +syn keyword xmodmapKeySym Arabic_hamzaunderalef Arabic_hamzaonyeh Arabic_alef Arabic_beh Arabic_tehmarbuta Arabic_teh Arabic_theh Arabic_jeem Arabic_hah Arabic_khah Arabic_dal Arabic_thal Arabic_ra Arabic_zain Arabic_seen +syn keyword xmodmapKeySym Arabic_sheen Arabic_sad Arabic_dad Arabic_tah Arabic_zah Arabic_ain Arabic_ghain Arabic_tatweel Arabic_feh Arabic_qaf Arabic_kaf Arabic_lam Arabic_meem Arabic_noon Arabic_ha +syn keyword xmodmapKeySym Arabic_heh Arabic_waw Arabic_alefmaksura Arabic_yeh Arabic_fathatan Arabic_dammatan Arabic_kasratan Arabic_fatha Arabic_damma Arabic_kasra Arabic_shadda Arabic_sukun Arabic_madda_above Arabic_hamza_above Arabic_hamza_below +syn keyword xmodmapKeySym Arabic_jeh Arabic_veh Arabic_keheh Arabic_gaf Arabic_noon_ghunna Arabic_heh_doachashmee Farsi_yeh Arabic_farsi_yeh Arabic_yeh_baree Arabic_heh_goal Arabic_switch Cyrillic_GHE_bar Cyrillic_ghe_bar Cyrillic_ZHE_descender Cyrillic_zhe_descender +syn keyword xmodmapKeySym Cyrillic_KA_descender Cyrillic_ka_descender Cyrillic_KA_vertstroke Cyrillic_ka_vertstroke Cyrillic_EN_descender Cyrillic_en_descender Cyrillic_U_straight Cyrillic_u_straight Cyrillic_U_straight_bar Cyrillic_u_straight_bar Cyrillic_HA_descender Cyrillic_ha_descender Cyrillic_CHE_descender Cyrillic_che_descender Cyrillic_CHE_vertstroke +syn keyword xmodmapKeySym Cyrillic_che_vertstroke Cyrillic_SHHA Cyrillic_shha Cyrillic_SCHWA Cyrillic_schwa Cyrillic_I_macron Cyrillic_i_macron Cyrillic_O_bar Cyrillic_o_bar Cyrillic_U_macron Cyrillic_u_macron Serbian_dje Macedonia_gje Cyrillic_io Ukrainian_ie +syn keyword xmodmapKeySym Ukranian_je Macedonia_dse Ukrainian_i Ukranian_i Ukrainian_yi Ukranian_yi Cyrillic_je Serbian_je Cyrillic_lje Serbian_lje Cyrillic_nje Serbian_nje Serbian_tshe Macedonia_kje Ukrainian_ghe_with_upturn +syn keyword xmodmapKeySym Byelorussian_shortu Cyrillic_dzhe Serbian_dze numerosign Serbian_DJE Macedonia_GJE Cyrillic_IO Ukrainian_IE Ukranian_JE Macedonia_DSE Ukrainian_I Ukranian_I Ukrainian_YI Ukranian_YI Cyrillic_JE +syn keyword xmodmapKeySym Serbian_JE Cyrillic_LJE Serbian_LJE Cyrillic_NJE Serbian_NJE Serbian_TSHE Macedonia_KJE Ukrainian_GHE_WITH_UPTURN Byelorussian_SHORTU Cyrillic_DZHE Serbian_DZE Cyrillic_yu Cyrillic_a Cyrillic_be Cyrillic_tse +syn keyword xmodmapKeySym Cyrillic_de Cyrillic_ie Cyrillic_ef Cyrillic_ghe Cyrillic_ha Cyrillic_i Cyrillic_shorti Cyrillic_ka Cyrillic_el Cyrillic_em Cyrillic_en Cyrillic_o Cyrillic_pe Cyrillic_ya Cyrillic_er +syn keyword xmodmapKeySym Cyrillic_es Cyrillic_te Cyrillic_u Cyrillic_zhe Cyrillic_ve Cyrillic_softsign Cyrillic_yeru Cyrillic_ze Cyrillic_sha Cyrillic_e Cyrillic_shcha Cyrillic_che Cyrillic_hardsign Cyrillic_YU Cyrillic_A +syn keyword xmodmapKeySym Cyrillic_BE Cyrillic_TSE Cyrillic_DE Cyrillic_IE Cyrillic_EF Cyrillic_GHE Cyrillic_HA Cyrillic_I Cyrillic_SHORTI Cyrillic_KA Cyrillic_EL Cyrillic_EM Cyrillic_EN Cyrillic_O Cyrillic_PE +syn keyword xmodmapKeySym Cyrillic_YA Cyrillic_ER Cyrillic_ES Cyrillic_TE Cyrillic_U Cyrillic_ZHE Cyrillic_VE Cyrillic_SOFTSIGN Cyrillic_YERU Cyrillic_ZE Cyrillic_SHA Cyrillic_E Cyrillic_SHCHA Cyrillic_CHE Cyrillic_HARDSIGN +syn keyword xmodmapKeySym Greek_ALPHAaccent Greek_EPSILONaccent Greek_ETAaccent Greek_IOTAaccent Greek_IOTAdieresis Greek_IOTAdiaeresis Greek_OMICRONaccent Greek_UPSILONaccent Greek_UPSILONdieresis Greek_OMEGAaccent Greek_accentdieresis Greek_horizbar Greek_alphaaccent Greek_epsilonaccent Greek_etaaccent +syn keyword xmodmapKeySym Greek_iotaaccent Greek_iotadieresis Greek_iotaaccentdieresis Greek_omicronaccent Greek_upsilonaccent Greek_upsilondieresis Greek_upsilonaccentdieresis Greek_omegaaccent Greek_ALPHA Greek_BETA Greek_GAMMA Greek_DELTA Greek_EPSILON Greek_ZETA Greek_ETA +syn keyword xmodmapKeySym Greek_THETA Greek_IOTA Greek_KAPPA Greek_LAMDA Greek_LAMBDA Greek_MU Greek_NU Greek_XI Greek_OMICRON Greek_PI Greek_RHO Greek_SIGMA Greek_TAU Greek_UPSILON Greek_PHI +syn keyword xmodmapKeySym Greek_CHI Greek_PSI Greek_OMEGA Greek_alpha Greek_beta Greek_gamma Greek_delta Greek_epsilon Greek_zeta Greek_eta Greek_theta Greek_iota Greek_kappa Greek_lamda Greek_lambda +syn keyword xmodmapKeySym Greek_mu Greek_nu Greek_xi Greek_omicron Greek_pi Greek_rho Greek_sigma Greek_finalsmallsigma Greek_tau Greek_upsilon Greek_phi Greek_chi Greek_psi Greek_omega Greek_switch +syn keyword xmodmapKeySym leftradical topleftradical horizconnector topintegral botintegral vertconnector topleftsqbracket botleftsqbracket toprightsqbracket botrightsqbracket topleftparens botleftparens toprightparens botrightparens leftmiddlecurlybrace +syn keyword xmodmapKeySym rightmiddlecurlybrace topleftsummation botleftsummation topvertsummationconnector botvertsummationconnector toprightsummation botrightsummation rightmiddlesummation lessthanequal notequal greaterthanequal integral therefore variation infinity +syn keyword xmodmapKeySym nabla approximate similarequal ifonlyif implies identical radical includedin includes intersection union logicaland logicalor partialderivative function +syn keyword xmodmapKeySym leftarrow uparrow rightarrow downarrow blank soliddiamond checkerboard ht ff cr lf nl vt lowrightcorner uprightcorner +syn keyword xmodmapKeySym upleftcorner lowleftcorner crossinglines horizlinescan1 horizlinescan3 horizlinescan5 horizlinescan7 horizlinescan9 leftt rightt bott topt vertbar emspace enspace +syn keyword xmodmapKeySym em3space em4space digitspace punctspace thinspace hairspace emdash endash signifblank ellipsis doubbaselinedot onethird twothirds onefifth twofifths +syn keyword xmodmapKeySym threefifths fourfifths onesixth fivesixths careof figdash leftanglebracket decimalpoint rightanglebracket marker oneeighth threeeighths fiveeighths seveneighths trademark +syn keyword xmodmapKeySym signaturemark trademarkincircle leftopentriangle rightopentriangle emopencircle emopenrectangle leftsinglequotemark rightsinglequotemark leftdoublequotemark rightdoublequotemark prescription minutes seconds latincross hexagram +syn keyword xmodmapKeySym filledrectbullet filledlefttribullet filledrighttribullet emfilledcircle emfilledrect enopencircbullet enopensquarebullet openrectbullet opentribulletup opentribulletdown openstar enfilledcircbullet enfilledsqbullet filledtribulletup filledtribulletdown +syn keyword xmodmapKeySym leftpointer rightpointer club diamond heart maltesecross dagger doubledagger checkmark ballotcross musicalsharp musicalflat malesymbol femalesymbol telephone +syn keyword xmodmapKeySym telephonerecorder phonographcopyright caret singlelowquotemark doublelowquotemark cursor leftcaret rightcaret downcaret upcaret overbar downtack upshoe downstile underbar +syn keyword xmodmapKeySym jot quad uptack circle upstile downshoe rightshoe leftshoe lefttack righttack hebrew_doublelowline hebrew_aleph hebrew_bet hebrew_beth hebrew_gimel +syn keyword xmodmapKeySym hebrew_gimmel hebrew_dalet hebrew_daleth hebrew_he hebrew_waw hebrew_zain hebrew_zayin hebrew_chet hebrew_het hebrew_tet hebrew_teth hebrew_yod hebrew_finalkaph hebrew_kaph hebrew_lamed +syn keyword xmodmapKeySym hebrew_finalmem hebrew_mem hebrew_finalnun hebrew_nun hebrew_samech hebrew_samekh hebrew_ayin hebrew_finalpe hebrew_pe hebrew_finalzade hebrew_finalzadi hebrew_zade hebrew_zadi hebrew_qoph hebrew_kuf +syn keyword xmodmapKeySym hebrew_resh hebrew_shin hebrew_taw hebrew_taf Hebrew_switch Thai_kokai Thai_khokhai Thai_khokhuat Thai_khokhwai Thai_khokhon Thai_khorakhang Thai_ngongu Thai_chochan Thai_choching Thai_chochang +syn keyword xmodmapKeySym Thai_soso Thai_chochoe Thai_yoying Thai_dochada Thai_topatak Thai_thothan Thai_thonangmontho Thai_thophuthao Thai_nonen Thai_dodek Thai_totao Thai_thothung Thai_thothahan Thai_thothong Thai_nonu +syn keyword xmodmapKeySym Thai_bobaimai Thai_popla Thai_phophung Thai_fofa Thai_phophan Thai_fofan Thai_phosamphao Thai_moma Thai_yoyak Thai_rorua Thai_ru Thai_loling Thai_lu Thai_wowaen Thai_sosala +syn keyword xmodmapKeySym Thai_sorusi Thai_sosua Thai_hohip Thai_lochula Thai_oang Thai_honokhuk Thai_paiyannoi Thai_saraa Thai_maihanakat Thai_saraaa Thai_saraam Thai_sarai Thai_saraii Thai_saraue Thai_sarauee +syn keyword xmodmapKeySym Thai_sarau Thai_sarauu Thai_phinthu Thai_maihanakat_maitho Thai_baht Thai_sarae Thai_saraae Thai_sarao Thai_saraaimaimuan Thai_saraaimaimalai Thai_lakkhangyao Thai_maiyamok Thai_maitaikhu Thai_maiek Thai_maitho +syn keyword xmodmapKeySym Thai_maitri Thai_maichattawa Thai_thanthakhat Thai_nikhahit Thai_leksun Thai_leknung Thai_leksong Thai_leksam Thai_leksi Thai_lekha Thai_lekhok Thai_lekchet Thai_lekpaet Thai_lekkao Hangul +syn keyword xmodmapKeySym Hangul_Start Hangul_End Hangul_Hanja Hangul_Jamo Hangul_Romaja Hangul_Codeinput Hangul_Jeonja Hangul_Banja Hangul_PreHanja Hangul_PostHanja Hangul_SingleCandidate Hangul_MultipleCandidate Hangul_PreviousCandidate Hangul_Special Hangul_switch +syn keyword xmodmapKeySym Hangul_Kiyeog Hangul_SsangKiyeog Hangul_KiyeogSios Hangul_Nieun Hangul_NieunJieuj Hangul_NieunHieuh Hangul_Dikeud Hangul_SsangDikeud Hangul_Rieul Hangul_RieulKiyeog Hangul_RieulMieum Hangul_RieulPieub Hangul_RieulSios Hangul_RieulTieut Hangul_RieulPhieuf +syn keyword xmodmapKeySym Hangul_RieulHieuh Hangul_Mieum Hangul_Pieub Hangul_SsangPieub Hangul_PieubSios Hangul_Sios Hangul_SsangSios Hangul_Ieung Hangul_Jieuj Hangul_SsangJieuj Hangul_Cieuc Hangul_Khieuq Hangul_Tieut Hangul_Phieuf Hangul_Hieuh +syn keyword xmodmapKeySym Hangul_A Hangul_AE Hangul_YA Hangul_YAE Hangul_EO Hangul_E Hangul_YEO Hangul_YE Hangul_O Hangul_WA Hangul_WAE Hangul_OE Hangul_YO Hangul_U Hangul_WEO +syn keyword xmodmapKeySym Hangul_WE Hangul_WI Hangul_YU Hangul_EU Hangul_YI Hangul_I Hangul_J_Kiyeog Hangul_J_SsangKiyeog Hangul_J_KiyeogSios Hangul_J_Nieun Hangul_J_NieunJieuj Hangul_J_NieunHieuh Hangul_J_Dikeud Hangul_J_Rieul Hangul_J_RieulKiyeog +syn keyword xmodmapKeySym Hangul_J_RieulMieum Hangul_J_RieulPieub Hangul_J_RieulSios Hangul_J_RieulTieut Hangul_J_RieulPhieuf Hangul_J_RieulHieuh Hangul_J_Mieum Hangul_J_Pieub Hangul_J_PieubSios Hangul_J_Sios Hangul_J_SsangSios Hangul_J_Ieung Hangul_J_Jieuj Hangul_J_Cieuc Hangul_J_Khieuq +syn keyword xmodmapKeySym Hangul_J_Tieut Hangul_J_Phieuf Hangul_J_Hieuh Hangul_RieulYeorinHieuh Hangul_SunkyeongeumMieum Hangul_SunkyeongeumPieub Hangul_PanSios Hangul_KkogjiDalrinIeung Hangul_SunkyeongeumPhieuf Hangul_YeorinHieuh Hangul_AraeA Hangul_AraeAE Hangul_J_PanSios Hangul_J_KkogjiDalrinIeung Hangul_J_YeorinHieuh +syn keyword xmodmapKeySym Korean_Won Armenian_eternity Armenian_ligature_ew Armenian_full_stop Armenian_verjaket Armenian_parenright Armenian_parenleft Armenian_guillemotright Armenian_guillemotleft Armenian_em_dash Armenian_dot Armenian_mijaket Armenian_separation_mark Armenian_but Armenian_comma +syn keyword xmodmapKeySym Armenian_en_dash Armenian_hyphen Armenian_yentamna Armenian_ellipsis Armenian_exclam Armenian_amanak Armenian_accent Armenian_shesht Armenian_question Armenian_paruyk Armenian_AYB Armenian_ayb Armenian_BEN Armenian_ben Armenian_GIM +syn keyword xmodmapKeySym Armenian_gim Armenian_DA Armenian_da Armenian_YECH Armenian_yech Armenian_ZA Armenian_za Armenian_E Armenian_e Armenian_AT Armenian_at Armenian_TO Armenian_to Armenian_ZHE Armenian_zhe +syn keyword xmodmapKeySym Armenian_INI Armenian_ini Armenian_LYUN Armenian_lyun Armenian_KHE Armenian_khe Armenian_TSA Armenian_tsa Armenian_KEN Armenian_ken Armenian_HO Armenian_ho Armenian_DZA Armenian_dza Armenian_GHAT +syn keyword xmodmapKeySym Armenian_ghat Armenian_TCHE Armenian_tche Armenian_MEN Armenian_men Armenian_HI Armenian_hi Armenian_NU Armenian_nu Armenian_SHA Armenian_sha Armenian_VO Armenian_vo Armenian_CHA Armenian_cha +syn keyword xmodmapKeySym Armenian_PE Armenian_pe Armenian_JE Armenian_je Armenian_RA Armenian_ra Armenian_SE Armenian_se Armenian_VEV Armenian_vev Armenian_TYUN Armenian_tyun Armenian_RE Armenian_re Armenian_TSO +syn keyword xmodmapKeySym Armenian_tso Armenian_VYUN Armenian_vyun Armenian_PYUR Armenian_pyur Armenian_KE Armenian_ke Armenian_O Armenian_o Armenian_FE Armenian_fe Armenian_apostrophe Armenian_section_sign Georgian_an Georgian_ban +syn keyword xmodmapKeySym Georgian_gan Georgian_don Georgian_en Georgian_vin Georgian_zen Georgian_tan Georgian_in Georgian_kan Georgian_las Georgian_man Georgian_nar Georgian_on Georgian_par Georgian_zhar Georgian_rae +syn keyword xmodmapKeySym Georgian_san Georgian_tar Georgian_un Georgian_phar Georgian_khar Georgian_ghan Georgian_qar Georgian_shin Georgian_chin Georgian_can Georgian_jil Georgian_cil Georgian_char Georgian_xan Georgian_jhan +syn keyword xmodmapKeySym Georgian_hae Georgian_he Georgian_hie Georgian_we Georgian_har Georgian_hoe Georgian_fi Ccedillaabovedot Xabovedot Qabovedot Ibreve IE UO Zstroke Gcaron +syn keyword xmodmapKeySym Obarred ccedillaabovedot xabovedot Ocaron qabovedot ibreve ie uo zstroke gcaron ocaron obarred SCHWA schwa Lbelowdot +syn keyword xmodmapKeySym Lstrokebelowdot lbelowdot lstrokebelowdot Gtilde gtilde Abelowdot abelowdot Ahook ahook Acircumflexacute acircumflexacute Acircumflexgrave acircumflexgrave Acircumflexhook acircumflexhook +syn keyword xmodmapKeySym Acircumflextilde acircumflextilde Acircumflexbelowdot acircumflexbelowdot Abreveacute abreveacute Abrevegrave abrevegrave Abrevehook abrevehook Abrevetilde abrevetilde Abrevebelowdot abrevebelowdot Ebelowdot +syn keyword xmodmapKeySym ebelowdot Ehook ehook Etilde etilde Ecircumflexacute ecircumflexacute Ecircumflexgrave ecircumflexgrave Ecircumflexhook ecircumflexhook Ecircumflextilde ecircumflextilde Ecircumflexbelowdot ecircumflexbelowdot +syn keyword xmodmapKeySym Ihook ihook Ibelowdot ibelowdot Obelowdot obelowdot Ohook ohook Ocircumflexacute ocircumflexacute Ocircumflexgrave ocircumflexgrave Ocircumflexhook ocircumflexhook Ocircumflextilde +syn keyword xmodmapKeySym ocircumflextilde Ocircumflexbelowdot ocircumflexbelowdot Ohornacute ohornacute Ohorngrave ohorngrave Ohornhook ohornhook Ohorntilde ohorntilde Ohornbelowdot ohornbelowdot Ubelowdot ubelowdot +syn keyword xmodmapKeySym Uhook uhook Uhornacute uhornacute Uhorngrave uhorngrave Uhornhook uhornhook Uhorntilde uhorntilde Uhornbelowdot uhornbelowdot Ybelowdot ybelowdot Yhook +syn keyword xmodmapKeySym yhook Ytilde ytilde Ohorn ohorn Uhorn uhorn combining_tilde combining_grave combining_acute combining_hook combining_belowdot EcuSign ColonSign CruzeiroSign +syn keyword xmodmapKeySym FFrancSign LiraSign MillSign NairaSign PesetaSign RupeeSign WonSign NewSheqelSign DongSign EuroSign +syn match xmodmapKeySym "\<[A-Za-z]\>" + +" keywords +syn keyword xmodmapKeyword keycode keysym clear add remove pointer + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_xmodmap_syn_inits") + if version < 508 + let did_xmodmap_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink xmodmapComment Comment + HiLink xmodmapTodo Todo + HiLink xmodmapInt Number + HiLink xmodmapHex Number + HiLink xmodmapOctal Number + HiLink xmodmapOctalError Error + HiLink xmodmapKeySym Constant + HiLink xmodmapKeyword Keyword + delcommand HiLink +endif + +let b:current_syntax = "xmodmap" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/xpm.vim b/runtime/syntax/xpm.vim new file mode 100644 index 000000000..4cbda82fb --- /dev/null +++ b/runtime/syntax/xpm.vim @@ -0,0 +1,144 @@ +" Vim syntax file +" Language: X Pixmap +" Maintainer: Ronald Schild <rs@scutum.de> +" Last Change: 2001 May 09 +" Version: 5.4n.1 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn keyword xpmType char +syn keyword xpmStorageClass static +syn keyword xpmTodo TODO FIXME XXX contained +syn region xpmComment start="/\*" end="\*/" contains=xpmTodo +syn region xpmPixelString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@xpmColors + +if has("gui_running") + +let color = "" +let chars = "" +let colors = 0 +let cpp = 0 +let n = 0 +let i = 1 + +while i <= line("$") " scanning all lines + + let s = matchstr(getline(i), '".\{-1,}"') + if s != "" " does line contain a string? + + if n == 0 " first string is the Values 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', '') + + " highlight the Values string as normal string (no pixel string) + exe 'syn match xpmValues /'.s.'/' + hi link xpmValues String + + let n = 1 " n = color index + + 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 + " 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 + " next try: 'g4' key (4-level grayscale) + let color = substitute(s, '".*\sg4\s\+\(.\{-}\)\s*\([ms]\s.*\)*\s*"', '\1', '') + if color == s + " 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 + + " 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' + else + exe 'hi xpmColor'.n." guifg='".color."'" + exe 'hi xpmColor'.n." guibg='".color."'" + endif + let n = n + 1 + else + break " no more color string + endif + endif + let i = i + 1 +endwhile + +unlet color chars colors cpp n i s + +endif " has("gui_running") + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_xpm_syntax_inits") + if version < 508 + let did_xpm_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink xpmType Type + HiLink xpmStorageClass StorageClass + HiLink xpmTodo Todo + HiLink xpmComment Comment + HiLink xpmPixelString String + + delcommand HiLink +endif + +let b:current_syntax = "xpm" + +" vim: ts=8:sw=3:noet: diff --git a/runtime/syntax/xpm2.vim b/runtime/syntax/xpm2.vim new file mode 100644 index 000000000..3a3de6f54 --- /dev/null +++ b/runtime/syntax/xpm2.vim @@ -0,0 +1,156 @@ +" Vim syntax file +" Language: X Pixmap v2 +" Maintainer: Steve Wall (hitched97@velnet.com) +" Last Change: 2001 Apr 25 +" Version: 5.8 +" +" Made from xpm.vim by Ronald Schild <rs@scutum.de> + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn region xpm2PixelString start="^" end="$" contains=@xpm2Colors +syn keyword xpm2Todo TODO FIXME XXX contained +syn match xpm2Comment "\!.*$" contains=xpm2Todo + + +if version < 508 + command -nargs=+ HiLink hi link <args> + command -nargs=+ Hi hi <args> +else + command -nargs=+ HiLink hi def link <args> + command -nargs=+ Hi hi def <args> +endif + +if has("gui_running") + + let color = "" + let chars = "" + let colors = 0 + let cpp = 0 + let n = 0 + let i = 1 + + while i <= line("$") " scanning all lines + + let s = getline(i) + if match(s,"\!.*$") != -1 + let s = matchstr(s, "^[^\!]*") + endif + if s != "" " does line contain a string? + + if n == 0 " first string is the Values 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', '') + + " highlight the Values string as normal string (no pixel string) + exe 'syn match xpm2Values /'.s.'/' + HiLink xpm2Values Statement + + let n = 1 " n = color index + + 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 + " 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 + " next try: 'g4' key (4-level grayscale) + let color = substitute(s, '.*\sg4\s\+\(.\{-}\)\s*\([ms]\s.*\)*\s*', '\1', '') + if color == s + " 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 + + " 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, '/\*^$.~[]') + + " change whitespace to "\s\+" + let s = substitute(s, "[ \t][ \t]*", "\\\\s\\\\+", "g") + let chars = substitute(chars, "[ \t][ \t]*", "\\\\s\\\\+", "g") + + " now create syntax items + " highlight the color string as normal string (no pixel string) + exe 'syn match xpm2Col'.n.'Def /'.s.'/ contains=xpm2Col'.n.'inDef' + exe 'HiLink xpm2Col'.n.'Def Constant' + + " but highlight the first whitespace after chars in its color + exe 'syn match xpm2Col'.n.'inDef /^'.chars.'/hs=s+'.(cpp).' contained' + exe 'HiLink xpm2Col'.n.'inDef xpm2Color'.n + + " remove the following whitespace from chars + let chars = substitute(chars, '\\s\\+$', '', '') + + " and create the syntax item contained in the pixel strings + exe 'syn match xpm2Color'.n.' /'.chars.'/ contained' + exe 'syn cluster xpm2Colors add=xpm2Color'.n + + " if no color or color = "None" show background + if color == "" || substitute(color, '.*', '\L&', '') == 'none' + exe 'Hi xpm2Color'.n.' guifg=bg guibg=NONE' + else + exe 'Hi xpm2Color'.n." guifg='".color."' guibg='".color."'" + endif + let n = n + 1 + else + break " no more color string + endif + endif + let i = i + 1 + endwhile + + unlet color chars colors cpp n i s + +endif " has("gui_running") + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_xpm2_syntax_inits") + if version < 508 + let did_xpm2_syntax_inits = 1 + endif + + " The default highlighting. + HiLink xpm2Type Type + HiLink xpm2StorageClass StorageClass + HiLink xpm2Todo Todo + HiLink xpm2Comment Comment + HiLink xpm2PixelString String +endif +delcommand HiLink +delcommand Hi + +let b:current_syntax = "xpm2" + +" vim: ts=8:sw=2:noet: diff --git a/runtime/syntax/xs.vim b/runtime/syntax/xs.vim new file mode 100644 index 000000000..9f1054a89 --- /dev/null +++ b/runtime/syntax/xs.vim @@ -0,0 +1,54 @@ +" Vim syntax file +" Language: XS (Perl extension interface language) +" Maintainer: Michael W. Dodge <sarge@pobox.com> +" Last Change: 2001 May 09 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the C syntax to start with +if version < 600 + source <sfile>:p:h/c.vim +else + runtime! syntax/c.vim +endif + +" XS extentions +" TODO: Figure out how to look for trailing '='. +syn keyword xsKeyword MODULE PACKAGE PREFIX +syn keyword xsKeyword OUTPUT: CODE: INIT: PREINIT: INPUT: +syn keyword xsKeyword PPCODE: REQUIRE: CLEANUP: BOOT: +syn keyword xsKeyword VERSIONCHECK: PROTOTYPES: PROTOTYPE: +syn keyword xsKeyword ALIAS: INCLUDE: CASE: +" TODO: Figure out how to look for trailing '('. +syn keyword xsMacro SV EXTEND PUSHs +syn keyword xsVariable RETVAL NO_INIT +"syn match xsCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1 +"syn match xsCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_xs_syntax_inits") + if version < 508 + let did_xs_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink xsKeyword Keyword + HiLink xsMacro Macro + HiLink xsVariable Identifier + + delcommand HiLink +endif + +let b:current_syntax = "xs" + +" vim: ts=8 diff --git a/runtime/syntax/xsd.vim b/runtime/syntax/xsd.vim new file mode 100644 index 000000000..c3431f42e --- /dev/null +++ b/runtime/syntax/xsd.vim @@ -0,0 +1,61 @@ +" Vim syntax file +" Language: XSD (XML Schema) +" Maintainer: Johannes Zellner <johannes@zellner.org> +" Last Change: Tue, 27 Apr 2004 14:54:59 CEST +" Filenames: *.xsd +" $Id$ + +" REFERENCES: +" [1] http://www.w3.org/TR/xmlschema-0 +" + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +runtime syntax/xml.vim + +syn cluster xmlTagHook add=xsdElement +syn case match + +syn match xsdElement '\%(xsd:\)\@<=all' +syn match xsdElement '\%(xsd:\)\@<=annotation' +syn match xsdElement '\%(xsd:\)\@<=any' +syn match xsdElement '\%(xsd:\)\@<=anyAttribute' +syn match xsdElement '\%(xsd:\)\@<=appInfo' +syn match xsdElement '\%(xsd:\)\@<=attribute' +syn match xsdElement '\%(xsd:\)\@<=attributeGroup' +syn match xsdElement '\%(xsd:\)\@<=choice' +syn match xsdElement '\%(xsd:\)\@<=complexContent' +syn match xsdElement '\%(xsd:\)\@<=complexType' +syn match xsdElement '\%(xsd:\)\@<=documentation' +syn match xsdElement '\%(xsd:\)\@<=element' +syn match xsdElement '\%(xsd:\)\@<=enumeration' +syn match xsdElement '\%(xsd:\)\@<=extension' +syn match xsdElement '\%(xsd:\)\@<=field' +syn match xsdElement '\%(xsd:\)\@<=group' +syn match xsdElement '\%(xsd:\)\@<=import' +syn match xsdElement '\%(xsd:\)\@<=include' +syn match xsdElement '\%(xsd:\)\@<=key' +syn match xsdElement '\%(xsd:\)\@<=keyref' +syn match xsdElement '\%(xsd:\)\@<=length' +syn match xsdElement '\%(xsd:\)\@<=list' +syn match xsdElement '\%(xsd:\)\@<=maxInclusive' +syn match xsdElement '\%(xsd:\)\@<=maxLength' +syn match xsdElement '\%(xsd:\)\@<=minInclusive' +syn match xsdElement '\%(xsd:\)\@<=minLength' +syn match xsdElement '\%(xsd:\)\@<=pattern' +syn match xsdElement '\%(xsd:\)\@<=redefine' +syn match xsdElement '\%(xsd:\)\@<=restriction' +syn match xsdElement '\%(xsd:\)\@<=schema' +syn match xsdElement '\%(xsd:\)\@<=selector' +syn match xsdElement '\%(xsd:\)\@<=sequence' +syn match xsdElement '\%(xsd:\)\@<=simpleContent' +syn match xsdElement '\%(xsd:\)\@<=simpleType' +syn match xsdElement '\%(xsd:\)\@<=union' +syn match xsdElement '\%(xsd:\)\@<=unique' + +hi def link xsdElement Statement + +" vim: ts=8 diff --git a/runtime/syntax/xslt.vim b/runtime/syntax/xslt.vim new file mode 100644 index 000000000..98dd86919 --- /dev/null +++ b/runtime/syntax/xslt.vim @@ -0,0 +1,62 @@ +" Vim syntax file +" Language: XSLT +" Maintainer: Johannes Zellner <johannes@zellner.org> +" Last Change: Sun, 28 Oct 2001 21:22:24 +0100 +" Filenames: *.xsl +" $Id$ + +" REFERENCES: +" [1] http://www.w3.org/TR/xslt +" + +" Quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +runtime syntax/xml.vim + +syn cluster xmlTagHook add=xslElement +syn case match + +syn match xslElement '\%(xsl:\)\@<=apply-imports' +syn match xslElement '\%(xsl:\)\@<=apply-templates' +syn match xslElement '\%(xsl:\)\@<=attribute' +syn match xslElement '\%(xsl:\)\@<=attribute-set' +syn match xslElement '\%(xsl:\)\@<=call-template' +syn match xslElement '\%(xsl:\)\@<=choose' +syn match xslElement '\%(xsl:\)\@<=comment' +syn match xslElement '\%(xsl:\)\@<=copy' +syn match xslElement '\%(xsl:\)\@<=copy-of' +syn match xslElement '\%(xsl:\)\@<=decimal-format' +syn match xslElement '\%(xsl:\)\@<=document' +syn match xslElement '\%(xsl:\)\@<=element' +syn match xslElement '\%(xsl:\)\@<=fallback' +syn match xslElement '\%(xsl:\)\@<=for-each' +syn match xslElement '\%(xsl:\)\@<=if' +syn match xslElement '\%(xsl:\)\@<=include' +syn match xslElement '\%(xsl:\)\@<=import' +syn match xslElement '\%(xsl:\)\@<=key' +syn match xslElement '\%(xsl:\)\@<=message' +syn match xslElement '\%(xsl:\)\@<=namespace-alias' +syn match xslElement '\%(xsl:\)\@<=number' +syn match xslElement '\%(xsl:\)\@<=otherwise' +syn match xslElement '\%(xsl:\)\@<=output' +syn match xslElement '\%(xsl:\)\@<=param' +syn match xslElement '\%(xsl:\)\@<=processing-instruction' +syn match xslElement '\%(xsl:\)\@<=preserve-space' +syn match xslElement '\%(xsl:\)\@<=script' +syn match xslElement '\%(xsl:\)\@<=sort' +syn match xslElement '\%(xsl:\)\@<=strip-space' +syn match xslElement '\%(xsl:\)\@<=stylesheet' +syn match xslElement '\%(xsl:\)\@<=template' +syn match xslElement '\%(xsl:\)\@<=transform' +syn match xslElement '\%(xsl:\)\@<=text' +syn match xslElement '\%(xsl:\)\@<=value-of' +syn match xslElement '\%(xsl:\)\@<=variable' +syn match xslElement '\%(xsl:\)\@<=when' +syn match xslElement '\%(xsl:\)\@<=with-param' + +hi def link xslElement Statement + +" vim: ts=8 diff --git a/runtime/syntax/xxd.vim b/runtime/syntax/xxd.vim new file mode 100644 index 000000000..1ed543c20 --- /dev/null +++ b/runtime/syntax/xxd.vim @@ -0,0 +1,42 @@ +" Vim syntax file +" Language: bin using xxd +" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> +" Last Change: Nov 18, 2002 +" Version: 6 +" Notes: use :help xxd to see how to invoke it +" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn match xxdAddress "^[0-9a-f]\+:" contains=xxdSep +syn match xxdSep contained ":" +syn match xxdAscii " .\{,16\}\r\=$"hs=s+2 contains=xxdDot +syn match xxdDot contained "[.\r]" + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_xxd_syntax_inits") + if version < 508 + let did_xxd_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink xxdAddress Constant + HiLink xxdSep Identifier + HiLink xxdAscii Statement + + delcommand HiLink +endif + +let b:current_syntax = "xxd" + +" vim: ts=4 diff --git a/runtime/syntax/yacc.vim b/runtime/syntax/yacc.vim new file mode 100644 index 000000000..532a39a95 --- /dev/null +++ b/runtime/syntax/yacc.vim @@ -0,0 +1,98 @@ +" Vim syntax file +" Language: Yacc +" Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> +" Last Change: Nov 18, 2002 +" Version: 2 +" URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax +" +" Option: +" yacc_uses_cpp : if this variable exists, then C++ is loaded rather than C + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the C syntax to start with +if version >= 600 + if exists("yacc_uses_cpp") + runtime! syntax/cpp.vim + else + runtime! syntax/c.vim + endif +elseif exists("yacc_uses_cpp") + so <sfile>:p:h/cpp.vim +else + so <sfile>:p:h/c.vim +endif + +" Clusters +syn cluster yaccActionGroup contains=yaccDelim,cInParen,cTodo,cIncluded,yaccDelim,yaccCurlyError,yaccUnionCurly,yaccUnion,cUserLabel,cOctalZero,cCppOut2,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCommentStartError,cParenError +syn cluster yaccUnionGroup contains=yaccKey,cComment,yaccCurly,cType,cStructure,cStorageClass,yaccUnionCurly + +" Yacc stuff +syn match yaccDelim "^\s*[:|;]" +syn match yaccOper "@\d\+" + +syn match yaccKey "^\s*%\(token\|type\|left\|right\|start\|ident\|nonassoc\)\>" +syn match yaccKey "\s%\(prec\|expect\)\>" +syn match yaccKey "\$\(<[a-zA-Z_][a-zA-Z_0-9]*>\)\=[\$0-9]\+" +syn keyword yaccKeyActn yyerrok yyclearin + +syn match yaccUnionStart "^%union" skipwhite skipnl nextgroup=yaccUnion +syn region yaccUnion contained matchgroup=yaccCurly start="{" matchgroup=yaccCurly end="}" contains=@yaccUnionGroup +syn region yaccUnionCurly contained matchgroup=yaccCurly start="{" matchgroup=yaccCurly end="}" contains=@yaccUnionGroup +syn match yaccBrkt contained "[<>]" +syn match yaccType "<[a-zA-Z_][a-zA-Z0-9_]*>" contains=yaccBrkt +syn match yaccDefinition "^[A-Za-z][A-Za-z0-9_]*[ \t]*:" + +" special Yacc separators +syn match yaccSectionSep "^[ \t]*%%" +syn match yaccSep "^[ \t]*%{" +syn match yaccSep "^[ \t]*%}" + +" I'd really like to highlight just the outer {}. Any suggestions??? +syn match yaccCurlyError "[{}]" +syn region yaccAction matchgroup=yaccCurly start="{" end="}" contains=ALLBUT,@yaccActionGroup + + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_yacc_syn_inits") + if version < 508 + let did_yacchdl_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + " Internal yacc highlighting links + HiLink yaccBrkt yaccStmt + HiLink yaccKey yaccStmt + HiLink yaccOper yaccStmt + HiLink yaccUnionStart yaccKey + + " External yacc highlighting links + HiLink yaccCurly Delimiter + HiLink yaccCurlyError Error + HiLink yaccDefinition Function + HiLink yaccDelim Function + HiLink yaccKeyActn Special + HiLink yaccSectionSep Todo + HiLink yaccSep Delimiter + HiLink yaccStmt Statement + HiLink yaccType Type + + " since Bram doesn't like my Delimiter :| + HiLink Delimiter Type + + delcommand HiLink +endif + +let b:current_syntax = "yacc" + +" vim: ts=15 diff --git a/runtime/syntax/yaml.vim b/runtime/syntax/yaml.vim new file mode 100644 index 000000000..56e578b30 --- /dev/null +++ b/runtime/syntax/yaml.vim @@ -0,0 +1,105 @@ +" Vim syntax file +" Language: YAML (YAML Ain't Markup Language) +" Maintainer: Nikolai Weibull <source@pcppopper.org> +" URL: http://www.pcppopper.org/vim/syntax/pcp/yaml/ +" Latest Revision: 2004-05-22 +" arch-tag: 01bf8ef1-335f-4692-a228-4846cb64cd16 + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Todo +syn keyword yamlTodo contained TODO FIXME XXX NOTE + +" Comments (4.2.2) +syn region yamlComment matchgroup=yamlComment start='\%(^\|\s\)#' end='$' contains=yamlTodo + +" Node Properties (4.3.4) +syn match yamlNodeProperty '!\%(![^\\^% ]\+\|[^!][^:/ ]*\)' + +" Anchors (4.3.6) +syn match yamlAnchor '&.\+' + +" Aliases (4.3.7) +syn match yamlAlias '\*.\+' + +" Operators, Blocks, Keys, and Delimiters +syn match yamlDelimiter '[-,:]' +syn match yamlBlock '[\[\]{}>|]' +syn match yamlOperator '[?+-]' +syn match yamlKey '\w\+\(\s\+\w\+\)*\ze\s*:' + +" Strings (4.6.8, 4.6.9) +syn region yamlString start=+"+ skip=+\\"+ end=+"+ contains=yamlEscape +syn region yamlString start=+'+ skip=+''+ end=+'+ contains=yamlSingleEscape +syn match yamlEscape contained +\\[\\"abefnrtv^0_ NLP]+ +syn match yamlEscape contained '\\x\x\{2}' +syn match yamlEscape contained '\\u\x\{4}' +syn match yamlEscape contained '\\U\x\{8}' +" TODO: how do we get 0x85, 0x2028, and 0x2029 into this? +syn match yamlEscape '\\\%(\r\n\|[\r\n]\)' +syn match yamlSingleEscape contained +''+ + +" Numbers +" TODO: sexagecimal and fixed (20:30.15 and 1,230.15) +syn match yamlNumber '\<[+-]\=\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=' +syn match yamlNumber '0\o\+' +syn match yamlNumber '0x\x\+' +syn match yamlNumber '([+-]\=[iI]nf)' +syn match yamlNumber '(NaN)' + +" Constants +syn match yamlConstant '\<[~yn]\>' +syn keyword yamlConstant true True TRUE false False FALSE +syn keyword yamlConstant yes Yes on ON no No off OFF +syn keyword yamlConstant null Null NULL nil Nil NIL + +" Timestamps +syn match yamlTimestamp '\d\d\d\d-\%(1[0-2]\|\d\)-\%(3[0-2]\|2\d\|1\d\|\d\)\%( \%([01]\d\|2[0-3]\):[0-5]\d:[0-5]\d.\d\d [+-]\%([01]\d\|2[0-3]\):[0-5]\d\|t\%([01]\d\|2[0-3]\):[0-5]\d:[0-5]\d.\d\d[+-]\%([01]\d\|2[0-3]\):[0-5]\d\|T\%([01]\d\|2[0-3]\):[0-5]\d:[0-5]\d.\dZ\)\=' + +" Documents (4.3.1) +syn region yamlDocumentHeader start='---' end='$' contains=yamlDirective +syn match yamlDocumentEnd '\.\.\.' + +" Directives (4.3.2) +syn match yamlDirective contained '%[^:]\+:.\+' + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_yaml_syn_inits") + if version < 508 + let did_yaml_syn_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink yamlTodo Todo + HiLink yamlComment Comment + HiLink yamlDocumentHeader PreProc + HiLink yamlDocumentEnd PreProc + HiLink yamlDirective Keyword + HiLink yamlNodeProperty Type + HiLink yamlAnchor Type + HiLink yamlAlias Type + HiLink yamlDelimiter Delimiter + HiLink yamlBlock Operator + HiLink yamlOperator Operator + HiLink yamlKey Identifier + HiLink yamlString String + HiLink yamlEscape SpecialChar + HiLink yamlSingleEscape SpecialChar + HiLink yamlNumber Number + HiLink yamlConstant Constant + HiLink yamlTimestamp Number + + delcommand HiLink +endif + +let b:current_syntax = "yaml" + +" vim: set sts=2 sw=2: diff --git a/runtime/syntax/z8a.vim b/runtime/syntax/z8a.vim new file mode 100644 index 000000000..a3a8a2bbd --- /dev/null +++ b/runtime/syntax/z8a.vim @@ -0,0 +1,114 @@ +" Vim syntax file +" Language: Z80 assembler asz80 +" Maintainer: Milan Pikula <www@fornax.elf.stuba.sk> +" Last Change: 2003 May 11 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case ignore + +" Common Z80 Assembly instructions +syn keyword z8aInstruction adc add and bit ccf cp cpd cpdr cpi cpir cpl +syn keyword z8aInstruction daa di djnz ei exx halt im in +syn keyword z8aInstruction ind ini indr inir jp jr ld ldd lddr ldi ldir +syn keyword z8aInstruction neg nop or otdr otir out outd outi +syn keyword z8aInstruction res rl rla rlc rlca rld +syn keyword z8aInstruction rr rra rrc rrca rrd sbc scf set sla sra +syn keyword z8aInstruction srl sub xor +" syn keyword z8aInstruction push pop call ret reti retn inc dec ex rst + +" Any other stuff +syn match z8aIdentifier "[a-z_][a-z0-9_]*" + +" Instructions changing stack +syn keyword z8aSpecInst push pop call ret reti retn rst +syn match z8aInstruction "\<inc\>" +syn match z8aInstruction "\<dec\>" +syn match z8aInstruction "\<ex\>" +syn match z8aSpecInst "\<inc\s\+sp\>"me=s+3 +syn match z8aSpecInst "\<dec\s\+sp\>"me=s+3 +syn match z8aSpecInst "\<ex\s\+(\s*sp\s*)\s*,\s*hl\>"me=s+2 + +"Labels +syn match z8aLabel "[a-z_][a-z0-9_]*:" +syn match z8aSpecialLabel "[a-z_][a-z0-9_]*::" + +" PreProcessor commands +syn match z8aPreProc "\.org" +syn match z8aPreProc "\.globl" +syn match z8aPreProc "\.db" +syn match z8aPreProc "\.dw" +syn match z8aPreProc "\.ds" +syn match z8aPreProc "\.byte" +syn match z8aPreProc "\.word" +syn match z8aPreProc "\.blkb" +syn match z8aPreProc "\.blkw" +syn match z8aPreProc "\.ascii" +syn match z8aPreProc "\.asciz" +syn match z8aPreProc "\.module" +syn match z8aPreProc "\.title" +syn match z8aPreProc "\.sbttl" +syn match z8aPreProc "\.even" +syn match z8aPreProc "\.odd" +syn match z8aPreProc "\.area" +syn match z8aPreProc "\.page" +syn match z8aPreProc "\.setdp" +syn match z8aPreProc "\.radix" +syn match z8aInclude "\.include" +syn match z8aPreCondit "\.if" +syn match z8aPreCondit "\.else" +syn match z8aPreCondit "\.endif" + +" Common strings +syn match z8aString "\".*\"" +syn match z8aString "\'.*\'" + +" Numbers +syn match z8aNumber "[0-9]\+" +syn match z8aNumber "0[xXhH][0-9a-fA-F]\+" +syn match z8aNumber "0[bB][0-1]*" +syn match z8aNumber "0[oO\@qQ][0-7]\+" +syn match z8aNumber "0[dD][0-9]\+" + +" Character constant +syn match z8aString "\#\'."hs=s+1 + +" Comments +syn match z8aComment ";.*" + +syn case match + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_z8a_syntax_inits") + if version < 508 + let did_z8a_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink z8aSection Special + HiLink z8aLabel Label + HiLink z8aSpecialLabel Label + HiLink z8aComment Comment + HiLink z8aInstruction Statement + HiLink z8aSpecInst Statement + HiLink z8aInclude Include + HiLink z8aPreCondit PreCondit + HiLink z8aPreProc PreProc + HiLink z8aNumber Number + HiLink z8aString String + + delcommand HiLink +endif + +let b:current_syntax = "z8a" +" vim: ts=8 diff --git a/runtime/syntax/zsh.vim b/runtime/syntax/zsh.vim new file mode 100644 index 000000000..83763a627 --- /dev/null +++ b/runtime/syntax/zsh.vim @@ -0,0 +1,118 @@ +" Vim syntax file +" Language: Z shell (zsh) +" Maintainer: Felix von Leitner <leitner@math.fu-berlin.de> +" Heavily based on sh.vim by Lennart Schultz +" Last Change: 2003 May 11 + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" String and Character contstants +" Highlight special characters (those which have a backslash) differently +syn match zshSpecial "\\\d\d\d\|\\[abcfnrtv\\']" +syn region zshSinglequote start=+'+ skip=+\\'+ end=+'+ +" A bunch of useful zsh keywords +" syn keyword zshFunction function +syn keyword zshStatement bg break cd chdir continue echo eval exec +syn keyword zshStatement exit export fg getopts hash jobs kill +syn keyword zshStatement pwd read readonly return set zshift function +syn keyword zshStatement stop suspend test times trap type ulimit +syn keyword zshStatement umask unset wait setopt compctl source +syn keyword zshStatement whence disown shift which unhash unalias +syn keyword zshStatement alias functions unfunction getln disable +syn keyword zshStatement vared getopt enable unsetopt autoload +syn keyword zshStatement bindkey pushln command limit unlimit fc +syn keyword zshStatement print builtin noglob sched r time +syn keyword zshStatement typeset declare local integer + +syn keyword zshConditional if else esac case then elif fi in +syn keyword zshRepeat while for do done + +" Following is worth to notice: command substitution, file redirection and functions (so these features turns red) +syn match zshFunctionName "\h\w*\s*()" +syn region zshCommandSub start=+`+ skip=+\\`+ end=+`+ +" contains=ALLBUT,zshFunction +syn match zshRedir "\d\=\(<\|<<\|>\|>>\)\(|\|&\d\)\=" + +syn keyword zshTodo contained TODO + +syn keyword zshShellVariables USER LOGNAME HOME PATH CDPATH SHELL +syn keyword zshShellVariables LC_TYPE LC_MESSAGE MAIL MAILCHECK +syn keyword zshShellVariables PS1 PS2 IFS EGID EUID ERRNO GID UID +syn keyword zshShellVariables HOST LINENO MACHTYPE OLDPWD OPTARG +syn keyword zshShellVariables OPTIND OSTYPE PPID PWD RANDOM SECONDS +syn keyword zshShellVariables SHLVL TTY signals TTYIDLE USERNAME +syn keyword zshShellVariables VENDOR ZSH_NAME ZSH_VERSION ARGV0 +syn keyword zshShellVariables BAUD COLUMNS cdpath DIRSTACKSIZE +syn keyword zshShellVariables FCEDIT fignore fpath histchars HISTCHARS +syn keyword zshShellVariables HISTFILE HISTSIZE KEYTIMEOUT LANG +syn keyword zshShellVariables LC_ALL LC_COLLATE LC_CTYPE LC_MESSAGES +syn keyword zshShellVariables LC_TIME LINES LISTMAX LOGCHECK mailpath +syn keyword zshShellVariables MAILPATH MANPATH manpath module_path +syn keyword zshShellVariables MODULE_PATH NULLCMD path POSTEDIT +syn keyword zshShellVariables PS3 PS4 PROMPT PROMPT2 PROMPT3 PROMPT4 +syn keyword zshShellVariables psvar PSVAR prompt READNULLCMD +syn keyword zshShellVariables REPORTTIME RPROMPT RPS1 SAVEHIST +syn keyword zshShellVariables SPROMPT STTY TIMEFMT TMOUT TMPPREFIX +syn keyword zshShellVariables watch WATCH WATCHFMT WORDCHARS ZDOTDIR +syn match zshSpecialShellVar "\$[-#@*$?!0-9]" +syn keyword zshSetVariables ignoreeof noclobber +syn region zshDerefOpr start="\${" end="}" contains=zshShellVariables +syn match zshDerefIdentifier "\$[a-zA-Z_][a-zA-Z0-9_]*\>" +syn match zshOperator "[][}{&;|)(]" + + + +syn match zshNumber "-\=\<\d\+\>" +syn match zshComment "#.*$" contains=zshNumber,zshTodo + + +syn match zshTestOpr "-\<[oeaznlg][tfqet]\=\>\|!\==\|-\<[b-gkLprsStuwjxOG]\>" +"syn region zshTest start="\[" skip="\\$" end="\]" contains=zshString,zshTestOpr,zshDerefIdentifier,zshDerefOpr +syn region zshString start=+"+ skip=+\\"+ end=+"+ contains=zshSpecial,zshOperator,zshDerefIdentifier,zshDerefOpr,zshSpecialShellVar,zshSinglequote,zshCommandSub + +" Define the default highlighting. +" For version 5.7 and earlier: only when not done already +" For version 5.8 and later: only when an item doesn't have highlighting yet +if version >= 508 || !exists("did_zsh_syntax_inits") + if version < 508 + let did_zsh_syntax_inits = 1 + command -nargs=+ HiLink hi link <args> + else + command -nargs=+ HiLink hi def link <args> + endif + + HiLink zshSinglequote zshString + HiLink zshConditional zshStatement + HiLink zshRepeat zshStatement + HiLink zshFunctionName zshFunction + HiLink zshCommandSub zshOperator + HiLink zshRedir zshOperator + HiLink zshSetVariables zshShellVariables + HiLink zshSpecialShellVar zshShellVariables + HiLink zshTestOpr zshOperator + HiLink zshDerefOpr zshSpecial + HiLink zshDerefIdentifier zshShellVariables + HiLink zshOperator Operator + HiLink zshStatement Statement + HiLink zshNumber Number + HiLink zshString String + HiLink zshComment Comment + HiLink zshSpecial Special + HiLink zshTodo Todo + HiLink zshShellVariables Special +" hi zshOperator term=underline ctermfg=6 guifg=Purple gui=bold +" hi zshShellVariables term=underline ctermfg=2 guifg=SeaGreen gui=bold +" hi zshFunction term=bold ctermbg=1 guifg=Red + + delcommand HiLink +endif + +let b:current_syntax = "zsh" + +" vim: ts=8 |