Skip to content

Commit 4c30bef

Browse files
committed
eval.jax に対応させ忘れた eval.txt を更新
1 parent 5a9397b commit 4c30bef

File tree

1 file changed

+125
-23
lines changed

1 file changed

+125
-23
lines changed

en/eval.txt

+125-23
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 8.1. Last change: 2019 Mar 02
1+
*eval.txt* For Vim version 8.1. Last change: 2019 Mar 30
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -625,8 +625,11 @@ Functions that can be used with a Dictionary: >
625625
626626
1.5 Blobs ~
627627
*blob* *Blob* *Blobs* *E978*
628-
A Blob mostly behaves like a |List| of numbers, where the numbers have an
629-
8-bit value, from 0 to 255.
628+
A Blob is a binary object. It can be used to read an image from a file and
629+
send it over a channel, for example.
630+
631+
A Blob mostly behaves like a |List| of numbers, where each number has the
632+
value of an 8-bit byte, from 0 to 255.
630633

631634

632635
Blob creation ~
@@ -2262,11 +2265,12 @@ ch_status({handle} [, {options}])
22622265
changenr() Number current change number
22632266
char2nr({expr} [, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
22642267
cindent({lnum}) Number C indent for line {lnum}
2265-
clearmatches() none clear all matches
2268+
clearmatches([{win}]) none clear all matches
22662269
col({expr}) Number column nr of cursor or mark
22672270
complete({startcol}, {matches}) none set Insert mode completion
22682271
complete_add({expr}) Number add completion match
22692272
complete_check() Number check for key typed during completion
2273+
complete_info([{what}]) Dict get current completion information
22702274
confirm({msg} [, {choices} [, {default} [, {type}]]])
22712275
Number number of choice picked by user
22722276
copy({expr}) any make a shallow copy of {expr}
@@ -2355,7 +2359,7 @@ getjumplist([{winnr} [, {tabnr}]])
23552359
getline({lnum}) String line {lnum} of current buffer
23562360
getline({lnum}, {end}) List lines {lnum} to {end} of current buffer
23572361
getloclist({nr} [, {what}]) List list of location list items
2358-
getmatches() List list of current matches
2362+
getmatches([{win}]) List list of current matches
23592363
getpid() Number process ID of Vim
23602364
getpos({expr}) List position of cursor, mark, etc.
23612365
getqflist([{what}]) List list of quickfix items
@@ -2446,7 +2450,7 @@ matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]])
24462450
matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
24472451
Number highlight positions with {group}
24482452
matcharg({nr}) List arguments of |:match|
2449-
matchdelete({id}) Number delete match identified by {id}
2453+
matchdelete({id} [, {win}]) Number delete match identified by {id}
24502454
matchend({expr}, {pat} [, {start} [, {count}]])
24512455
Number position where {pat} ends in {expr}
24522456
matchlist({expr}, {pat} [, {start} [, {count}]])
@@ -2521,10 +2525,13 @@ repeat({expr}, {count}) String repeat {expr} {count} times
25212525
resolve({filename}) String get filename a shortcut points to
25222526
reverse({list}) List reverse {list} in-place
25232527
round({expr}) Float round off {expr}
2528+
rubyeval({expr}) any evaluate |Ruby| expression
25242529
screenattr({row}, {col}) Number attribute at screen position
25252530
screenchar({row}, {col}) Number character at screen position
2531+
screenchars({row}, {col}) List List of characters at screen position
25262532
screencol() Number current cursor column
25272533
screenrow() Number current cursor row
2534+
screenstring({row}, {col}) String characters at screen position
25282535
search({pattern} [, {flags} [, {stopline} [, {timeout}]]])
25292536
Number search for {pattern}
25302537
searchdecl({name} [, {global} [, {thisblock}]])
@@ -2549,7 +2556,7 @@ setfperm({fname}, {mode}) Number set {fname} file permissions to {mode}
25492556
setline({lnum}, {line}) Number set line {lnum} to {line}
25502557
setloclist({nr}, {list} [, {action} [, {what}]])
25512558
Number modify location list using {list}
2552-
setmatches({list}) Number restore a list of matches
2559+
setmatches({list} [, {win}]) Number restore a list of matches
25532560
setpos({expr}, {list}) Number set the {expr} position to {list}
25542561
setqflist({list} [, {action} [, {what}]])
25552562
Number modify quickfix list using {list}
@@ -2672,6 +2679,7 @@ test_null_partial() Funcref null value for testing
26722679
test_null_string() String null value for testing
26732680
test_option_not_set({name}) none reset flag indicating option was set
26742681
test_override({expr}, {val}) none test with Vim internal overrides
2682+
test_refcount({expr}) Number get the reference count of {expr}
26752683
test_scrollbar({which}, {value}, {dragging})
26762684
none scroll in the GUI for testing
26772685
test_settime({expr}) none set current time for testing
@@ -3439,6 +3447,10 @@ char2nr({expr} [, {utf8}]) *char2nr()*
34393447
< With {utf8} set to 1, always treat as utf-8 characters.
34403448
A combining character is a separate character.
34413449
|nr2char()| does the opposite.
3450+
To turn a string into a list of character numbers: >
3451+
let str = "ABC"
3452+
let list = map(split(str, '\zs'), {_, val -> char2nr(val)})
3453+
< Result: [65, 66, 67]
34423454

