Mercurial > vim
comparison runtime/doc/eval.txt @ 23588:510088f8c66f v8.2.2336
patch 8.2.2336: Vim9: not possible to extend dictionary with different type
Commit: https://github.com/vim/vim/commit/b0e6b513648db7035046613431a4aa9d71ef4653
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 12 20:23:40 2021 +0100
patch 8.2.2336: Vim9: not possible to extend dictionary with different type
Problem: Vim9: it is not possible to extend a dictionary with different
item types.
Solution: Add extendnew(). (closes #7666)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 12 Jan 2021 20:30:07 +0100 |
parents | 87671ccc6c6b |
children | d3e064f54890 |
comparison
equal
deleted
inserted
replaced
23587:901fb2bf09d1 | 23588:510088f8c66f |
---|---|
2522 expand({expr} [, {nosuf} [, {list}]]) | 2522 expand({expr} [, {nosuf} [, {list}]]) |
2523 any expand special keywords in {expr} | 2523 any expand special keywords in {expr} |
2524 expandcmd({expr}) String expand {expr} like with `:edit` | 2524 expandcmd({expr}) String expand {expr} like with `:edit` |
2525 extend({expr1}, {expr2} [, {expr3}]) | 2525 extend({expr1}, {expr2} [, {expr3}]) |
2526 List/Dict insert items of {expr2} into {expr1} | 2526 List/Dict insert items of {expr2} into {expr1} |
2527 extendnew({expr1}, {expr2} [, {expr3}]) | |
2528 List/Dict like |extend()| but creates a new | |
2529 List or Dictionary | |
2527 feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer | 2530 feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer |
2528 filereadable({file}) Number |TRUE| if {file} is a readable file | 2531 filereadable({file}) Number |TRUE| if {file} is a readable file |
2529 filewritable({file}) Number |TRUE| if {file} is a writable file | 2532 filewritable({file}) Number |TRUE| if {file} is a writable file |
2530 filter({expr1}, {expr2}) List/Dict remove items from {expr1} where | 2533 filter({expr1}, {expr2}) List/Dict remove items from {expr1} where |
2531 {expr2} is 0 | 2534 {expr2} is 0 |
4518 | 4521 |
4519 Can also be used as a |method|: > | 4522 Can also be used as a |method|: > |
4520 mylist->extend(otherlist) | 4523 mylist->extend(otherlist) |
4521 | 4524 |
4522 | 4525 |
4526 extendnew({expr1}, {expr2} [, {expr3}]) *extendnew()* | |
4527 Like |extend()| but instead of adding items to {expr1} a new | |
4528 List or Dictionary is created and returned. {expr1} remains | |
4529 unchanged. Items can still be changed by {expr2}, if you | |
4530 don't want that use |deepcopy()| first. | |
4531 | |
4532 | |
4523 feedkeys({string} [, {mode}]) *feedkeys()* | 4533 feedkeys({string} [, {mode}]) *feedkeys()* |
4524 Characters in {string} are queued for processing as if they | 4534 Characters in {string} are queued for processing as if they |
4525 come from a mapping or were typed by the user. | 4535 come from a mapping or were typed by the user. |
4526 | 4536 |
4527 By default the string is added to the end of the typeahead | 4537 By default the string is added to the end of the typeahead |