From 47b4eb110da8dfab1fca51ce4cc68b224d85b966 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 1 Aug 2019 16:45:37 +0200 Subject: vim-patch:4c92e75dd4dd Update runtime files. https://github.com/vim/vim/commit/4c92e75dd4ddb68dd92a86dd02d53c70dd4af33a vim-patch:c854898881c0 Revert change accidentally included in runtime file updates. Closes vim/vim#3998. https://github.com/vim/vim/commit/c854898881c02259f90170f210bf65bbd20cc1fc --- runtime/doc/change.txt | 2 +- runtime/doc/digraph.txt | 4 + runtime/doc/eval.txt | 11 +- runtime/doc/filetype.txt | 9 ++ runtime/doc/pattern.txt | 2 +- runtime/doc/print.txt | 7 +- runtime/doc/russian.txt | 3 +- runtime/doc/tagsrch.txt | 3 +- runtime/doc/usr_45.txt | 6 - runtime/filetype.vim | 5 +- runtime/ftplugin/8th.vim | 25 ++++ runtime/ftplugin/rst.vim | 2 +- runtime/syntax/8th.vim | 335 +++++++++++++++++++++++++++++++++++++++++++++++ runtime/syntax/c.vim | 4 +- runtime/syntax/make.vim | 9 +- runtime/syntax/spec.vim | 6 +- 16 files changed, 400 insertions(+), 33 deletions(-) create mode 100644 runtime/ftplugin/8th.vim create mode 100644 runtime/syntax/8th.vim diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index ee70e95ab2..2259eddb6a 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -600,11 +600,11 @@ Directory for temporary files is created in the first suitable directory of: For the {pattern} see |pattern|. {string} can be a literal string, or something special; see |sub-replace-special|. - *E939* When [range] and [count] are omitted, replace in the current line only. When [count] is given, replace in [count] lines, starting with the last line in [range]. When [range] is omitted start in the current line. + *E939* [count] must be a positive number. Also see |cmdline-ranges|. diff --git a/runtime/doc/digraph.txt b/runtime/doc/digraph.txt index 953a65f125..b106e625f2 100644 --- a/runtime/doc/digraph.txt +++ b/runtime/doc/digraph.txt @@ -50,6 +50,10 @@ conversion to be available, it might fail. For the NUL character you will see "10". That's because NUL characters are internally represented with a NL character. When you write the file it will become a NUL character. +Example: > + digraph oe 339 +This defines the "oe" digraph for a character that is number 339 in Unicode. + ============================================================================== 2. Using digraphs *digraphs-use* diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 1a5268faf3..cfc183ec42 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -6341,8 +6341,7 @@ printf({fmt}, {expr1} ...) *printf()* *printf-S* S The text of the String argument is used. If a precision is specified, no more display cells than the - number specified are used. Without the |+multi_byte| - feature works just like 's'. + number specified are used. *printf-f* *E807* f F The Float argument is converted into a string of the @@ -7990,10 +7989,10 @@ strcharpart({src}, {start} [, {len}]) *strcharpart()* strdisplaywidth({expr} [, {col}]) *strdisplaywidth()* The result is a Number, which is the number of display cells - String {expr} occupies on the screen when it starts at {col}. - When {col} is omitted zero is used. Otherwise it is the - screen column where to start. This matters for Tab - characters. + String {expr} occupies on the screen when it starts at {col} + (first column is zero). When {col} is omitted zero is used. + Otherwise it is the screen column where to start. This + matters for Tab characters. The option settings of the current window are used. This matters for anything that's displayed differently, such as 'tabstop' and 'display'. diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index a4a5d6188b..ad834e1f6c 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -599,6 +599,15 @@ your |vimrc|: > let rrst_dynamic_comments = 0 +RESTRUCTUREDTEXT *ft-rst-plugin* + +The following formatting setting are optionally available: > + setlocal expandtab shiftwidth=3 softtabstop=3 tabstop=8 + +To enable this behavior, set the following variable in your vimrc: > + let g:rst_style = 1 + + RPM SPEC *ft-spec-plugin* Since the text for this plugin is rather long it has been put in a separate diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index 5d2c0e97b8..9e68bb8af1 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1125,7 +1125,7 @@ x A single character, with no special meaning, matches itself The "Func" column shows what library function is used. The implementation depends on the system. Otherwise: (1) Uses islower() for ASCII and Vim builtin rules for other - characters when built with the |+multi_byte| feature. + characters. (2) Uses Vim builtin rules (3) As with (1) but using isupper() */[[=* *[==]* diff --git a/runtime/doc/print.txt b/runtime/doc/print.txt index 084ad4e521..a341ce9652 100644 --- a/runtime/doc/print.txt +++ b/runtime/doc/print.txt @@ -99,10 +99,9 @@ not recognized by Vim will just be converted to lower case and underscores replaced with '-' signs. If 'printencoding' is empty or Vim cannot find the file then it will use -'encoding' (if Vim is compiled with |+multi_byte| and it is set an 8-bit -encoding) to find the print character encoding file. If Vim is unable to find -a character encoding file then it will use the "latin1" print character -encoding file. +'encoding' (if it is set an 8-bit encoding) to find the print character +encoding file. If Vim is unable to find a character encoding file then it +will use the "latin1" print character encoding file. When 'encoding' is set to a multi-byte encoding, Vim will try to convert characters to the printing encoding for printing (if 'printencoding' is empty diff --git a/runtime/doc/russian.txt b/runtime/doc/russian.txt index 724c4f9454..776630a52b 100644 --- a/runtime/doc/russian.txt +++ b/runtime/doc/russian.txt @@ -52,8 +52,7 @@ automatic installs. Vim also needs to be compiled with |+gettext| feature for user interface items translations to work. After downloading an archive from RuVim project, unpack it into your -$VIMRUNTIME directory. We recommend using UTF-8 archive, if your version of -Vim is compiled with |+multi_byte| feature enabled. +$VIMRUNTIME directory. We recommend using UTF-8 archive. In order to use the Russian documentation, make sure you have set the 'helplang' option to "ru". diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt index f63535af11..eec217769a 100644 --- a/runtime/doc/tagsrch.txt +++ b/runtime/doc/tagsrch.txt @@ -572,8 +572,7 @@ ignored. (Case is ignored when 'ignorecase' is set and 'tagcase' is The value '2' should be used then: !_TAG_FILE_SORTED2{anything} ~ -The other tag that Vim recognizes, but only when compiled with the -|+multi_byte| feature, is the encoding of the tags file: +The other tag that Vim recognizes is the encoding of the tags file: !_TAG_FILE_ENCODINGutf-8{anything} ~ Here "utf-8" is the encoding used for the tags. Vim will then convert the tag being searched for from 'encoding' to the encoding of the tags file. And when diff --git a/runtime/doc/usr_45.txt b/runtime/doc/usr_45.txt index be33f0be6d..1ce6969d37 100644 --- a/runtime/doc/usr_45.txt +++ b/runtime/doc/usr_45.txt @@ -152,12 +152,6 @@ language than the text. language, the default should work fine and you don't need to do anything. The following is only relevant when you want to edit different languages. - Note: - Using different encodings only works when Vim was compiled to handle - it. To find out if it works, use the ":version" command and check the - output for "+multi_byte". If it's there, you are OK. If you see - "-multi_byte" you will have to find another Vim. - USING UNICODE IN THE GUI diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 9c92023e93..b2337aa49b 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2019 Jan 28 +" Last Change: 2019 Feb 07 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -54,6 +54,9 @@ au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help " Abaqus or Trasys au BufNewFile,BufRead *.inp call dist#ft#Check_inp() +" 8th (Firth-derivative) +au BufNewFile,BufRead *.8th setf 8th + " A-A-P recipe au BufNewFile,BufRead *.aap setf aap diff --git a/runtime/ftplugin/8th.vim b/runtime/ftplugin/8th.vim new file mode 100644 index 0000000000..14301187d6 --- /dev/null +++ b/runtime/ftplugin/8th.vim @@ -0,0 +1,25 @@ +" Vim ftplugin file +" Language: 8th +" Version: any +" Last Change: 2015/11/08 +" Maintainer: Ron Aaron +" URL: https://8th-dev.com/ +" Filetypes: *.8th +" NOTE: 8th allows any non-whitespace in a name, so you need to do: +" setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 +" This goes with the syntax/8th.vim file. + +" Only do this when not done yet for this buffer +if exists("b:did_8thplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_8thplugin = 1 + +setlocal ts=2 sts=2 sw=2 et +setlocal com=s1:/*,mb:*,ex:*/,:\|,:\\ +setlocal fo=tcrqol +setlocal matchpairs+=\::; +setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 +setlocal suffixesadd=.8th diff --git a/runtime/ftplugin/rst.vim b/runtime/ftplugin/rst.vim index 8ab56b052a..f0646e9f36 100644 --- a/runtime/ftplugin/rst.vim +++ b/runtime/ftplugin/rst.vim @@ -30,7 +30,7 @@ setlocal formatoptions+=tcroql " " More sophisticated indentation rules should be revisted in the future. -if !exists("g:rst_style") || g:rst_style != 0 +if exists("g:rst_style") && g:rst_style != 0 setlocal expandtab shiftwidth=3 softtabstop=3 tabstop=8 endif diff --git a/runtime/syntax/8th.vim b/runtime/syntax/8th.vim new file mode 100644 index 0000000000..ddc1084c9f --- /dev/null +++ b/runtime/syntax/8th.vim @@ -0,0 +1,335 @@ +" Vim syntax file +" Language: 8th +" Version: 19.01d +" Maintainer: Ron Aaron +" URL: https://8th-dev.com/ +" Filetypes: *.8th +" NOTE: You should also have the ftplugin/8th.vim file to set 'isk' + +if version < 600 + syntax clear + finish +elseif exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim +syn clear +" Synchronization method +syn sync ccomment +syn sync maxlines=100 +syn case match +syn match eighthColonName "\S\+" contained +syn match eighthColonDef ":\s\+\S\+" contains=eighthColonName + +" new words +syn match eighthClasses "\<\S\+:" contained +syn match eighthClassWord "\<\S\+:.\+" contains=eighthClasses + +syn keyword eighthEndOfColonDef ; i; +syn keyword eighthDefine var var, + +" Built in words +com! -nargs=+ Builtin syn keyword eighthBuiltin +"Builtin ^ < <# <#> = > - -- ,# ; ;; ! ??? / . .# ' () @ * */ \ + +Builtin ! G:! #! G:#! ## G:## #> G:#> #if G:#if ' G:' ( G:( (* G:(* (:) G:(:) (code) G:(code) (getc) G:(getc) +Builtin (gets) G:(gets) (interp) G:(interp) (needs) G:(needs) (putc) G:(putc) (puts) G:(puts) (putslim) G:(putslim) +Builtin (say) G:(say) (stat) G:(stat) ) G:) +listener G:+listener +ref G:+ref ,# G:,# -- G:-- -----BEGIN G:-----BEGIN +Builtin -Inf G:-Inf -Inf? G:-Inf? -listener G:-listener -ref G:-ref -rot G:-rot . G:. .# G:.# .needs G:.needs +Builtin .r G:.r .s G:.s .stats G:.stats .ver G:.ver .with G:.with 0; G:0; 2dip G:2dip 2drop G:2drop +Builtin 2dup G:2dup 2over G:2over 2swap G:2swap 3drop G:3drop 4drop G:4drop 8thdt? G:8thdt? 8thver? G:8thver? +Builtin : G:: ; G:; ;; G:;; ;;; G:;;; ;then G:;then ;with G:;with <# G:<# <#> G:<#> >clip G:>clip >json G:>json +Builtin >kind G:>kind >n G:>n >r G:>r >s G:>s ?: G:?: ??? G:??? @ G:@ Inf G:Inf Inf? G:Inf? NaN G:NaN +Builtin NaN? G:NaN? SED-CHECK G:SED-CHECK SED: G:SED: SED: G:SED: \ G:\ ` G:` `` G:`` actor: G:actor: +Builtin again G:again ahead G:ahead and G:and appname G:appname apropos G:apropos argc G:argc args G:args +Builtin array? G:array? assert G:assert base G:base bi G:bi bits G:bits break G:break break? G:break? +Builtin build? G:build? buildver? G:buildver? bye G:bye c# G:c# c/does G:c/does case G:case caseof G:caseof +Builtin chdir G:chdir clip> G:clip> clone G:clone clone-shallow G:clone-shallow cold G:cold compat-level G:compat-level +Builtin compile G:compile compile? G:compile? conflict G:conflict const G:const container? G:container? +Builtin cr G:cr curlang G:curlang curry G:curry curry: G:curry: decimal G:decimal defer: G:defer: deg>rad G:deg>rad +Builtin depth G:depth die G:die dip G:dip drop G:drop dstack G:dstack dump G:dump dup G:dup dup? G:dup? +Builtin else G:else enum: G:enum: eval G:eval eval! G:eval! eval0 G:eval0 execnull G:execnull expect G:expect +Builtin extra! G:extra! extra@ G:extra@ false G:false fnv G:fnv fourth G:fourth free G:free func: G:func: +Builtin getc G:getc getcwd G:getcwd getenv G:getenv gets G:gets handler G:handler header G:header help G:help +Builtin hex G:hex i: G:i: i; G:i; if G:if if; G:if; isa? G:isa? items-used G:items-used jcall G:jcall +Builtin jclass G:jclass jmethod G:jmethod json-nesting G:json-nesting json-pretty G:json-pretty json-throw G:json-throw +Builtin json> G:json> k32 G:k32 keep G:keep l: G:l: last G:last lib G:lib libbin G:libbin libc G:libc +Builtin listener@ G:listener@ literal G:literal locals: G:locals: lock G:lock lock-to G:lock-to locked? G:locked? +Builtin log G:log log-async G:log-async log-task G:log-task log-time G:log-time log-time-local G:log-time-local +Builtin long-days G:long-days long-months G:long-months loop G:loop loop- G:loop- map? G:map? mark G:mark +Builtin mark? G:mark? memfree G:memfree mobile? G:mobile? n# G:n# name>os G:name>os name>sem G:name>sem +Builtin ndrop G:ndrop needs G:needs new G:new next-arg G:next-arg nip G:nip noop G:noop not G:not ns G:ns +Builtin ns: G:ns: ns>ls G:ns>ls ns>s G:ns>s ns? G:ns? null G:null null; G:null; null? G:null? number? G:number? +Builtin off G:off on G:on onexit G:onexit only G:only op! G:op! or G:or os G:os os-names G:os-names +Builtin os>long-name G:os>long-name os>name G:os>name over G:over p: G:p: pack G:pack parse G:parse +Builtin parsech G:parsech parseln G:parseln parsews G:parsews pick G:pick poke G:poke pool-clear G:pool-clear +Builtin prior G:prior private G:private process-args G:process-args prompt G:prompt public G:public +Builtin putc G:putc puts G:puts putslim G:putslim quote G:quote r! G:r! r> G:r> r@ G:r@ rad>deg G:rad>deg +Builtin rand G:rand rand-pcg G:rand-pcg rand-pcg-seed G:rand-pcg-seed randbuf G:randbuf randbuf-pcg G:randbuf-pcg +Builtin rdrop G:rdrop recurse G:recurse recurse-stack G:recurse-stack ref@ G:ref@ reg! G:reg! reg@ G:reg@ +Builtin regbin@ G:regbin@ remaining-args G:remaining-args repeat G:repeat reset G:reset roll G:roll +Builtin rop! G:rop! rot G:rot rpick G:rpick rroll G:rroll rstack G:rstack rswap G:rswap rusage G:rusage +Builtin s>ns G:s>ns same? G:same? scriptdir G:scriptdir scriptfile G:scriptfile sem G:sem sem-post G:sem-post +Builtin sem-rm G:sem-rm sem-wait G:sem-wait sem-wait? G:sem-wait? sem>name G:sem>name semi-throw G:semi-throw +Builtin set-wipe G:set-wipe setenv G:setenv settings! G:settings! settings![] G:settings![] settings@ G:settings@ +Builtin settings@? G:settings@? settings@[] G:settings@[] sh G:sh sh$ G:sh$ short-days G:short-days +Builtin short-months G:short-months sleep G:sleep space G:space stack-check G:stack-check stack-size G:stack-size +Builtin step G:step string? G:string? struct: G:struct: swap G:swap syslang G:syslang sysregion G:sysregion +Builtin tab-hook G:tab-hook tell-conflict G:tell-conflict tempdir G:tempdir tempfilename G:tempfilename +Builtin then G:then third G:third throw G:throw thrownull G:thrownull times G:times tlog G:tlog tri G:tri +Builtin true G:true tuck G:tuck type-check G:type-check typeassert G:typeassert unlock G:unlock unpack G:unpack +Builtin until G:until until! G:until! var G:var var, G:var, while G:while while! G:while! with: G:with: +Builtin words G:words words-like G:words-like words/ G:words/ xchg G:xchg xor G:xor >auth HTTP:>auth +Builtin sh I:sh tpush I:tpush trace-word I:trace-word call JSONRPC:call auth-string OAuth:auth-string +Builtin gen-nonce OAuth:gen-nonce params OAuth:params call SOAP:call ! a:! + a:+ - a:- 2each a:2each +Builtin 2map a:2map 2map+ a:2map+ 2map= a:2map= = a:= >map a:>map @ a:@ @@ a:@@ bsearch a:bsearch clear a:clear +Builtin close a:close diff a:diff dot a:dot each a:each each-slice a:each-slice exists? a:exists? filter a:filter +Builtin generate a:generate group a:group indexof a:indexof insert a:insert intersect a:intersect join a:join +Builtin len a:len map a:map map+ a:map+ map= a:map= mean a:mean mean&variance a:mean&variance new a:new +Builtin op a:op op! a:op! op= a:op= open a:open pop a:pop push a:push qsort a:qsort randeach a:randeach +Builtin reduce a:reduce reduce+ a:reduce+ rev a:rev shift a:shift shuffle a:shuffle slice a:slice slice+ a:slice+ +Builtin slide a:slide sort a:sort union a:union when a:when when! a:when! x a:x x-each a:x-each xchg a:xchg +Builtin y a:y zip a:zip 8thdir app:8thdir asset app:asset atrun app:atrun atrun app:atrun atrun app:atrun +Builtin basedir app:basedir current app:current datadir app:datadir exename app:exename isgui app:isgui +Builtin main app:main oncrash app:oncrash orientation app:orientation pid app:pid restart app:restart +Builtin resumed app:resumed shared? app:shared? standalone app:standalone subdir app:subdir suspended app:suspended +Builtin sysquit app:sysquit (here) asm:(here) >n asm:>n avail asm:avail c, asm:c, here! asm:here! n> asm:n> +Builtin used asm:used w, asm:w, ! b:! + b:+ / b:/ = b:= >base64 b:>base64 >hex b:>hex >mpack b:>mpack +Builtin @ b:@ append b:append base64> b:base64> bit! b:bit! bit@ b:bit@ clear b:clear compress b:compress +Builtin conv b:conv each b:each each-slice b:each-slice expand b:expand fill b:fill getb b:getb hex> b:hex> +Builtin len b:len mem> b:mem> move b:move mpack-date b:mpack-date mpack-ignore b:mpack-ignore mpack> b:mpack> +Builtin new b:new op b:op rev b:rev search b:search shmem b:shmem slice b:slice splice b:splice ungetb b:ungetb +Builtin writable b:writable xor b:xor +block bc:+block .blocks bc:.blocks add-block bc:add-block block-hash bc:block-hash +Builtin block@ bc:block@ first-block bc:first-block hash bc:hash last-block bc:last-block load bc:load +Builtin new bc:new save bc:save set-sql bc:set-sql validate bc:validate validate-block bc:validate-block +Builtin add bloom:add filter bloom:filter in? bloom:in? accept bt:accept ch! bt:ch! ch@ bt:ch@ connect bt:connect +Builtin disconnect bt:disconnect err? bt:err? leconnect bt:leconnect lescan bt:lescan listen bt:listen +Builtin on? bt:on? read bt:read scan bt:scan service? bt:service? services? bt:services? write bt:write +Builtin * c:* * c:* + c:+ + c:+ = c:= = c:= >ri c:>ri >ri c:>ri abs c:abs abs c:abs arg c:arg arg c:arg +Builtin conj c:conj conj c:conj im c:im n> c:n> new c:new new c:new re c:re >aes128gcm cr:>aes128gcm +Builtin >aes256gcm cr:>aes256gcm >cp cr:>cp >cpe cr:>cpe >decrypt cr:>decrypt >edbox cr:>edbox >encrypt cr:>encrypt +Builtin >nbuf cr:>nbuf >rsabox cr:>rsabox >uuid cr:>uuid CBC cr:CBC CFB cr:CFB CTR cr:CTR ECB cr:ECB +Builtin GCM cr:GCM OFB cr:OFB aad? cr:aad? aes128box-sig cr:aes128box-sig aes128gcm> cr:aes128gcm> +Builtin aes256box-sig cr:aes256box-sig aes256gcm> cr:aes256gcm> aesgcm cr:aesgcm blakehash cr:blakehash +Builtin chacha20box-sig cr:chacha20box-sig chachapoly cr:chachapoly cipher! cr:cipher! cipher@ cr:cipher@ +Builtin cp> cr:cp> cpe> cr:cpe> decrypt cr:decrypt decrypt+ cr:decrypt+ decrypt> cr:decrypt> dh-genkey cr:dh-genkey +Builtin dh-secret cr:dh-secret dh-sign cr:dh-sign dh-verify cr:dh-verify ebox-sig cr:ebox-sig ecc-genkey cr:ecc-genkey +Builtin ecc-secret cr:ecc-secret ecc-sign cr:ecc-sign ecc-verify cr:ecc-verify edbox-sig cr:edbox-sig +Builtin edbox> cr:edbox> encrypt cr:encrypt encrypt+ cr:encrypt+ encrypt> cr:encrypt> ensurekey cr:ensurekey +Builtin err? cr:err? gcm-tag-size cr:gcm-tag-size genkey cr:genkey hash cr:hash hash! cr:hash! hash+ cr:hash+ +Builtin hash>b cr:hash>b hash>s cr:hash>s hash@ cr:hash@ hmac cr:hmac hotp cr:hotp iv? cr:iv? mode cr:mode +Builtin mode@ cr:mode@ randkey cr:randkey restore cr:restore root-certs cr:root-certs rsa_decrypt cr:rsa_decrypt +Builtin rsa_encrypt cr:rsa_encrypt rsa_sign cr:rsa_sign rsa_verify cr:rsa_verify rsabox-sig cr:rsabox-sig +Builtin rsabox> cr:rsabox> rsagenkey cr:rsagenkey save cr:save sbox-sig cr:sbox-sig sha1-hmac cr:sha1-hmac +Builtin shard cr:shard tag? cr:tag? totp cr:totp totp-epoch cr:totp-epoch totp-time-step cr:totp-time-step +Builtin unshard cr:unshard uuid cr:uuid uuid> cr:uuid> validate-pgp-sig cr:validate-pgp-sig (.hebrew) d:(.hebrew) +Builtin (.islamic) d:(.islamic) + d:+ +day d:+day +hour d:+hour +min d:+min +msec d:+msec - d:- .hebrew d:.hebrew +Builtin .islamic d:.islamic .time d:.time / d:/ = d:= >fixed d:>fixed >hebepoch d:>hebepoch >msec d:>msec +Builtin >unix d:>unix >ymd d:>ymd Adar d:Adar Adar2 d:Adar2 Adar2 d:Adar2 Av d:Av Elul d:Elul Fri d:Fri +Builtin Heshvan d:Heshvan Iyar d:Iyar Kislev d:Kislev Mon d:Mon Nissan d:Nissan Sat d:Sat Shevat d:Shevat +Builtin Sivan d:Sivan Sun d:Sun Tammuz d:Tammuz Tevet d:Tevet Thu d:Thu Tishrei d:Tishrei Tue d:Tue +Builtin Wed d:Wed adjust-dst d:adjust-dst between d:between d. d:d. dawn d:dawn days-in-hebrew-year d:days-in-hebrew-year +Builtin displaying-hebrew d:displaying-hebrew do-dawn d:do-dawn do-dusk d:do-dusk do-rise d:do-rise +Builtin doy d:doy dst? d:dst? dstquery d:dstquery dstzones? d:dstzones? dusk d:dusk elapsed-timer d:elapsed-timer +Builtin elapsed-timer-seconds d:elapsed-timer-seconds first-dow d:first-dow fixed> d:fixed> fixed>dow d:fixed>dow +Builtin fixed>hebrew d:fixed>hebrew fixed>islamic d:fixed>islamic format d:format hanukkah d:hanukkah +Builtin hebrew-epoch d:hebrew-epoch hebrew>fixed d:hebrew>fixed hebrewtoday d:hebrewtoday hmonth-name d:hmonth-name +Builtin islamic.epoch d:islamic.epoch islamic>fixed d:islamic>fixed islamictoday d:islamictoday join d:join +Builtin last-day-of-hebrew-month d:last-day-of-hebrew-month last-dow d:last-dow last-month d:last-month +Builtin last-week d:last-week last-year d:last-year latitude d:latitude longitude d:longitude longitude d:longitude +Builtin msec d:msec msec> d:msec> new d:new next-dow d:next-dow next-month d:next-month next-week d:next-week +Builtin next-year d:next-year number>hebrew d:number>hebrew omer d:omer parse d:parse pesach d:pesach +Builtin prev-dow d:prev-dow purim d:purim rosh-chodesh? d:rosh-chodesh? rosh-hashanah d:rosh-hashanah +Builtin shavuot d:shavuot start-timer d:start-timer sunrise d:sunrise taanit-esther d:taanit-esther +Builtin ticks d:ticks ticks/sec d:ticks/sec timer d:timer tisha-beav d:tisha-beav tzadjust d:tzadjust +Builtin unix> d:unix> updatetz d:updatetz year@ d:year@ ymd d:ymd ymd> d:ymd> yom-haatsmaut d:yom-haatsmaut +Builtin yom-kippur d:yom-kippur add-func db:add-func bind db:bind close db:close col db:col col[] db:col[] +Builtin col{} db:col{} err? db:err? errmsg db:errmsg exec db:exec exec-cb db:exec-cb key db:key mysql? db:mysql? +Builtin odbc? db:odbc? open db:open open? db:open? prepare db:prepare query db:query query-all db:query-all +Builtin rekey db:rekey sqlerrmsg db:sqlerrmsg bp dbg:bp except-task@ dbg:except-task@ go dbg:go line-info dbg:line-info +Builtin prompt dbg:prompt stop dbg:stop trace dbg:trace trace-enter dbg:trace-enter trace-leave dbg:trace-leave +Builtin abspath f:abspath append f:append associate f:associate atime f:atime canwrite? f:canwrite? +Builtin chmod f:chmod close f:close copy f:copy copydir f:copydir create f:create ctime f:ctime dir? f:dir? +Builtin dname f:dname eachbuf f:eachbuf eachline f:eachline enssep f:enssep eof? f:eof? err? f:err? +Builtin exists? f:exists? flush f:flush fname f:fname getb f:getb getc f:getc getline f:getline getmod f:getmod +Builtin glob f:glob glob-nocase f:glob-nocase include f:include launch f:launch link f:link link> f:link> +Builtin link? f:link? mkdir f:mkdir mmap f:mmap mmap-range f:mmap-range mmap-range? f:mmap-range? mtime f:mtime +Builtin mv f:mv open f:open open-ro f:open-ro popen f:popen print f:print read f:read relpath f:relpath +Builtin rglob f:rglob rm f:rm rmdir f:rmdir seek f:seek sep f:sep show f:show size f:size slurp f:slurp +Builtin stderr f:stderr stdin f:stdin stdout f:stdout tell f:tell times f:times trash f:trash ungetb f:ungetb +Builtin ungetc f:ungetc unzip f:unzip unzip-entry f:unzip-entry watch f:watch write f:write writen f:writen +Builtin zip+ f:zip+ zip@ f:zip@ zipentry f:zipentry zipnew f:zipnew zipopen f:zipopen zipsave f:zipsave +Builtin bold font:bold face? font:face? glyph-path font:glyph-path glyph-pos font:glyph-pos info font:info +Builtin italic font:italic ls font:ls measure font:measure new font:new pixels font:pixels pixels? font:pixels? +Builtin points font:points points? font:points? styles font:styles styles? font:styles? underline font:underline +Builtin +child g:+child +kind g:+kind +path g:+path -child g:-child /path g:/path >img g:>img >progress g:>progress +Builtin add-items g:add-items adjustwidth g:adjustwidth allow-orient g:allow-orient arc g:arc arc2 g:arc2 +Builtin autohide g:autohide back g:back bezier g:bezier bg g:bg bg? g:bg? bounds g:bounds bounds? g:bounds? +Builtin box-label g:box-label btn-font g:btn-font bubble g:bubble button-size g:button-size buttons-visible g:buttons-visible +Builtin c-text g:c-text callout g:callout center g:center child g:child clear g:clear clearpath g:clearpath +Builtin clr>n g:clr>n coleven g:coleven colordlg g:colordlg colwidth g:colwidth connectededges g:connectededges +Builtin contrasting g:contrasting cp g:cp curmouse? g:curmouse? default-font g:default-font deselect-row g:deselect-row +Builtin dismiss g:dismiss do g:do draw-fitted-text g:draw-fitted-text draw-text g:draw-text draw-text-at g:draw-text-at +Builtin each g:each edit-on-double-click g:edit-on-double-click editable g:editable editdlg g:editdlg +Builtin empty-text g:empty-text enable g:enable enabled? g:enabled? fade g:fade fb-files g:fb-files +Builtin fcolor g:fcolor fg g:fg fg? g:fg? file-filter g:file-filter file-name g:file-name filedlg g:filedlg +Builtin fill g:fill fillall g:fillall fit-text g:fit-text flex! g:flex! focus g:focus fontdlg g:fontdlg +Builtin forward g:forward fullscreen g:fullscreen get-lasso-items g:get-lasso-items get-tab g:get-tab +Builtin getclr g:getclr getfont g:getfont getimage g:getimage getpath g:getpath getroot g:getroot gradient g:gradient +Builtin gui? g:gui? handle g:handle headerheight g:headerheight hide g:hide image g:image image-at g:image-at +Builtin invalidate g:invalidate ix? g:ix? justify g:justify keyinfo g:keyinfo l-text g:l-text laf g:laf +Builtin laf! g:laf! laf? g:laf? len g:len line-width g:line-width lineto g:lineto list+ g:list+ list- g:list- +Builtin loadcontent g:loadcontent localize g:localize m! g:m! m@ g:m@ menu-font g:menu-font menu-update g:menu-update +Builtin menuenabled g:menuenabled mouse? g:mouse? mousepos? g:mousepos? moveto g:moveto msgdlg g:msgdlg +Builtin multi g:multi name g:name named-skin g:named-skin new g:new new-laf g:new-laf next g:next obj g:obj +Builtin on g:on on? g:on? ontop g:ontop oshandle g:oshandle outlinethickness g:outlinethickness panel-size g:panel-size +Builtin panel-size? g:panel-size? parent g:parent path g:path path>s g:path>s pie g:pie pix! g:pix! +Builtin pop g:pop popmenu g:popmenu pos? g:pos? prev g:prev propval! g:propval! propval@ g:propval@ +Builtin push g:push qbezier g:qbezier quit g:quit r-text g:r-text readonly g:readonly rect g:rect refresh g:refresh +Builtin restore g:restore root g:root root-item-visible g:root-item-visible rotate g:rotate rowheight g:rowheight +Builtin rrect g:rrect s>path g:s>path save g:save say g:say scale g:scale scolor g:scolor scrollthickness g:scrollthickness +Builtin sectionenable g:sectionenable select! g:select! select@ g:select@ selected-rows g:selected-rows +Builtin set-lasso g:set-lasso set-long-press g:set-long-press set-popup-font g:set-popup-font set-range g:set-range +Builtin set-swipe g:set-swipe set-value g:set-value setcursor g:setcursor setfont g:setfont setheader g:setheader +Builtin sethtml g:sethtml setimage g:setimage setname g:setname setroot g:setroot settab g:settab show g:show +Builtin show-line-numbers g:show-line-numbers show-pct g:show-pct showmenu g:showmenu showtooltip g:showtooltip +Builtin size g:size size? g:size? skin g:skin skin-class g:skin-class stackix g:stackix state g:state +Builtin state? g:state? stepsize g:stepsize stroke g:stroke stroke-fill g:stroke-fill style g:style +Builtin tabname g:tabname text g:text text-box-style g:text-box-style text? g:text? textcolor g:textcolor +Builtin textsize g:textsize timer! g:timer! timer@ g:timer@ toback g:toback tofront g:tofront toggle-row g:toggle-row +Builtin tooltip g:tooltip top g:top transition g:transition translate g:translate tree-open g:tree-open +Builtin triangle g:triangle update g:update updateitems g:updateitems url g:url user g:user user! g:user! +Builtin vertical g:vertical view g:view visible? g:visible? vpos! g:vpos! vpos@ g:vpos@ waitcursor g:waitcursor +Builtin winding g:winding xy g:xy xy? g:xy? +edge gr:+edge +edge+w gr:+edge+w +node gr:+node connect gr:connect +Builtin edges gr:edges m! gr:m! m@ gr:m@ neighbors gr:neighbors new gr:new node-edges gr:node-edges +Builtin nodes gr:nodes traverse gr:traverse + h:+ clear h:clear len h:len new h:new peek h:peek pop h:pop +Builtin push h:push unique h:unique arm? hw:arm? camera hw:camera camera-fmt hw:camera-fmt camera-img hw:camera-img +Builtin camera? hw:camera? cpu? hw:cpu? device? hw:device? displays? hw:displays? displaysize? hw:displaysize? +Builtin err? hw:err? gpio hw:gpio gpio! hw:gpio! gpio-mmap hw:gpio-mmap gpio@ hw:gpio@ i2c hw:i2c i2c! hw:i2c! +Builtin i2c!reg hw:i2c!reg i2c@ hw:i2c@ i2c@reg hw:i2c@reg isround? hw:isround? iswatch? hw:iswatch? +Builtin mac? hw:mac? mem? hw:mem? poll hw:poll sensor hw:sensor start hw:start stop hw:stop fetch-full imap:fetch-full +Builtin fetch-uid-mail imap:fetch-uid-mail login imap:login new imap:new select-inbox imap:select-inbox +Builtin >file img:>file copy img:copy crop img:crop data img:data desat img:desat fill img:fill filter img:filter +Builtin flip img:flip from-svg img:from-svg new img:new pix! img:pix! pix@ img:pix@ qr-gen img:qr-gen +Builtin qr-parse img:qr-parse rotate img:rotate scale img:scale scroll img:scroll size img:size countries iso:countries +Builtin find loc:find sort loc:sort ! m:! !? m:!? + m:+ +? m:+? - m:- @ m:@ @? m:@? @@ m:@@ clear m:clear +Builtin data m:data each m:each exists? m:exists? iter m:iter iter-all m:iter-all keys m:keys len m:len +Builtin map m:map new m:new op! m:op! open m:open vals m:vals xchg m:xchg ! mat:! * mat:* + mat:+ = mat:= +Builtin @ mat:@ col mat:col data mat:data det mat:det dim? mat:dim? get-n mat:get-n ident mat:ident +Builtin m. mat:m. minor mat:minor n* mat:n* new mat:new row mat:row same-size? mat:same-size? trans mat:trans +Builtin ! n:! * n:* */ n:*/ + n:+ +! n:+! - n:- / n:/ /mod n:/mod 1+ n:1+ 1- n:1- < n:< = n:= > n:> +Builtin BIGE n:BIGE BIGPI n:BIGPI E n:E PI n:PI ^ n:^ abs n:abs acos n:acos acos n:acos asin n:asin +Builtin asin n:asin atan n:atan atan n:atan atan2 n:atan2 band n:band between n:between bfloat n:bfloat +Builtin bic n:bic bint n:bint binv n:binv bnot n:bnot bor n:bor bxor n:bxor ceil n:ceil clamp n:clamp +Builtin cmp n:cmp comb n:comb cos n:cos cosd n:cosd exp n:exp expmod n:expmod float n:float floor n:floor +Builtin fmod n:fmod frac n:frac gcd n:gcd int n:int invmod n:invmod kind? n:kind? lcm n:lcm ln n:ln +Builtin max n:max median n:median min n:min mod n:mod neg n:neg odd? n:odd? perm n:perm prime? n:prime? +Builtin quantize n:quantize quantize! n:quantize! r+ n:r+ range n:range rot32l n:rot32l rot32r n:rot32r +Builtin round n:round round2 n:round2 running-variance n:running-variance running-variance-finalize n:running-variance-finalize +Builtin sgn n:sgn shl n:shl shr n:shr sin n:sin sind n:sind sqr n:sqr sqrt n:sqrt tan n:tan tand n:tand +Builtin trunc n:trunc ~= n:~= ! net:! >url net:>url @ net:@ DGRAM net:DGRAM INET4 net:INET4 INET6 net:INET6 +Builtin PROTO_TCP net:PROTO_TCP PROTO_UDP net:PROTO_UDP STREAM net:STREAM accept net:accept addrinfo>o net:addrinfo>o +Builtin again? net:again? alloc-and-read net:alloc-and-read alloc-buf net:alloc-buf bind net:bind browse net:browse +Builtin close net:close connect net:connect err>s net:err>s err? net:err? get net:get getaddrinfo net:getaddrinfo +Builtin getpeername net:getpeername head net:head ifaces? net:ifaces? listen net:listen net-socket net:net-socket +Builtin opts net:opts port-is-ssl? net:port-is-ssl? post net:post proxy! net:proxy! read net:read recvfrom net:recvfrom +Builtin s>url net:s>url sendto net:sendto server net:server setsockopt net:setsockopt socket net:socket +Builtin tlshello net:tlshello url> net:url> user-agent net:user-agent wait net:wait write net:write +Builtin MAX ns:MAX cast ptr:cast len ptr:len pack ptr:pack unpack ptr:unpack unpack_orig ptr:unpack_orig +Builtin + q:+ clear q:clear len q:len new q:new notify q:notify overwrite q:overwrite peek q:peek pick q:pick +Builtin pop q:pop push q:push shift q:shift size q:size slide q:slide throwing q:throwing wait q:wait +Builtin ++match r:++match +/ r:+/ +match r:+match / r:/ @ r:@ err? r:err? len r:len match r:match new r:new +Builtin rx r:rx str r:str ! s:! * s:* + s:+ - s:- / s:/ /scripts s:/scripts <+ s:<+ = s:= =ic s:=ic +Builtin >base64 s:>base64 >ucs2 s:>ucs2 @ s:@ append s:append base64> s:base64> clear s:clear cmp s:cmp +Builtin cmpi s:cmpi compress s:compress days! s:days! each s:each eachline s:eachline expand s:expand +Builtin fill s:fill fmt s:fmt gershayim s:gershayim globmatch s:globmatch hexupr s:hexupr insert s:insert +Builtin intl s:intl intl! s:intl! lang s:lang lc s:lc len s:len lsub s:lsub ltrim s:ltrim map s:map +Builtin months! s:months! new s:new replace s:replace replace! s:replace! rev s:rev rsearch s:rsearch +Builtin rsub s:rsub rtrim s:rtrim script? s:script? search s:search size s:size slice s:slice strfmap s:strfmap +Builtin strfmt s:strfmt trim s:trim tsub s:tsub uc s:uc ucs2> s:ucs2> utf8? s:utf8? zt s:zt close sio:close +Builtin enum sio:enum open sio:open opts! sio:opts! opts@ sio:opts@ read sio:read write sio:write new smtp:new +Builtin send smtp:send apply-filter snd:apply-filter devices? snd:devices? end-record snd:end-record +Builtin filter snd:filter formats? snd:formats? freq snd:freq gain snd:gain gain? snd:gain? len snd:len +Builtin loop snd:loop mix snd:mix new snd:new pause snd:pause play snd:play played snd:played rate snd:rate +Builtin record snd:record seek snd:seek stop snd:stop stopall snd:stopall unmix snd:unmix volume snd:volume +Builtin volume? snd:volume? + st:+ . st:. clear st:clear len st:len ndrop st:ndrop new st:new op! st:op! +Builtin peek st:peek pick st:pick pop st:pop push st:push roll st:roll shift st:shift size st:size +Builtin slide st:slide swap st:swap throwing st:throwing >buf struct:>buf arr> struct:arr> buf struct:buf +Builtin buf> struct:buf> byte struct:byte double struct:double field! struct:field! field@ struct:field@ +Builtin float struct:float ignore struct:ignore int struct:int long struct:long struct; struct:struct; +Builtin word struct:word ! t:! @ t:@ assign t:assign curtask t:curtask def-queue t:def-queue def-stack t:def-stack +Builtin done? t:done? err! t:err! err? t:err? getq t:getq guitask t:guitask handler t:handler kill t:kill +Builtin list t:list main t:main name! t:name! name@ t:name@ notify t:notify pop t:pop priority t:priority +Builtin push t:push push< t:push< q-notify t:q-notify q-wait t:q-wait qlen t:qlen result t:result task t:task +Builtin task-n t:task-n task-stop t:task-stop wait t:wait ! w:! @ w:@ alias: w:alias: cb w:cb deprecate w:deprecate +Builtin exec w:exec exec? w:exec? ffifail w:ffifail find w:find forget w:forget is w:is undo w:undo +Builtin >s xml:>s >txt xml:>txt parse xml:parse parse-html xml:parse-html parse-stream xml:parse-stream +Builtin getmsg[] zmq:getmsg[] sendmsg[] zmq:sendmsg[] +" numbers +syn keyword eighthMath decimal hex base@ base! +syn match eighthInteger '\<-\=[0-9.]*[0-9.]\+\>' +" recognize hex and binary numbers, the '$' and '%' notation is for eighth +syn match eighthInteger '\<\$\x*\x\+\>' " *1* --- dont't mess +syn match eighthInteger '\<\x*\d\x*\>' " *2* --- this order! +syn match eighthInteger '\<%[0-1]*[0-1]\+\>' +syn match eighthInteger "\<'.\>" + +" Strings +syn region eighthString start=+\.\?\"+ skip=+"+ end=+$+ +syn keyword jsonNull null +syn keyword jsonBool /\(true\|false\)/ + syn region eighthString start=/\<"/ end=/"\>/ +syn match jsonObjEntry /"\"[^"]\+\"\ze\s*:/ + +"syn region jsonObject start=/{/ end=/}/ contained contains=jsonObjEntry,jsonArray,jsonObject, jsonBool, eighthString +"syn region jsonArray start=/\[/ end=/\]/ contained contains=jsonArray,jsonObject, jsonBool, eighthString + +" Include files +" syn match eighthInclude '\<\(libinclude\|include\|needs\)\s\+\S\+' +syn region eighthComment start="\zs\\" end="$" contains=eighthTodo + +" Define the default highlighting. +if !exists("did_eighth_syntax_inits") + let did_eighth_syntax_inits=1 + " The default methods for highlighting. Can be overriden later. + hi def link eighthTodo Todo + hi def link eighthOperators Operator + hi def link eighthMath Number + hi def link eighthInteger Number + hi def link eighthStack Special + hi def link eighthFStack Special + hi def link eighthSP Special + hi def link eighthColonDef Define + hi def link eighthColonName Operator + hi def link eighthEndOfColonDef Define + hi def link eighthDefine Define + hi def link eighthDebug Debug + hi def link eighthCharOps Character + hi def link eighthConversion String + hi def link eighthForth Statement + hi def link eighthVocs Statement + hi def link eighthString String + hi def link eighthComment Comment + hi def link eighthClassDef Define + hi def link eighthEndOfClassDef Define + hi def link eighthObjectDef Define + hi def link eighthEndOfObjectDef Define + hi def link eighthInclude Include + hi def link eighthBuiltin Define + hi def link eighthClasses Define + hi def link eighthClassWord Keyword + + hi def link jsonObject Delimiter + hi def link jsonObjEntry Label + hi def link jsonArray Special + hi def link jsonNull Function + hi def link jsonBool Boolean +endif + +let b:current_syntax = "8th" +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: ts=8:sw=4:nocindent:smartindent: diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim index 95d3455dde..2eb7881f67 100644 --- a/runtime/syntax/c.vim +++ b/runtime/syntax/c.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: C " Maintainer: Bram Moolenaar -" Last Change: 2018 Sep 21 +" Last Change: 2019 Feb 11 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -342,7 +342,7 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu") syn keyword cConstant EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK EMSGSIZE syn keyword cConstant EMULTIHOP ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS ENODATA syn keyword cConstant ENODEV ENOENT ENOEXEC ENOLCK ENOLINK ENOMEM ENOMSG ENOPROTOOPT ENOSPC ENOSR - syn keyword cConstant ENOSTR ENOSYS ENOTCONN ENOTDIR ENOTEMPTY ENOTRECOVERABLE ENOTSOCK ENOTSUP + syn keyword cConstant ENOSTR ENOSYS ENOTBLK ENOTCONN ENOTDIR ENOTEMPTY ENOTRECOVERABLE ENOTSOCK ENOTSUP syn keyword cConstant ENOTTY ENXIO EOPNOTSUPP EOVERFLOW EOWNERDEAD EPERM EPIPE EPROTO syn keyword cConstant EPROTONOSUPPORT EPROTOTYPE ERANGE EROFS ESPIPE ESRCH ESTALE ETIME ETIMEDOUT syn keyword cConstant ETXTBSY EWOULDBLOCK EXDEV diff --git a/runtime/syntax/make.vim b/runtime/syntax/make.vim index 7072bab988..16e66bc8f2 100644 --- a/runtime/syntax/make.vim +++ b/runtime/syntax/make.vim @@ -1,8 +1,9 @@ " Vim syntax file " Language: Makefile -" Maintainer: Claudio Fleiner -" URL: http://www.fleiner.com/vim/syntax/make.vim -" Last Change: 2015 Feb 28 +" Maintainer: Roland Hieber +" Previous Maintainer: Claudio Fleiner +" URL: https://github.com/vim/vim/syntax/make.vim +" Last Change: 2019 Feb 08 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -64,7 +65,7 @@ syn match makeCmdNextLine "\\\n."he=e-1 contained " Statements / Functions (GNU make) -syn match makeStatement contained "(\(subst\|abspath\|addprefix\|addsuffix\|and\|basename\|call\|dir\|error\|eval\|filter-out\|filter\|findstring\|firstword\|flavor\|foreach\|if\|info\|join\|lastword\|notdir\|or\|origin\|patsubst\|realpath\|shell\|sort\|strip\|suffix\|value\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1 +syn match makeStatement contained "(\(abspath\|addprefix\|addsuffix\|and\|basename\|call\|dir\|error\|eval\|file\|filter-out\|filter\|findstring\|firstword\|flavor\|foreach\|guile\|if\|info\|join\|lastword\|notdir\|or\|origin\|patsubst\|realpath\|shell\|sort\|strip\|subst\|suffix\|value\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1 " Comment if exists("make_microsoft") diff --git a/runtime/syntax/spec.vim b/runtime/syntax/spec.vim index 3a7dc9e422..ae93fe51a4 100644 --- a/runtime/syntax/spec.vim +++ b/runtime/syntax/spec.vim @@ -3,7 +3,7 @@ " Language: SPEC: Build/install scripts for Linux RPM packages " Maintainer: Igor Gnatenko i.gnatenko.brain@gmail.com " Former Maintainer: Donovan Rebbechi elflord@panix.com (until March 2014) -" Last Change: Sat Apr 9 15:30 2016 Filip Szymański +" Last Change: 2019 Feb 12 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -86,9 +86,9 @@ syn region specSectionMacroBracketArea oneline matchgroup=specSectionMacro start "%% Files Section %% "TODO %config valid parameters: missingok\|noreplace "TODO %verify valid parameters: \(not\)\= \(md5\|atime\|...\) -syn region specFilesArea matchgroup=specSection start='^%[Ff][Ii][Ll][Ee][Ss]\>' skip='%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|verify\|ghost\)\>' end='^%[a-zA-Z]'me=e-2 contains=specFilesOpts,specFilesDirective,@specListedFiles,specComment,specCommandSpecial,specMacroIdentifier +syn region specFilesArea matchgroup=specSection start='^%[Ff][Ii][Ll][Ee][Ss]\>' skip='%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|license\|verify\|ghost\)\>' end='^%[a-zA-Z]'me=e-2 contains=specFilesOpts,specFilesDirective,@specListedFiles,specComment,specCommandSpecial,specMacroIdentifier "tip: remember to include new itens in specFilesArea above -syn match specFilesDirective contained '%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|verify\|ghost\)\>' +syn match specFilesDirective contained '%\(attrib\|defattr\|attr\|dir\|config\|docdir\|doc\|lang\|license\|verify\|ghost\)\>' "valid options for certain section headers syn match specDescriptionOpts contained '\s-[ln]\s*\a'ms=s+1,me=e-1 -- cgit From a14fc7b159dcc0f39e8aff68763dff92cb364d18 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 1 Aug 2019 17:04:25 +0200 Subject: vim-patch:f6b401090e81 Update runtime files https://github.com/vim/vim/commit/f6b401090e816b4216f783a9b85d21d9ad134ff8 --- runtime/doc/eval.txt | 8 ++-- runtime/doc/indent.txt | 5 +++ runtime/doc/index.txt | 25 +++++++++++ runtime/doc/options.txt | 3 ++ runtime/doc/pattern.txt | 2 +- runtime/doc/visual.txt | 2 + runtime/indent/python.vim | 104 +++++++++++++++++++++++++--------------------- 7 files changed, 97 insertions(+), 52 deletions(-) diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index cfc183ec42..aa7e58acc4 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -2576,9 +2576,9 @@ assert_false({actual} [, {msg}]) *assert_false()* "Expected False but got {actual}" is produced. assert_inrange({lower}, {upper}, {actual} [, {msg}]) *assert_inrange()* - This asserts number values. When {actual} is lower than - {lower} or higher than {upper} an error message is added to - |v:errors|. + This asserts number and |Float| values. When {actual} is lower + than {lower} or higher than {upper} an error message is added + to |v:errors|. Also see |assert-return|. When {msg} is omitted an error in the form "Expected range {lower} - {upper}, but got {actual}" is produced. @@ -4631,7 +4631,7 @@ gettabinfo([{arg}]) *gettabinfo()* tabnr tab page number. variables a reference to the dictionary with tabpage-local variables - windows List of |window-ID|s in the tag page. + windows List of |window-ID|s in the tab page. gettabvar({tabnr}, {varname} [, {def}]) *gettabvar()* Get the value of a tab-local variable {varname} in tab page diff --git a/runtime/doc/indent.txt b/runtime/doc/indent.txt index 721aa93442..e69497e1ab 100644 --- a/runtime/doc/indent.txt +++ b/runtime/doc/indent.txt @@ -944,6 +944,11 @@ can sometimes be slow, thus it timeouts after 150 msec. If you notice the indenting isn't correct, you can set a larger timeout in msec: > let g:pyindent_searchpair_timeout = 500 +If looking back for unclosed parenthesis is still too slow, especially during +a copy-paste operation, or if you don't need indenting inside multi-line +parentheses, you can completely disable this feature: > + let g:pyindent_disable_parentheses_indenting = 1 + R *ft-r-indent* diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 03523042c6..305d5be404 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -155,6 +155,20 @@ commands in CTRL-X submode *i_CTRL-X_index* |i_CTRL-X_s| CTRL-X s spelling suggestions {not available when compiled without the |+insert_expand| feature} +commands in completion mode (see |popupmenu-keys|) + +|complete_CTRL-E| CTRL-E stop completion and go back to original text +|complete_CTRL-Y| CTRL-Y accept selected match and stop completion + CTRL-L insert one character from the current match + insert currently selected match + delete one character and redo search + CTRL-H same as + select the previous match + select the next match + select a match several entries back + select a match several entries forward + other stop completion and insert the typed character + ============================================================================== 2. Normal mode *normal-index* @@ -839,6 +853,17 @@ tag char note action in Normal mode ~ |z| z same as "zh" |z| z same as "zl" +============================================================================== +2.6 Operator-pending mode *operator-pending-index* + +These can be used after an operator, but before a {motion} has been entered. + +tag char action in Insert mode ~ +----------------------------------------------------------------------- +|o_v| v force operator to work characterwise +|o_V| V force operator to work linewise +|o_CTRL-V| CTRL-V force operator to work blockwise + ============================================================================== 3. Visual mode *visual-index* diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index d0ead3c256..a94bbc5599 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1880,6 +1880,9 @@ A jump table for the options with a short description can be found at |Q_op|. context:{n} Use a context of {n} lines between a change and a fold that contains unchanged lines. When omitted a context of six lines is used. + When using zero the context is actually one, + since folds require a line in between, also + for a deleted line. See |fold-diff|. iblank Ignore changes where lines are all blank. Adds diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index 9e68bb8af1..7f6a74e3f6 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1201,7 +1201,7 @@ x A single character, with no special meaning, matches itself \%u20AC Matches the character specified with up to four hexadecimal characters. \%U1234abcd Matches the character specified with up to eight hexadecimal - characters. + characters, up to 0x7fffffff ============================================================================== 7. Ignoring case in a pattern */ignorecase* diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt index 252a1ca8b8..4f29577680 100644 --- a/runtime/doc/visual.txt +++ b/runtime/doc/visual.txt @@ -103,6 +103,8 @@ gn Search forward for the last used search pattern, like E.g., "dgn" deletes the text of the next match. If Visual mode is active, extends the selection until the end of the next match. + Note: Unlinke `n` the search direction does not depend + on the previous search command. *gN* *v_gN* gN Like |gn| but searches backward, like with `N`. diff --git a/runtime/indent/python.vim b/runtime/indent/python.vim index 7ab3cb9f50..e53987a0de 100644 --- a/runtime/indent/python.vim +++ b/runtime/indent/python.vim @@ -2,7 +2,7 @@ " Language: Python " Maintainer: Bram Moolenaar " Original Author: David Bustos -" Last Change: 2013 Jul 9 +" Last Change: 2019 Feb 21 " Only load this indent file when no other was loaded. if exists("b:did_indent") @@ -53,58 +53,68 @@ function GetPythonIndent(lnum) return 0 endif - " searchpair() can be slow sometimes, limit the time to 100 msec or what is - " put in g:pyindent_searchpair_timeout - let searchpair_stopline = 0 - let searchpair_timeout = get(g:, 'pyindent_searchpair_timeout', 150) - - " If the previous line is inside parenthesis, use the indent of the starting - " line. - " Trick: use the non-existing "dummy" variable to break out of the loop when - " going too far back. call cursor(plnum, 1) - let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW', - \ "line('.') < " . (plnum - s:maxoff) . " ? dummy :" - \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" - \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", - \ searchpair_stopline, searchpair_timeout) - if parlnum > 0 - let plindent = indent(parlnum) - let plnumstart = parlnum - else + + " Identing inside parentheses can be very slow, regardless of the searchpair() + " timeout, so let the user disable this feature if he doesn't need it + let disable_parentheses_indenting = get(g:, "pyindent_disable_parentheses_indenting", 0) + + if disable_parentheses_indenting == 1 let plindent = indent(plnum) let plnumstart = plnum - endif - + else + " searchpair() can be slow sometimes, limit the time to 150 msec or what is + " put in g:pyindent_searchpair_timeout + let searchpair_stopline = 0 + let searchpair_timeout = get(g:, 'pyindent_searchpair_timeout', 150) + + " If the previous line is inside parenthesis, use the indent of the starting + " line. + " Trick: use the non-existing "dummy" variable to break out of the loop when + " going too far back. + let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW', + \ "line('.') < " . (plnum - s:maxoff) . " ? dummy :" + \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" + \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", + \ searchpair_stopline, searchpair_timeout) + if parlnum > 0 + let plindent = indent(parlnum) + let plnumstart = parlnum + else + let plindent = indent(plnum) + let plnumstart = plnum + endif - " When inside parenthesis: If at the first line below the parenthesis add - " two 'shiftwidth', otherwise same as previous line. - " i = (a - " + b - " + c) - call cursor(a:lnum, 1) - let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', - \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" - \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" - \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", - \ searchpair_stopline, searchpair_timeout) - if p > 0 - if p == plnum - " When the start is inside parenthesis, only indent one 'shiftwidth'. - let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', - \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" - \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" - \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", - \ searchpair_stopline, searchpair_timeout) - if pp > 0 - return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth()) + " When inside parenthesis: If at the first line below the parenthesis add + " two 'shiftwidth', otherwise same as previous line. + " i = (a + " + b + " + c) + call cursor(a:lnum, 1) + let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', + \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" + \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" + \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", + \ searchpair_stopline, searchpair_timeout) + if p > 0 + if p == plnum + " When the start is inside parenthesis, only indent one 'shiftwidth'. + let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW', + \ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :" + \ . " synIDattr(synID(line('.'), col('.'), 1), 'name')" + \ . " =~ '\\(Comment\\|Todo\\|String\\)$'", + \ searchpair_stopline, searchpair_timeout) + if pp > 0 + return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth()) + endif + return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2)) endif - return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2)) - endif - if plnumstart == p - return indent(plnum) + if plnumstart == p + return indent(plnum) + endif + return plindent endif - return plindent + endif -- cgit From 41fe644124140c4a303de4a5a84e28efec918274 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 1 Aug 2019 22:30:40 +0200 Subject: vim-patch:26967617a30e Update runtime files. https://github.com/vim/vim/commit/26967617a30e55aedc98b8f14b841d88469abd0e NA: vim-patch:55d81cd2a15d --- runtime/doc/autocmd.txt | 10 ++++++++-- runtime/doc/index.txt | 8 +++++--- runtime/doc/motion.txt | 4 ++-- runtime/doc/options.txt | 6 +++--- runtime/doc/pi_netrw.txt | 6 +++--- runtime/doc/spell.txt | 10 +++++----- runtime/doc/usr_05.txt | 2 +- runtime/doc/visual.txt | 2 +- runtime/doc/windows.txt | 6 ++++++ 9 files changed, 34 insertions(+), 20 deletions(-) diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 47afc4bd21..ffd9133ef5 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -648,6 +648,7 @@ CursorMoved After the cursor was moved in Normal or Visual Not triggered when there is typeahead or when an operator is pending. For an example see |match-parens|. + Note: Cannot be skipped with `:noautocmd`. Careful: This is triggered very often, don't do anything that the user does not expect or that is slow. @@ -1050,6 +1051,8 @@ TextChanged After a change was made to the text in the was defined). Not triggered when there is typeahead or when an operator is pending. + Note: This can not be skipped with + `:noautocmd`. Careful: This is triggered very often, don't do anything that the user does not expect or that is slow. @@ -1474,8 +1477,8 @@ If you want the buffer to be unmodified after changing it, reset the instead of ":q!". *autocmd-nested* *E218* -By default, autocommands do not nest. If you use ":e" or ":w" in an -autocommand, Vim does not execute the BufRead and BufWrite autocommands for +By default, autocommands do not nest. For example, if you use ":e" or ":w" in +an autocommand, Vim does not execute the BufRead and BufWrite autocommands for those commands. If you do want this, use the "++nested" flag for those commands in which you want nesting. For example: > :autocmd FileChangedShell *.c ++nested e! @@ -1621,5 +1624,8 @@ following command. Example: > This will write the file without triggering the autocommands defined by the gzip plugin. +Note that some autocommands are not triggered right away, but only later. +This specifically applies to |CursorMoved| and |TextChanged|. + vim:tw=78:ts=8:noet:ft=help:norl: diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 305d5be404..6b80ab1ac2 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -569,6 +569,8 @@ tag command action in Normal mode ~ |CTRL-W_gF| CTRL-W g F edit file name under the cursor in a new tab page and jump to the line number following the file name. +|CTRL-W_gt| CTRL-W g t same as `gt`: go to next tab page +|CTRL-W_gT| CTRL-W g T same as `gT`: go to previous tab page |CTRL-W_h| CTRL-W h go to Nth left window (stop at first window) |CTRL-W_i| CTRL-W i split window and jump to declaration of identifier under the cursor @@ -858,7 +860,7 @@ tag char note action in Normal mode ~ These can be used after an operator, but before a {motion} has been entered. -tag char action in Insert mode ~ +tag char action in Operator-pending mode ~ ----------------------------------------------------------------------- |o_v| v force operator to work characterwise |o_V| V force operator to work linewise @@ -986,7 +988,7 @@ Normal characters are inserted at the current cursor position. "Completion" below refers to context-sensitive completion. It will complete file names, tags, commands etc. as appropriate. -tag command action in Command-line editing mode ~ +tag command action in Command-line editing mode ~ ------------------------------------------------------------------------------ CTRL-@ not used |c_CTRL-A| CTRL-A do completion on the pattern in front of the @@ -1085,7 +1087,7 @@ This is a brief but complete listing of all the ":" commands, without mentioning any arguments. The optional part of the command name is inside []. The commands are sorted on the non-optional part of their name. -tag command action ~ +tag command action ~ ------------------------------------------------------------------------------ |:!| :! filter lines or execute an external command |:!!| :!! repeat last ":!" command diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt index 461fefe903..818bbf9eb7 100644 --- a/runtime/doc/motion.txt +++ b/runtime/doc/motion.txt @@ -310,7 +310,7 @@ _ [count] - 1 lines downward, on the first non-blank G Goto line [count], default last line, on the first non-blank character |linewise|. If 'startofline' not set, keep the same column. - G is a one of |jump-motions|. + G is one of the |jump-motions|. ** Goto line [count], default last line, on the last @@ -989,7 +989,7 @@ These commands are not marks themselves, but jump to a mark: A "jump" is a command that normally moves the cursor several lines away. If you make the cursor "jump" the position of the cursor before the jump is -remembered. You can return to that position with the "''" and "``" command, +remembered. You can return to that position with the "''" and "``" commands, unless the line containing that position was changed or deleted. The following commands are "jump" commands: "'", "`", "G", "/", "?", "n", "N", "%", "(", ")", "[[", "]]", "{", "}", ":s", ":tag", "L", "M", "H" and the diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index a94bbc5599..707073d158 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -324,9 +324,9 @@ Setting the filetype When the optional FALLBACK argument is present, a later :setfiletype command will override the - 'filetype'. This is to used for filetype detections - that are just a guess. |did_filetype()| will return - false after this command. + 'filetype'. This is to be used for filetype + detections that are just a guess. |did_filetype()| + will return false after this command. *option-window* *optwin* :bro[wse] se[t] *:set-browse* *:browse-set* *:opt* *:options* diff --git a/runtime/doc/pi_netrw.txt b/runtime/doc/pi_netrw.txt index a0e071d4dd..95726324ef 100644 --- a/runtime/doc/pi_netrw.txt +++ b/runtime/doc/pi_netrw.txt @@ -3433,7 +3433,7 @@ Example: Clear netrw's marked file list via a mapping on gu > - Click "Add..." - Set External Editor (adjust path as needed, include the quotes and !.! at the end): - "c:\Program Files\Vim\vim70\gvim.exe" !.! + "c:\Program Files\Vim\vim81\gvim.exe" !.! - Check that the filetype in the box below is {asterisk}.{asterisk} (all files), or whatever types you want (cec: change {asterisk} to * ; I had to @@ -3683,8 +3683,8 @@ by obtaining a copy of the latest (often developmental) netrw at: The script is typically installed on systems as something like: > - /usr/local/share/vim/vim7x/plugin/netrwPlugin.vim - /usr/local/share/vim/vim7x/autoload/netrw.vim + /usr/local/share/vim/vim8x/plugin/netrwPlugin.vim + /usr/local/share/vim/vim8x/autoload/netrw.vim (see output of :echo &rtp) < which is loaded automatically at startup (assuming :set nocp). If you diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt index 67917d9617..955861bd2d 100644 --- a/runtime/doc/spell.txt +++ b/runtime/doc/spell.txt @@ -298,25 +298,25 @@ Exceptions: spell file is used. For example, with these values: - 'runtimepath' is "~/.config/nvim,/usr/share/vim70,~/.config/nvim/after" + 'runtimepath' is "~/.config/nvim,/usr/local/share/nvim/runtime/,~/.config/nvim/after" 'encoding' is "iso-8859-2" 'spelllang' is "pl" Vim will look for: 1. ~/.config/nvim/spell/pl.iso-8859-2.spl -2. /usr/share/vim70/spell/pl.iso-8859-2.spl +2. /usr/local/share/nvim/runtime/spell/pl.iso-8859-2.spl 3. ~/.config/nvim/spell/pl.iso-8859-2.add.spl -4. /usr/share/vim70/spell/pl.iso-8859-2.add.spl +4. /usr/local/share/nvim/runtime/spell/pl.iso-8859-2.add.spl 5. ~/.config/nvim/after/spell/pl.iso-8859-2.add.spl This assumes 1. is not found and 2. is found. If 'encoding' is "latin1" Vim will look for: 1. ~/.config/nvim/spell/pl.latin1.spl -2. /usr/share/vim70/spell/pl.latin1.spl +2. /usr/local/share/nvim/runtime/spell/pl.latin1.spl 3. ~/.config/nvim/after/spell/pl.latin1.spl 4. ~/.config/nvim/spell/pl.ascii.spl -5. /usr/share/vim70/spell/pl.ascii.spl +5. /usr/local/share/nvim/runtime/spell/pl.ascii.spl 6. ~/.config/nvim/after/spell/pl.ascii.spl This assumes none of them are found (Polish doesn't make sense when leaving diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt index d85be4ccae..e21481af17 100644 --- a/runtime/doc/usr_05.txt +++ b/runtime/doc/usr_05.txt @@ -192,7 +192,7 @@ typing commands at the command-line. \ | wincmd p | diffthis This adds the ":DiffOrig" command. Use this in a modified buffer to see the -differences with the file it was loaded from. See |diff|. +differences with the file it was loaded from. See |diff| and |:DiffOrig|. > set nolangremap diff --git a/runtime/doc/visual.txt b/runtime/doc/visual.txt index 4f29577680..2062696a4e 100644 --- a/runtime/doc/visual.txt +++ b/runtime/doc/visual.txt @@ -103,7 +103,7 @@ gn Search forward for the last used search pattern, like E.g., "dgn" deletes the text of the next match. If Visual mode is active, extends the selection until the end of the next match. - Note: Unlinke `n` the search direction does not depend + Note: Unlike `n` the search direction does not depend on the previous search command. *gN* *v_gN* diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt index ac9e1f48fe..b93945a340 100644 --- a/runtime/doc/windows.txt +++ b/runtime/doc/windows.txt @@ -807,6 +807,12 @@ CTRL-W gF *CTRL-W_gF* {not available when the |+file_in_path| feature was disabled at compile time} +CTRL-W gt *CTRL-W_gt* + Go to next tab page, same as `gt`. + +CTRL-W gT *CTRL-W_gT* + Go to previous tab page, same as `gT`. + Also see |CTRL-W_CTRL-I|: open window for an included file that includes the keyword under the cursor. -- cgit From 2cdbbe50a4a695004adce50d7502869bb2410928 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 1 Aug 2019 22:45:59 +0200 Subject: vim-patch:63b74a8362b1 Update runtime files. https://github.com/vim/vim/commit/63b74a8362b14576b21d342dc424d0396ca8ea27 --- runtime/autoload/dist/ft.vim | 2 +- runtime/doc/index.txt | 5 +- runtime/doc/options.txt | 12 ++- runtime/doc/tagsrch.txt | 3 +- runtime/filetype.vim | 6 +- runtime/ftplugin/cobol.vim | 5 +- runtime/ftplugin/python.vim | 133 +++++++++++++++++++++++++-------- runtime/indent/cobol.vim | 11 ++- runtime/indent/html.vim | 11 ++- runtime/indent/sh.vim | 4 +- runtime/indent/testdir/html.ok | 6 +- runtime/indent/testdir/xml.ok | 4 +- runtime/indent/xml.vim | 63 +++++++++++----- runtime/syntax/cobol.vim | 164 +++++++++++++++++++++++++++++------------ 14 files changed, 314 insertions(+), 115 deletions(-) diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index a97bad3b56..e85ffc763b 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -1,7 +1,7 @@ " Vim functions for file type detection " " Maintainer: Bram Moolenaar -" Last Change: 2019 Jan 18 +" Last Change: 2019 Mar 08 " These functions are moved here from runtime/filetype.vim to make startup " faster. diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 6b80ab1ac2..4cab36a3c8 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1028,10 +1028,11 @@ tag command action in Command-line editing mode ~ command-line from history. |c_CTRL-Q| CTRL-Q same as CTRL-V, unless it's used for terminal control flow -|c_CTRL-R| CTRL-R {0-9a-z"%#*:= CTRL-F CTRL-P CTRL-W CTRL-A} +|c_CTRL-R| CTRL-R {regname} insert the contents of a register or object under the cursor as if typed -|c_CTRL-R_CTRL-R| CTRL-R CTRL-R {0-9a-z"%#*:= CTRL-F CTRL-P CTRL-W CTRL-A} +|c_CTRL-R_CTRL-R| CTRL-R CTRL-R {regname} +|c_CTRL-R_CTRL-O| CTRL-R CTRL-O {regname} insert the contents of a register or object under the cursor literally CTRL-S (used for terminal control flow) diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 707073d158..8881f12f47 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1810,7 +1810,15 @@ A jump table for the options with a short description can be found at |Q_op|. The default value is for C programs. For C++ this value would be useful, to include const type declarations: > ^\(#\s*define\|[a-z]*\s*const\s*[a-z]*\) +< You can also use "\ze" just before the name and continue the pattern + to check what is following. E.g. for Javascript, if a function is + defined with "func_name = function(args)": > + ^\s*\ze\i\+\s*=\s*function( +< If the function is defined with "func_name : function() {...": > + ^\s*\ze\i\+\s*[:]\s*(*function\s*( < When using the ":set" command, you need to double the backslashes! + To avoid that use `:let` with a single quote string: > + let &l:define = '^\s*\ze\k\+\s*=\s*function(' *'delcombine'* *'deco'* *'nodelcombine'* *'nodeco'* 'delcombine' 'deco' boolean (default off) @@ -5974,7 +5982,9 @@ A jump table for the options with a short description can be found at |Q_op|. pages. split If included, split the current window before loading a buffer for a |quickfix| command that display errors. - Otherwise: do not split, use current window. + Otherwise: do not split, use current window (when used + in the quickfix window: the previously used window or + split if there is no other window). vsplit Just like "split" but split vertically. newtab Like "split", but open a new tab page. Overrules "split" when both are present. diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt index eec217769a..4890cf3848 100644 --- a/runtime/doc/tagsrch.txt +++ b/runtime/doc/tagsrch.txt @@ -523,8 +523,7 @@ only supported by new versions of ctags (such as Exuberant ctags). be any identifier. It cannot contain a . {TAB} One character. Note: previous versions allowed any white space here. This has been abandoned to allow spaces in - {tagfile}. It can be re-enabled by including the - |+tag_any_white| feature at compile time. *tag-any-white* + {tagfile}. {tagfile} The file that contains the definition of {tagname}. It can have an absolute or relative path. It may contain environment variables and wildcards (although the use of wildcards is diff --git a/runtime/filetype.vim b/runtime/filetype.vim index b2337aa49b..0a0973e7d3 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1,7 +1,7 @@ " Vim support file to detect file types " " Maintainer: Bram Moolenaar -" Last Change: 2019 Feb 07 +" Last Change: 2019 Mar 19 " Listen very carefully, I will say this only once if exists("did_load_filetypes") @@ -1613,6 +1613,10 @@ au BufNewFile,BufRead */etc/sysctl.conf,*/etc/sysctl.d/*.conf setf sysctl " Systemd unit files au BufNewFile,BufRead */systemd/*.{automount,mount,path,service,socket,swap,target,timer} setf systemd +" Systemd overrides +au BufNewFile,BufRead /etc/systemd/system/*.d/*.conf setf systemd +" Systemd temp files +au BufNewFile,BufRead /etc/systemd/system/*.d/.#* setf systemd " Synopsys Design Constraints au BufNewFile,BufRead *.sdc setf sdc diff --git a/runtime/ftplugin/cobol.vim b/runtime/ftplugin/cobol.vim index 11ad3ad727..d96a1bf281 100644 --- a/runtime/ftplugin/cobol.vim +++ b/runtime/ftplugin/cobol.vim @@ -1,7 +1,8 @@ " Vim filetype plugin file " Language: cobol -" Author: Tim Pope -" Last Update: By ZyX: use shiftwidth() +" Maintainer: Ankit Jain +" (formerly Tim Pope ) +" Last Update: By Ankit Jain (changed maintainer) on 22.03.2019 " Insert mode mappings: " Normal mode mappings: < > << >> [[ ]] [] ][ diff --git a/runtime/ftplugin/python.vim b/runtime/ftplugin/python.vim index 5c4a59b1a9..64c1a87a69 100644 --- a/runtime/ftplugin/python.vim +++ b/runtime/ftplugin/python.vim @@ -3,7 +3,7 @@ " Maintainer: Tom Picton " Previous Maintainer: James Sully " Previous Maintainer: Johannes Zellner -" Last Change: Sun, 15 April 2018 +" Last Change: Sun 17 Mar 2019 " https://github.com/tpict/vim-ftplugin-python if exists("b:did_ftplugin") | finish | endif @@ -37,9 +37,10 @@ setlocal suffixesadd=.py setlocal comments=b:#,fb:- setlocal commentstring=#\ %s -setlocal omnifunc=pythoncomplete#Complete if has('python3') - setlocal omnifunc=python3complete#Complete + setlocal omnifunc=python3complete#Complete +elseif has('python') + setlocal omnifunc=pythoncomplete#Complete endif set wildignore+=*.pyc @@ -53,32 +54,34 @@ let b:prev='\v^\s*(class\|def\|async def)>' let b:next_end='\v\S\n*(%$\|^(\s*\n*)*(class\|def\|async def)\|^\S)' let b:prev_end='\v\S\n*(^(\s*\n*)*(class\|def\|async def)\|^\S)' -execute "nnoremap ]] :call Python_jump('n', '". b:next_toplevel."', 'W', v:count1)" -execute "nnoremap [[ :call Python_jump('n', '". b:prev_toplevel."', 'Wb', v:count1)" -execute "nnoremap ][ :call Python_jump('n', '". b:next_endtoplevel."', 'W', 0, v:count1)" -execute "nnoremap [] :call Python_jump('n', '". b:prev_endtoplevel."', 'Wb', 0, v:count1)" -execute "nnoremap ]m :call Python_jump('n', '". b:next."', 'W', v:count1)" -execute "nnoremap [m :call Python_jump('n', '". b:prev."', 'Wb', v:count1)" -execute "nnoremap ]M :call Python_jump('n', '". b:next_end."', 'W', 0, v:count1)" -execute "nnoremap [M :call Python_jump('n', '". b:prev_end."', 'Wb', 0, v:count1)" - -execute "onoremap ]] :call Python_jump('o', '". b:next_toplevel."', 'W', v:count1)" -execute "onoremap [[ :call Python_jump('o', '". b:prev_toplevel."', 'Wb', v:count1)" -execute "onoremap ][ :call Python_jump('o', '". b:next_endtoplevel."', 'W', 0, v:count1)" -execute "onoremap [] :call Python_jump('o', '". b:prev_endtoplevel."', 'Wb', 0, v:count1)" -execute "onoremap ]m :call Python_jump('o', '". b:next."', 'W', v:count1)" -execute "onoremap [m :call Python_jump('o', '". b:prev."', 'Wb', v:count1)" -execute "onoremap ]M :call Python_jump('o', '". b:next_end."', 'W', 0, v:count1)" -execute "onoremap [M :call Python_jump('o', '". b:prev_end."', 'Wb', 0, v:count1)" - -execute "xnoremap ]] :call Python_jump('x', '". b:next_toplevel."', 'W', v:count1)" -execute "xnoremap [[ :call Python_jump('x', '". b:prev_toplevel."', 'Wb', v:count1)" -execute "xnoremap ][ :call Python_jump('x', '". b:next_endtoplevel."', 'W', 0, v:count1)" -execute "xnoremap [] :call Python_jump('x', '". b:prev_endtoplevel."', 'Wb', 0, v:count1)" -execute "xnoremap ]m :call Python_jump('x', '". b:next."', 'W', v:count1)" -execute "xnoremap [m :call Python_jump('x', '". b:prev."', 'Wb', v:count1)" -execute "xnoremap ]M :call Python_jump('x', '". b:next_end."', 'W', 0, v:count1)" -execute "xnoremap [M :call Python_jump('x', '". b:prev_end."', 'Wb', 0, v:count1)" +if !exists('g:no_plugin_maps') && !exists('g:no_python_maps') + execute "nnoremap ]] :call Python_jump('n', '". b:next_toplevel."', 'W', v:count1)" + execute "nnoremap [[ :call Python_jump('n', '". b:prev_toplevel."', 'Wb', v:count1)" + execute "nnoremap ][ :call Python_jump('n', '". b:next_endtoplevel."', 'W', v:count1, 0)" + execute "nnoremap [] :call Python_jump('n', '". b:prev_endtoplevel."', 'Wb', v:count1, 0)" + execute "nnoremap ]m :call Python_jump('n', '". b:next."', 'W', v:count1)" + execute "nnoremap [m :call Python_jump('n', '". b:prev."', 'Wb', v:count1)" + execute "nnoremap ]M :call Python_jump('n', '". b:next_end."', 'W', v:count1, 0)" + execute "nnoremap [M :call Python_jump('n', '". b:prev_end."', 'Wb', v:count1, 0)" + + execute "onoremap ]] :call Python_jump('o', '". b:next_toplevel."', 'W', v:count1)" + execute "onoremap [[ :call Python_jump('o', '". b:prev_toplevel."', 'Wb', v:count1)" + execute "onoremap ][ :call Python_jump('o', '". b:next_endtoplevel."', 'W', v:count1, 0)" + execute "onoremap [] :call Python_jump('o', '". b:prev_endtoplevel."', 'Wb', v:count1, 0)" + execute "onoremap ]m :call Python_jump('o', '". b:next."', 'W', v:count1)" + execute "onoremap [m :call Python_jump('o', '". b:prev."', 'Wb', v:count1)" + execute "onoremap ]M :call Python_jump('o', '". b:next_end."', 'W', v:count1, 0)" + execute "onoremap [M :call Python_jump('o', '". b:prev_end."', 'Wb', v:count1, 0)" + + execute "xnoremap ]] :call Python_jump('x', '". b:next_toplevel."', 'W', v:count1)" + execute "xnoremap [[ :call Python_jump('x', '". b:prev_toplevel."', 'Wb', v:count1)" + execute "xnoremap ][ :call Python_jump('x', '". b:next_endtoplevel."', 'W', v:count1, 0)" + execute "xnoremap [] :call Python_jump('x', '". b:prev_endtoplevel."', 'Wb', v:count1, 0)" + execute "xnoremap ]m :call Python_jump('x', '". b:next."', 'W', v:count1)" + execute "xnoremap [m :call Python_jump('x', '". b:prev."', 'Wb', v:count1)" + execute "xnoremap ]M :call Python_jump('x', '". b:next_end."', 'W', v:count1, 0)" + execute "xnoremap [M :call Python_jump('x', '". b:prev_end."', 'Wb', v:count1, 0)" +endif if !exists('*Python_jump') fun! Python_jump(mode, motion, flags, count, ...) range @@ -123,10 +126,80 @@ if !exists('g:pydoc_executable') let g:pydoc_executable = 0 endif endif + +" Windows-specific pydoc setup +if has('win32') || has('win64') + if executable('python') + " available as Tools\scripts\pydoc.py + let g:pydoc_executable = 1 + else + let g:pydoc_executable = 0 + endif +endif + " If "pydoc" was found use it for keywordprg. if g:pydoc_executable - setlocal keywordprg=pydoc + if has('win32') || has('win64') + setlocal keywordprg=python\ -m\ pydoc\ + else + setlocal keywordprg=pydoc + endif endif +" Script for filetype switching to undo the local stuff we may have changed +let b:undo_ftplugin = 'setlocal cinkeys<' + \ . '|setlocal comments<' + \ . '|setlocal commentstring<' + \ . '|setlocal expandtab<' + \ . '|setlocal include<' + \ . '|setlocal includeexpr<' + \ . '|setlocal indentkeys<' + \ . '|setlocal keywordprg<' + \ . '|setlocal omnifunc<' + \ . '|setlocal shiftwidth<' + \ . '|setlocal softtabstop<' + \ . '|setlocal suffixesadd<' + \ . '|setlocal tabstop<' + \ . '|silent! nunmap [M' + \ . '|silent! nunmap [[' + \ . '|silent! nunmap []' + \ . '|silent! nunmap [m' + \ . '|silent! nunmap ]M' + \ . '|silent! nunmap ][' + \ . '|silent! nunmap ]]' + \ . '|silent! nunmap ]m' + \ . '|silent! ounmap [M' + \ . '|silent! ounmap [[' + \ . '|silent! ounmap []' + \ . '|silent! ounmap [m' + \ . '|silent! ounmap ]M' + \ . '|silent! ounmap ][' + \ . '|silent! ounmap ]]' + \ . '|silent! ounmap ]m' + \ . '|silent! xunmap [M' + \ . '|silent! xunmap [[' + \ . '|silent! xunmap []' + \ . '|silent! xunmap [m' + \ . '|silent! xunmap ]M' + \ . '|silent! xunmap ][' + \ . '|silent! xunmap ]]' + \ . '|silent! xunmap ]m' + \ . '|unlet! b:browsefilter' + \ . '|unlet! b:child_match' + \ . '|unlet! b:child_sub' + \ . '|unlet! b:grandparent_match' + \ . '|unlet! b:grandparent_sub' + \ . '|unlet! b:next' + \ . '|unlet! b:next_end' + \ . '|unlet! b:next_endtoplevel' + \ . '|unlet! b:next_toplevel' + \ . '|unlet! b:parent_match' + \ . '|unlet! b:parent_sub' + \ . '|unlet! b:prev' + \ . '|unlet! b:prev_end' + \ . '|unlet! b:prev_endtoplevel' + \ . '|unlet! b:prev_toplevel' + \ . '|unlet! b:undo_ftplugin' + let &cpo = s:keepcpo unlet s:keepcpo diff --git a/runtime/indent/cobol.vim b/runtime/indent/cobol.vim index c08444ac40..590a729df4 100644 --- a/runtime/indent/cobol.vim +++ b/runtime/indent/cobol.vim @@ -1,7 +1,12 @@ " Vim indent file " Language: cobol -" Author: Tim Pope +" Maintainer: Ankit Jain +" (formerly Tim Pope ) " $Id: cobol.vim,v 1.1 2007/05/05 18:08:19 vimboss Exp $ +" Last Update: By Ankit Jain on 22.03.2019 +" Ankit Jain 22.03.2019 Changes & fixes: +" Allow chars in 1st 6 columns +" #C22032019 if exists("b:did_indent") finish @@ -66,7 +71,9 @@ function! GetCobolIndent(lnum) abort let ashft = minshft + 1 let bshft = ashft + 4 " (Obsolete) numbered lines - if getline(a:lnum) =~? '^\s*\d\{6\}\%($\|[ */$CD-]\)' + " #C22032019: Columns 1-6 could have alphabets as well as numbers + "if getline(a:lnum) =~? '^\s*\d\{6\}\%($\|[ */$CD-]\)' + if getline(a:lnum) =~? '^\s*[a-zA-Z0-9]\{6\}\%($\|[ */$CD-]\)' return 0 endif let cline = s:stripped(a:lnum) diff --git a/runtime/indent/html.vim b/runtime/indent/html.vim index 1a8177050a..1d2043ae9e 100644 --- a/runtime/indent/html.vim +++ b/runtime/indent/html.vim @@ -2,7 +2,7 @@ " Header: "{{{ " Maintainer: Bram Moolenaar " Original Author: Andy Wokula -" Last Change: 2018 Mar 28 +" Last Change: 2019 Mar 20 " Version: 1.0 " Description: HTML indent script with cached state for faster indenting on a " range of lines. @@ -902,12 +902,19 @@ func! s:InsideTag(foundHtmlString) "{{{ if a:foundHtmlString " Inside an attribute string. - " Align with the previous line or use an external function. + " Align with the opening quote or use an external function. let lnum = v:lnum - 1 if lnum > 1 if exists('b:html_indent_tag_string_func') return b:html_indent_tag_string_func(lnum) endif + " If there is a double quote in the previous line, indent with the + " character after it. + if getline(lnum) =~ '"' + call cursor(lnum, 0) + normal f" + return virtcol('.') + endif return indent(lnum) endif endif diff --git a/runtime/indent/sh.vim b/runtime/indent/sh.vim index c93be31958..0396b4eb94 100644 --- a/runtime/indent/sh.vim +++ b/runtime/indent/sh.vim @@ -7,6 +7,8 @@ " License: Vim (see :h license) " Repository: https://github.com/chrisbra/vim-sh-indent " Changelog: +" 20190316 - Make use of searchpairpos for nested if sections +" fixes #11 " 20190201 - Better check for closing if sections " 20180724 - make check for zsh syntax more rigid (needs word-boundaries) " 20180326 - better support for line continuation @@ -115,7 +117,7 @@ function! GetShIndent() " Current line is a endif line, so get indent from start of "if condition" line " TODO: should we do the same for other "end" lines? if curline =~ '^\s*\%(fi\)\s*\%(#.*\)\=$' - let previous_line = search('if.\{-\};\s*then\s*\%(#.*\)\=$', 'bnW') + let previous_line = searchpair('\', '', '\', 'bnW') if previous_line > 0 let ind = indent(previous_line) endif diff --git a/runtime/indent/testdir/html.ok b/runtime/indent/testdir/html.ok index 524d57bb6c..ad819333cc 100644 --- a/runtime/indent/testdir/html.ok +++ b/runtime/indent/testdir/html.ok @@ -9,17 +9,17 @@
+ class="foo bar"> text
+ data="something"> text
+ bar"> text
diff --git a/runtime/indent/testdir/xml.ok b/runtime/indent/testdir/xml.ok index 529198572a..cfdf701c11 100644 --- a/runtime/indent/testdir/xml.ok +++ b/runtime/indent/testdir/xml.ok @@ -10,11 +10,11 @@ diff --git a/runtime/indent/xml.vim b/runtime/indent/xml.vim index 29069bab84..ad22de1d50 100644 --- a/runtime/indent/xml.vim +++ b/runtime/indent/xml.vim @@ -1,9 +1,11 @@ " Language: xml " Repository: https://github.com/chrisbra/vim-xml-ftplugin -" Last Changed: Jan 28, 2019 +" Last Changed: Feb 04, 2019 " Maintainer: Christian Brabandt " Previous Maintainer: Johannes Zellner " Last Change: +" 20190204 - correctly handle wrap tags +" https://github.com/chrisbra/vim-xml-ftplugin/issues/5 " 20190128 - Make sure to find previous tag " https://github.com/chrisbra/vim-xml-ftplugin/issues/4 " 20181116 - Fix indentation when tags start with a colon or an underscore @@ -74,13 +76,20 @@ fun! XmlIndentSynCheck(lnum) endfun " [-- return the sum of indents of a:lnum --] -fun! XmlIndentSum(lnum, style, add) - let line = getline(a:lnum) - if a:style == match(line, '^\s*XmlIndentSum(line, style, add) + if IsXMLContinuation(a:line) && a:style == 0 + " no complete tag, add one additional indent level + " but only for the current line + return a:add + shiftwidth() + elseif HasNoTagEnd(a:line) + " no complete tag, return initial indent + return a:add + endif + if a:style == match(a:line, '^\s*XmlIndentWithPattern(line, b:xml_indent_open) - \ - XmlIndentWithPattern(line, b:xml_indent_close) - \ - XmlIndentWithPattern(line, '.\{-}/>'))) + a:add + \ (XmlIndentWithPattern(a:line, b:xml_indent_open) + \ - XmlIndentWithPattern(a:line, b:xml_indent_close) + \ - XmlIndentWithPattern(a:line, '.\{-}/>'))) + a:add else return a:add endif @@ -89,19 +98,24 @@ endfun " Main indent function fun! XmlIndentGet(lnum, use_syntax_check) " Find a non-empty line above the current line. - let plnum = prevnonblank(a:lnum - 1) - " Hit the start of the file, use zero indent. - if plnum == 0 + if prevnonblank(a:lnum - 1) == 0 + " Hit the start of the file, use zero indent. return 0 endif " Find previous line with a tag (regardless whether open or closed, " but always start restrict the match to a line before the current one + " Note: xml declaration: + " won't be found, as it is not a legal tag name let ptag_pattern = '\%(.\{-}<[/:A-Z_a-z]\)'. '\%(\&\%<'. line('.').'l\)' - let ptag = search(ptag_pattern, 'bnw') + let ptag = search(ptag_pattern, 'bnW') + " no previous tag + if ptag == 0 + return 0 + endif let syn_name = '' if a:use_syntax_check - let check_lnum = XmlIndentSynCheck(plnum) + let check_lnum = XmlIndentSynCheck(ptag) let check_alnum = XmlIndentSynCheck(a:lnum) if check_lnum == 0 || check_alnum == 0 return indent(a:lnum) @@ -113,18 +127,31 @@ fun! XmlIndentGet(lnum, use_syntax_check) return XmlIndentComment(a:lnum) endif + let pline = getline(ptag) + let pind = indent(ptag) " Get indent from previous tag line - let ind = XmlIndentSum(ptag, -1, indent(ptag)) + let ind = XmlIndentSum(pline, -1, pind) + let t_ind = ind " Determine indent from current line - let ind = XmlIndentSum(a:lnum, 0, ind) + let ind = XmlIndentSum(getline(a:lnum), 0, ind) return ind endfun +func! IsXMLContinuation(line) + " Checks, whether or not the line matches a start-of-tag + return a:line !~ '^\s*<' +endfunc + +func! HasNoTagEnd(line) + " Checks whether or not the line matches '>' (so finishes a tag) + return a:line !~ '>\s*$' +endfunc + " return indent for a commented line, " the middle part might be indented on additional level func! XmlIndentComment(lnum) - let ptagopen = search(b:xml_indent_open, 'bnw') - let ptagclose = search(b:xml_indent_close, 'bnw') + let ptagopen = search(b:xml_indent_open, 'bnW') + let ptagclose = search(b:xml_indent_close, 'bnW') if getline(a:lnum) =~ '' " end of comment, same as start of comment - return indent(search('