diff --git a/doc/slimv.txt b/doc/slimv.txt index 1ad3c2c..93c5e2b 100644 --- a/doc/slimv.txt +++ b/doc/slimv.txt @@ -1,7 +1,7 @@ -*slimv.txt* Slimv Last Change: 06 May 2009 +*slimv.txt* Slimv Last Change: 04 Jun 2009 Slimv *slimv* - Version 0.5.2 + Version 0.5.3 The Superior Lisp Interaction Mode for Vim. This plugin is aimed to help Lisp development by interfacing between Vim and @@ -558,9 +558,15 @@ by Slimv to ',' by default. Repl commands: ,c ,rc Connect to Server - REPL menu commands (separate menu, valid only for the REPL buffer): + + Set#1 Set#2 Command + --------------------------------------------------- + ,\ ,\ REPL Menu (separate menu, valid only for the REPL buffer) + + REPL menu commands: ,. ,rs Send Input ,/ ,ro Close and Send Input + Interrupt Lisp Process ,< ,rp Previous Input ,> ,rn Next Input ,z ,rr Refresh REPL Buffer @@ -925,6 +931,13 @@ FAQ *slimv-faq* =============================================================================== CHANGE LOG *slimv-changelog* +0.5.3 - Added Interrupt-Lisp-Process command. + - Added mapping for the REPL menu. + - Added special forms to Clojre API lookup. + - Bugfix: put cursor after the last character in insert mode when + continuously refreshing REPL buffer. + - Fixed some Ctrl-C handling problems. + 0.5.2 - Updated Clojure API. - Adapted Clojure autodetection to version 1.0 (clojure-1.0.0.jar). - Complete-Symbol command moved to separate Edit submenu. @@ -1005,6 +1018,7 @@ ISSUES, LIMITATIONS, KNOWN BUGS *slimv-issues* - Interruption (Ctrl-C) does not work with all Lisp implementations. For example SBCL exits on Windows when receiving Ctrl-C. It does not work in Clojure. + In this case use the Interrupt-Lisp-Process menu command. - There are some functions that are not compatible or simply not working for Clojure. - It is not possible to run separate Lisp and Clojure REPL in the same diff --git a/ftplugin/slimv-cljapi.vim b/ftplugin/slimv-cljapi.vim index 8c2c50e..8fcc4c1 100644 --- a/ftplugin/slimv-cljapi.vim +++ b/ftplugin/slimv-cljapi.vim @@ -1,7 +1,7 @@ " slimv-cljapi.vim: " Clojure API lookup support for Slimv -" Version: 0.5.2 -" Last Change: 06 May 2009 +" Version: 0.5.3 +" Last Change: 20 May 2009 " Maintainer: Tamas Kovacs " License: This file is placed in the public domain. " No warranty, express or implied. @@ -23,513 +23,529 @@ endif if !exists( 'g:slimv_cljapi_db' ) let g:slimv_cljapi_db = [ + \["def", "special_forms\\#def"], + \["if", "special_forms\\#if"], + \["do", "special_forms\\#do"], + \["let", "special_forms\\#let"], + \["quote", "special_forms\\#quote"], + \["var", "special_forms\\#var"], + \["fn", "special_forms\\#fn"], + \["loop", "special_forms\\#loop"], + \["recur", "special_forms\\#recur"], + \["throw", "special_forms\\#throw"], + \["try", "special_forms\\#try"], + \["monitor-enter", "special_forms\\#monitor-enter"], + \["monitor-exit", "special_forms\\#monitor-exit"], + \[".", "java_interop\\#dot"], + \["new", "java_interop\\#new"], + \["set!", "vars\\#set"], \["clojure.core", "api\\#toc1"], - \["*", "api\\#toc2"], - \["*1", "api\\#toc6"], - \["*2", "api\\#toc7"], - \["*3", "api\\#toc8"], - \["*agent*", "api\\#toc9"], - \["*clojure-version*", "api\\#toc10"], - \["*command-line-args*", "api\\#toc11"], - \["*compile-files*", "api\\#toc12"], - \["*compile-path*", "api\\#toc13"], - \["*e", "api\\#toc14"], - \["*err*", "api\\#toc15"], - \["*file*", "api\\#toc16"], - \["*flush-on-newline*", "api\\#toc17"], - \["*in*", "api\\#toc18"], - \["*ns*", "api\\#toc19"], - \["*out*", "api\\#toc20"], - \["*print-dup*", "api\\#toc21"], - \["*print-length*", "api\\#toc22"], - \["*print-level*", "api\\#toc23"], - \["*print-meta*", "api\\#toc24"], - \["*print-readably*", "api\\#toc25"], - \["*read-eval*", "api\\#toc26"], - \["*warn-on-reflection*", "api\\#toc27"], - \["+", "api\\#toc28"], - \["-", "api\\#toc32"], - \["->", "api\\#toc35"], - \["..", "api\\#toc38"], - \["/", "api\\#toc41"], - \["<", "api\\#toc44"], - \["<=", "api\\#toc47"], - \["=", "api\\#toc50"], - \["==", "api\\#toc53"], - \[">", "api\\#toc56"], - \[">=", "api\\#toc59"], - \["accessor", "api\\#toc62"], - \["aclone", "api\\#toc63"], - \["add-classpath", "api\\#toc64"], - \["add-watch", "api\\#toc65"], - \["add-watcher", "api\\#toc66"], - \["agent", "api\\#toc67"], - \["agent-errors", "api\\#toc69"], - \["aget", "api\\#toc70"], - \["alength", "api\\#toc72"], - \["alias", "api\\#toc73"], - \["all-ns", "api\\#toc74"], - \["alter", "api\\#toc75"], - \["alter-meta!", "api\\#toc76"], - \["alter-var-root", "api\\#toc77"], - \["amap", "api\\#toc78"], - \["ancestors", "api\\#toc80"], - \["and", "api\\#toc82"], - \["apply", "api\\#toc86"], - \["areduce", "api\\#toc87"], - \["array-map", "api\\#toc89"], - \["aset", "api\\#toc91"], - \["aset-boolean", "api\\#toc93"], - \["aset-byte", "api\\#toc95"], - \["aset-char", "api\\#toc97"], - \["aset-double", "api\\#toc99"], - \["aset-float", "api\\#toc101"], - \["aset-int", "api\\#toc103"], - \["aset-long", "api\\#toc105"], - \["aset-short", "api\\#toc107"], - \["assert", "api\\#toc109"], - \["assoc", "api\\#toc111"], - \["assoc-in", "api\\#toc113"], - \["associative?", "api\\#toc114"], - \["atom", "api\\#toc115"], - \["await", "api\\#toc117"], - \["await-for", "api\\#toc118"], - \["bases", "api\\#toc119"], - \["bean", "api\\#toc120"], - \["bigdec", "api\\#toc121"], - \["bigint", "api\\#toc122"], - \["binding", "api\\#toc123"], - \["bit-and", "api\\#toc125"], - \["bit-and-not", "api\\#toc126"], - \["bit-clear", "api\\#toc127"], - \["bit-flip", "api\\#toc128"], - \["bit-not", "api\\#toc129"], - \["bit-or", "api\\#toc130"], - \["bit-set", "api\\#toc131"], - \["bit-shift-left", "api\\#toc132"], - \["bit-shift-right", "api\\#toc133"], - \["bit-test", "api\\#toc134"], - \["bit-xor", "api\\#toc135"], - \["boolean", "api\\#toc136"], - \["butlast", "api\\#toc137"], - \["byte", "api\\#toc138"], - \["cast", "api\\#toc139"], - \["char", "api\\#toc140"], - \["char-escape-string", "api\\#toc141"], - \["char-name-string", "api\\#toc142"], - \["class", "api\\#toc143"], - \["class?", "api\\#toc144"], - \["clear-agent-errors", "api\\#toc145"], - \["clojure-version", "api\\#toc146"], - \["coll?", "api\\#toc147"], - \["comment", "api\\#toc148"], - \["commute", "api\\#toc150"], - \["comp", "api\\#toc151"], - \["comparator", "api\\#toc152"], - \["compare", "api\\#toc153"], - \["compare-and-set!", "api\\#toc154"], - \["compile", "api\\#toc155"], - \["complement", "api\\#toc156"], - \["concat", "api\\#toc157"], - \["cond", "api\\#toc161"], - \["condp", "api\\#toc163"], - \["conj", "api\\#toc165"], - \["cons", "api\\#toc167"], - \["constantly", "api\\#toc168"], - \["construct-proxy", "api\\#toc169"], - \["contains?", "api\\#toc170"], - \["count", "api\\#toc171"], - \["counted?", "api\\#toc172"], - \["create-ns", "api\\#toc173"], - \["create-struct", "api\\#toc174"], - \["cycle", "api\\#toc175"], - \["dec", "api\\#toc176"], - \["decimal?", "api\\#toc177"], - \["declare", "api\\#toc178"], - \["definline", "api\\#toc180"], - \["defmacro", "api\\#toc182"], - \["defmethod", "api\\#toc185"], - \["defmulti", "api\\#toc187"], - \["defn", "api\\#toc189"], - \["defn-", "api\\#toc192"], - \["defonce", "api\\#toc194"], - \["defstruct", "api\\#toc196"], - \["delay", "api\\#toc198"], - \["delay?", "api\\#toc200"], - \["deref", "api\\#toc201"], - \["derive", "api\\#toc202"], - \["descendants", "api\\#toc204"], - \["disj", "api\\#toc206"], - \["dissoc", "api\\#toc209"], - \["distinct", "api\\#toc212"], - \["distinct?", "api\\#toc213"], - \["doall", "api\\#toc216"], - \["doc", "api\\#toc218"], - \["dorun", "api\\#toc220"], - \["doseq", "api\\#toc222"], - \["dosync", "api\\#toc224"], - \["dotimes", "api\\#toc226"], - \["doto", "api\\#toc228"], - \["double", "api\\#toc230"], - \["double-array", "api\\#toc231"], - \["doubles", "api\\#toc233"], - \["drop", "api\\#toc234"], - \["drop-last", "api\\#toc235"], - \["drop-while", "api\\#toc237"], - \["empty", "api\\#toc238"], - \["empty?", "api\\#toc239"], - \["ensure", "api\\#toc240"], - \["enumeration-seq", "api\\#toc241"], - \["eval", "api\\#toc242"], - \["even?", "api\\#toc243"], - \["every?", "api\\#toc244"], - \["false?", "api\\#toc245"], - \["ffirst", "api\\#toc246"], - \["file-seq", "api\\#toc247"], - \["filter", "api\\#toc248"], - \["find", "api\\#toc249"], - \["find-doc", "api\\#toc250"], - \["find-ns", "api\\#toc251"], - \["find-var", "api\\#toc252"], - \["first", "api\\#toc253"], - \["float", "api\\#toc254"], - \["float-array", "api\\#toc255"], - \["float?", "api\\#toc257"], - \["floats", "api\\#toc258"], - \["flush", "api\\#toc259"], - \["fn", "api\\#toc260"], - \["fn?", "api\\#toc262"], - \["fnext", "api\\#toc263"], - \["for", "api\\#toc264"], - \["force", "api\\#toc266"], - \["format", "api\\#toc267"], - \["future", "api\\#toc268"], - \["future-call", "api\\#toc270"], - \["gen-class", "api\\#toc271"], - \["gen-interface", "api\\#toc273"], - \["gensym", "api\\#toc275"], - \["get", "api\\#toc277"], - \["get-in", "api\\#toc279"], - \["get-method", "api\\#toc280"], - \["get-proxy-class", "api\\#toc281"], - \["get-validator", "api\\#toc282"], - \["hash", "api\\#toc283"], - \["hash-map", "api\\#toc284"], - \["hash-set", "api\\#toc286"], - \["identical?", "api\\#toc288"], - \["identity", "api\\#toc289"], - \["if-let", "api\\#toc290"], - \["if-not", "api\\#toc293"], - \["ifn?", "api\\#toc296"], - \["import", "api\\#toc297"], - \["in-ns", "api\\#toc298"], - \["inc", "api\\#toc299"], - \["init-proxy", "api\\#toc300"], - \["instance?", "api\\#toc301"], - \["int", "api\\#toc302"], - \["int-array", "api\\#toc303"], - \["integer?", "api\\#toc305"], - \["interleave", "api\\#toc306"], - \["intern", "api\\#toc307"], - \["interpose", "api\\#toc309"], - \["into", "api\\#toc310"], - \["into-array", "api\\#toc311"], - \["ints", "api\\#toc313"], - \["io!", "api\\#toc314"], - \["isa?", "api\\#toc316"], - \["iterate", "api\\#toc318"], - \["iterator-seq", "api\\#toc319"], - \["key", "api\\#toc320"], - \["keys", "api\\#toc321"], - \["keyword", "api\\#toc322"], - \["keyword?", "api\\#toc324"], - \["last", "api\\#toc325"], - \["lazy-cat", "api\\#toc326"], - \["lazy-seq", "api\\#toc328"], - \["let", "api\\#toc330"], - \["letfn", "api\\#toc332"], - \["line-seq", "api\\#toc334"], - \["list", "api\\#toc335"], - \["list*", "api\\#toc336"], - \["list?", "api\\#toc337"], - \["load", "api\\#toc338"], - \["load-file", "api\\#toc339"], - \["load-reader", "api\\#toc340"], - \["load-string", "api\\#toc341"], - \["loaded-libs", "api\\#toc342"], - \["locking", "api\\#toc343"], - \["long", "api\\#toc345"], - \["long-array", "api\\#toc346"], - \["longs", "api\\#toc348"], - \["loop", "api\\#toc349"], - \["macroexpand", "api\\#toc351"], - \["macroexpand-1", "api\\#toc352"], - \["make-array", "api\\#toc353"], - \["make-hierarchy", "api\\#toc355"], - \["map", "api\\#toc356"], - \["map?", "api\\#toc360"], - \["mapcat", "api\\#toc361"], - \["max", "api\\#toc362"], - \["max-key", "api\\#toc365"], - \["memfn", "api\\#toc368"], - \["memoize", "api\\#toc370"], - \["merge", "api\\#toc371"], - \["merge-with", "api\\#toc372"], - \["meta", "api\\#toc373"], - \["methods", "api\\#toc374"], - \["min", "api\\#toc375"], - \["min-key", "api\\#toc378"], - \["mod", "api\\#toc381"], - \["name", "api\\#toc382"], - \["namespace", "api\\#toc383"], - \["neg?", "api\\#toc384"], - \["newline", "api\\#toc385"], - \["next", "api\\#toc386"], - \["nfirst", "api\\#toc387"], - \["nil?", "api\\#toc388"], - \["nnext", "api\\#toc389"], - \["not", "api\\#toc390"], - \["not-any?", "api\\#toc391"], - \["not-empty", "api\\#toc392"], - \["not-every?", "api\\#toc393"], - \["not=", "api\\#toc394"], - \["ns", "api\\#toc397"], - \["ns-aliases", "api\\#toc399"], - \["ns-imports", "api\\#toc400"], - \["ns-interns", "api\\#toc401"], - \["ns-map", "api\\#toc402"], - \["ns-name", "api\\#toc403"], - \["ns-publics", "api\\#toc404"], - \["ns-refers", "api\\#toc405"], - \["ns-resolve", "api\\#toc406"], - \["ns-unalias", "api\\#toc407"], - \["ns-unmap", "api\\#toc408"], - \["nth", "api\\#toc409"], - \["nthnext", "api\\#toc411"], - \["num", "api\\#toc412"], - \["number?", "api\\#toc413"], - \["odd?", "api\\#toc414"], - \["or", "api\\#toc415"], - \["parents", "api\\#toc419"], - \["partial", "api\\#toc421"], - \["partition", "api\\#toc425"], - \["pcalls", "api\\#toc427"], - \["peek", "api\\#toc428"], - \["pmap", "api\\#toc429"], - \["pop", "api\\#toc431"], - \["pos?", "api\\#toc432"], - \["pr", "api\\#toc433"], - \["pr-str", "api\\#toc436"], - \["prefer-method", "api\\#toc437"], - \["prefers", "api\\#toc438"], - \["print", "api\\#toc439"], - \["print-namespace-doc", "api\\#toc440"], - \["print-str", "api\\#toc441"], - \["printf", "api\\#toc442"], - \["println", "api\\#toc443"], - \["println-str", "api\\#toc444"], - \["prn", "api\\#toc445"], - \["prn-str", "api\\#toc446"], - \["proxy", "api\\#toc447"], - \["proxy-mappings", "api\\#toc449"], - \["proxy-super", "api\\#toc450"], - \["pvalues", "api\\#toc452"], - \["quot", "api\\#toc454"], - \["rand", "api\\#toc455"], - \["rand-int", "api\\#toc457"], - \["range", "api\\#toc458"], - \["ratio?", "api\\#toc461"], - \["rationalize", "api\\#toc462"], - \["re-find", "api\\#toc463"], - \["re-groups", "api\\#toc465"], - \["re-matcher", "api\\#toc466"], - \["re-matches", "api\\#toc467"], - \["re-pattern", "api\\#toc468"], - \["re-seq", "api\\#toc469"], - \["read", "api\\#toc470"], - \["read-line", "api\\#toc474"], - \["read-string", "api\\#toc475"], - \["reduce", "api\\#toc476"], - \["ref", "api\\#toc478"], - \["ref-set", "api\\#toc480"], - \["refer", "api\\#toc481"], - \["refer-clojure", "api\\#toc482"], - \["release-pending-sends", "api\\#toc484"], - \["rem", "api\\#toc485"], - \["remove", "api\\#toc486"], - \["remove-method", "api\\#toc487"], - \["remove-ns", "api\\#toc488"], - \["remove-watch", "api\\#toc489"], - \["remove-watcher", "api\\#toc490"], - \["repeat", "api\\#toc491"], - \["repeatedly", "api\\#toc493"], - \["replace", "api\\#toc494"], - \["replicate", "api\\#toc495"], - \["require", "api\\#toc496"], - \["reset!", "api\\#toc497"], - \["reset-meta!", "api\\#toc498"], - \["resolve", "api\\#toc499"], - \["rest", "api\\#toc500"], - \["resultset-seq", "api\\#toc501"], - \["reverse", "api\\#toc502"], - \["reversible?", "api\\#toc503"], - \["rseq", "api\\#toc504"], - \["rsubseq", "api\\#toc505"], - \["second", "api\\#toc507"], - \["select-keys", "api\\#toc508"], - \["send", "api\\#toc509"], - \["send-off", "api\\#toc510"], - \["seq", "api\\#toc511"], - \["seq?", "api\\#toc512"], - \["seque", "api\\#toc513"], - \["sequence", "api\\#toc515"], - \["sequential?", "api\\#toc516"], - \["set", "api\\#toc517"], - \["set-validator!", "api\\#toc518"], - \["set?", "api\\#toc519"], - \["short", "api\\#toc520"], - \["shutdown-agents", "api\\#toc521"], - \["slurp", "api\\#toc522"], - \["some", "api\\#toc523"], - \["sort", "api\\#toc524"], - \["sort-by", "api\\#toc526"], - \["sorted-map", "api\\#toc528"], - \["sorted-map-by", "api\\#toc529"], - \["sorted-set", "api\\#toc530"], - \["sorted?", "api\\#toc531"], - \["special-form-anchor", "api\\#toc532"], - \["special-symbol?", "api\\#toc533"], - \["split-at", "api\\#toc534"], - \["split-with", "api\\#toc535"], - \["str", "api\\#toc536"], - \["stream?", "api\\#toc539"], - \["string?", "api\\#toc540"], - \["struct", "api\\#toc541"], - \["struct-map", "api\\#toc542"], - \["subs", "api\\#toc543"], - \["subseq", "api\\#toc545"], - \["subvec", "api\\#toc547"], - \["supers", "api\\#toc549"], - \["swap!", "api\\#toc550"], - \["symbol", "api\\#toc554"], - \["symbol?", "api\\#toc556"], - \["sync", "api\\#toc557"], - \["syntax-symbol-anchor", "api\\#toc559"], - \["take", "api\\#toc560"], - \["take-nth", "api\\#toc561"], - \["take-while", "api\\#toc562"], - \["test", "api\\#toc563"], - \["the-ns", "api\\#toc564"], - \["time", "api\\#toc565"], - \["to-array", "api\\#toc567"], - \["to-array-2d", "api\\#toc568"], - \["trampoline", "api\\#toc569"], - \["tree-seq", "api\\#toc571"], - \["true?", "api\\#toc572"], - \["type", "api\\#toc573"], - \["unchecked-add", "api\\#toc574"], - \["unchecked-dec", "api\\#toc575"], - \["unchecked-divide", "api\\#toc576"], - \["unchecked-inc", "api\\#toc577"], - \["unchecked-multiply", "api\\#toc578"], - \["unchecked-negate", "api\\#toc579"], - \["unchecked-remainder", "api\\#toc580"], - \["unchecked-subtract", "api\\#toc581"], - \["underive", "api\\#toc582"], - \["update-in", "api\\#toc584"], - \["update-proxy", "api\\#toc585"], - \["use", "api\\#toc586"], - \["val", "api\\#toc587"], - \["vals", "api\\#toc588"], - \["var-get", "api\\#toc589"], - \["var-set", "api\\#toc590"], - \["var?", "api\\#toc591"], - \["vary-meta", "api\\#toc592"], - \["vec", "api\\#toc593"], - \["vector", "api\\#toc594"], - \["vector?", "api\\#toc596"], - \["when", "api\\#toc597"], - \["when-first", "api\\#toc599"], - \["when-let", "api\\#toc601"], - \["when-not", "api\\#toc603"], - \["while", "api\\#toc605"], - \["with-in-str", "api\\#toc607"], - \["with-local-vars", "api\\#toc609"], - \["with-meta", "api\\#toc611"], - \["with-open", "api\\#toc612"], - \["with-out-str", "api\\#toc614"], - \["with-precision", "api\\#toc616"], - \["xml-seq", "api\\#toc618"], - \["zero?", "api\\#toc619"], - \["zipmap", "api\\#toc620"], + \["*", "api\\#*"], + \["*1", "api\\#*1"], + \["*2", "api\\#*2"], + \["*3", "api\\#*3"], + \["*agent*", "api\\#*agent*"], + \["*clojure-version*", "api\\#*clojure-version*"], + \["*command-line-args*", "api\\#*command-line-args*"], + \["*compile-files*", "api\\#*compile-files*"], + \["*compile-path*", "api\\#*compile-path*"], + \["*e", "api\\#*e"], + \["*err*", "api\\#*err*"], + \["*file*", "api\\#*file*"], + \["*flush-on-newline*", "api\\#*flush-on-newline*"], + \["*in*", "api\\#*in*"], + \["*ns*", "api\\#*ns*"], + \["*out*", "api\\#*out*"], + \["*print-dup*", "api\\#*print-dup*"], + \["*print-length*", "api\\#*print-length*"], + \["*print-level*", "api\\#*print-level*"], + \["*print-meta*", "api\\#*print-meta*"], + \["*print-readably*", "api\\#*print-readably*"], + \["*read-eval*", "api\\#*read-eval*"], + \["*warn-on-reflection*", "api\\#*warn-on-reflection*"], + \["+", "api\\#+"], + \["-", "api\\#-"], + \["->", "api\\#->"], + \["..", "api\\#.."], + \["/", "api\\#/"], + \["<", "api\\#<"], + \["<=", "api\\#<="], + \["=", "api\\#="], + \["==", "api\\#=="], + \[">", "api\\#>"], + \[">=", "api\\#>="], + \["accessor", "api\\#accessor"], + \["aclone", "api\\#aclone"], + \["add-classpath", "api\\#add-classpath"], + \["add-watch", "api\\#add-watch"], + \["add-watcher", "api\\#add-watcher"], + \["agent", "api\\#agent"], + \["agent-errors", "api\\#agent-errors"], + \["aget", "api\\#aget"], + \["alength", "api\\#alength"], + \["alias", "api\\#alias"], + \["all-ns", "api\\#all-ns"], + \["alter", "api\\#alter"], + \["alter-meta!", "api\\#alter-meta"], + \["alter-var-root", "api\\#alter-var-root"], + \["amap", "api\\#amap"], + \["ancestors", "api\\#ancestors"], + \["and", "api\\#and"], + \["apply", "api\\#apply"], + \["areduce", "api\\#areduce"], + \["array-map", "api\\#array-map"], + \["aset", "api\\#aset"], + \["aset-boolean", "api\\#aset-boolean"], + \["aset-byte", "api\\#aset-byte"], + \["aset-char", "api\\#aset-char"], + \["aset-double", "api\\#aset-double"], + \["aset-float", "api\\#aset-float"], + \["aset-int", "api\\#aset-int"], + \["aset-long", "api\\#aset-long"], + \["aset-short", "api\\#aset-short"], + \["assert", "api\\#assert"], + \["assoc", "api\\#assoc"], + \["assoc-in", "api\\#assoc-in"], + \["associative?", "api\\#associative?"], + \["atom", "api\\#atom"], + \["await", "api\\#await"], + \["await-for", "api\\#await-for"], + \["bases", "api\\#bases"], + \["bean", "api\\#bean"], + \["bigdec", "api\\#bigdec"], + \["bigint", "api\\#bigint"], + \["binding", "api\\#binding"], + \["bit-and", "api\\#bit-and"], + \["bit-and-not", "api\\#bit-and-not"], + \["bit-clear", "api\\#bit-clear"], + \["bit-flip", "api\\#bit-flip"], + \["bit-not", "api\\#bit-not"], + \["bit-or", "api\\#bit-or"], + \["bit-set", "api\\#bit-set"], + \["bit-shift-left", "api\\#bit-shift-left"], + \["bit-shift-right", "api\\#bit-shift-right"], + \["bit-test", "api\\#bit-test"], + \["bit-xor", "api\\#bit-xor"], + \["boolean", "api\\#boolean"], + \["butlast", "api\\#butlast"], + \["byte", "api\\#byte"], + \["cast", "api\\#cast"], + \["char", "api\\#char"], + \["char-escape-string", "api\\#char-escape-string"], + \["char-name-string", "api\\#char-name-string"], + \["class", "api\\#class"], + \["class?", "api\\#class?"], + \["clear-agent-errors", "api\\#clear-agent-errors"], + \["clojure-version", "api\\#clojure-version"], + \["coll?", "api\\#coll?"], + \["comment", "api\\#comment"], + \["commute", "api\\#commute"], + \["comp", "api\\#comp"], + \["comparator", "api\\#comparator"], + \["compare", "api\\#compare"], + \["compare-and-set!", "api\\#compare-and-set"], + \["compile", "api\\#compile"], + \["complement", "api\\#complement"], + \["concat", "api\\#concat"], + \["cond", "api\\#cond"], + \["condp", "api\\#condp"], + \["conj", "api\\#conj"], + \["cons", "api\\#cons"], + \["constantly", "api\\#constantly"], + \["construct-proxy", "api\\#construct-proxy"], + \["contains?", "api\\#contains?"], + \["count", "api\\#count"], + \["counted?", "api\\#counted?"], + \["create-ns", "api\\#create-ns"], + \["create-struct", "api\\#create-struct"], + \["cycle", "api\\#cycle"], + \["dec", "api\\#dec"], + \["decimal?", "api\\#decimal?"], + \["declare", "api\\#declare"], + \["definline", "api\\#definline"], + \["defmacro", "api\\#defmacro"], + \["defmethod", "api\\#defmethod"], + \["defmulti", "api\\#defmulti"], + \["defn", "api\\#defn"], + \["defn-", "api\\#defn-"], + \["defonce", "api\\#defonce"], + \["defstruct", "api\\#defstruct"], + \["delay", "api\\#delay"], + \["delay?", "api\\#delay?"], + \["deref", "api\\#deref"], + \["derive", "api\\#derive"], + \["descendants", "api\\#descendants"], + \["disj", "api\\#disj"], + \["dissoc", "api\\#dissoc"], + \["distinct", "api\\#distinct"], + \["distinct?", "api\\#distinct?"], + \["doall", "api\\#doall"], + \["doc", "api\\#doc"], + \["dorun", "api\\#dorun"], + \["doseq", "api\\#doseq"], + \["dosync", "api\\#dosync"], + \["dotimes", "api\\#dotimes"], + \["doto", "api\\#doto"], + \["double", "api\\#double"], + \["double-array", "api\\#double-array"], + \["doubles", "api\\#doubles"], + \["drop", "api\\#drop"], + \["drop-last", "api\\#drop-last"], + \["drop-while", "api\\#drop-while"], + \["empty", "api\\#empty"], + \["empty?", "api\\#empty?"], + \["ensure", "api\\#ensure"], + \["enumeration-seq", "api\\#enumeration-seq"], + \["eval", "api\\#eval"], + \["even?", "api\\#even?"], + \["every?", "api\\#every?"], + \["false?", "api\\#false?"], + \["ffirst", "api\\#ffirst"], + \["file-seq", "api\\#file-seq"], + \["filter", "api\\#filter"], + \["find", "api\\#find"], + \["find-doc", "api\\#find-doc"], + \["find-ns", "api\\#find-ns"], + \["find-var", "api\\#find-var"], + \["first", "api\\#first"], + \["float", "api\\#float"], + \["float-array", "api\\#float-array"], + \["float?", "api\\#float?"], + \["floats", "api\\#floats"], + \["flush", "api\\#flush"], + \["fn", "api\\#fn"], + \["fn?", "api\\#fn?"], + \["fnext", "api\\#fnext"], + \["for", "api\\#for"], + \["force", "api\\#force"], + \["format", "api\\#format"], + \["future", "api\\#future"], + \["future-call", "api\\#future-call"], + \["gen-class", "api\\#gen-class"], + \["gen-interface", "api\\#gen-interface"], + \["gensym", "api\\#gensym"], + \["get", "api\\#get"], + \["get-in", "api\\#get-in"], + \["get-method", "api\\#get-method"], + \["get-proxy-class", "api\\#get-proxy-class"], + \["get-validator", "api\\#get-validator"], + \["hash", "api\\#hash"], + \["hash-map", "api\\#hash-map"], + \["hash-set", "api\\#hash-set"], + \["identical?", "api\\#identical?"], + \["identity", "api\\#identity"], + \["if-let", "api\\#if-let"], + \["if-not", "api\\#if-not"], + \["ifn?", "api\\#ifn?"], + \["import", "api\\#import"], + \["in-ns", "api\\#in-ns"], + \["inc", "api\\#inc"], + \["init-proxy", "api\\#init-proxy"], + \["instance?", "api\\#instance?"], + \["int", "api\\#int"], + \["int-array", "api\\#int-array"], + \["integer?", "api\\#integer?"], + \["interleave", "api\\#interleave"], + \["intern", "api\\#intern"], + \["interpose", "api\\#interpose"], + \["into", "api\\#into"], + \["into-array", "api\\#into-array"], + \["ints", "api\\#ints"], + \["io!", "api\\#io"], + \["isa?", "api\\#isa?"], + \["iterate", "api\\#iterate"], + \["iterator-seq", "api\\#iterator-seq"], + \["key", "api\\#key"], + \["keys", "api\\#keys"], + \["keyword", "api\\#keyword"], + \["keyword?", "api\\#keyword?"], + \["last", "api\\#last"], + \["lazy-cat", "api\\#lazy-cat"], + \["lazy-seq", "api\\#lazy-seq"], + \["let", "api\\#let"], + \["letfn", "api\\#letfn"], + \["line-seq", "api\\#line-seq"], + \["list", "api\\#list"], + \["list*", "api\\#list*"], + \["list?", "api\\#list?"], + \["load", "api\\#load"], + \["load-file", "api\\#load-file"], + \["load-reader", "api\\#load-reader"], + \["load-string", "api\\#load-string"], + \["loaded-libs", "api\\#loaded-libs"], + \["locking", "api\\#locking"], + \["long", "api\\#long"], + \["long-array", "api\\#long-array"], + \["longs", "api\\#longs"], + \["loop", "api\\#loop"], + \["macroexpand", "api\\#macroexpand"], + \["macroexpand-1", "api\\#macroexpand-1"], + \["make-array", "api\\#make-array"], + \["make-hierarchy", "api\\#make-hierarchy"], + \["map", "api\\#map"], + \["map?", "api\\#map?"], + \["mapcat", "api\\#mapcat"], + \["max", "api\\#max"], + \["max-key", "api\\#max-key"], + \["memfn", "api\\#memfn"], + \["memoize", "api\\#memoize"], + \["merge", "api\\#merge"], + \["merge-with", "api\\#merge-with"], + \["meta", "api\\#meta"], + \["methods", "api\\#methods"], + \["min", "api\\#min"], + \["min-key", "api\\#min-key"], + \["mod", "api\\#mod"], + \["name", "api\\#name"], + \["namespace", "api\\#namespace"], + \["neg?", "api\\#neg?"], + \["newline", "api\\#newline"], + \["next", "api\\#next"], + \["nfirst", "api\\#nfirst"], + \["nil?", "api\\#nil?"], + \["nnext", "api\\#nnext"], + \["not", "api\\#not"], + \["not-any?", "api\\#not-any?"], + \["not-empty", "api\\#not-empty"], + \["not-every?", "api\\#not-every?"], + \["not=", "api\\#not="], + \["ns", "api\\#ns"], + \["ns-aliases", "api\\#ns-aliases"], + \["ns-imports", "api\\#ns-imports"], + \["ns-interns", "api\\#ns-interns"], + \["ns-map", "api\\#ns-map"], + \["ns-name", "api\\#ns-name"], + \["ns-publics", "api\\#ns-publics"], + \["ns-refers", "api\\#ns-refers"], + \["ns-resolve", "api\\#ns-resolve"], + \["ns-unalias", "api\\#ns-unalias"], + \["ns-unmap", "api\\#ns-unmap"], + \["nth", "api\\#nth"], + \["nthnext", "api\\#nthnext"], + \["num", "api\\#num"], + \["number?", "api\\#number?"], + \["odd?", "api\\#odd?"], + \["or", "api\\#or"], + \["parents", "api\\#parents"], + \["partial", "api\\#partial"], + \["partition", "api\\#partition"], + \["pcalls", "api\\#pcalls"], + \["peek", "api\\#peek"], + \["pmap", "api\\#pmap"], + \["pop", "api\\#pop"], + \["pos?", "api\\#pos?"], + \["pr", "api\\#pr"], + \["pr-str", "api\\#pr-str"], + \["prefer-method", "api\\#prefer-method"], + \["prefers", "api\\#prefers"], + \["print", "api\\#print"], + \["print-namespace-doc", "api\\#print-namespace-doc"], + \["print-str", "api\\#print-str"], + \["printf", "api\\#printf"], + \["println", "api\\#println"], + \["println-str", "api\\#println-str"], + \["prn", "api\\#prn"], + \["prn-str", "api\\#prn-str"], + \["proxy", "api\\#proxy"], + \["proxy-mappings", "api\\#proxy-mappings"], + \["proxy-super", "api\\#proxy-super"], + \["pvalues", "api\\#pvalues"], + \["quot", "api\\#quot"], + \["rand", "api\\#rand"], + \["rand-int", "api\\#rand-int"], + \["range", "api\\#range"], + \["ratio?", "api\\#ratio?"], + \["rationalize", "api\\#rationalize"], + \["re-find", "api\\#re-find"], + \["re-groups", "api\\#re-groups"], + \["re-matcher", "api\\#re-matcher"], + \["re-matches", "api\\#re-matches"], + \["re-pattern", "api\\#re-pattern"], + \["re-seq", "api\\#re-seq"], + \["read", "api\\#read"], + \["read-line", "api\\#read-line"], + \["read-string", "api\\#read-string"], + \["reduce", "api\\#reduce"], + \["ref", "api\\#ref"], + \["ref-set", "api\\#ref-set"], + \["refer", "api\\#refer"], + \["refer-clojure", "api\\#refer-clojure"], + \["release-pending-sends", "api\\#release-pending-sends"], + \["rem", "api\\#rem"], + \["remove", "api\\#remove"], + \["remove-method", "api\\#remove-method"], + \["remove-ns", "api\\#remove-ns"], + \["remove-watch", "api\\#remove-watch"], + \["remove-watcher", "api\\#remove-watcher"], + \["repeat", "api\\#repeat"], + \["repeatedly", "api\\#repeatedly"], + \["replace", "api\\#replace"], + \["replicate", "api\\#replicate"], + \["require", "api\\#require"], + \["reset!", "api\\#reset"], + \["reset-meta!", "api\\#reset-meta"], + \["resolve", "api\\#resolve"], + \["rest", "api\\#rest"], + \["resultset-seq", "api\\#resultset-seq"], + \["reverse", "api\\#reverse"], + \["reversible?", "api\\#reversible?"], + \["rseq", "api\\#rseq"], + \["rsubseq", "api\\#rsubseq"], + \["second", "api\\#second"], + \["select-keys", "api\\#select-keys"], + \["send", "api\\#send"], + \["send-off", "api\\#send-off"], + \["seq", "api\\#seq"], + \["seq?", "api\\#seq?"], + \["seque", "api\\#seque"], + \["sequence", "api\\#sequence"], + \["sequential?", "api\\#sequential?"], + \["set", "api\\#set"], + \["set-validator!", "api\\#set-validator"], + \["set?", "api\\#set?"], + \["short", "api\\#short"], + \["shutdown-agents", "api\\#shutdown-agents"], + \["slurp", "api\\#slurp"], + \["some", "api\\#some"], + \["sort", "api\\#sort"], + \["sort-by", "api\\#sort-by"], + \["sorted-map", "api\\#sorted-map"], + \["sorted-map-by", "api\\#sorted-map-by"], + \["sorted-set", "api\\#sorted-set"], + \["sorted?", "api\\#sorted?"], + \["special-form-anchor", "api\\#special-form-anchor"], + \["special-symbol?", "api\\#special-symbol?"], + \["split-at", "api\\#split-at"], + \["split-with", "api\\#split-with"], + \["str", "api\\#str"], + \["stream?", "api\\#stream?"], + \["string?", "api\\#string?"], + \["struct", "api\\#struct"], + \["struct-map", "api\\#struct-map"], + \["subs", "api\\#subs"], + \["subseq", "api\\#subseq"], + \["subvec", "api\\#subvec"], + \["supers", "api\\#supers"], + \["swap!", "api\\#swap"], + \["symbol", "api\\#symbol"], + \["symbol?", "api\\#symbol?"], + \["sync", "api\\#sync"], + \["syntax-symbol-anchor", "api\\#syntax-symbol-anchor"], + \["take", "api\\#take"], + \["take-nth", "api\\#take-nth"], + \["take-while", "api\\#take-while"], + \["test", "api\\#test"], + \["the-ns", "api\\#the-ns"], + \["time", "api\\#time"], + \["to-array", "api\\#to-array"], + \["to-array-2d", "api\\#to-array-2d"], + \["trampoline", "api\\#trampoline"], + \["tree-seq", "api\\#tree-seq"], + \["true?", "api\\#true?"], + \["type", "api\\#type"], + \["unchecked-add", "api\\#unchecked-add"], + \["unchecked-dec", "api\\#unchecked-dec"], + \["unchecked-divide", "api\\#unchecked-divide"], + \["unchecked-inc", "api\\#unchecked-inc"], + \["unchecked-multiply", "api\\#unchecked-multiply"], + \["unchecked-negate", "api\\#unchecked-negate"], + \["unchecked-remainder", "api\\#unchecked-remainder"], + \["unchecked-subtract", "api\\#unchecked-subtract"], + \["underive", "api\\#underive"], + \["update-in", "api\\#update-in"], + \["update-proxy", "api\\#update-proxy"], + \["use", "api\\#use"], + \["val", "api\\#val"], + \["vals", "api\\#vals"], + \["var-get", "api\\#var-get"], + \["var-set", "api\\#var-set"], + \["var?", "api\\#var?"], + \["vary-meta", "api\\#vary-meta"], + \["vec", "api\\#vec"], + \["vector", "api\\#vector"], + \["vector?", "api\\#vector?"], + \["when", "api\\#when"], + \["when-first", "api\\#when-first"], + \["when-let", "api\\#when-let"], + \["when-not", "api\\#when-not"], + \["while", "api\\#while"], + \["with-in-str", "api\\#with-in-str"], + \["with-local-vars", "api\\#with-local-vars"], + \["with-meta", "api\\#with-meta"], + \["with-open", "api\\#with-open"], + \["with-out-str", "api\\#with-out-str"], + \["with-precision", "api\\#with-precision"], + \["xml-seq", "api\\#xml-seq"], + \["zero?", "api\\#zero?"], + \["zipmap", "api\\#zipmap"], \["clojure.inspector", "api\\#toc621"], - \["inspect", "api\\#toc622"], - \["inspect-table", "api\\#toc623"], - \["inspect-tree", "api\\#toc624"], + \["inspect", "api\\#inspect"], + \["inspect-table", "api\\#inspect-table"], + \["inspect-tree", "api\\#inspect-tree"], \["clojure.main", "api\\#toc625"], - \["load-script", "api\\#toc626"], - \["main", "api\\#toc627"], - \["repl", "api\\#toc628"], - \["repl-caught", "api\\#toc629"], - \["repl-exception", "api\\#toc630"], - \["repl-prompt", "api\\#toc631"], - \["repl-read", "api\\#toc632"], - \["skip-if-eol", "api\\#toc633"], - \["skip-whitespace", "api\\#toc634"], - \["with-bindings", "api\\#toc635"], + \["load-script", "api\\#load-script"], + \["main", "api\\#main"], + \["repl", "api\\#repl"], + \["repl-caught", "api\\#repl-caught"], + \["repl-exception", "api\\#repl-exception"], + \["repl-prompt", "api\\#repl-prompt"], + \["repl-read", "api\\#repl-read"], + \["skip-if-eol", "api\\#skip-if-eol"], + \["skip-whitespace", "api\\#skip-whitespace"], + \["with-bindings", "api\\#with-bindings"], \["clojure.parallel", "api\\#toc637"], - \["pany", "api\\#toc638"], - \["par", "api\\#toc639"], - \["pdistinct", "api\\#toc641"], - \["pfilter-dupes", "api\\#toc642"], - \["pfilter-nils", "api\\#toc643"], - \["pmax", "api\\#toc644"], - \["pmin", "api\\#toc646"], - \["preduce", "api\\#toc648"], - \["psort", "api\\#toc649"], - \["psummary", "api\\#toc651"], - \["pvec", "api\\#toc653"], + \["pany", "api\\#pany"], + \["par", "api\\#par"], + \["pdistinct", "api\\#pdistinct"], + \["pfilter-dupes", "api\\#pfilter-dupes"], + \["pfilter-nils", "api\\#pfilter-nils"], + \["pmax", "api\\#pmax"], + \["pmin", "api\\#pmin"], + \["preduce", "api\\#preduce"], + \["psort", "api\\#psort"], + \["psummary", "api\\#psummary"], + \["pvec", "api\\#pvec"], \["clojure.set", "api\\#toc654"], - \["difference", "api\\#toc655"], - \["index", "api\\#toc658"], - \["intersection", "api\\#toc659"], - \["join", "api\\#toc662"], - \["map-invert", "api\\#toc664"], - \["project", "api\\#toc665"], - \["rename", "api\\#toc666"], - \["rename-keys", "api\\#toc667"], - \["select", "api\\#toc668"], - \["union", "api\\#toc669"], + \["difference", "api\\#difference"], + \["index", "api\\#index"], + \["intersection", "api\\#intersection"], + \["join", "api\\#join"], + \["map-invert", "api\\#map-invert"], + \["project", "api\\#project"], + \["rename", "api\\#rename"], + \["rename-keys", "api\\#rename-keys"], + \["select", "api\\#select"], + \["union", "api\\#union"], \["clojure.xml", "api\\#toc673"], - \["parse", "api\\#toc674"], + \["parse", "api\\#parse"], \["clojure.zip", "api\\#toc676"], - \["append-child", "api\\#toc677"], - \["branch?", "api\\#toc678"], - \["children", "api\\#toc679"], - \["down", "api\\#toc680"], - \["edit", "api\\#toc681"], - \["end?", "api\\#toc682"], - \["insert-child", "api\\#toc683"], - \["insert-left", "api\\#toc684"], - \["insert-right", "api\\#toc685"], - \["left", "api\\#toc686"], - \["leftmost", "api\\#toc687"], - \["lefts", "api\\#toc688"], - \["make-node", "api\\#toc689"], - \["next", "api\\#toc690"], - \["node", "api\\#toc691"], - \["path", "api\\#toc692"], - \["prev", "api\\#toc693"], - \["remove", "api\\#toc694"], - \["replace", "api\\#toc695"], - \["right", "api\\#toc696"], - \["rightmost", "api\\#toc697"], - \["rights", "api\\#toc698"], - \["root", "api\\#toc699"], - \["seq-zip", "api\\#toc700"], - \["up", "api\\#toc701"], - \["vector-zip", "api\\#toc702"], - \["xml-zip", "api\\#toc703"], - \["zipper", "api\\#toc704"]] + \["append-child", "api\\#append-child"], + \["branch?", "api\\#branch?"], + \["children", "api\\#children"], + \["down", "api\\#down"], + \["edit", "api\\#edit"], + \["end?", "api\\#end?"], + \["insert-child", "api\\#insert-child"], + \["insert-left", "api\\#insert-left"], + \["insert-right", "api\\#insert-right"], + \["left", "api\\#left"], + \["leftmost", "api\\#leftmost"], + \["lefts", "api\\#lefts"], + \["make-node", "api\\#make-node"], + \["next", "api\\#next"], + \["node", "api\\#node"], + \["path", "api\\#path"], + \["prev", "api\\#prev"], + \["remove", "api\\#remove"], + \["replace", "api\\#replace"], + \["right", "api\\#right"], + \["rightmost", "api\\#rightmost"], + \["rights", "api\\#rights"], + \["root", "api\\#root"], + \["seq-zip", "api\\#seq-zip"], + \["up", "api\\#up"], + \["vector-zip", "api\\#vector-zip"], + \["xml-zip", "api\\#xml-zip"], + \["zipper", "api\\#zipper"]] endif diff --git a/ftplugin/slimv.vim b/ftplugin/slimv.vim index 5b15631..bc93930 100644 --- a/ftplugin/slimv.vim +++ b/ftplugin/slimv.vim @@ -1,6 +1,6 @@ " slimv.vim: The Superior Lisp Interaction Mode for VIM -" Version: 0.5.2 -" Last Change: 06 May 2009 +" Version: 0.5.3 +" Last Change: 23 May 2009 " Maintainer: Tamas Kovacs " License: This file is placed in the public domain. " No warranty, express or implied. @@ -475,7 +475,7 @@ endfunction " Position the cursor at the end of the REPL buffer " Optionally mark this position in Vim mark 's' -function! SlimvEndOfReplBuffer( markit ) +function! SlimvEndOfReplBuffer( markit, insert ) if !g:slimv_repl_open " User does not want to display REPL in Vim return @@ -486,10 +486,9 @@ function! SlimvEndOfReplBuffer( markit ) " Also remember the prompt, because the user may overwrite it call setpos( "'s", [0, line('$'), col('$'), 0] ) let s:prompt = getline( "'s" ) - if s:insertmode - " Hacking: we add a space at the end of the last line - " so that the cursor remains in correct position after insertmode eval - "call setline( "'s", s:prompt . " " ) + if a:insert + " We are in insert mode, so we end up appending to the last line + startinsert! endif endif set nomodified @@ -524,12 +523,19 @@ function! SlimvRefreshReplBufferNow() " updating the REPL file. Just go on, it's not that important. endtry endif - call SlimvEndOfReplBuffer( 1 ) + let insert = 0 + if mode() == 'i' || mode() == 'I' + let insert = 1 + endif + call SlimvEndOfReplBuffer( 1, insert ) endfunction " Send interrupt command to REPL function! SlimvInterrupt() call SlimvSend( ['SLIMV::INTERRUPT'], 0 ) + sleep 200m + call SlimvRefreshReplBufferNow() + startinsert! endfunction " Refresh REPL buffer continuously until no change is detected @@ -559,8 +565,8 @@ function! SlimvRefreshReplBuffer() endif let interrupt = 0 let wait = g:slimv_repl_wait * 10 " number of cycles to wait for refreshing the REPL buffer - try - while wait > 0 || g:slimv_repl_wait == 0 + while wait > 0 || g:slimv_repl_wait == 0 + try let m = '/\%#/' silent! execute 'match Cursor ' . m match Cursor /\%#/ @@ -571,31 +577,38 @@ function! SlimvRefreshReplBuffer() sleep 100m let lastftime = ftime let ftime = getftime( s:repl_name ) - if ftime != lastftime || ftime == localtime() + if ftime != lastftime || ftime == localtime() || ftime == localtime()-1 " REPL buffer file changed recently, reload it call SlimvRefreshReplBufferNow() + if s:insertmode + " We are in insert mode, let's fake a movement to the right + " in order to display the cursor at the right place. + normal l + endif endif if g:slimv_repl_wait != 0 let wait = wait - 1 endif - endwhile - catch /^Vim:Interrupt$/ - if getchar(1) - " Swallow interrupt key - let c = getchar(0) - if c == 3 - " Yes, this was the Ctrl-C, propagate it to the server - let interrupt = 1 - call SlimvHandleInterrupt() + catch /^Vim:Interrupt$/ + if getchar(1) + " Swallow interrupt key + let c = getchar(0) + if c == 3 + " Yes, this was the Ctrl-C, propagate it to the server + " but only if it has not yet been done in this turn + if interrupt == 0 + let interrupt = 1 + call SlimvHandleInterrupt() + " We override the wait time here to 2 secs + let wait = 20 + endif + endif endif - endif - endtry + endtry + endwhile " Restore everything silent! execute 'match None ' . m - if !interrupt - let s:insertmode = 0 - endif echon ' ' let &ve = save_ve @@ -610,7 +623,11 @@ function! SlimvRefreshReplBuffer() let refresh = ":call SlimvRefreshReplBuffer()" endif call append( '$', "Slimv warning: REPL is busy, refresh display with " . refresh ) - call SlimvEndOfReplBuffer( 1 ) + call SlimvEndOfReplBuffer( 1, s:insertmode ) + endif + if s:insertmode + startinsert! + let s:insertmode = 0 endif endfunction @@ -626,6 +643,7 @@ function! SlimvReplLeave() " Check if REPL menu exists, then remove it silent amenu REPL aunmenu REPL + unmap \ catch /.*/ " REPL menu not found, we cannot remove it endtry @@ -692,7 +710,7 @@ function! SlimvOpenReplBuffer() redraw call SlimvSend( ['SLIMV::OUTPUT::' . s:repl_name ], 0 ) - call SlimvEndOfReplBuffer( 0 ) + call SlimvEndOfReplBuffer( 0, 0 ) endfunction " Select symbol under cursor and copy it to register 's' @@ -795,7 +813,7 @@ function! SlimvSetCommandLine( cmd ) endif let line = line . a:cmd call setline( ".", line ) - call SlimvEndOfReplBuffer( 0 ) + call SlimvEndOfReplBuffer( 0, 0 ) endfunction " Add command list to the command history @@ -915,13 +933,13 @@ function! SlimvSendCommand( insert, close ) let i = i - 1 endwhile call setline( ".", indent ) - call SlimvEndOfReplBuffer( 0 ) + call SlimvEndOfReplBuffer( 0, 0 ) endif endif else call append( '$', "Slimv error: previous EOF mark not found, re-enter last form:" ) call append( '$', "" ) - call SlimvEndOfReplBuffer( 1 ) + call SlimvEndOfReplBuffer( 1, 0 ) endif endfunction @@ -1000,7 +1018,7 @@ endfunction " Go to command line and recall previous command from command history function! SlimvPreviousCommand() - call SlimvEndOfReplBuffer( 0 ) + call SlimvEndOfReplBuffer( 0, 0 ) if line( "." ) >= line( "'s" ) call s:PreviousCommand() endif @@ -1008,7 +1026,7 @@ endfunction " Go to command line and recall next command from command history function! SlimvNextCommand() - call SlimvEndOfReplBuffer( 0 ) + call SlimvEndOfReplBuffer( 0, 0 ) if line( "." ) >= line( "'s" ) call s:NextCommand() endif @@ -1017,7 +1035,8 @@ endfunction " Handle interrupt (Ctrl-C) keypress in the REPL buffer function! SlimvHandleInterrupt() call SlimvSend( ['SLIMV::INTERRUPT'], 0 ) - call SlimvRefreshReplBuffer() + sleep 200m + call SlimvRefreshReplBufferNow() endfunction " Start and connect slimv server @@ -1655,8 +1674,14 @@ endif " Add REPL menu. This menu exist only for the REPL buffer. function SlimvAddReplMenu() + if &wildcharm != 0 + execute ':map \ :emenu REPL.' . nr2char( &wildcharm ) + endif + amenu &REPL.Send-&Input :call SlimvSendCommand(0,0) amenu &REPL.Cl&ose-Send-Input :call SlimvSendCommand(0,1) + amenu &REPL.Interrup&t-Lisp-Process :call SlimvInterrupt() + amenu &REPL.-REPLSep- : amenu &REPL.&Previous-Input :call SlimvPreviousCommand() amenu &REPL.&Next-Input :call SlimvNextCommand() menu &REPL.&Refresh :call SlimvRefresh()