Skip to content

Commit

Permalink
vim-patch:50ba526fbf3e
Browse files Browse the repository at this point in the history
Updated runtime files.

vim/vim@50ba526

vim-patch:20eeb6129d12
  • Loading branch information
justinmk committed Apr 28, 2017
1 parent 2e64752 commit a5e9974
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 13 deletions.
2 changes: 1 addition & 1 deletion runtime/doc/autocmd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ WinLeave Before leaving a window. If the window to be

*WinNew*
WinNew When a new window was created. Not done for
the fist window, when Vim has just started.
the first window, when Vim has just started.
Before a WinEnter event.

==============================================================================
Expand Down
27 changes: 18 additions & 9 deletions runtime/doc/eval.txt
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ expr8[expr1] item of String or |List| *expr-[]* *E111*

If expr8 is a Number or String this results in a String that contains the
expr1'th single byte from expr8. expr8 is used as a String, expr1 as a
Number. This doesn't recognize multi-byte encodings, see |byteidx()| for
Number. This doesn't recognize multi-byte encodings, see `byteidx()` for
an alternative, or use `split()` to turn the string into a list of characters.

Index zero gives the first byte. This is like it works in C. Careful:
Expand Down Expand Up @@ -1222,7 +1222,7 @@ The arguments are optional. Example: >
< error function
*closure*
Lambda expressions can access outer scope variables and arguments. This is
often called a closure. Example where "i" a and "a:arg" are used in a lambda
often called a closure. Example where "i" and "a:arg" are used in a lambda
while they exist in the function scope. They remain valid even after the
function returns: >
:function Foo(arg)
Expand Down Expand Up @@ -2031,8 +2031,8 @@ expand({expr} [, {nosuf} [, {list}]])
feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer
filereadable({file}) Number |TRUE| if {file} is a readable file
filewritable({file}) Number |TRUE| if {file} is a writable file
filter({expr}, {string}) List/Dict remove items from {expr} where
{string} is 0
filter({expr1}, {expr2}) List/Dict remove items from {expr1} where
{expr2} is 0
finddir({name}[, {path}[, {count}]])
String find directory {name} in {path}
findfile({name}[, {path}[, {count}]])
Expand All @@ -2056,7 +2056,7 @@ garbagecollect([{atexit}]) none free memory, breaking cyclic references
get({list}, {idx} [, {def}]) any get item {idx} from {list} or {def}
get({dict}, {key} [, {def}]) any get item {key} from {dict} or {def}
get({func}, {what}) any get property of funcref/partial {func}
getbufinfo( [{expr}]) List information about buffers
getbufinfo([{expr}]) List information about buffers
getbufline({expr}, {lnum} [, {end}])
List lines {lnum} to {end} of buffer {expr}
getbufvar({expr}, {varname} [, {def}])
Expand Down Expand Up @@ -2155,7 +2155,7 @@ lispindent({lnum}) Number Lisp indent for line {lnum}
localtime() Number current time
log({expr}) Float natural logarithm (base e) of {expr}
log10({expr}) Float logarithm of Float {expr} to base 10
map({expr}, {string}) List/Dict change each item in {expr} to {expr}
map({expr1}, {expr2}) List/Dict change each item in {expr1} to {expr}
maparg({name}[, {mode} [, {abbr} [, {dict}]]])
String or Dict
rhs of mapping {name} in mode {mode}
Expand Down Expand Up @@ -3488,9 +3488,10 @@ filter({expr1}, {expr2}) *filter()*
is zero remove the item from the |List| or |Dictionary|.
{expr2} must be a |string| or |Funcref|.

if {expr2} is a |string|, inside {expr2} |v:val| has the value
If {expr2} is a |string|, inside {expr2} |v:val| has the value
of the current item. For a |Dictionary| |v:key| has the key
of the current item.
of the current item and for a |List| |v:key| has the index of
the current item.
For a |Dictionary| |v:key| has the key of the current item.
Examples: >
call filter(mylist, 'v:val !~ "OLD"')
Expand All @@ -3513,7 +3514,11 @@ filter({expr1}, {expr2}) *filter()*
return a:idx % 2 == 1
endfunc
call filter(mylist, function('Odd'))
<
< It is shorter when using a |lambda|: >
call filter(myList, {idx, val -> idx * val <= 42})
< If you do not use "val" you can leave it out: >
call filter(myList, {idx -> idx % 2 == 1})
The operation is done in-place. If you want a |List| or
|Dictionary| to remain unmodified make a copy first: >
:let l = filter(copy(mylist), 'v:val =~ "KEEP"')
Expand Down Expand Up @@ -5150,6 +5155,10 @@ map({expr1}, {expr2}) *map()*
return a:key . '-' . a:val
endfunc
call map(myDict, function('KeyValue'))
< It is shorter when using a |lambda|: >
call map(myDict, {key, val -> key . '-' . val})
< If you do not use "val" you can leave it out: >
call map(myDict, {key -> 'item: ' . key})
<
The operation is done in-place. If you want a |List| or
|Dictionary| to remain unmodified make a copy first: >
Expand Down
4 changes: 2 additions & 2 deletions runtime/doc/if_pyth.txt
Original file line number Diff line number Diff line change
Expand Up @@ -696,11 +696,11 @@ functions to evaluate Python expressions and pass their values to VimL.
The `:py3` and `:python3` commands work similar to `:python`. A simple check
if the `:py3` command is working: >
:py3 print("Hello")
< *:py3file*
To see what version of Python you have: >
:py3 import sys
:py3 print(sys.version)
< *:py3file*
The `:py3file` command works similar to `:pyfile`.
*:py3do*
The `:py3do` command works similar to `:pydo`.
Expand Down
6 changes: 5 additions & 1 deletion runtime/filetype.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2016 Sep 15
" Last Change: 2016 Sep 22

" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
Expand Down Expand Up @@ -805,6 +805,10 @@ au BufNewFile,BufRead *.gp,.gprc setf gp
au BufNewFile,BufRead */.gnupg/options setf gpg
au BufNewFile,BufRead */.gnupg/gpg.conf setf gpg
au BufNewFile,BufRead */usr/*/gnupg/options.skel setf gpg
if !empty($GNUPGHOME)
au BufNewFile,BufRead $GNUPGHOME/options setf gpg
au BufNewFile,BufRead $GNUPGHOME/gpg.conf setf gpg
endif

" gnash(1) configuration files
au BufNewFile,BufRead gnashrc,.gnashrc,gnashpluginrc,.gnashpluginrc setf gnash
Expand Down

0 comments on commit a5e9974

Please sign in to comment.