Skip to content

Commit 96f45c0

Browse files
committed
Update runtime files
1 parent 8fc4296 commit 96f45c0

46 files changed

Lines changed: 9583 additions & 1074 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

READMEdir/README_os390.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Getting the source to z/OS:
1111

1212
First get the source code in one big tar file and ftp it a binary to z/OS. If
1313
the tar file is initially compressed with gzip (tar.gz) or bzip2 (tar.bz2)
14-
uncompress it on your PC, as this tools are (most likely) not available on the
15-
mainframe.
14+
uncompress it on your PC, as these tools are (most likely) not available on
15+
the mainframe.
1616

1717
To reduce the size of the tar file you might compress it into a zip file. On
1818
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.
8282

8383
There are two ways for building VIM with X11 support. The first way is simple
8484
and results in a big executable (~13 Mb), the second needs a few additional
85-
steps and results in a much smaller executable (~4.5 Mb). This examples assume
86-
you want Motif.
85+
steps and results in a much smaller executable (~4.5 Mb). These examples
86+
assume you want Motif.
8787

8888
The easy way:
8989
$ export CC=cc

runtime/autoload/xmlformat.vim

Lines changed: 94 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" Vim plugin for formatting XML
2-
" Last Change: Thu, 07 Dec 2018
3-
" Version: 0.1
2+
" Last Change: 2019 Oct 24
3+
" Version: 0.2
44
" Author: Christian Brabandt <[email protected]>
55
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
66
" License: VIM License
@@ -22,44 +22,73 @@ func! xmlformat#Format()
2222
" do not fall back to internal formatting
2323
return 0
2424
endif
25+
let count_orig = v:count
2526
let sw = shiftwidth()
2627
let prev = prevnonblank(v:lnum-1)
2728
let s:indent = indent(prev)/sw
2829
let result = []
2930
let lastitem = prev ? getline(prev) : ''
3031
let is_xml_decl = 0
31-
" split on `<`, but don't split on very first opening <
32-
for item in split(join(getline(v:lnum, (v:lnum + v:count - 1))), '.\@<=[>]\zs')
33-
if s:EndTag(item)
34-
let s:indent = s:DecreaseIndent()
35-
call add(result, s:Indent(item))
36-
elseif s:EmptyTag(lastitem)
37-
call add(result, s:Indent(item))
38-
elseif s:StartTag(lastitem) && s:IsTag(item)
39-
let s:indent += 1
40-
call add(result, s:Indent(item))
41-
else
42-
if !s:IsTag(item)
43-
" Simply split on '<'
44-
let t=split(item, '.<\@=\zs')
45-
let s:indent+=1
46-
call add(result, s:Indent(t[0]))
47-
let s:indent = s:DecreaseIndent()
48-
call add(result, s:Indent(t[1]))
49-
else
32+
" go through every line, but don't join all content together and join it
33+
" back. We might lose empty lines
34+
let list = getline(v:lnum, (v:lnum + count_orig - 1))
35+
let current = 0
36+
for line in list
37+
" Keep empty input lines?
38+
if empty(line)
39+
call add(result, '')
40+
continue
41+
elseif line !~# '<[/]\?[^>]*>'
42+
let nextmatch = match(list, '<[/]\?[^>]*>', current)
43+
let line .= join(list[(current + 1):(nextmatch-1)], "\n")
44+
call remove(list, current+1, nextmatch-1)
45+
endif
46+
" split on `>`, but don't split on very first opening <
47+
" this means, items can be like ['<tag>', 'tag content</tag>']
48+
for item in split(line, '.\@<=[>]\zs')
49+
if s:EndTag(item)
50+
let s:indent = s:DecreaseIndent()
51+
call add(result, s:Indent(item))
52+
elseif s:EmptyTag(lastitem)
53+
call add(result, s:Indent(item))
54+
elseif s:StartTag(lastitem) && s:IsTag(item)
55+
let s:indent += 1
5056
call add(result, s:Indent(item))
57+
else
58+
if !s:IsTag(item)
59+
" Simply split on '<', if there is one,
60+
" but reformat according to &textwidth
61+
let t=split(item, '.<\@=\zs')
62+
" t should only contain 2 items, but just be safe here
63+
if s:IsTag(lastitem)
64+
let s:indent+=1
65+
endif
66+
let result+=s:FormatContent([t[0]])
67+
if s:EndTag(t[1])
68+
let s:indent = s:DecreaseIndent()
69+
endif
70+
"for y in t[1:]
71+
let result+=s:FormatContent(t[1:])
72+
"endfor
73+
else
74+
call add(result, s:Indent(item))
75+
endif
5176
endif
52-
endif
53-
let lastitem = item
54-
endfor
77+
let lastitem = item
78+
endfor
79+
let current += 1
80+
endfor
5581

