Skip to content

Commit

Permalink
Merge remote-tracking branch 'vim/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ychin committed Dec 12, 2018
2 parents 5af4e39 + 2954719 commit e6977ce
Show file tree
Hide file tree
Showing 50 changed files with 772 additions and 252 deletions.
16 changes: 10 additions & 6 deletions runtime/autoload/xmlformat.vim
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
" Vim plugin for formatting XML
" Last Change: Thu, 22 May 2018 21:26:55 +0100
" Version: 0.1
" Author: Christian Brabandt <cb@256bit.org>
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
" License: VIM License
" Last Change: Thu, 07 Dec 2018
" Version: 0.1
" Author: Christian Brabandt <cb@256bit.org>
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
" License: VIM License
" Documentation: see :h xmlformat.txt (TODO!)
" ---------------------------------------------------------------------
" Load Once: {{{1
Expand Down Expand Up @@ -85,7 +85,11 @@ func! s:Trim(item)
endfunc
" Check if tag is a new opening tag <tag> {{{1
func! s:StartTag(tag)
return a:tag =~? '^\s*<[^/?]'
let is_comment = s:IsComment(a:tag)
return a:tag =~? '^\s*<[^/?]' && !is_comment
endfunc
func! s:IsComment(tag)
return a:tag =~? '<!--'
endfunc
" Remove one level of indentation {{{1
func! s:DecreaseIndent()
Expand Down
13 changes: 8 additions & 5 deletions runtime/doc/digraph.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,14 @@ this, you will have to type <BS> e again. To avoid this don't set the

You may have problems using Vim with characters which have a value above 128.
For example: You insert ue (u-umlaut) and the editor echoes \334 in Insert
mode. After leaving the Insert mode everything is fine. Note that fmt
removes all characters with a value above 128 from the text being formatted.
On some Unix systems this means you have to define the environment-variable
LC_CTYPE. If you are using csh, then put the following line in your .cshrc: >
setenv LC_CTYPE iso_8859_1
mode. After leaving the Insert mode everything is fine. On some Unix systems
this means you have to define the environment-variable LC_CTYPE. If you are
using csh, then put the following line in your .cshrc: >
setenv LC_CTYPE en_US.utf8
(or similar for a different language or country). The value must be a valid
locale on your system, i.e. on Unix-like systems it must be present in the
output of >
locale -a
==============================================================================
3. Default digraphs *digraphs-default*
Expand Down
25 changes: 16 additions & 9 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: 2018 May 17
*eval.txt* For Vim version 8.1. Last change: 2018 Dec 09


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -518,7 +518,7 @@ To loop over the values use the |values()| function: >
:endfor
If you want both the key and the value use the |items()| function. It returns
a List in which each item is a List with two items, the key and the value: >
a List in which each item is a List with two items, the key and the value: >
:for [key, value] in items(mydict)
: echo key . ': ' . value
:endfor
Expand Down Expand Up @@ -1088,11 +1088,6 @@ These are INVALID:
3. empty {M}
1e40 missing .{M}

*float-pi* *float-e*
A few useful values to copy&paste: >
:let pi = 3.14159265359
:let e = 2.71828182846
Rationale:
Before floating point was introduced, the text "123.456" was interpreted as
the two numbers "123" and "456", both converted to a string and concatenated,
Expand All @@ -1101,6 +1096,15 @@ could not find it intentionally being used in Vim scripts, this backwards
incompatibility was accepted in favor of being able to use the normal notation
for floating point numbers.

*float-pi* *float-e*
A few useful values to copy&paste: >
:let pi = 3.14159265359
:let e = 2.71828182846
Or, if you don't want to write them in as floating-point literals, you can
also use functions, like the following: >
:let pi = acos(-1.0)
:let e = exp(1.0)
*floating-point-precision*
The precision and range of floating points numbers depends on what "double"
means in the library Vim was compiled with. There is no way to change this at
Expand Down Expand Up @@ -1438,7 +1442,9 @@ Note that this means that filetype plugins don't get a different set of script
variables for each buffer. Use local buffer variables instead |b:var|.


Predefined Vim variables: *vim-variable* *v:var* *v:*
PREDEFINED VIM VARIABLES *vim-variable* *v:var* *v:*
*E963*
Some variables can be set by the user, but the type cannot be changed.

*v:beval_col* *beval_col-variable*
v:beval_col The number of the column, over which the mouse pointer is.
Expand Down Expand Up @@ -7845,7 +7851,8 @@ str2float({expr}) *str2float()*
as when using a floating point number in an expression, see
|floating-point-format|. But it's a bit more permissive.
E.g., "1e40" is accepted, while in an expression you need to
write "1.0e40".
write "1.0e40". The hexadecimal form "0x123" is also
accepted, but not others, like binary or octal.
Text after the number is silently ignored.
The decimal point is always '.', no matter what the locale is
set to. A comma ends the number: "12,345.67" is converted to
Expand Down
36 changes: 24 additions & 12 deletions 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: 2018 May 13
*map.txt* For Vim version 8.1. Last change: 2018 Dec 08


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -1223,14 +1223,19 @@ See |:verbose-cmd| for more information.
attributes (see below) are {attr}. If the command
already exists, an error is reported, unless a ! is
specified, in which case the command is redefined.
There is one exception: When sourcing a script again,
a command that was previously defined in that script
will be silently replaced.


