Skip to content

Commit

Permalink
Update runtime files
Browse files Browse the repository at this point in the history
  • Loading branch information
brammool committed Oct 26, 2019
1 parent 8fc4296 commit 96f45c0
Show file tree
Hide file tree
Showing 46 changed files with 9,583 additions and 1,074 deletions.
8 changes: 4 additions & 4 deletions READMEdir/README_os390.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
121 changes: 94 additions & 27 deletions runtime/autoload/xmlformat.vim
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
" License: VIM License
Expand All @@ -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>', 'tag content</tag>']
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
Expand Down Expand Up @@ -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 =~? '<!--'
endfunc
Expand All @@ -108,6 +138,43 @@ endfunc
func! s:EmptyTag(tag)
return a:tag =~ '/>\s*$'
endfunc
" Format input line according to textwidth {{{1
func! s:FormatContent(list)
let result=[]
let limit = 80
if &textwidth > 0
let limit = &textwidth
endif
let column=0
let idx = -1
let add_indent = 0
let cnt = 0
for item in a:list
for word in split(item, '\s\+\S\+\zs')
let column += strdisplaywidth(word, column)
if match(word, "^\\s*\n\\+\\s*$") > -1
call add(result, '')
let idx += 1
let column = 0
let add_indent = 1
elseif column > limit || cnt == 0
let add = s:Indent(s:Trim(word))
call add(result, add)
let column = strdisplaywidth(add)
let idx += 1
else
if add_indent
let result[idx] = s:Indent(s:Trim(word))
else
let result[idx] .= ' '. s:Trim(word)
endif
let add_indent = 0
endif
let cnt += 1
endfor
endfor
return result
endfunc
" Restoration And Modelines: {{{1
let &cpo= s:keepcpo
unlet s:keepcpo
Expand Down
12 changes: 6 additions & 6 deletions runtime/doc/eval.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*eval.txt* For Vim version 8.1. Last change: 2019 Oct 13
*eval.txt* For Vim version 8.1. Last change: 2019 Oct 26


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

Example: >
Expand Down Expand Up @@ -7506,7 +7506,7 @@ pum_getpos() *pum_getpos()*
row top screen row (0 first row)
col leftmost screen column (0 first col)
size total nr of items
scrollbar |TRUE| if visible
scrollbar |TRUE| if scrollbar is visible

The values are the same as in |v:event| during
|CompleteChanged|.
Expand Down
8 changes: 6 additions & 2 deletions runtime/doc/helphelp.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*helphelp.txt* For Vim version 8.1. Last change: 2019 May 04
*helphelp.txt* For Vim version 8.1. Last change: 2019 Oct 18


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

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

*:helpg* *:helpgrep*
:helpg[rep] {pattern}[@xx]
Expand Down
2 changes: 1 addition & 1 deletion runtime/doc/map.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*map.txt* For Vim version 8.1. Last change: 2019 Jun 02
*map.txt* For Vim version 8.1. Last change: 2019 Oct 20


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down
2 changes: 1 addition & 1 deletion runtime/doc/message.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*message.txt* For Vim version 8.1. Last change: 2019 Aug 23
*message.txt* For Vim version 8.1. Last change: 2019 Oct 19


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down
25 changes: 13 additions & 12 deletions runtime/doc/options.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*options.txt* For Vim version 8.1. Last change: 2019 Oct 20
*options.txt* For Vim version 8.1. Last change: 2019 Oct 26


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -6497,10 +6497,10 @@ A jump table for the options with a short description can be found at |Q_op|.
For Unix the default it "| tee". The stdout of the compiler is saved
in a file and echoed to the screen. If the 'shell' option is "csh" or
"tcsh" after initializations, the default becomes "|& tee". If the
'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh" or "bash" the
default becomes "2>&1| tee". This means that stderr is also included.
Before using the 'shell' option a path is removed, thus "/bin/sh" uses
"sh".
'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", "zsh-beta",
"bash" or "fish" the default becomes "2>&1| tee". This means that
stderr is also included. Before using the 'shell' option a path is
removed, thus "/bin/sh" uses "sh".
The initialization of this option is done after reading the ".vimrc"
and the other initializations, so that when the 'shell' option is set
there, the 'shellpipe' option changes automatically, unless it was
Expand Down Expand Up @@ -6540,13 +6540,14 @@ A jump table for the options with a short description can be found at |Q_op|.
The name of the temporary file can be represented by "%s" if necessary
(the file name is appended automatically if no %s appears in the value
of this option).
The default is ">". For Unix, if the 'shell' option is "csh", "tcsh"
or "zsh" during initializations, the default becomes ">&". If the
'shell' option is "sh", "ksh" or "bash" the default becomes
">%s 2>&1". This means that stderr is also included.
For Win32, the Unix checks are done and additionally "cmd" is checked
for, which makes the default ">%s 2>&1". Also, the same names with
".exe" appended are checked for.
The default is ">". For Unix, if the 'shell' option is "csh" or
"tcsh" during initializations, the default becomes ">&". If the
'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh",
"zsh-beta","bash" or "fish", the default becomes ">%s 2>&1". This
means that stderr is also included. For Win32, the Unix checks are
done and additionally "cmd" is checked for, which makes the default
">%s 2>&1". Also, the same names with ".exe" appended are checked
for.
The initialization of this option is done after reading the ".vimrc"
and the other initializations, so that when the 'shell' option is set
there, the 'shellredir' option changes automatically unless it was
Expand Down
8 changes: 4 additions & 4 deletions runtime/doc/popup.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*popup.txt* For Vim version 8.1. Last change: 2019 Sep 25
*popup.txt* For Vim version 8.1. Last change: 2019 Oct 20


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


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



popup_getoptions({id}) *popup_getoptions()*
Return the {options} for popup {id} in a Dict.
A zero value means the option was not set. For "zindex" the
Expand Down
4 changes: 2 additions & 2 deletions runtime/doc/quickfix.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 8.1. Last change: 2019 Aug 06
*quickfix.txt* For Vim version 8.1. Last change: 2019 Oct 22


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -486,7 +486,7 @@ EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST:
etc.
< When the current file can't be |abandon|ed and the [!]
is not present, the command fails.
When an error is detected execution stops.
When going to the next entry fails execution stops.
The last buffer (or where an error occurred) becomes
the current buffer.
{cmd} can contain '|' to concatenate several commands.
Expand Down
20 changes: 20 additions & 0 deletions runtime/doc/syntax.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,26 @@ startup vimrc: >
:let filetype_w = "cweb"
DART *dart.vim* *ft-dart-syntax*

Dart is an object-oriented, typed, class defined, garbage collected language
used for developing mobile, desktop, web, and back-end applications. Dart uses
a C-like syntax derived from C, Java, and JavaScript, with features adopted
from Smalltalk, Python, Ruby, and others.

More information about the language and its development environment at the
official Dart language website at https://dart.dev

dart.vim syntax detects and highlights Dart statements, reserved words,
type declarations, storage classes, conditionals, loops, interpolated values,
and comments. There is no support idioms from Flutter or any other Dart
framework.

Changes, fixes? Submit an issue or pull request via:

https://github.com/pr3d4t0r/dart-vim-syntax/


DESKTOP *desktop.vim* *ft-desktop-syntax*

Primary goal of this syntax file is to highlight .desktop and .directory files
Expand Down
Loading

0 comments on commit 96f45c0

Please sign in to comment.