" VIM Syntax file for txr " Kaz Kylheku " INSTALL-HOWTO: " " 1. Create the directory .vim/syntax in your home directory and " put this file there. " 2. In your .vimrc, add this command to associate *.txr files " with the txr filetype. " :au BufRead,BufNewFile *.txr set filetype=txr | set lisp " " If you want syntax highlighting to be on automatically (for any language) " you need to add ":syntax on" in your .vimrc also. But you knew that already! " " This file is generated by the genvim.txr script in the TXR source tree. syn case match syn spell toplevel setlocal iskeyword=a-z,A-Z,48-57,!,$,&,*,+,-,<,=,>,?,\\,_,~,^ syn keyword txr_keyword contained accept all bind block syn keyword txr_keyword contained cases cat choose close syn keyword txr_keyword contained coll collect defex deffilter syn keyword txr_keyword contained define do eof eol syn keyword txr_keyword contained fail filter flatten forget syn keyword txr_keyword contained freeform fuzz gather load syn keyword txr_keyword contained local maybe merge next syn keyword txr_keyword contained none output rebind repeat syn keyword txr_keyword contained require set skip some syn keyword txr_keyword contained text throw trailer try syn keyword txr_keyword contained var syn keyword txr_keyword contained end and or syn keyword txl_keyword contained * *keyword-package* *random-state* *self-path* syn keyword txl_keyword contained *stddebug* *stderr* *stdin* *stdout* syn keyword txl_keyword contained *system-package* *user-package* + - syn keyword txl_keyword contained / /= < <= syn keyword txl_keyword contained = > >= abs syn keyword txl_keyword contained acons acons-new aconsql-new acos syn keyword txl_keyword contained alist-nremove alist-remove all and syn keyword txl_keyword contained andf append append* apply syn keyword txl_keyword contained ash asin assoc assql syn keyword txl_keyword contained atan atom bignump block syn keyword txl_keyword contained break-str call car cat-str syn keyword txl_keyword contained cat-vec catch cdr ceil syn keyword txl_keyword contained chain chr-isalnum chr-isalpha chr-isascii syn keyword txl_keyword contained chr-iscntrl chr-isdigit chr-isgraph chr-islower syn keyword txl_keyword contained chr-isprint chr-ispunct chr-isspace chr-isupper syn keyword txl_keyword contained chr-isxdigit chr-num chr-str chr-str-set syn keyword txl_keyword contained chr-tolower chr-toupper chrp close-stream syn keyword txl_keyword contained collect_each collect_each_star compl-span-str cond syn keyword txl_keyword contained cons consp copy-alist copy-cons syn keyword txl_keyword contained copy-hash copy-list copy-str copy-vec syn keyword txl_keyword contained cos dec defun defvar syn keyword txl_keyword contained del delete-package dohash downcase-str syn keyword txl_keyword contained dwim each each_star eq syn keyword txl_keyword contained eql equal error eval syn keyword txl_keyword contained evenp exp expt exptmod syn keyword txl_keyword contained fifth find find-if find-package syn keyword txl_keyword contained first fixnump flatten flatten* syn keyword txl_keyword contained flip flo-int flo-str floatp syn keyword txl_keyword contained floor flush-stream for for_star syn keyword txl_keyword contained force format fourth fun syn keyword txl_keyword contained func-get-env func-get-form functionp gcd syn keyword txl_keyword contained generate gensym get-byte get-char syn keyword txl_keyword contained get-hash-userdata get-line get-list-from-stream get-string-from-stream syn keyword txl_keyword contained gethash hash hash-alist hash-construct syn keyword txl_keyword contained hash-count hash-diff hash-eql hash-equal syn keyword txl_keyword contained hash-isec hash-keys hash-pairs hash-uni syn keyword txl_keyword contained hash-values hashp identity if syn keyword txl_keyword contained iff iffi inc int-flo syn keyword txl_keyword contained int-str integerp intern interp-fun-p syn keyword txl_keyword contained isqrt keep-if keep-if* keywordp syn keyword txl_keyword contained lambda lazy-str lazy-str-force lazy-str-force-upto syn keyword txl_keyword contained lazy-str-get-trailing-list lazy-stream-cons lazy-stringp lcons-fun syn keyword txl_keyword contained ldiff length length-list length-str syn keyword txl_keyword contained length-str-< length-str-<= length-str-> length-str->= syn keyword txl_keyword contained length-vec let let_star list syn keyword txl_keyword contained list-str list-vector listp log syn keyword txl_keyword contained logand logior lognot logtest syn keyword txl_keyword contained logtrunc logxor make-hash make-lazy-cons syn keyword txl_keyword contained make-package make-random-state make-similar-hash make-string-byte-input-stream syn keyword txl_keyword contained make-string-input-stream make-string-output-stream make-strlist-output-stream make-sym syn keyword txl_keyword contained mapcar mapcar* maphash mappend syn keyword txl_keyword contained mappend* match-fun match-regex match-str syn keyword txl_keyword contained match-str-tree max memq memql syn keyword txl_keyword contained memqual merge min mkstring syn keyword txl_keyword contained mod multi-sort none not syn keyword txl_keyword contained nreverse null num-chr num-str syn keyword txl_keyword contained numberp oddp open-command open-directory syn keyword txl_keyword contained open-file open-pipe open-process or syn keyword txl_keyword contained orf packagep pop pprint syn keyword txl_keyword contained print prog1 progn prop syn keyword txl_keyword contained proper-listp push pushhash put-byte syn keyword txl_keyword contained put-char put-line put-string qquote syn keyword txl_keyword contained quasi quote rand random syn keyword txl_keyword contained random-fixnum random-state-p range range* syn keyword txl_keyword contained reduce-left reduce-right ref refset syn keyword txl_keyword contained regex-compile regexp regsub rehome-sym syn keyword txl_keyword contained remhash remove-if remove-if* remq syn keyword txl_keyword contained remq* remql remql* remqual syn keyword txl_keyword contained remqual* repeat replace replace-list syn keyword txl_keyword contained replace-str replace-vec rest return syn keyword txl_keyword contained return_from reverse rplaca rplacd syn keyword txl_keyword contained s-ifblk s-ifchr s-ifdir s-ififo syn keyword txl_keyword contained s-iflnk s-ifmt s-ifreg s-irgrp syn keyword txl_keyword contained s-iroth s-irusr s-irwxg s-irwxo syn keyword txl_keyword contained s-irwxu s-isgid s-isuid s-isvtx syn keyword txl_keyword contained s-iwgrp s-iwoth s-iwusr s-ixgrp syn keyword txl_keyword contained s-ixoth s-ixusr search-regex search-str syn keyword txl_keyword contained search-str-tree second set set-diff syn keyword txl_keyword contained set-hash-userdata sethash sin sixth syn keyword txl_keyword contained size-vec some sort source-loc syn keyword txl_keyword contained source-loc-str span-str splice split-str syn keyword txl_keyword contained split-str-set sqrt stat string-cmp syn keyword txl_keyword contained string-extend string-lt stringp sub syn keyword txl_keyword contained sub-list sub-str sub-vec symbol-function syn keyword txl_keyword contained symbol-name symbol-package symbolp tan syn keyword txl_keyword contained third throw throwf time syn keyword txl_keyword contained time-string-local time-string-utc time-usec tok-str syn keyword txl_keyword contained tostring tostringp tree-find trim-str syn keyword txl_keyword contained trunc typeof unquote upcase-str syn keyword txl_keyword contained url-decode url-encode uw_protect vec-push syn keyword txl_keyword contained vec-set-length vecref vector vector_list syn keyword txl_keyword contained vectorp zerop syn match txr_error "@[\t ]*[*]\?[\t ]*." syn match txr_nested_error "[^\t `]\+" contained syn match txr_hashbang "^#!.*" syn match txr_atat "@[ \t]*@" syn match txr_comment "@[ \t]*[#;].*" syn match txr_contin "@[ \t]*\\$" syn match txr_char "@[ \t]*\\." syn match txr_char "@[ \t]*\\x[0-9A-Fa-f]\+" syn match txr_char "@[ \t]*\\[0-9]\+" syn match txr_variable "@[ \t]*[*]\?[ \t]*[A-Za-z_][A-Za-z0-9_]*" syn match txr_metanum "@[0-9]\+" syn match txr_regdir "@[ \t]*/\(\\/\|[^/]\|\\\n\)*/" syn match txr_chr "#\\x[A-Fa-f0-9]\+" contained syn match txr_chr "#\\o[0-9]\+" contained syn match txr_chr "#\\[^ \t\nA-Za-z0-9_]" contained syn match txr_chr "#\\[A-Za-z0-9_]\+" contained syn match txr_regex "/\(\\/\|[^/]\|\\\n\)*/" contained syn match txl_regex "#/\(\\/\|[^/]\|\\\n\)*/" contained syn match txr_ncomment ";.*" contained syn match txr_ident "[:@]\?[A-Za-z0-9!$%&*+\-<=>?\\^_~]\+" contained syn match txl_ident "[:@]\?[A-Za-z0-9!$%&*+\-<=>?\\^_~/]\+" contained syn match txl_ident ":" contained syn match txr_num "[+-]\?[0-9]\+" contained syn match txr_unquote "," contained syn match txr_splice ",\*" contained syn match txr_quote "'" contained syn match txr_dot "\." contained syn match txr_dotdot "\.\." contained syn region txr_bracevar matchgroup=Delimiter start="@[ \t]*[*]\?{" matchgroup=Delimiter end="}" contains=txr_num,txr_ident,txr_string,txr_list,txr_bracket,txr_mlist,txr_mbracket,txr_regex,txr_quasilit,txr_chr,txr_nested_error syn region txr_directive matchgroup=Delimiter start="@[ \t]*(" matchgroup=Delimiter end=")" contains=txr_keyword,txr_string,txr_list,txr_bracket,txr_mlist,txr_mbracket,txr_quasilit,txr_num,txl_ident,txl_regex,txr_string,txr_chr,txr_quote,txr_unquote,txr_splice,txr_dot,txr_dotdot,txr_ncomment,txr_nested_error syn region txr_list contained matchgroup=Delimiter start="#\?H\?(" matchgroup=Delimiter end=")" contains=txl_keyword,txr_string,txl_regex,txr_num,txl_ident,txr_metanum,txr_list,txr_bracket,txr_mlist,txr_mbracket,txr_quasilit,txr_chr,txr_quote,txr_unquote,txr_splice,txr_dot,txr_dotdot,txr_ncomment,txr_nested_error syn region txr_bracket contained matchgroup=Delimiter start="\[" matchgroup=Delimiter end="\]" contains=txl_keyword,txr_string,txl_regex,txr_num,txl_ident,txr_metanum,txr_list,txr_bracket,txr_mlist,txr_mbracket,txr_quasilit,txr_chr,txr_quote,txr_unquote,txr_splice,txr_dot,txr_dotdot,txr_ncomment,txr_nested_error syn region txr_mlist contained matchgroup=Delimiter start="@(" matchgroup=Delimiter end=")" contains=txl_keyword,txr_string,txl_regex,txr_num,txl_ident,txr_metanum,txr_list,txr_bracket,txr_mlist,txr_mbracket,txr_quasilit,txr_chr,txr_quote,txr_unquote,txr_splice,txr_dot,txr_dotdot,txr_ncomment,txr_nested_error syn region txr_mbracket matchgroup=Delimiter start="@\[" matchgroup=Delimiter end="\]" contains=txl_keyword,txr_string,txl_regex,txr_num,txl_ident,txr_metanum,txr_list,txr_bracket,txr_mlist,txr_mbracket,txr_quasilit,txr_chr,txr_quote,txr_unquote,txr_splice,txr_dot,txr_dotdot,txr_ncomment,txr_nested_error syn region txr_string contained oneline start=+"+ skip=+\\\\\|\\"+ end=+"+ syn region txr_quasilit contained oneline start=+`+ skip=+\\\\\|\\`+ end=+`+ contains=txr_variable,txr_metanum,txr_bracevar,txr_mlist,txr_mbracket hi def link txr_at Special hi def link txr_atstar Special hi def link txr_atat Special hi def link txr_comment Comment hi def link txr_ncomment Comment hi def link txr_hashbang Preproc hi def link txr_contin Preproc hi def link txr_char String hi def link txr_keyword Keyword hi def link txl_keyword Type hi def link txr_string String hi def link txr_chr String hi def link txr_quasilit String hi def link txr_regex String hi def link txl_regex String hi def link txr_regdir String hi def link txr_variable Identifier hi def link txr_metanum Identifier hi def link txr_ident Identifier hi def link txl_ident Identifier hi def link txr_num Number hi def link txr_quote Special hi def link txr_unquote Special hi def link txr_splice Special hi def link txr_dot Special hi def link txr_dotdot Special hi def link txr_error Error hi def link txr_nested_error Error let b:current_syntax = "lisp"