@@ -919,19 +919,6 @@ export function diff_hlID(
919
919
return denops . call ( "diff_hlID" , ...args ) ;
920
920
}
921
921
922
- /**
923
- * Return all of environment variables as dictionary. You can
924
- * check if an environment variable exists like this:
925
- * :echo has_key(environ(), 'HOME')
926
- * Note that the variable name may be CamelCase; to ignore case
927
- * use this:
928
- * :echo index(keys(environ()), 'HOME', 0, 1) != -1
929
- */
930
- export function environ ( denops : Denops ) : Promise < unknown > ;
931
- export function environ ( denops : Denops , ...args : unknown [ ] ) : Promise < unknown > {
932
- return denops . call ( "environ" , ...args ) ;
933
- }
934
-
935
922
/**
936
923
* Return the Number 1 if {expr} is empty, zero otherwise.
937
924
* - A |List| or |Dictionary| is empty when it does not have any
@@ -952,6 +939,19 @@ export function empty(denops: Denops, ...args: unknown[]): Promise<unknown> {
952
939
return denops . call ( "empty" , ...args ) ;
953
940
}
954
941
942
+ /**
943
+ * Return all of environment variables as dictionary. You can
944
+ * check if an environment variable exists like this:
945
+ * :echo has_key(environ(), 'HOME')
946
+ * Note that the variable name may be CamelCase; to ignore case
947
+ * use this:
948
+ * :echo index(keys(environ()), 'HOME', 0, 1) != -1
949
+ */
950
+ export function environ ( denops : Denops ) : Promise < unknown > ;
951
+ export function environ ( denops : Denops , ...args : unknown [ ] ) : Promise < unknown > {
952
+ return denops . call ( "environ" , ...args ) ;
953
+ }
954
+
955
955
/**
956
956
* Escape the characters in {chars} that occur in {string} with a
957
957
* backslash. Example:
@@ -1005,16 +1005,15 @@ export function eventhandler(
1005
1005
* arguments.
1006
1006
* executable() uses the value of $PATH and/or the normal
1007
1007
* searchpath for programs.
1008
- * On MS-DOS and MS-Windows the ".exe", ".bat", etc. can
1009
- * optionally be included. Then the extensions in $PATHEXT are
1010
- * tried. Thus if "foo.exe" does not exist, "foo.exe.bat" can be
1011
- * found. If $PATHEXT is not set then ".exe;.com;.bat;.cmd" is
1012
- * used. A dot by itself can be used in $PATHEXT to try using
1013
- * the name without an extension. When 'shell' looks like a
1014
- * Unix shell, then the name is also tried without adding an
1015
- * extension.
1016
- * On MS-DOS and MS-Windows it only checks if the file exists and
1017
- * is not a directory, not if it's really executable.
1008
+ * On MS-Windows the ".exe", ".bat", etc. can optionally be
1009
+ * included. Then the extensions in $PATHEXT are tried. Thus if
1010
+ * "foo.exe" does not exist, "foo.exe.bat" can be found. If
1011
+ * $PATHEXT is not set then ".exe;.com;.bat;.cmd" is used. A dot
1012
+ * by itself can be used in $PATHEXT to try using the name
1013
+ * without an extension. When 'shell' looks like a Unix shell,
1014
+ * then the name is also tried without adding an extension.
1015
+ * On MS-Windows it only checks if the file exists and is not a
1016
+ * directory, not if it's really executable.
1018
1017
* On MS-Windows an executable in the same directory as Vim is
1019
1018
* always found. Since this directory is added to $PATH it
1020
1019
* should also work to execute it |win32-PATH|.
@@ -1260,6 +1259,8 @@ export function extend(denops: Denops, ...args: unknown[]): Promise<unknown> {
1260
1259
* 'L' Lowlevel input. Only works for Unix or when using the
1261
1260
* GUI. Keys are used as if they were coming from the
1262
1261
* terminal. Other flags are not used.
1262
+ * When a CTRL-C interrupts and 't' is included it sets
1263
+ * the internal "got_int" flag.
1263
1264
* 'i' Insert the string instead of appending (see above).
1264
1265
* 'x' Execute commands until typeahead is empty. This is
1265
1266
* similar to using ":normal!". You can call feedkeys()
@@ -1835,6 +1836,8 @@ export function get(denops: Denops, ...args: unknown[]): Promise<unknown> {
1835
1836
* {only with the |+viminfo| feature}
1836
1837
* listed TRUE if the buffer is listed.
1837
1838
* lnum current line number in buffer.
1839
+ * linecount number of lines in the buffer (only
1840
+ * valid when loaded)
1838
1841
* loaded TRUE if the buffer is loaded.
1839
1842
* name full path to the file in the buffer.
1840
1843
* signs list of signs placed in the buffer.
@@ -2133,6 +2136,7 @@ export function getcmdwintype(
2133
2136
* command Ex command (and arguments)
2134
2137
* compiler compilers
2135
2138
* cscope |:cscope| suboptions
2139
+ * diff_buffer |:diffget| and |:diffput| completion
2136
2140
* dir directory names
2137
2141
* environment environment variable names
2138
2142
* event autocommand events
@@ -2435,7 +2439,7 @@ export function getmatches(
2435
2439
/**
2436
2440
* Return a Number which is the process ID of the Vim process.
2437
2441
* On Unix and MS-Windows this is a unique number, until Vim
2438
- * exits. On MS-DOS it's always zero.
2442
+ * exits.
2439
2443
*/
2440
2444
export function getpid ( denops : Denops ) : Promise < unknown > ;
2441
2445
export function getpid ( denops : Denops , ...args : unknown [ ] ) : Promise < unknown > {
@@ -2754,7 +2758,7 @@ export function getwininfo(
2754
2758
}
2755
2759
2756
2760
/**
2757
- * The result is a list with two numbers, the result of
2761
+ * The result is a List with two numbers, the result of
2758
2762
* |getwinposx()| and |getwinposy()| combined:
2759
2763
* [x-pos, y-pos]
2760
2764
* {timeout} can be used to specify how long to wait in msec for
@@ -3879,6 +3883,7 @@ export function map(denops: Denops, ...args: unknown[]): Promise<unknown> {
3879
3883
* "rhs" The {rhs} of the mapping as typed.
3880
3884
* "silent" 1 for a |:map-silent| mapping, else 0.
3881
3885
* "noremap" 1 if the {rhs} of the mapping is not remappable.
3886
+ * "script" 1 if mapping was defined with <script>.
3882
3887
* "expr" 1 for an expression mapping (|:map-<expr>|).
3883
3888
* "buffer" 1 for a buffer local mapping (|:map-local|).
3884
3889
* "mode" Modes for which the mapping is defined. In
@@ -4003,6 +4008,10 @@ export function mapcheck(denops: Denops, ...args: unknown[]): Promise<unknown> {
4003
4008
* The 'ignorecase' option is used to set the ignore-caseness of
4004
4009
* the pattern. 'smartcase' is NOT used. The matching is always
4005
4010
* done like 'magic' is set and 'cpoptions' is empty.
4011
+ * Note that a match at the start is preferred, thus when the
4012
+ * pattern is using "*" (any number of matches) it tends to find
4013
+ * zero matches at the start instead of a number of matches
4014
+ * further down in the text.
4006
4015
* Can also be used as a |method|:
4007
4016
* GetList()->match('word')
4008
4017
*/
@@ -4052,6 +4061,10 @@ export function match(denops: Denops, ...args: unknown[]): Promise<unknown> {
4052
4061
* The 'ignorecase' option is used to set the ignore-caseness of
4053
4062
* the pattern. 'smartcase' is NOT used. The matching is always
4054
4063
* done like 'magic' is set and 'cpoptions' is empty.
4064
+ * Note that a match at the start is preferred, thus when the
4065
+ * pattern is using "*" (any number of matches) it tends to find
4066
+ * zero matches at the start instead of a number of matches
4067
+ * further down in the text.
4055
4068
* Can also be used as a |method|:
4056
4069
* GetList()->match('word')
4057
4070
*/
@@ -4094,6 +4107,10 @@ export function strpbrk(denops: Denops, ...args: unknown[]): Promise<unknown> {
4094
4107
* The 'ignorecase' option is used to set the ignore-caseness of
4095
4108
* the pattern. 'smartcase' is NOT used. The matching is always
4096
4109
* done like 'magic' is set and 'cpoptions' is empty.
4110
+ * Note that a match at the start is preferred, thus when the
4111
+ * pattern is using "*" (any number of matches) it tends to find
4112
+ * zero matches at the start instead of a number of matches
4113
+ * further down in the text.
4097
4114
* Can also be used as a |method|:
4098
4115
* GetList()->match('word')
4099
4116
*/
@@ -4409,9 +4426,9 @@ export function matchstrpos(
4409
4426
4410
4427
/**
4411
4428
* Return the maximum value of all items in {expr}.
4412
- * {expr} can be a list or a dictionary . For a dictionary ,
4413
- * it returns the maximum of all values in the dictionary .
4414
- * If {expr} is neither a list nor a dictionary , or one of the
4429
+ * {expr} can be a List or a Dictionary . For a Dictionary ,
4430
+ * it returns the maximum of all values in the Dictionary .
4431
+ * If {expr} is neither a List nor a Dictionary , or one of the
4415
4432
* items in {expr} cannot be used as a Number this results in
4416
4433
* an error. An empty |List| or |Dictionary| results in zero.
4417
4434
* Can also be used as a |method|:
@@ -4423,9 +4440,9 @@ export function max(denops: Denops, ...args: unknown[]): Promise<unknown> {
4423
4440
}
4424
4441
4425
4442
/**
4426
- * {expr} can be a list or a dictionary . For a dictionary ,
4427
- * it returns the minimum of all values in the dictionary .
4428
- * If {expr} is neither a list nor a dictionary , or one of the
4443
+ * {expr} can be a List or a Dictionary . For a Dictionary ,
4444
+ * it returns the minimum of all values in the Dictionary .
4445
+ * If {expr} is neither a List nor a Dictionary , or one of the
4429
4446
* items in {expr} cannot be used as a Number this results in
4430
4447
* an error. An empty |List| or |Dictionary| results in zero.
4431
4448
* Can also be used as a |method|:
@@ -5861,8 +5878,8 @@ export function setloclist(
5861
5878
}
5862
5879
5863
5880
/**
5864
- * Restores a list of matches saved by |getmatches() for the
5865
- * current window| . Returns 0 if successful, otherwise -1. All
5881
+ * Restores a list of matches saved by |getmatches()| for the
5882
+ * current window. Returns 0 if successful, otherwise -1. All
5866
5883
* current matches are cleared before the list is restored. See
5867
5884
* example for |getmatches()|.
5868
5885
* If {win} is specified, use the window with this number or
@@ -5884,7 +5901,11 @@ export function setmatches(
5884
5901
5885
5902
/**
5886
5903
* Create or replace or add to the quickfix list.
5887
- * When {what} is not present, use the items in {list}. Each
5904
+ * If the optional {what} dictionary argument is supplied, then
5905
+ * only the items listed in {what} are set. The first {list}
5906
+ * argument is ignored. See below for the supported items in
5907
+ * {what}.
5908
+ * When {what} is not present, the items in {list} or used. Each
5888
5909
* item must be a dictionary. Non-dictionary items in {list} are
5889
5910
* ignored. Each dictionary item can contain the following
5890
5911
* entries:
@@ -5932,10 +5953,7 @@ export function setmatches(
5932
5953
* quickfix list in the stack and all the following lists are
5933
5954
* freed. To add a new quickfix list at the end of the stack,
5934
5955
* set "nr" in {what} to "$".
5935
- * If the optional {what} dictionary argument is supplied, then
5936
- * only the items listed in {what} are set. The first {list}
5937
- * argument is ignored. The following items can be specified in
5938
- * {what}:
5956
+ * The following items can be specified in dictionary {what}:
5939
5957
* context quickfix list context. See |quickfix-context|
5940
5958
* efm errorformat to use when parsing text from
5941
5959
* "lines". If this is not present, then the
@@ -5990,6 +6008,7 @@ export function setqflist(
5990
6008
5991
6009
/**
5992
6010
* Set the register {regname} to {value}.
6011
+ * If {regname} is "" or "@", the unnamed register '"' is used.
5993
6012
* {value} may be any value returned by |getreg()|, including
5994
6013
* a |List|.
5995
6014
* If {options} contains "a" or {regname} is upper case,
@@ -6105,20 +6124,23 @@ export function settabwinvar(
6105
6124
* Modify the tag stack of the window {nr} using {dict}.
6106
6125
* {nr} can be the window number or the |window-ID|.
6107
6126
* For a list of supported items in {dict}, refer to
6108
- * |gettagstack()|
6109
- * If {action} is not present or is set to 'r', then the tag
6110
- * stack is replaced. If {action} is set to 'a', then new entries
6111
- * from {dict} are pushed onto the tag stack.
6127
+ * |gettagstack()|. "curidx" takes effect before changing the tag
6128
+ * stack.
6129
+ * How the tag stack is modified depends on the {action}
6130
+ * argument:
6131
+ * - If {action} is not present or is set to 'r', then the tag
6132
+ * stack is replaced.
6133
+ * - If {action} is set to 'a', then new entries from {dict} are
6134
+ * pushed (added) onto the tag stack.
6135
+ * - If {action} is set to 't', then all the entries from the
6136
+ * current entry in the tag stack or "curidx" in {dict} are
6137
+ * removed and then new entries are pushed to the stack.
6138
+ * The current index is set to one after the length of the tag
6139
+ * stack after the modification.
6112
6140
* Returns zero for success, -1 for failure.
6113
- * Examples:
6114
- * Set current index of the tag stack to 4:
6115
- * call settagstack(1005, {'curidx' : 4})
6141
+ * Examples (for more examples see |tagstack-examples||):
6116
6142
* Empty the tag stack of window 3:
6117
6143
* call settagstack(3, {'items' : []})
6118
- * Push a new item onto the tag stack:
6119
- * let pos = [bufnr('myfile.txt'), 10, 1, 0]
6120
- * let newtag = [{'tagname' : 'mytag', 'from' : pos}]
6121
- * call settagstack(2, {'items' : newtag}, 'a')
6122
6144
* Save and restore the tag stack:
6123
6145
* let stack = gettagstack(1003)
6124
6146
* " do something else
@@ -6250,6 +6272,8 @@ export function shiftwidth(
6250
6272
* removed when "dir" is a symbolic link within the same
6251
6273
* directory. In order to resolve all the involved symbolic
6252
6274
* links before simplifying the path name, use |resolve()|.
6275
+ * Can also be used as a |method|:
6276
+ * GetName()->simplify()
6253
6277
*/
6254
6278
export function simplify ( denops : Denops , filename : unknown ) : Promise < unknown > ;
6255
6279
export function simplify ( denops : Denops , ...args : unknown [ ] ) : Promise < unknown > {
@@ -7184,7 +7208,7 @@ export function synstack(denops: Denops, ...args: unknown[]): Promise<unknown> {
7184
7208
* The command executed is constructed using several options:
7185
7209
* 'shell' 'shellcmdflag' 'shellxquote' {expr} 'shellredir' {tmp} 'shellxquote'
7186
7210
* ({tmp} is an automatically generated file name).
7187
- * For Unix and OS/2 braces are put around {expr} to allow for
7211
+ * For Unix, braces are put around {expr} to allow for
7188
7212
* concatenated commands.
7189
7213
* The command will be executed in "cooked" mode, so that a
7190
7214
* CTRL-C will interrupt the command (on Unix at least).
@@ -7958,11 +7982,12 @@ export function winheight(
7958
7982
* " Two horizontally split windows
7959
7983
* :echo winlayout()
7960
7984
* ['col', [['leaf', 1000], ['leaf', 1001]]]
7961
- * " Three horizontally split windows, with two
7962
- * " vertically split windows in the middle window
7985
+ * " The second tab page, with three horizontally split
7986
+ * " windows, with two vertically split windows in the
7987
+ * " middle window
7963
7988
* :echo winlayout(2)
7964
- * ['col', [['leaf', 1002], ['row', ['leaf', 1003],
7965
- * ['leaf', 1001]]], ['leaf', 1000]]
7989
+ * ['col', [['leaf', 1002], ['row', [[ 'leaf', 1003],
7990
+ * ['leaf', 1001]]], ['leaf', 1000] ]]
7966
7991
* Can also be used as a |method|:
7967
7992
* GetTabnr()->winlayout()
7968
7993
*/
@@ -7977,6 +8002,7 @@ export function winlayout(
7977
8002
/**
7978
8003
* The result is a Number, which is the number of the current
7979
8004
* window. The top window has number 1.
8005
+ * Returns zero for a popup window.
7980
8006
* The optional argument {arg} supports the following values:
7981
8007
* $ the number of the last window (the window
7982
8008
* count).
0 commit comments