:delc[ommand] {cmd} *:delc* *:delcommand* *E184*
Delete the user-defined command {cmd}.

:comc[lear] *:comc* *:comclear*
Delete all user-defined commands.

Command attributes

Command attributes ~

User-defined commands are treated by Vim just like any other Ex commands. They
can have arguments, or have a range specified. Arguments are subject to
Expand All @@ -1241,8 +1246,9 @@ There are a number of attributes, split into four categories: argument
handling, completion behavior, range handling, and special cases. The
attributes are described below, by category.

Argument handling *E175* *E176* *:command-nargs*

Argument handling ~
*E175* *E176* *:command-nargs*
By default, a user defined command will take no arguments (and an error is
reported if any are supplied). However, it is possible to specify that the
command can take arguments, using the -nargs attribute. Valid cases are:
Expand Down Expand Up @@ -1271,8 +1277,10 @@ defined, not where it is invoked! Example:
Executing script2.vim will result in "None" being echoed. Not what you
intended! Calling a function may be an alternative.

Completion behavior *:command-completion* *E179*
*E180* *E181* *:command-complete*

Completion behavior ~
*:command-completion* *E179* *E180* *E181*
*:command-complete*
By default, the arguments of user defined commands do not undergo completion.
However, by specifying one or the other of the following attributes, argument
completion can be enabled:
Expand Down Expand Up @@ -1317,9 +1325,9 @@ completion can be enabled:
Note: That some completion methods might expand environment variables.


Custom completion *:command-completion-custom*
*:command-completion-customlist*
*E467* *E468*
Custom completion ~
*:command-completion-custom*
*:command-completion-customlist* *E467* *E468*
It is possible to define customized completion schemes via the "custom,{func}"
or the "customlist,{func}" completion argument. The {func} part should be a
function with the following signature: >
Expand Down Expand Up @@ -1364,8 +1372,8 @@ the 'path' option: >
This example does not work for file names with spaces!


Range handling *E177* *E178* *:command-range*
*:command-count*
Range handling ~
*E177* *E178* *:command-range* *:command-count*
By default, user-defined commands do not accept a line number range. However,
it is possible to specify that the command does take a range (the -range
attribute), or that it takes an arbitrary count value, either in the line
Expand Down Expand Up @@ -1399,8 +1407,11 @@ Possible values are:
-addr=loaded_buffers Range for loaded buffers
-addr=windows Range for windows
-addr=tabs Range for tab pages
-addr=other other kind of range

Special cases *:command-bang* *:command-bar*

Special cases ~
*:command-bang* *:command-bar*
*:command-register* *:command-buffer*
There are some special cases as well:

Expand All @@ -1418,7 +1429,8 @@ replacement text separately.
Note that these arguments can be abbreviated, but that is a deprecated
feature. Use the full name for new scripts.

Replacement text

Replacement text ~

The replacement text for a user defined command is scanned for special escape
sequences, using <...> notation. Escape sequences are replaced with values
Expand Down
11 changes: 8 additions & 3 deletions runtime/doc/options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8290,7 +8290,11 @@ A jump table for the options with a short description can be found at |Q_op|.
separated by non-keyword characters (white space is preferred).
Maximum line length is 510 bytes.

Unfortunately we currently cannot recommend a file to be used here.
An English word list was added to this github issue:
https://github.com/vim/vim/issues/629#issuecomment-443293282
Unpack thesaurus_pkg.zip, put the thesaurus.txt file somewhere, e.g.
~/.vim/thesaurus/english.txt, and the 'thesaurus' option to this file
name.

To include a comma in a file name precede it with a backslash. Spaces
after a comma are ignored, otherwise spaces are included in the file
Expand Down Expand Up @@ -8607,8 +8611,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|t_RV| is set to the escape sequence to request the xterm version
number, more intelligent detection process runs.
The "xterm2" value will be set if the xterm version is reported to be
from 95 to 276. The "sgr" value will be set if the xterm version is
277 or higher and when Vim detects Mac Terminal.app or iTerm2.
from 95 to 276. The "sgr" value will be set if Vim detects Mac
Terminal.app, iTerm2 or mintty, and when the xterm version is 277 or
higher.
If you do not want 'ttymouse' to be set to "xterm2" or "sgr"
automatically, set t_RV to an empty string: >
:set t_RV=
Expand Down
2 changes: 1 addition & 1 deletion runtime/doc/terminal.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ sent to the job running in the terminal. For example, to make F1 switch
to Terminal-Normal mode: >
tnoremap <F1> <C-W>N
You can use Esc, but you need to make sure it won't cause other keys to
break: >
break (cursor keys start with an Esc, so they may break): >
tnoremap <Esc> <C-W>N
set notimeout ttimeout timeoutlen=100
Expand Down

0 comments on commit e6977ce

Please sign in to comment.