From 96f45c0b6fc9e9d404e6805593ed1e0e6795e470 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 26 Oct 2019 19:53:45 +0200 Subject: Update runtime files --- READMEdir/README_os390.txt | 8 +- runtime/autoload/xmlformat.vim | 121 +- runtime/doc/eval.txt | 12 +- runtime/doc/helphelp.txt | 8 +- runtime/doc/map.txt | 2 +- runtime/doc/message.txt | 2 +- runtime/doc/options.txt | 25 +- runtime/doc/popup.txt | 8 +- runtime/doc/quickfix.txt | 4 +- runtime/doc/syntax.txt | 20 + runtime/doc/tags | 7 + runtime/doc/terminal.txt | 2 +- runtime/doc/textprop.txt | 15 +- runtime/doc/todo.txt | 47 +- runtime/doc/various.txt | 4 +- runtime/doc/windows.txt | 5 +- runtime/filetype.vim | 2 +- runtime/ftplugin/meson.vim | 19 + runtime/gvim.desktop | 5 +- runtime/indent/meson.vim | 180 + runtime/indent/sh.vim | 6 +- runtime/indent/typescript.vim | 4 +- runtime/indent/xml.vim | 10 +- runtime/lang/menu_tr.latin1.vim | 3 + runtime/lang/menu_tr.utf-8.vim | 3 + runtime/lang/menu_tr_tr.latin1.vim | 332 + runtime/lang/menu_tr_tr.utf-8.vim | 331 + runtime/pack/dist/opt/matchit/autoload/matchit.vim | 10 +- runtime/pack/dist/opt/matchit/doc/matchit.txt | 8 +- runtime/pack/dist/opt/matchit/plugin/matchit.vim | 16 +- runtime/syntax/dart.vim | 90 + runtime/syntax/dtd.vim | 13 +- runtime/syntax/meson.vim | 165 + runtime/syntax/xml.vim | 36 +- runtime/syntax/zsh.vim | 11 +- runtime/tutor/tutor.tr.iso9 | 1004 +-- runtime/tutor/tutor.zh.big5 | 62 +- runtime/tutor/tutor.zh.utf-8 | 2 +- runtime/tutor/tutor.zh_tw.utf-8 | 2 +- runtime/vim.desktop | 5 +- src/INSTALLvms.txt | 2 +- src/po/Make_all.mak | 4 + src/po/de.po | 768 ++- src/po/gvim.desktop.in | 1 - src/po/tr.po | 7272 ++++++++++++++++++++ src/po/vim.desktop.in | 1 - 46 files changed, 9583 insertions(+), 1074 deletions(-) create mode 100644 runtime/ftplugin/meson.vim create mode 100644 runtime/indent/meson.vim create mode 100644 runtime/lang/menu_tr.latin1.vim create mode 100644 runtime/lang/menu_tr.utf-8.vim create mode 100644 runtime/lang/menu_tr_tr.latin1.vim create mode 100644 runtime/lang/menu_tr_tr.utf-8.vim create mode 100644 runtime/syntax/dart.vim create mode 100644 runtime/syntax/meson.vim create mode 100644 src/po/tr.po diff --git a/READMEdir/README_os390.txt b/READMEdir/README_os390.txt index 8aa33ae880..e0a0bdb6ba 100644 --- a/READMEdir/README_os390.txt +++ b/READMEdir/README_os390.txt @@ -11,8 +11,8 @@ Getting the source to z/OS: First get the source code in one big tar file and ftp it a binary to z/OS. If the tar file is initially compressed with gzip (tar.gz) or bzip2 (tar.bz2) -uncompress it on your PC, as this tools are (most likely) not available on the -mainframe. +uncompress it on your PC, as these tools are (most likely) not available on +the mainframe. To reduce the size of the tar file you might compress it into a zip file. On z/OS Unix you might have the command "jar" from java to uncompress a zip. Use: @@ -82,8 +82,8 @@ WARNING: This instruction was not tested with Vim 7.4 or later. There are two ways for building VIM with X11 support. The first way is simple and results in a big executable (~13 Mb), the second needs a few additional -steps and results in a much smaller executable (~4.5 Mb). This examples assume -you want Motif. +steps and results in a much smaller executable (~4.5 Mb). These examples +assume you want Motif. The easy way: $ export CC=cc diff --git a/runtime/autoload/xmlformat.vim b/runtime/autoload/xmlformat.vim index ea89401977..30b09f1261 100644 --- a/runtime/autoload/xmlformat.vim +++ b/runtime/autoload/xmlformat.vim @@ -1,6 +1,6 @@ " Vim plugin for formatting XML -" Last Change: Thu, 07 Dec 2018 -" Version: 0.1 +" Last Change: 2019 Oct 24 +" Version: 0.2 " Author: Christian Brabandt " Repository: https://github.com/chrisbra/vim-xml-ftplugin " License: VIM License @@ -22,44 +22,73 @@ func! xmlformat#Format() " do not fall back to internal formatting return 0 endif + let count_orig = v:count let sw = shiftwidth() let prev = prevnonblank(v:lnum-1) let s:indent = indent(prev)/sw let result = [] let lastitem = prev ? getline(prev) : '' let is_xml_decl = 0 - " split on `<`, but don't split on very first opening < - for item in split(join(getline(v:lnum, (v:lnum + v:count - 1))), '.\@<=[>]\zs') - if s:EndTag(item) - let s:indent = s:DecreaseIndent() - call add(result, s:Indent(item)) - elseif s:EmptyTag(lastitem) - call add(result, s:Indent(item)) - elseif s:StartTag(lastitem) && s:IsTag(item) - let s:indent += 1 - call add(result, s:Indent(item)) - else - if !s:IsTag(item) - " Simply split on '<' - let t=split(item, '.<\@=\zs') - let s:indent+=1 - call add(result, s:Indent(t[0])) - let s:indent = s:DecreaseIndent() - call add(result, s:Indent(t[1])) - else + " go through every line, but don't join all content together and join it + " back. We might lose empty lines + let list = getline(v:lnum, (v:lnum + count_orig - 1)) + let current = 0 + for line in list + " Keep empty input lines? + if empty(line) + call add(result, '') + continue + elseif line !~# '<[/]\?[^>]*>' + let nextmatch = match(list, '<[/]\?[^>]*>', current) + let line .= join(list[(current + 1):(nextmatch-1)], "\n") + call remove(list, current+1, nextmatch-1) + endif + " split on `>`, but don't split on very first opening < + " this means, items can be like ['', 'tag content'] + for item in split(line, '.\@<=[>]\zs') + if s:EndTag(item) + let s:indent = s:DecreaseIndent() + call add(result, s:Indent(item)) + elseif s:EmptyTag(lastitem) + call add(result, s:Indent(item)) + elseif s:StartTag(lastitem) && s:IsTag(item) + let s:indent += 1 call add(result, s:Indent(item)) + else + if !s:IsTag(item) + " Simply split on '<', if there is one, + " but reformat according to &textwidth + let t=split(item, '.<\@=\zs') + " t should only contain 2 items, but just be safe here + if s:IsTag(lastitem) + let s:indent+=1 + endif + let result+=s:FormatContent([t[0]]) + if s:EndTag(t[1]) + let s:indent = s:DecreaseIndent() + endif + "for y in t[1:] + let result+=s:FormatContent(t[1:]) + "endfor + else + call add(result, s:Indent(item)) + endif endif - endif - let lastitem = item - endfor + let lastitem = item + endfor + let current += 1 + endfor - if !empty(result) - exe v:lnum. ",". (v:lnum + v:count - 1). 'd' + if !empty(result) + let lastprevline = getline(v:lnum + count_orig) + let delete_lastline = v:lnum + count_orig - 1 == line('$') + exe v:lnum. ",". (v:lnum + count_orig - 1). 'd' call append(v:lnum - 1, result) " Might need to remove the last line, if it became empty because of the " append() call let last = v:lnum + len(result) - if getline(last) is '' + " do not use empty(), it returns true for `empty(0)` + if getline(last) is '' && lastprevline is '' && delete_lastline exe last. 'd' endif endif @@ -88,6 +117,7 @@ func! s:StartTag(tag) let is_comment = s:IsComment(a:tag) return a:tag =~? '^\s*<[^/?]' && !is_comment endfunc +" Check if tag is a Comment start {{{1 func! s:IsComment(tag) return a:tag =~? '