mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
vim-patch:50ba526fbf3e
Updated runtime files.
50ba526fbf
vim-patch:20eeb6129d12
This commit is contained in:
@ -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.
|
||||
|
||||
==============================================================================
|
||||
|
@ -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:
|
||||
@ -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)
|
||||
@ -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}]])
|
||||
@ -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}])
|
||||
@ -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}
|
||||
@ -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"')
|
||||
@ -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"')
|
||||
@ -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: >
|
||||
|
@ -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`.
|
||||
|
@ -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")
|
||||
@ -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
|
||||
|
Reference in New Issue
Block a user