" 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 and bind syn keyword txr_keyword contained block cases cat catch syn keyword txr_keyword contained choose close coll collect syn keyword txr_keyword contained defex deffilter define do syn keyword txr_keyword contained end eof eol fail syn keyword txr_keyword contained filter finally flatten forget syn keyword txr_keyword contained freeform fuzz gather last syn keyword txr_keyword contained load local maybe merge syn keyword txr_keyword contained next none or output syn keyword txr_keyword contained rebind rep repeat require syn keyword txr_keyword contained set skip some text syn keyword txr_keyword contained throw trailer try until syn keyword txr_keyword contained var syn keyword txl_keyword contained * *keyword-package* *random-state* *self-path* syn keyword txl_keyword contained *stddebug* *stderr* *stdin* *stdlog* syn keyword txl_keyword contained *stdnull* *stdout* *system-package* *user-package* syn keyword txl_keyword contained + - / /= syn keyword txl_keyword contained < <= = > syn keyword txl_keyword contained >= abs acons acons-new syn keyword txl_keyword contained aconsql-new acos alist-nremove alist-remove syn keyword txl_keyword contained all and andf append syn keyword txl_keyword contained append* append-each append-each* apply syn keyword txl_keyword contained ash asin assoc assql syn keyword txl_keyword contained atan atan2 atom bignump syn keyword txl_keyword contained block boundp break-str call syn keyword txl_keyword contained car cat-str cat-vec catch syn keyword txl_keyword contained cdr ceil chain chr-isalnum syn keyword txl_keyword contained chr-isalpha chr-isascii chr-iscntrl chr-isdigit syn keyword txl_keyword contained chr-isgraph chr-islower chr-isprint chr-ispunct syn keyword txl_keyword contained chr-isspace chr-isupper chr-isxdigit chr-num syn keyword txl_keyword contained chr-str chr-str-set chr-tolower chr-toupper syn keyword txl_keyword contained chrp close-stream closelog collect-each syn keyword txl_keyword contained collect-each* compl-span-str cond cons syn keyword txl_keyword contained conses conses* consp copy-alist syn keyword txl_keyword contained copy-cons copy-hash copy-list copy-str syn keyword txl_keyword contained copy-vec cos count-if countq syn keyword txl_keyword contained countql countqual cum-norm-dist daemon syn keyword txl_keyword contained dec defun defvar del syn keyword txl_keyword contained delete-package do dohash downcase-str syn keyword txl_keyword contained dwim each each* eq syn keyword txl_keyword contained eql equal errno error syn keyword txl_keyword contained eval evenp exit exp syn keyword txl_keyword contained expand expt exptmod fboundp 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* syn keyword txl_keyword contained force format fourth fun syn keyword txl_keyword contained func-get-env func-get-form func-set-env functionp syn keyword txl_keyword contained gcd generate gensym get-byte syn keyword txl_keyword contained get-char get-hash-userdata get-line get-list-from-stream syn keyword txl_keyword contained get-sig-handler get-string-from-stream gethash group-by syn keyword txl_keyword contained hash hash-alist hash-construct hash-count syn keyword txl_keyword contained hash-diff hash-eql hash-equal hash-isec syn keyword txl_keyword contained hash-keys hash-pairs hash-uni hash-update 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* lisp-parse syn keyword txl_keyword contained list list-str list-vector listp syn keyword txl_keyword contained log log-alert log-auth log-authpriv syn keyword txl_keyword contained log-cons log-crit log-daemon log-debug syn keyword txl_keyword contained log-emerg log-err log-info log-ndelay syn keyword txl_keyword contained log-notice log-nowait log-odelay log-perror syn keyword txl_keyword contained log-pid log-user log-warning logand syn keyword txl_keyword contained logior lognot logtest logtrunc syn keyword txl_keyword contained logxor make-catenated-stream 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 make-time make-time-utc mapcar mapcar* syn keyword txl_keyword contained maphash mappend mappend* mask syn keyword txl_keyword contained match-fun match-regex match-regex-right 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 n-choose-k n-perm-k syn keyword txl_keyword contained none not nreverse null syn keyword txl_keyword contained num-chr num-str numberp oddp syn keyword txl_keyword contained op open-command open-directory open-file syn keyword txl_keyword contained open-pipe open-process open-tail openlog syn keyword txl_keyword contained or orf packagep pop syn keyword txl_keyword contained pprint print prog1 progn syn keyword txl_keyword contained prop proper-listp push pushhash syn keyword txl_keyword contained put-byte put-char put-line put-string syn keyword txl_keyword contained qquote quasi quote rand syn keyword txl_keyword contained random random-fixnum random-state-p range syn keyword txl_keyword contained range* read real-time-stream-p reduce-left syn keyword txl_keyword contained reduce-right ref refset regex-compile syn keyword txl_keyword contained regex-parse regexp regsub rehome-sym syn keyword txl_keyword contained remhash remove-if remove-if* remove-path syn keyword txl_keyword contained remq remq* remql remql* syn keyword txl_keyword contained remqual remqual* rename-path repeat syn keyword txl_keyword contained replace replace-list replace-str replace-vec syn keyword txl_keyword contained rest return return-from reverse syn keyword txl_keyword contained rplaca rplacd s-ifblk s-ifchr syn keyword txl_keyword contained s-ifdir s-ififo s-iflnk s-ifmt syn keyword txl_keyword contained s-ifreg s-irgrp s-iroth s-irusr syn keyword txl_keyword contained s-irwxg s-irwxo s-irwxu s-isgid syn keyword txl_keyword contained s-isuid s-isvtx s-iwgrp s-iwoth syn keyword txl_keyword contained s-iwusr s-ixgrp s-ixoth s-ixusr syn keyword txl_keyword contained search-regex search-str search-str-tree second syn keyword txl_keyword contained seek-stream set set-diff set-hash-userdata syn keyword txl_keyword contained set-sig-handler sethash setlogmask sig-abrt syn keyword txl_keyword contained sig-alrm sig-bus sig-check sig-chld syn keyword txl_keyword contained sig-cont sig-fpe sig-hup sig-ill syn keyword txl_keyword contained sig-int sig-io sig-iot sig-kill syn keyword txl_keyword contained sig-lost sig-pipe sig-poll sig-prof syn keyword txl_keyword contained sig-pwr sig-quit sig-segv sig-stkflt syn keyword txl_keyword contained sig-stop sig-sys sig-term sig-trap syn keyword txl_keyword contained sig-tstp sig-ttin sig-ttou sig-urg syn keyword txl_keyword contained sig-usr1 sig-usr2 sig-vtalrm sig-winch syn keyword txl_keyword contained sig-xcpu sig-xfsz 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 stream-get-prop syn keyword txl_keyword contained stream-set-prop streamp string-cmp string-extend syn keyword txl_keyword contained string-lt stringp sub sub-list syn keyword txl_keyword contained sub-str sub-vec symbol-function symbol-name syn keyword txl_keyword contained symbol-package symbol-value symbolp syslog syn keyword txl_keyword contained tan third throw throwf syn keyword txl_keyword contained time time-fields-local time-fields-utc time-string-local syn keyword txl_keyword contained time-string-utc time-usec tok-str tostring syn keyword txl_keyword contained tostringp tree-find trim-str trunc syn keyword txl_keyword contained typeof unget-byte unget-char unquote syn keyword txl_keyword contained upcase-str update url-decode url-encode syn keyword txl_keyword contained usleep uw-protect vec-push vec-set-length syn keyword txl_keyword contained vecref vector vector-list vectorp syn keyword txl_keyword contained 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_dot "\." contained syn match txr_num "#x[+\-]\?[0-9A-Fa-f]\+" contained syn match txr_num "[+\-]\?[0-9]\+" contained syn match txr_ident "[:@]\?[A-Za-z0-9!$%&*+\-<=>?\\^_~]*[A-Za-z!$%&*+\-<=>?\\^_~][A-Za-z0-9!$%&*+\-<=>?\\^_~]*" contained syn match txl_ident "[:@]\?[A-Za-z0-9!$%&*+\-<=>?\\^_~/]*[A-Za-z!$%&*+\-<=>?\\^_~/][A-Za-z0-9!$%&*+\-<=>?\\^_~/]*" contained syn match txr_num "[+\-]\?[0-9]*[.][0-9]\+\([eE][+\-]\?[0-9]\+\)\?" contained syn match txr_num "[+\-]\?[0-9]\+\([eE][+\-]\?[0-9]\+\)" contained syn match txl_ident ":" contained syn match txr_unquote "," contained syn match txr_splice ",\*" contained syn match txr_quote "'" contained syn match txr_dotdot "\.\." contained syn match txr_metaat "@" 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_metaat,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_metaat,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_metaat,txr_ncomment,txr_nested_error syn region txr_mlist contained matchgroup=Delimiter start="@[ \t]*(" 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_metaat,txr_ncomment,txr_nested_error syn region txr_mbracket matchgroup=Delimiter start="@[ \t]*\[" 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_metaat,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_metaat Special hi def link txr_error Error hi def link txr_nested_error Error let b:current_syntax = "lisp"