34433455
cindent({lnum}) *cindent()*
34443456
Get the amount of indent for line {lnum} according the C
@@ -3449,9 +3461,11 @@ cindent({lnum}) *cindent()*
34493461
feature, -1 is returned.
34503462
See |C-indenting|.
34513463

3452-
clearmatches() *clearmatches()*
3453-
Clears all matches previously defined by |matchadd()| and the
3454-
|:match| commands.
3464+
clearmatches([{win}]) *clearmatches()*
3465+
Clears all matches previously defined for the current window
3466+
by |matchadd()| and the |:match| commands.
3467+
If {win} is specified, use the window with this number or
3468+
window ID instead of the current window.
34553469

34563470
*col()*
34573471
col({expr}) The result is a Number, which is the byte index of the column
@@ -3536,6 +3550,55 @@ complete_check() *complete_check()*
35363550
Only to be used by the function specified with the
35373551
'completefunc' option.
35383552

3553+
*complete_info()*
3554+
complete_info([{what}])
3555+
Returns a Dictionary with information about Insert mode
3556+
completion. See |ins-completion|.
3557+
The items are:
3558+
mode Current completion mode name string.
3559+
See |completion_info_mode| for the values.
3560+
pum_visible |TRUE| if popup menu is visible.
3561+
See |pumvisible()|.
3562+
items List of completion matches. Each item is a
3563+
dictionary containing the entries "word",
3564+
"abbr", "menu", "kind", "info" and "user_data".
3565+
See |complete-items|.
3566+
selected Selected item index. First index is zero.
3567+
Index is -1 if no item is selected (showing
3568+
typed text only)
3569+
inserted Inserted string. [NOT IMPLEMENT YET]
3570+
3571+
*complete_info_mode*
3572+
mode values are:
3573+
"" Not in completion mode
3574+
"keyword" Keyword completion |i_CTRL-X_CTRL-N|
3575+
"ctrl_x" Just pressed CTRL-X |i_CTRL-X|
3576+
"whole_line" Whole lines |i_CTRL-X_CTRL-L|
3577+
"files" File names |i_CTRL-X_CTRL-F|
3578+
"tags" Tags |i_CTRL-X_CTRL-]|
3579+
"path_defines" Definition completion |i_CTRL-X_CTRL-D|
3580+
"path_patterns" Include completion |i_CTRL-X_CTRL-I|
3581+
"dictionary" Dictionary |i_CTRL-X_CTRL-K|
3582+
"thesaurus" Thesaurus |i_CTRL-X_CTRL-T|
3583+
"cmdline" Vim Command line |i_CTRL-X_CTRL-V|
3584+
"function" User defined completion |i_CTRL-X_CTRL-U|
3585+
"omni" Omni completion |i_CTRL-X_CTRL-O|
3586+
"spell" Spelling suggestions |i_CTRL-X_s|
3587+
"eval" |complete()| completion
3588+
"unknown" Other internal modes
3589+
3590+
If the optional {what} list argument is supplied, then only
3591+
the items listed in {what} are returned. Unsupported items in
3592+
{what} are silently ignored.
3593+
3594+
Examples: >
3595+
" Get all items
3596+
call complete_info()
3597+
" Get only 'mode'
3598+
call complete_info(['mode'])
3599+
" Get only 'mode' and 'pum_visible'
3600+
call complete_info(['mode', 'pum_visible'])
3601+
<
35393602
*confirm()*
35403603
confirm({msg} [, {choices} [, {default} [, {type}]]])
35413604
confirm() offers the user a dialog, from which a choice can be
@@ -4975,11 +5038,12 @@ getloclist({nr} [, {what}]) *getloclist()*
49755038
|location-list-file-window| for more
49765039
details.
49775040

