; $Id: modes.rc,v 1.6 2004/10/31 21:54:52 tom Exp $ ; majormodes in this file are ordered alphabetically for convenience - the ; precedence used by vile is strictly alphabetic, counting case. setv %filters-modes=true define-mode ada ~with define-submode ada suffixes '\.\(ada\|ads\|adb\)$' comment-prefix '^\s*--' comments '^\s*--\s*$' fence-if '^\s*\' fence-elif '^\s*\' fence-else '^\s*\' fence-fi '^\s*\' ignorecase ~elsewith define-submode ada group 'begin' fence-if '^\s*\' fence-else '^\s*\' fence-fi '^\s*\' ~endwith ; GNU assembler (a Byzantine elaboration of AT&T) define-mode as ~with define-submode as suffixes '\.[sS]$' ~endwith ; M$ assembler (a Byzantine elaboration of Intel) define-mode asm ~with define-submode asm suffixes '\.asm$' fence-if '^\s*\<\(if\|ifdef\|ifndef\)\>' fence-elif '^\s*\' fence-else '^\s*\' fence-fi '^\s*\' ~endwith ; AutoIt version 3 define-mode au3 ~with define-submode au3 suffixes '\.au3$' dos ignorecase comment-prefix '^\s*;' comments '^\s*;\s\+\s*$' fence-if '^\s*\.*\\s*\(;.*\)\?$' fence-elif '^\s*\' fence-else '^\s*\' fence-fi '^\s*\' ~elsewith define-submode au3 group 'case' fence-if '^\s*\' fence-elif '^\s*\' fence-else '^\s*\' fence-fi '^\s*\' ~elsewith define-submode au3 group 'func' fence-if '^\s*\' fence-fi '^\s*\' ~elsewith define-submode au3 group 'while' fence-if '^\s*\' fence-fi '^\s*\' ~elsewith define-submode au3 group 'for' fence-if '^\s*\' fence-fi '^\s*\' ~endwith define-mode awk ~with define-submode awk suffixes '\.awk$' pre '^#!\s*\/.*awk\>\(\s*-[\a]\+\)*\s*$' cindent cindent-chars $fences comment-prefix '^\s*#' comments '^\s*#\s\+\s*$' ~endwith define-mode basic ~with define-submode basic suffixes '\.bas$' comment-prefix '^\s*\'' comments '^\s*\'\s\+\s*$' ignorecase notabinsert ~endwith define-mode bat ~with define-submode bat suffixes '\.\(bat\|cmd\)$' pre '\s*\(@\)\?echo\s*\(on\|off\)\?$' dos ignorecase comment-prefix '^\s*rem\>' comments '^\s*rem\>\s\+\s*$' ~endwith ; we normally use the builtin values, but this is useful for looking at ; autoconf templates: ~with define-submode c mode-filename 'llib-.*$' ignoresuffix '\.\(in\|orig\|~\)$' ~endwith define-mode cfg ~with define-submode cfg suffixes '\.cfg$' comment-prefix '^\s*#' comments '^\s*#\s*$' ~endwith define-mode cpp ~with define-submode cpp before "c" mode-pathname '.*/include/[cg]++[^/]*/.*' ~if $filename-ic suffixes '\.\(cc\|cpp\|cxx\|hh\|hpp\|hxx\)$' ~else suffixes '\.\(cc\|cpp\|cxx\|hh\|hpp\|hxx\|[CH]\|CC\)$' ~endif cindent cindent-chars &cat ':#' $fences ~endwith define-mode csh ~with define-submode csh suffixes '\.\(csh.*\|login\|logout\)$' pre '^#!\s*\/.*csh\>\(\s*-[\a]\+\)*\s*$' comment-prefix '^\s*#' comments '^\s*#\s*$' fence-if '^\s*\.*\' fence-elif '^\s*\' fence-else '^\s*\' fence-fi '^\s*\' ~elsewith define-submode csh group 'case' fence-if '^\s*\\s*(.*)' fence-elif '^\s*\.*:' fence-else '^\s*\\s*:' fence-fi '^\s*\' ~elsewith define-submode csh group 'loop' fence-if '^\s*\\s*(.*)' fence-fi '^\s*\' ~endwith define-mode cweb ~with define-submode cweb suffixes '\.\(w\|web\)$' ~endwith ; Fences in DCL do not work well because we really want a fence-if which ; looks for an 'if' on a line where there is no 'then'. But here is a set of ; expressions that work by relying on matching the if-once first, so it ; excludes the if-block. define-mode dcl ~with define-submode dcl suffixes '\.\(com\|tpu\)$' comment-prefix '^\s*\$!' comments '^\s*\$!\s*$' ignorecase ~elsewith define-submode dcl group 'if-once' fence-if '^\s*\(\$\s*\)\?\.*\' ~elsewith define-submode dcl group 'if-block' fence-if '^\s*\(\$\s*\)\?\' fence-else '^\s*\(\$\s*\)\?\' fence-fi '^\s*\(\$\s*\)\?\' ~endwith define-mode def ~with define-submode def suffixes '\.\(def\)$' ignorecase dos ~endwith define-mode diff ~with define-submode diff suffixes '\.\(patch\|dif\|diff\|diffs\|rej\)$' pre '^\' ~endwith ; ECLiPSe (a dialect of Prolog) define-mode ecl ~with define-submode ecl suffixes '\.\(ecl\|pro\)$' ~endwith ; Syntax descriptions for enscript ; NOTE: Smalltalk files also may have ".st" suffix. define-mode est ~with define-submode est suffixes '\.st$' cindent ~endwith ; Embedded SQL in C/C++ define-mode esql ~with define-submode esql suffixes '\.\(ec\|pc\|ppc\)$' cindent cindent-chars &cat ':#' $fences ~endwith ; forms definition. ; FIXME: The groups should not nest (extend the syntax) define-mode fdl ~with define-submode fdl suffixes '\.\$' comment-prefix '^\s*$rem\>' comments '^\(\|$rem\)$' fence-if '^\$\s*if\>' fence-elif '^\$\s*elseif\>' fence-else '^\$\s*else\>\s*$' fence-fi '^\$\s*endif\s*$' ~elsewith define-submode fdl group 'form' fence-if '^\$form\>' fence-fi '^\$endform\s*$' ~elsewith define-submode fdl group 'field' fence-if '^\$field\>$' fence-fi '^\$endfield\s*$' ~elsewith define-submode fdl group 'group' fence-if '^\$group\>' fence-fi '^\$endgroup\s*$' ~elsewith define-submode fdl group 'array' fence-if '^\$array\>' fence-fi '^\$endarray\s*$' ~elsewith define-submode fdl group 'page' fence-if '^\$page\>' fence-fi '^\$endpage\s*$' ~elsewith define-submode fdl group 'scroll' fence-if '^\$scroll\>' fence-fi '^\$endscroll\s*$' ~elsewith define-submode fdl group 'state' fence-if '^\$state\>' fence-fi '^\$endstate\s*$' ~elsewith define-submode fdl group 'text' fence-if '^\$text\>' fence-fi '^\$endtext\s*$' ~endwith ; Inherit the C-style fences for JavaScript, but add new ones for HTML define-mode html ~with define-submode html suffixes '\.\(html\|htm\)$' pre '\(\|