summaryrefslogtreecommitdiffstats
path: root/runtime/doc/eval.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r--runtime/doc/eval.txt25
1 files changed, 18 insertions, 7 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 08399b8e0c..38b2783da7 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 8.2. Last change: 2020 Jun 30
+*eval.txt* For Vim version 8.2. Last change: 2020 Jul 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3036,7 +3036,8 @@ append({lnum}, {text}) *append()*
:let failed = append(line('$'), "# THE END")
:let failed = append(0, ["Chapter 1", "the beginning"])
-< Can also be used as a |method| after a List: >
+< Can also be used as a |method| after a List, the base is
+ passed as the second argument: >
mylist->append(lnum)
@@ -3058,7 +3059,8 @@ appendbufline({expr}, {lnum}, {text}) *appendbufline()*
error message is given. Example: >
:let failed = appendbufline(13, 0, "# THE START")
<
- Can also be used as a |method| after a List: >
+< Can also be used as a |method| after a List, the base is
+ passed as the second argument: >
mylist->appendbufline(buf, lnum)
@@ -3902,6 +3904,7 @@ deepcopy({expr} [, {noref}]) *deepcopy()* *E698*
changing an item in the copy does not change the contents of
the original |List|.
A |Dictionary| is copied in a similar way as a |List|.
+
When {noref} is omitted or zero a contained |List| or
|Dictionary| is only copied once. All references point to
this single copy. With {noref} set to 1 every occurrence of a
@@ -4838,12 +4841,14 @@ get({list}, {idx} [, {default}]) *get()*
Get item {idx} from |List| {list}. When this item is not
available return {default}. Return zero when {default} is
omitted.
- Can also be used as a |method|: >
+ Preferably used as a |method|: >
mylist->get(idx)
get({blob}, {idx} [, {default}])
Get byte {idx} from |Blob| {blob}. When this byte is not
available return {default}. Return -1 when {default} is
omitted.
+ Preferably used as a |method|: >
+ myblob->get(idx)
get({dict}, {key} [, {default}])
Get item with key {key} from |Dictionary| {dict}. When this
item is not available return {default}. Return zero when
@@ -4851,6 +4856,8 @@ get({dict}, {key} [, {default}])
let val = get(g:, 'var_name', 'default')
< This gets the value of g:var_name if it exists, and uses
'default' when it does not exist.
+ Preferably used as a |method|: >
+ mydict->get(key)
get({func}, {what})
Get an item with from Funcref {func}. Possible values for
{what} are:
@@ -4858,7 +4865,9 @@ get({func}, {what})
"func" The function
"dict" The dictionary
"args" The list with arguments
-
+ Preferably used as a |method|: >
+ myfunc->get(what)
+<
*getbufinfo()*
getbufinfo([{expr}])
getbufinfo([{dict}])
@@ -9013,6 +9022,8 @@ setloclist({nr}, {list} [, {action} [, {what}]]) *setloclist()*
Otherwise, same as |setqflist()|.
Also see |location-list|.
+ For {action} see |setqflist-action|.
+
If the optional {what} dictionary argument is supplied, then
only the items listed in {what} are set. Refer to |setqflist()|
for the list of supported keys in {what}.
@@ -9091,7 +9102,7 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
only the items listed in {what} are set. The first {list}
argument is ignored. See below for the supported items in
{what}.
-
+ *setqflist-what*
When {what} is not present, the items in {list} or used. Each
item must be a dictionary. Non-dictionary items in {list} are
ignored. Each dictionary item can contain the following
@@ -9128,7 +9139,7 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
Note that the list is not exactly the same as what
|getqflist()| returns.
- {action} values: *E927*
+ {action} values: *setqflist-action* *E927*
'a' The items from {list} are added to the existing
quickfix list. If there is no existing list, then a
new list is created.