4978-
getmatches() *getmatches()*
4979-
Returns a |List| with all matches previously defined by
4980-
|matchadd()| and the |:match| commands. |getmatches()| is
4981-
useful in combination with |setmatches()|, as |setmatches()|
4982-
can restore a list of matches saved by |getmatches()|.
5041+
getmatches([{win}]) *getmatches()*
5042+
Returns a |List| with all matches previously defined for the
5043+
current window by |matchadd()| and the |:match| commands.
5044+
|getmatches()| is useful in combination with |setmatches()|,
5045+
as |setmatches()| can restore a list of matches saved by
5046+
|getmatches()|.
49835047
Example: >
49845048
:echo getmatches()
49855049
< [{'group': 'MyGroup1', 'pattern': 'TODO',
@@ -6344,7 +6408,7 @@ matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]])
63446408
Defines a pattern to be highlighted in the current window (a
63456409
"match"). It will be highlighted with {group}. Returns an
63466410
identification number (ID), which can be used to delete the
6347-
match using |matchdelete()|.
6411+
match using |matchdelete()|. The ID is bound to the window.
63486412
Matching is case sensitive and magic, unless case sensitivity
63496413
or magicness are explicitly overridden in {pattern}. The
63506414
'magic', 'smartcase' and 'ignorecase' options are not used.
@@ -6440,11 +6504,13 @@ matcharg({nr}) *matcharg()*
64406504
Highlighting matches using the |:match| commands are limited
64416505
to three matches. |matchadd()| does not have this limitation.
64426506

