diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-02-13 18:14:48 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-02-13 18:14:48 +0100 |
commit | 942db23c9cb7532d68048530d749eb84ca94d0cd (patch) | |
tree | 13d89605923a2ccc490b83ae155e5791a92062a1 | |
parent | 0fa09676c25a0a4a01f339887b8bf40b4673621f (diff) |
Update runtime files
33 files changed, 312 insertions, 218 deletions
diff --git a/runtime/autoload/clojurecomplete.vim b/runtime/autoload/clojurecomplete.vim index 030785e901..2c0f0eacd4 100644 --- a/runtime/autoload/clojurecomplete.vim +++ b/runtime/autoload/clojurecomplete.vim @@ -1,14 +1,15 @@ " Vim completion script -" Language: Clojure -" Maintainer: Sung Pae <self@sungpae.com> -" URL: https://github.com/guns/vim-clojure-static -" License: Same as Vim -" Last Change: 18 July 2016 +" Language: Clojure +" Maintainer: Alex Vear <av@axvr.io> +" Former Maintainers: Sung Pae <self@sungpae.com> +" URL: https://github.com/clojure-vim/clojure.vim +" License: Vim (see :h license) +" Last Change: 2021-02-13 " -*- COMPLETION WORDS -*- -" Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-011/clj/src/vim_clojure_static/generate.clj -" Clojure version 1.8.0 -let s:words = ["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-readably*","*read-eval*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods",".","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Throwable->map","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc!","assoc","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","booleans","bound-fn","bound-fn*","bound?","butlast","byte","byte-array","bytes","case","cast","cat","catch","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj!","conj","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","def","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj!","disj","dissoc!","dissoc","distinct","distinct?","do","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","finally","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","identical?","identity","if","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","init-proxy","instance?","int","int-array","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","monitor-enter","monitor-exit","munge","name","namespace","namespace-munge","neg?","new","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop!","pop","pop-thread-bindings","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","quot","quote","rand","rand-int","rand-nth","random-sample","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","recur","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seque","sequence","sequential?","set!","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","symbol","symbol?","sync","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","throw","time","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true?","try","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unreduced","unsigned-bit-shift-right","update","update-in","update-proxy","use","val","vals","var","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","vswap!","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"] +" Generated from https://github.com/clojure-vim/clojure.vim/blob/f8594e7030cdfb0b7990ac92953c77a08a7220f0/clj/src/vim_clojure_static/generate.clj +" Clojure version 1.10.2 +let s:words = ["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-namespace-maps*","*print-readably*","*read-eval*","*reader-resolver*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods",".","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Inst","PrintWriter-on","StackTraceElement->vec","Throwable->map","accessor","aclone","add-classpath","add-tap","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","any?","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc!","assoc","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","case","case-fallthrough-err-impl","cast","cat","catch","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj!","conj","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","def","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj!","disj","dissoc!","dissoc","distinct","distinct?","do","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","double?","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-cause","ex-data","ex-info","ex-message","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","finally","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","halt-when","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","ident?","identical?","identity","if","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","indexed?","init-proxy","inst-ms","inst-ms*","inst?","instance?","int","int-array","int?","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","monitor-enter","monitor-exit","munge","name","namespace","namespace-munge","nat-int?","neg-int?","neg?","new","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop!","pop","pop-thread-bindings","pos-int?","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","qualified-ident?","qualified-keyword?","qualified-symbol?","quot","quote","rand","rand-int","rand-nth","random-sample","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read+string","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","recur","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-tap","remove-watch","repeat","repeatedly","replace","replicate","require","requiring-resolve","reset!","reset-meta!","reset-vals!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seqable?","seque","sequence","sequential?","set!","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","simple-ident?","simple-keyword?","simple-symbol?","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","swap-vals!","symbol","symbol?","sync","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","tap>","test","the-ns","thread-bound?","throw","time","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true?","try","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unreduced","unsigned-bit-shift-right","update","update-in","update-proxy","uri?","use","uuid?","val","vals","var","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","vswap!","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"] " Simple word completion for special forms and public vars in clojure.core function! clojurecomplete#Complete(findstart, base) diff --git a/runtime/autoload/phpcomplete.vim b/runtime/autoload/phpcomplete.vim index 377baa8432..4041a80bd8 100644 --- a/runtime/autoload/phpcomplete.vim +++ b/runtime/autoload/phpcomplete.vim @@ -3,7 +3,7 @@ " Maintainer: Dávid Szabó ( complex857 AT gmail DOT com ) " Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl ) " URL: https://github.com/shawncplus/phpcomplete.vim -" Last Change: 2018 Oct 10 +" Last Change: 2021 Feb 08 " " OPTIONS: " @@ -122,7 +122,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{ endif endif - " If exists b:php_menu it means completion was already constructed we " don't need to do anything more if exists("b:php_menu") @@ -148,8 +147,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{ try let eventignore = &eventignore let &eventignore = 'all' - let winheight = winheight(0) - let winnr = winnr() let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(getline(0, line('.'))) @@ -183,7 +180,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{ endif if filereadable(classlocation) - let classfile = readfile(classlocation) let classcontent = '' let classcontent .= "\n".phpcomplete#GetClassContents(classlocation, classname) let sccontent = split(classcontent, "\n") @@ -217,7 +213,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{ return phpcomplete#CompleteGeneral(a:base, current_namespace, imports) endif finally - silent! exec winnr.'resize '.winheight let &eventignore = eventignore endtry endfunction @@ -1025,7 +1020,7 @@ function! phpcomplete#CompleteUserClass(context, base, sccontent, visibility) " let c_var = '$'.c_var endif let c_variables[c_var] = '' - if g:phpcomplete_parse_docblock_comments && len(get(variables, var_index)) > 0 + if g:phpcomplete_parse_docblock_comments && len(get(variables, var_index, '')) > 0 let c_doc[c_var] = phpcomplete#GetDocBlock(a:sccontent, variables[var_index]) endif let var_index += 1 @@ -2082,26 +2077,17 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam " ... " ] " - let full_file_path = fnamemodify(a:file_path, ':p') let class_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*' - let cfile = join(a:file_lines, "\n") + let full_file_path = fnamemodify(a:file_path, ':p') let result = [] - " We use new buffer and (later) normal! because - " this is the most efficient way. The other way - " is to go through the looong string looking for - " matching {} - - " remember the window we started at - let phpcomplete_original_window = winnr() - - silent! below 1new - silent! 0put =cfile - call search('\c\(class\|interface\|trait\)\_s\+'.a:class_name.'\(\>\|$\)') - let cfline = line('.') - call search('{') - let endline = line('.') - - let content = join(getline(cfline, endline), "\n") + let popup_id = popup_create(a:file_lines, {'hidden': v:true}) + + call win_execute(popup_id, 'call search(''\c\(class\|interface\|trait\)\_s\+'.a:class_name.'\(\>\|$\)'')') + call win_execute(popup_id, "let cfline = line('.')") + call win_execute(popup_id, "call search('{')") + call win_execute(popup_id, "let endline = line('.')") + + call win_execute(popup_id, 'let content = join(getline('.cfline.', '.endline.'), "\n")') " Catch extends if content =~? 'extends' let extends_string = matchstr(content, '\(class\|interface\)\_s\+'.a:class_name.'\_.\+extends\_s\+\zs\('.class_name_pattern.'\(,\|\_s\)*\)\+\ze\(extends\|{\)') @@ -2117,14 +2103,16 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam else let implemented_interfaces = [] endif - call searchpair('{', '', '}', 'W') - let class_closing_bracket_line = line('.') + + call win_execute(popup_id, 'let [class_closing_bracket_line, class_closing_bracket_col] = searchpairpos("{", "", "}", "W")') " Include class docblock let doc_line = cfline - 1 - if getline(doc_line) =~? '^\s*\*/' + call win_execute(popup_id, 'let l = getline('.doc_line.')') + if l =~? '^\s*\*/' while doc_line != 0 - if getline(doc_line) =~? '^\s*/\*\*' + call win_execute(popup_id, 'let l = getline('.doc_line.')') + if l =~? '^\s*/\*\*' let cfline = doc_line break endif @@ -2132,22 +2120,22 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam endwhile endif - let classcontent = join(getline(cfline, class_closing_bracket_line), "\n") + call win_execute(popup_id, 'let classcontent = join(getline('.cfline.', '.class_closing_bracket_line.'), "\n")') let used_traits = [] " move back to the line next to the class's definition - call cursor(endline + 1, 1) + call win_execute(popup_id, 'call cursor('.(endline + 1).', 1)') let keep_searching = 1 while keep_searching != 0 " try to grab "use..." keywords - let [lnum, col] = searchpos('\c^\s\+use\s\+'.class_name_pattern, 'cW', class_closing_bracket_line) - let syn_name = synIDattr(synID(lnum, col, 0), "name") + call win_execute(popup_id, 'let [lnum, col] = searchpos(''\c^\s\+use\s\+'.class_name_pattern.''', "cW", '.class_closing_bracket_line.')') + call win_execute(popup_id, 'let syn_name = synIDattr(synID('.lnum.', '.col.', 0), "name")') if syn_name =~? 'string\|comment' - call cursor(lnum + 1, 1) + call win_execute(popup_id, 'call cursor('.(lnum + 1).', 1)') continue endif - let trait_line = getline(lnum) + call win_execute(popup_id, 'let trait_line = getline('.lnum.')') if trait_line !~? ';' " try to find the next line containing ';' let l = lnum @@ -2157,25 +2145,23 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam while search_line !~? ';' && l > 0 " file lines are reversed so we need to go backwards let l += 1 - let search_line = getline(l) + call win_execute(popup_id, 'let search_line = getline('.l.')') let trait_line .= ' '.substitute(search_line, '\(^\s\+\|\s\+$\)', '', 'g') endwhile endif let use_expression = matchstr(trait_line, '^\s*use\s\+\zs.\{-}\ze;') let use_parts = map(split(use_expression, '\s*,\s*'), 'substitute(v:val, "\\s+", " ", "g")') let used_traits += map(use_parts, 'substitute(v:val, "\\s", "", "g")') - call cursor(lnum + 1, 1) + call win_execute(popup_id, 'call cursor('.(lnum + 1).', 1)') if [lnum, col] == [0, 0] let keep_searching = 0 endif endwhile - silent! bw! % + call popup_close(popup_id) let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(a:file_lines[0:cfline]) - " go back to original window - exe phpcomplete_original_window.'wincmd w' call add(result, { \ 'class': a:class_name, \ 'content': classcontent, @@ -2532,40 +2518,37 @@ function! phpcomplete#FormatDocBlock(info) " {{{ endif return res -endfunction! +endfunction " }}} function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{ - let original_window = winnr() - - silent! below 1new - silent! 0put =a:file_lines - normal! G + let popup_id = popup_create(a:file_lines, {'hidden': v:true}) + call win_execute(popup_id, 'normal! G') " clear out classes, functions and other blocks while 1 - let block_start_pos = searchpos('\c\(class\|trait\|function\|interface\)\s\+\_.\{-}\zs{', 'Web') + call win_execute(popup_id, 'let block_start_pos = searchpos(''\c\(class\|trait\|function\|interface\)\s\+\_.\{-}\zs{'', "Web")') if block_start_pos == [0, 0] break endif - let block_end_pos = searchpairpos('{', '', '}\|\%$', 'W', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"') + call win_execute(popup_id, 'let block_end_pos = searchpairpos("{", "", ''}\|\%$'', "W", ''synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"'')') + let popup_lines = winbufnr(popup_id)->getbufline(1, '$') if block_end_pos != [0, 0] " end of the block found, just delete it - silent! exec block_start_pos[0].','.block_end_pos[0].'d _' + call remove(popup_lines, block_start_pos[0] - 1, block_end_pos[0] - 1) else " block pair not found, use block start as beginning and the end " of the buffer instead - silent! exec block_start_pos[0].',$d _' + call remove(popup_lines, block_start_pos[0] - 1, -1) endif + call popup_settext(popup_id, popup_lines) endwhile - normal! G + call win_execute(popup_id, 'normal! G', 'silent!') " grab the remains - let file_lines = reverse(getline(1, line('.') - 1)) - - silent! bw! % - exe original_window.'wincmd w' + call win_execute(popup_id, "let file_lines = reverse(getline(1, line('.')-1))") + call popup_close(popup_id) let namespace_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*' let i = 0 diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt index 566411a1f7..62201d4502 100644 --- a/runtime/doc/diff.txt +++ b/runtime/doc/diff.txt @@ -1,4 +1,4 @@ -*diff.txt* For Vim version 8.2. Last change: 2019 Nov 10 +*diff.txt* For Vim version 8.2. Last change: 2021 Feb 10 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 0773b247b3..03fcb655d5 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.2. Last change: 2021 Jan 31 +*eval.txt* For Vim version 8.2. Last change: 2021 Feb 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -5903,6 +5903,7 @@ getreg([{regname} [, 1 [, {list}]]]) *getreg()* When the register was not set an empty list is returned. If {regname} is not specified, |v:register| is used. + In |Vim9-script| {regname} must be one character. Can also be used as a |method|: > GetRegname()->getreg() @@ -5930,6 +5931,7 @@ getreginfo([{regname}]) *getreginfo()* will be returned. If {regname} is not specified, |v:register| is used. The returned Dictionary can be passed to |setreg()|. + In |Vim9-script| {regname} must be one character. Can also be used as a |method|: > GetRegname()->getreginfo() @@ -5943,6 +5945,7 @@ getregtype([{regname}]) *getregtype()* "" for an empty or unknown register <CTRL-V> is one character with value 0x16. If {regname} is not specified, |v:register| is used. + In |Vim9-script| {regname} must be one character. Can also be used as a |method|: > GetRegname()->getregtype() @@ -9658,6 +9661,7 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()* setreg({regname}, {value} [, {options}]) Set the register {regname} to {value}. If {regname} is "" or "@", the unnamed register '"' is used. + In |Vim9-script| {regname} must be one character. {value} may be any value returned by |getreg()| or |getreginfo()|, including a |List| or |Dict|. diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt index 87d5c0bd5e..6a2dd5106b 100644 --- a/runtime/doc/indent.txt +++ b/runtime/doc/indent.txt @@ -610,14 +610,14 @@ the use of square and curly brackets, and otherwise by community convention. These conventions are not universally followed, so the Clojure indent script offers a few configurable options, listed below. -If the current vim does not include |searchpairpos()|, the indent script falls +If the current vim does not include searchpairpos(), the indent script falls back to normal 'lisp' indenting, and the following options are ignored. *g:clojure_maxlines* -Set maximum scan distance of |searchpairpos()|. Larger values trade -performance for correctness when dealing with very long forms. A value of 0 -will scan without limits. +Set maximum scan distance of searchpairpos(). Larger values trade performance +for correctness when dealing with very long forms. A value of 0 will scan +without limits. > " Default let g:clojure_maxlines = 100 diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index e5d29ad20b..2d96769c4b 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1,4 +1,4 @@ -*index.txt* For Vim version 8.2. Last change: 2021 Jan 15 +*index.txt* For Vim version 8.2. Last change: 2021 Feb 11 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1176,6 +1176,7 @@ tag command action ~ |:bNext| :bN[ext] go to previous buffer in the buffer list |:ball| :ba[ll] open a window for each buffer in the buffer list |:badd| :bad[d] add buffer to the buffer list +|:balt| :balt like ":badd" but also set the alternate file |:bdelete| :bd[elete] remove a buffer from the buffer list |:behave| :be[have] set mouse and selection behavior |:belowright| :bel[owright] make split window appear right or below diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index f25b1ba977..ee5ee26b45 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 8.2. Last change: 2021 Jan 08 +*options.txt* For Vim version 8.2. Last change: 2021 Feb 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1568,7 +1568,11 @@ A jump table for the options with a short description can be found at |Q_op|. {only in GUI versions or when the |+xterm_clipboard| feature is included} This option is a list of comma separated names. - These names are recognized: + Note: if one of the items is "exclude:", then you can't add an item + after that. Therefore do append an item with += but use ^= to + prepend, e.g.: > + set clipboard^=unnamed +< These names are recognized: *clipboard-unnamed* unnamed When included, Vim will use the clipboard register '*' @@ -4882,8 +4886,10 @@ A jump table for the options with a short description can be found at |Q_op|. *lcs-lead* lead:c Character to show for leading spaces. When omitted, leading spaces are blank. Overrides the "space" - setting for leading spaces. - *lcs-trail* + setting for leading spaces. You can combine it with + "tab:", for example: > + :set listchars+=tab:>-,lead:. +< *lcs-trail* trail:c Character to show for trailing spaces. When omitted, trailing spaces are blank. Overrides the "space" setting for trailing spaces. @@ -6232,7 +6238,7 @@ A jump table for the options with a short description can be found at |Q_op|. < *'runtimepath'* *'rtp'* *vimfiles* 'runtimepath' 'rtp' string (default: - Unix: "$HOME/.vim, + Unix: "$HOME/.vim, $VIM/vimfiles, $VIMRUNTIME, $VIM/vimfiles/after, @@ -6242,7 +6248,7 @@ A jump table for the options with a short description can be found at |Q_op|. $VIMRUNTIME, $VIM/vimfiles/after, home:vimfiles/after" - PC: "$HOME/vimfiles, + MS-Windows: "$HOME/vimfiles, $VIM/vimfiles, $VIMRUNTIME, $VIM/vimfiles/after, @@ -6254,8 +6260,8 @@ A jump table for the options with a short description can be found at |Q_op|. $VIM/vimfiles, $VIMRUNTIME, $VIM/vimfiles/after, - $BE_USER_SETTINGS/vim/after") - VMS: "sys$login:vimfiles, + $BE_USER_SETTINGS/vim/after" + VMS: "sys$login:vimfiles, $VIM/vimfiles, $VIMRUNTIME, $VIM/vimfiles/after, diff --git a/runtime/doc/popup.txt b/runtime/doc/popup.txt index 6d70cecd54..e7209c4e37 100644 --- a/runtime/doc/popup.txt +++ b/runtime/doc/popup.txt @@ -1,4 +1,4 @@ -*popup.txt* For Vim version 8.2. Last change: 2021 Jan 21 +*popup.txt* For Vim version 8.2. Last change: 2021 Feb 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -620,7 +620,8 @@ The second argument of |popup_create()| is a dictionary with options: property moves. Use an empty string to remove. See |popup-textprop-pos|. textpropwin What window to search for the text property. When - omitted or invalid the current window is used. + omitted or invalid the current window is used. Used + when "textprop" is present. textpropid Used to identify the text property when "textprop" is present. Use zero to reset. fixed When FALSE (the default), and: diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index b8ad85879f..2f34f49bf1 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 8.2. Last change: 2020 May 31 +*quickfix.txt* For Vim version 8.2. Last change: 2021 Feb 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1025,6 +1025,12 @@ commands can be combined to create a NewGrep command: > 'smartcase' is not used. If {pattern} is empty (e.g. // is specified), the last used search pattern is used. |last-pattern| + + |QuickFixCmdPre| and |QuickFixCmdPost| are triggered. + A file that is opened for matching may use a buffer + number, but it is reused if possible to avoid + consuming buffer numbers. + :{count}vim[grep] ... When a number is put before the command this is used as the maximum number of matches to find. Use diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index 971181c555..e492c89a4f 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -1,4 +1,4 @@ -*starting.txt* For Vim version 8.2. Last change: 2020 Dec 19 +*starting.txt* For Vim version 8.2. Last change: 2021 Feb 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1344,7 +1344,11 @@ resulting file, when executed with a ":source" command: "options". Script-local mappings will not be written. 2. Restores global variables that start with an uppercase letter and contain at least one lowercase letter, if 'sessionoptions' contains "globals". -3. Unloads all currently loaded buffers. +3. Closes all windows in the current tab page, except the current one; closes |