56-
if !empty(result)
57-
exe v:lnum. ",". (v:lnum + v:count - 1). 'd'
82+
if !empty(result)
83+
let lastprevline = getline(v:lnum + count_orig)
84+
let delete_lastline = v:lnum + count_orig - 1 == line('$')
85+
exe v:lnum. ",". (v:lnum + count_orig - 1). 'd'
5886
call append(v:lnum - 1, result)
5987
" Might need to remove the last line, if it became empty because of the
6088
" append() call
6189
let last = v:lnum + len(result)
62-
if getline(last) is ''
90+
" do not use empty(), it returns true for `empty(0)`
91+
if getline(last) is '' && lastprevline is '' && delete_lastline
6392
exe last. 'd'
6493
endif
6594
endif
@@ -88,6 +117,7 @@ func! s:StartTag(tag)
88117
let is_comment = s:IsComment(a:tag)
89118
return a:tag =~? '^\s*<[^/?]' && !is_comment
90119
endfunc
120+
" Check if tag is a Comment start {{{1
91121
func! s:IsComment(tag)
92122
return a:tag =~? '<!--'
93123
endfunc
@@ -108,6 +138,43 @@ endfunc
108138
func! s:EmptyTag(tag)
109139
return a:tag =~ '/>\s*$'
110140
endfunc
141+
" Format input line according to textwidth {{{1
142+
func! s:FormatContent(list)
143+
let result=[]
144+
let limit = 80
145+
if &textwidth > 0
146+
let limit = &textwidth
147+
endif
148+
let column=0
149+
let idx = -1
150+
let add_indent = 0
151+
let cnt = 0
152+
for item in a:list
153+
for word in split(item, '\s\+\S\+\zs')
154+
let column += strdisplaywidth(word, column)
155+
if match(word, "^\\s*\n\\+\\s*$") > -1
156+
call add(result, '')
157+
let idx += 1
158+
let column = 0
159+
let add_indent = 1
160+
elseif column > limit || cnt == 0
161+
let add = s:Indent(s:Trim(word))
162+
call add(result, add)
163+
let column = strdisplaywidth(add)
164+
let idx += 1
165+
else
166+
if add_indent
167+
let result[idx] = s:Indent(s:Trim(word))
168+
else
169+
let result[idx] .= ' '. s:Trim(word)
170+
endif
171+
let add_indent = 0
172+
endif
173+
let cnt += 1
174+
endfor
175+
endfor
176+
return result
177+
endfunc
111178
" Restoration And Modelines: {{{1
112179
let &cpo= s:keepcpo
113180
unlet s:keepcpo

runtime/doc/eval.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 8.1. Last change: 2019 Oct 13
1+
*eval.txt* For Vim version 8.1. Last change: 2019 Oct 26
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4242,8 +4242,8 @@ expandcmd({expr}) *expandcmd()*
42424242
Expand special items in {expr} like what is done for an Ex
42434243
command such as `:edit`. This expands special keywords, like
42444244
with |expand()|, and environment variables, anywhere in
4245-
{expr}. Returns the expanded string.
4246-
Example: >
4245+
{expr}. "~user" and "~/path" are only expanded at the start.
4246+
Returns the expanded string. Example: >
42474247
:echo expandcmd('make %<.o')
42484248
42494249
< Can also be used as a |method|: >
@@ -6492,8 +6492,8 @@ listener_add({callback} [, {buf}]) *listener_add()*
64926492
a:bufnr the buffer that was changed
64936493
a:start first changed line number
64946494
a:end first line number below the change
6495-
a:added total number of lines added, negative if lines
6496-
were deleted
6495+
a:added number of lines added, negative if lines were
6496+
deleted
64976497
a:changes a List of items with details about the changes
64986498

64996499
Example: >
@@ -7506,7 +7506,7 @@ pum_getpos() *pum_getpos()*
75067506
row top screen row (0 first row)
75077507
col leftmost screen column (0 first col)
75087508
size total nr of items
7509-
scrollbar |TRUE| if visible
7509+
scrollbar |TRUE| if scrollbar is visible
75107510

75117511
The values are the same as in |v:event| during
75127512
|CompleteChanged|.

runtime/doc/helphelp.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*helphelp.txt* For Vim version 8.1. Last change: 2019 May 04
1+
*helphelp.txt* For Vim version 8.1. Last change: 2019 Oct 18
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -102,7 +102,11 @@ Help on help files *helphelp*
102102
current file. See |help-translated|.
103103

104104
*:helpc* *:helpclose*
105-
:helpc[lose] Close one help window, if there is one.
105+
:helpc[lose] Close one help window, if there is one.
106+
Vim will try to restore the window layout (including
107+
cursor position) to the same layout it was before
108+
opening the help window initially. This might cause
109+
triggering several autocommands.
106110

107111
*:helpg* *:helpgrep*
108112
:helpg[rep] {pattern}[@xx]

runtime/doc/map.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*map.txt* For Vim version 8.1. Last change: 2019 Jun 02
1+
*map.txt* For Vim version 8.1. Last change: 2019 Oct 20
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar

runtime/doc/message.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*message.txt* For Vim version 8.1. Last change: 2019 Aug 23
1+
*message.txt* For Vim version 8.1. Last change: 2019 Oct 19
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar

runtime/doc/options.txt

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 8.1. Last change: 2019 Oct 20
1+
*options.txt* For Vim version 8.1. Last change: 2019 Oct 26
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -6497,10 +6497,10 @@ A jump table for the options with a short description can be found at |Q_op|.
64976497
For Unix the default it "| tee". The stdout of the compiler is saved
64986498
in a file and echoed to the screen. If the 'shell' option is "csh" or
64996499
"tcsh" after initializations, the default becomes "|& tee". If the
6500-
'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh" or "bash" the
6501-
default becomes "2>&1| tee". This means that stderr is also included.
6502-
Before using the 'shell' option a path is removed, thus "/bin/sh" uses
6503-
"sh".
6500+
'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", "zsh-beta",
6501+
"bash" or "fish" the default becomes "2>&1| tee". This means that
6502+
stderr is also included. Before using the 'shell' option a path is
6503+
removed, thus "/bin/sh" uses "sh".
65046504
The initialization of this option is done after reading the ".vimrc"
65056505
and the other initializations, so that when the 'shell' option is set
65066506
there, the 'shellpipe' option changes automatically, unless it was
@@ -6540,13 +6540,14 @@ A jump table for the options with a short description can be found at |Q_op|.
65406540
The name of the temporary file can be represented by "%s" if necessary
65416541
(the file name is appended automatically if no %s appears in the value
65426542
of this option).
6543-
The default is ">". For Unix, if the 'shell' option is "csh", "tcsh"
6544-
or "zsh" during initializations, the default becomes ">&". If the
6545-
'shell' option is "sh", "ksh" or "bash" the default becomes
6546-
">%s 2>&1". This means that stderr is also included.
6547-
For Win32, the Unix checks are done and additionally "cmd" is checked
6548-
for, which makes the default ">%s 2>&1". Also, the same names with
6549-
".exe" appended are checked for.
6543+
The default is ">". For Unix, if the 'shell' option is "csh" or
6544+
"tcsh" during initializations, the default becomes ">&". If the
6545+
'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh",
6546+
"zsh-beta","bash" or "fish", the default becomes ">%s 2>&1". This
6547+
means that stderr is also included. For Win32, the Unix checks are
6548+
done and additionally "cmd" is checked for, which makes the default
6549+
">%s 2>&1". Also, the same names with ".exe" appended are checked
6550+
for.
65506551
The initialization of this option is done after reading the ".vimrc"
65516552
and the other initializations, so that when the 'shell' option is set
65526553
there, the 'shellredir' option changes automatically unless it was

runtime/doc/popup.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*popup.txt* For Vim version 8.1. Last change: 2019 Sep 25
1+
*popup.txt* For Vim version 8.1. Last change: 2019 Oct 20
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -305,16 +305,16 @@ popup_findinfo() *popup_findinfo()*
305305
Get the |window-ID| for the popup info window, as it used by
306306
the popup menu. See |complete-popup|. The info popup is
307307
hidden when not used, it can be deleted with |popup_clear()|
308-
and |popup_close()|.
309-
Return zero if there is none.
308+
and |popup_close()|. Use |popup_show()| to reposition it to
309+
the item in the popup menu.
310+
Returns zero if there is none.
310311

311312

312313
popup_findpreview() *popup_findpreview()*
313314
Get the |window-ID| for the popup preview window.
314315
Return zero if there is none.
315316

316317

317-
318318
popup_getoptions({id}) *popup_getoptions()*
319319
Return the {options} for popup {id} in a Dict.
320320
A zero value means the option was not set. For "zindex" the

runtime/doc/quickfix.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*quickfix.txt* For Vim version 8.1. Last change: 2019 Aug 06
1+
*quickfix.txt* For Vim version 8.1. Last change: 2019 Oct 22
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -486,7 +486,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
486486
etc.
487487
< When the current file can't be |abandon|ed and the [!]
488488
is not present, the command fails.
489-
When an error is detected execution stops.
489+
When going to the next entry fails execution stops.
490490
The last buffer (or where an error occurred) becomes
491491
the current buffer.
492492
{cmd} can contain '|' to concatenate several commands.

runtime/doc/syntax.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,6 +1158,26 @@ startup vimrc: >
11581158
:let filetype_w = "cweb"
11591159
11601160
1161+
DART *dart.vim* *ft-dart-syntax*
1162+
1163+
Dart is an object-oriented, typed, class defined, garbage collected language
1164+
used for developing mobile, desktop, web, and back-end applications. Dart uses
1165+
a C-like syntax derived from C, Java, and JavaScript, with features adopted
1166+
from Smalltalk, Python, Ruby, and others.
1167+
1168+
More information about the language and its development environment at the
1169+
official Dart language website at https://dart.dev
1170+
1171+
dart.vim syntax detects and highlights Dart statements, reserved words,
1172+
type declarations, storage classes, conditionals, loops, interpolated values,
1173+
and comments. There is no support idioms from Flutter or any other Dart
1174+
framework.
1175+
1176+
Changes, fixes? Submit an issue or pull request via:
1177+
1178+
https://github.com/pr3d4t0r/dart-vim-syntax/
1179+
1180+
11611181
DESKTOP *desktop.vim* *ft-desktop-syntax*
11621182

11631183
Primary goal of this syntax file is to highlight .desktop and .directory files

0 commit comments

Comments
 (0)