6443-
matchdelete({id}) *matchdelete()* *E802* *E803*
6507+
matchdelete({id} [, {win}) *matchdelete()* *E802* *E803*
64446508
Deletes a match with ID {id} previously defined by |matchadd()|
64456509
or one of the |:match| commands. Returns 0 if successful,
64466510
otherwise -1. See example for |matchadd()|. All matches can
64476511
be deleted in one operation by |clearmatches()|.
6512+
If {win} is specified, use the window with this number or
6513+
window ID instead of the current window.
64486514

64496515
matchend({expr}, {pat} [, {start} [, {count}]]) *matchend()*
64506516
Same as |match()|, but return the index of first character
@@ -6633,6 +6699,10 @@ nr2char({expr} [, {utf8}]) *nr2char()*
66336699
nr2char(10), because NULs are represented with newline
66346700
characters. nr2char(0) is a real NUL and terminates the
66356701
string, thus results in an empty string.
6702+
To turn a list of character numbers into a string: >
6703+
let list = [65, 66, 67]
6704+
let str = join(map(list, {_, val -> nr2char(val)}), '')
6705+
< Result: "ABC"
66366706

66376707
or({expr}, {expr}) *or()*
66386708
Bitwise OR on the two arguments. The arguments are converted
@@ -7431,6 +7501,17 @@ round({expr}) *round()*
74317501
< -5.0
74327502
{only available when compiled with the |+float| feature}
74337503

7504+
rubyeval({expr}) *rubyeval()*
7505+
Evaluate Ruby expression {expr} and return its result
7506+
converted to Vim data structures.
7507+
Numbers, floats and strings are returned as they are (strings
7508+
are copied though).
7509+
Arrays are represented as Vim |List| type.
7510+
Hashes are represented as Vim |Dictionary| type.
7511+
Other objects are represented as strings resulted from their
7512+
"Object#to_s" method.
7513+
{only available when compiled with the |+ruby| feature}
7514+
74347515
screenattr({row}, {col}) *screenattr()*
74357516
Like |screenchar()|, but return the attribute. This is a rather
74367517
arbitrary number that can only be used to compare to the
@@ -7446,6 +7527,13 @@ screenchar({row}, {col}) *screenchar()*
74467527
This is mainly to be used for testing.
74477528
Returns -1 when row or col is out of range.
74487529

7530+
screenchars({row}, {col}) *screenchars()*
7531+
The result is a List of Numbers. The first number is the same
7532+
as what |screenchar()| returns. Further numbers are
7533+
composing characters on top of the base character.
7534+
This is mainly to be used for testing.
7535+
Returns an empty List when row or col is out of range.
7536+
74497537
screencol() *screencol()*
74507538
The result is a Number, which is the current screen column of
74517539
the cursor. The leftmost column has number 1.
@@ -7467,6 +7555,14 @@ screenrow() *screenrow()*
74677555

74687556
Note: Same restrictions as with |screencol()|.
74697557

7558+
screenstring({row}, {col}) *screenstring()*
7559+
The result is a String that contains the base character and
7560+
any composing characters at position [row, col] on the screen.
7561+
This is like |screenchars()| but returning a String with the
7562+
characters.
7563+
This is mainly to be used for testing.
7564+
Returns an empty String when row or col is out of range.
7565+
74707566
search({pattern} [, {flags} [, {stopline} [, {timeout}]]]) *search()*
74717567
Search for regexp pattern {pattern}. The search starts at the
74727568
cursor position (you can use |cursor()| to set it).
@@ -7825,10 +7921,13 @@ setloclist({nr}, {list} [, {action} [, {what}]]) *setloclist()*
78257921
only the items listed in {what} are set. Refer to |setqflist()|
78267922
for the list of supported keys in {what}.
78277923

7828-
setmatches({list}) *setmatches()*
7829-
Restores a list of matches saved by |getmatches()|. Returns 0
7830-
if successful, otherwise -1. All current matches are cleared
7831-
before the list is restored. See example for |getmatches()|.
7924+
setmatches({list} [, {win}]) *setmatches()*
7925+
Restores a list of matches saved by |getmatches() for the
7926+
current window|. Returns 0 if successful, otherwise -1. All
7927+
current matches are cleared before the list is restored. See
7928+
example for |getmatches()|.
7929+
If {win} is specified, use the window with this number or
7930+
window ID instead of the current window.
78327931

78337932
*setpos()*
78347933
setpos({expr}, {list})
@@ -9589,6 +9688,11 @@ test_override({name}, {val}) *test_override()*
95899688
< The value of "starting" is saved. It is restored by: >
95909689
call test_override('starting', 0)
95919690
9691+
test_refcount({expr}) *test_refcount()*
9692+
Return the reference count of {expr}. When {expr} is of a
9693+
type that does not have a reference count, returns -1. Only
9694+
to be used for testing.
9695+
95929696
test_scrollbar({which}, {value}, {dragging}) *test_scrollbar()*
95939697
Pretend using scrollbar {which} to move it to position
95949698
{value}. {which} can be:
@@ -10331,8 +10435,6 @@ tag_binary Compiled with binary searching in tags files
1033110435
|tag-binary-search|.
1033210436
tag_old_static Compiled with support for old static tags
1033310437
|tag-old-static|.
10334-
tag_any_white Compiled with support for any white characters in tags
10335-
files |tag-any-white|.
1033610438
tcl Compiled with Tcl interface.
1033710439
termguicolors Compiled with true color in terminal support.
1033810440
terminal Compiled with |terminal| support.

0 commit comments

Comments
 (0)