diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2023-08-01 16:17:26 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-01 16:17:26 -0700 |
| commit | d086bc1e8590a92a70c414bd60e1e988bbdd3c0a (patch) | |
| tree | 3e41a83e7cee67d9c7c4eeb886c81113d4e3a313 /runtime/lua | |
| parent | 642586977158b44c007177169d3091840a72a8fd (diff) | |
| download | rneovim-d086bc1e8590a92a70c414bd60e1e988bbdd3c0a.tar.gz rneovim-d086bc1e8590a92a70c414bd60e1e988bbdd3c0a.tar.bz2 rneovim-d086bc1e8590a92a70c414bd60e1e988bbdd3c0a.zip | |
docs: drop "Can also be used as a method" #24508
Now that we "own" builtin.txt, we cant remove the repetitive mention of
Vimscript's UFCS syntax. It's noisy to mention this for each function,
and it's also not a Vimscript feature that should be encouraged.
Also change the builtin.txt heading to "NVIM REFERENCE MANUAL", which
indicates when a help file is Nvim-owned.
Diffstat (limited to 'runtime/lua')
| -rw-r--r-- | runtime/lua/vim/_meta/vimfn.lua | 1256 |
1 files changed, 0 insertions, 1256 deletions
diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua index 261f349756..3de2e5ac4f 100644 --- a/runtime/lua/vim/_meta/vimfn.lua +++ b/runtime/lua/vim/_meta/vimfn.lua @@ -15,10 +15,6 @@ error('Cannot require a meta file') --- echo abs(-4) --- < 4 --- ---- Can also be used as a |method|: >vim ---- Compute()->abs() ---- < ---- --- @param expr any --- @return number function vim.fn.abs(expr) end @@ -35,10 +31,6 @@ function vim.fn.abs(expr) end --- echo acos(-0.5) --- < 2.094395 --- ---- Can also be used as a |method|: >vim ---- Compute()->acos() ---- < ---- --- @param expr any --- @return number function vim.fn.acos(expr) end @@ -53,10 +45,6 @@ function vim.fn.acos(expr) end --- Use |insert()| to add an item at another position. --- Returns 1 if {object} is not a |List| or a |Blob|. --- ---- Can also be used as a |method|: >vim ---- mylist->add(val1)->add(val2) ---- < ---- --- @param object any --- @param expr any --- @return any @@ -67,8 +55,6 @@ function vim.fn.add(object, expr) end --- Also see `or()` and `xor()`. --- Example: >vim --- let flag = and(bits, 0x80) ---- <Can also be used as a |method|: >vim ---- let flag = bits->and(0x80) --- < --- --- @param expr any @@ -96,9 +82,6 @@ function vim.fn.api_info() end --- 0 for success. Example: >vim --- let failed = append(line('$'), "# THE END") --- let failed = append(0, ["Chapter 1", "the beginning"]) ---- ---- <Can also be used as a |method| after a List: >vim ---- mylist->append(lnum) --- < --- --- @param lnum integer @@ -124,9 +107,6 @@ function vim.fn.append(lnum, text) end --- error message is given. Example: >vim --- let failed = appendbufline(13, 0, "# THE START") --- < ---- Can also be used as a |method| after a List: >vim ---- mylist->appendbufline(buf, lnum) ---- < --- --- @param buf any --- @param lnum integer @@ -204,10 +184,6 @@ function vim.fn.argv(nr, winid) end --- echo asin(-0.5) --- < -0.523599 --- ---- Can also be used as a |method|: >vim ---- Compute()->asin() ---- < ---- --- @param expr any --- @return number function vim.fn.asin(expr) end @@ -217,10 +193,6 @@ function vim.fn.asin(expr) end --- Also see |assert_fails()|, |assert_nobeep()| and --- |assert-return|. --- ---- Can also be used as a |method|: >vim ---- GetCmd()->assert_beeps() ---- < ---- --- @param cmd any --- @return 0|1 function vim.fn.assert_beeps(cmd) end @@ -240,10 +212,6 @@ function vim.fn.assert_beeps(cmd) end --- <Will result in a string to be added to |v:errors|: --- test.vim line 12: Expected 'foo' but got 'bar' ~ --- ---- Can also be used as a |method|: >vim ---- mylist->assert_equal([1, 2, 3]) ---- < ---- --- @param expected any --- @param actual any --- @param msg? any @@ -256,10 +224,6 @@ function vim.fn.assert_equal(expected, actual, msg) end --- When {fname-one} or {fname-two} does not exist the error will --- mention that. --- ---- Can also be used as a |method|: >vim ---- GetLog()->assert_equalfile('expected.log') ---- < ---- --- @return 0|1 function vim.fn.assert_equalfile() end @@ -314,10 +278,6 @@ function vim.fn.assert_exception(error, msg) end --- Note that beeping is not considered an error, and some failing --- commands only beep. Use |assert_beeps()| for those. --- ---- Can also be used as a |method|: >vim ---- GetCmd()->assert_fails('E99:') ---- < ---- --- @param cmd any --- @param error? any --- @param msg? any @@ -335,10 +295,6 @@ function vim.fn.assert_fails(cmd, error, msg, lnum, context) end --- A value is false when it is zero. When {actual} is not a --- number the assert fails. --- ---- Can also be used as a |method|: >vim ---- GetResult()->assert_false() ---- < ---- --- @param actual any --- @param msg? any --- @return 0|1 @@ -376,10 +332,6 @@ function vim.fn.assert_inrange(lower, upper, actual, msg) end --- <Will result in a string to be added to |v:errors|: --- test.vim line 12: Pattern '^f.*o$' does not match 'foobar' ~ --- ---- Can also be used as a |method|: >vim ---- getFile()->assert_match('foo.*') ---- < ---- --- @param pattern any --- @param actual any --- @param msg? any @@ -390,10 +342,6 @@ function vim.fn.assert_match(pattern, actual, msg) end --- produces a beep or visual bell. --- Also see |assert_beeps()|. --- ---- Can also be used as a |method|: >vim ---- GetCmd()->assert_nobeep() ---- < ---- --- @param cmd any --- @return 0|1 function vim.fn.assert_nobeep(cmd) end @@ -402,10 +350,6 @@ function vim.fn.assert_nobeep(cmd) end --- |v:errors| when {expected} and {actual} are equal. --- Also see |assert-return|. --- ---- Can also be used as a |method|: >vim ---- mylist->assert_notequal([1, 2, 3]) ---- < ---- --- @param expected any --- @param actual any --- @param msg? any @@ -416,10 +360,6 @@ function vim.fn.assert_notequal(expected, actual, msg) end --- |v:errors| when {pattern} matches {actual}. --- Also see |assert-return|. --- ---- Can also be used as a |method|: >vim ---- getFile()->assert_notmatch('bar.*') ---- < ---- --- @param pattern any --- @param actual any --- @param msg? any @@ -429,10 +369,6 @@ function vim.fn.assert_notmatch(pattern, actual, msg) end --- Report a test failure directly, using String {msg}. --- Always returns one. --- ---- Can also be used as a |method|: >vim ---- GetMessage()->assert_report() ---- < ---- --- @param msg any --- @return 0|1 function vim.fn.assert_report(msg) end @@ -444,10 +380,6 @@ function vim.fn.assert_report(msg) end --- When {actual} is not a number or |v:true| the assert fails. --- When {msg} is given it precedes the default message. --- ---- Can also be used as a |method|: >vim ---- GetResult()->assert_true() ---- < ---- --- @param actual any --- @param msg? any --- @return 0|1 @@ -463,10 +395,6 @@ function vim.fn.assert_true(actual, msg) end --- echo atan(-4.01) --- < -1.326405 --- ---- Can also be used as a |method|: >vim ---- Compute()->atan() ---- < ---- --- @param expr any --- @return number function vim.fn.atan(expr) end @@ -482,10 +410,6 @@ function vim.fn.atan(expr) end --- echo atan2(1, -1) --- < 2.356194 --- ---- Can also be used as a |method|: >vim ---- Compute()->atan2(1) ---- < ---- --- @param expr1 any --- @param expr2 any --- @return number @@ -498,10 +422,6 @@ function vim.fn.atan2(expr1, expr2) end --- <Returns an empty List on error. |list2blob()| does the --- opposite. --- ---- Can also be used as a |method|: >vim ---- GetBlob()->blob2list() ---- < ---- --- @param blob any --- @return any[] function vim.fn.blob2list(blob) end @@ -551,9 +471,6 @@ function vim.fn.browsedir(title, initdir) end --- call bufload(bufnr) --- call setbufline(bufnr, 1, ['some', 'text']) --- <Returns 0 on error. ---- Can also be used as a |method|: >vim ---- let bufnr = 'somename'->bufadd() ---- < --- --- @param name string --- @return integer @@ -580,10 +497,6 @@ function vim.fn.bufadd(name) end --- Use "bufexists(0)" to test for the existence of an alternate --- file name. --- ---- Can also be used as a |method|: >vim ---- let exists = 'somename'->bufexists() ---- < ---- --- @param buf any --- @return 0|1 function vim.fn.bufexists(buf) end @@ -613,10 +526,6 @@ function vim.fn.buffer_number(...) end --- {buf} exists and is listed (has the 'buflisted' option set). --- The {buf} argument is used like with |bufexists()|. --- ---- Can also be used as a |method|: >vim ---- let listed = 'somename'->buflisted() ---- < ---- --- @param buf any --- @return 0|1 function vim.fn.buflisted(buf) end @@ -630,10 +539,6 @@ function vim.fn.buflisted(buf) end --- there will be no dialog, the buffer will be loaded anyway. --- The {buf} argument is used like with |bufexists()|. --- ---- Can also be used as a |method|: >vim ---- eval 'somename'->bufload() ---- < ---- --- @param buf any function vim.fn.bufload(buf) end @@ -641,10 +546,6 @@ function vim.fn.bufload(buf) end --- {buf} exists and is loaded (shown in a window or hidden). --- The {buf} argument is used like with |bufexists()|. --- ---- Can also be used as a |method|: >vim ---- let loaded = 'somename'->bufloaded() ---- < ---- --- @param buf any --- @return 0|1 function vim.fn.bufloaded(buf) end @@ -669,11 +570,6 @@ function vim.fn.bufloaded(buf) end --- with a listed buffer, that one is returned. Next unlisted --- buffers are searched for. --- If the {buf} is a String, but you want to use it as a buffer ---- number, force it to be a Number by adding zero to it: >vim ---- echo bufname("3" + 0) ---- <Can also be used as a |method|: >vim ---- echo bufnr->bufname() ---- --- <If the buffer doesn't exist, or doesn't have a name, an empty --- string is returned. >vim --- echo bufname("#") " alternate buffer name @@ -699,10 +595,6 @@ function vim.fn.bufname(buf) end --- number necessarily exist, because ":bwipeout" may have removed --- them. Use bufexists() to test for the existence of a buffer. --- ---- Can also be used as a |method|: >vim ---- echo bufref->bufnr() ---- < ---- --- @param buf? any --- @param create? any --- @return integer @@ -718,10 +610,6 @@ function vim.fn.bufnr(buf, create) end --- Only deals with the current tab page. See |win_findbuf()| for --- finding more. --- ---- Can also be used as a |method|: >vim ---- FindBuffer()->bufwinid() ---- < ---- --- @param buf any --- @return integer function vim.fn.bufwinid(buf) end @@ -736,10 +624,6 @@ function vim.fn.bufwinid(buf) end --- <The number can be used with |CTRL-W_w| and ":wincmd w" --- |:wincmd|. --- ---- Can also be used as a |method|: >vim ---- FindBuffer()->bufwinnr() ---- < ---- --- @param buf any --- @return integer function vim.fn.bufwinnr(buf) end @@ -753,10 +637,6 @@ function vim.fn.bufwinnr(buf) end --- --- Returns -1 if the {byte} value is invalid. --- ---- Can also be used as a |method|: >vim ---- GetOffset()->byte2line() ---- < ---- --- @param byte any --- @return integer function vim.fn.byte2line(byte) end @@ -795,9 +675,6 @@ function vim.fn.byte2line(byte) end --- echo byteidx('a😊😊', 2, 1) " returns 1 --- echo byteidx('a😊😊', 3, 1) " returns 5 --- < ---- Can also be used as a |method|: >vim ---- GetName()->byteidx(idx) ---- < --- --- @param expr any --- @param nr integer @@ -815,10 +692,6 @@ function vim.fn.byteidx(expr, nr, utf16) end --- character is 3 bytes), the second echo results in 1 ('e' is --- one byte). --- ---- Can also be used as a |method|: >vim ---- GetName()->byteidxcomp(idx) ---- < ---- --- @param expr any --- @param nr integer --- @param utf16? any @@ -833,10 +706,6 @@ function vim.fn.byteidxcomp(expr, nr, utf16) end --- {dict} is for functions with the "dict" attribute. It will be --- used to set the local variable "self". |Dictionary-function| --- ---- Can also be used as a |method|: >vim ---- GetFunc()->call([arg, arg], dict) ---- < ---- --- @param func any --- @param arglist any --- @param dict? any @@ -856,10 +725,6 @@ function vim.fn.call(func, arglist, dict) end --- --- Returns 0.0 if {expr} is not a |Float| or a |Number|. --- ---- Can also be used as a |method|: >vim ---- Compute()->ceil() ---- < ---- --- @param expr any --- @return number function vim.fn.ceil(expr) end @@ -925,10 +790,6 @@ function vim.fn.chansend(id, data) end --- --- Returns 0 if {string} is not a |String|. --- ---- Can also be used as a |method|: >vim ---- GetChar()->char2nr() ---- < ---- --- @param string string --- @param utf8? any --- @return 0|1 @@ -956,10 +817,6 @@ function vim.fn.charclass(string) end --- echo charcol('.') " returns 3 --- echo col('.') " returns 7 --- ---- <Can also be used as a |method|: >vim ---- GetPos()->col() ---- < ---- --- @param expr any --- @param winid? integer --- @return integer @@ -997,9 +854,6 @@ function vim.fn.charcol(expr, winid) end --- echo charidx('áb́ć', 16) " returns -1 --- echo charidx('a😊😊', 4, 0, 1) " returns 2 --- < ---- Can also be used as a |method|: >vim ---- GetName()->charidx(idx) ---- < --- --- @param string string --- @param idx integer @@ -1029,10 +883,6 @@ function vim.fn.charidx(string, idx, countcc, utf16) end --- call chdir(save_dir) --- endif --- ---- <Can also be used as a |method|: >vim ---- GetDir()->chdir() ---- < ---- --- @param dir string --- @return string function vim.fn.chdir(dir) end @@ -1044,10 +894,6 @@ function vim.fn.chdir(dir) end --- When {lnum} is invalid -1 is returned. --- See |C-indenting|. --- ---- Can also be used as a |method|: >vim ---- GetLnum()->cindent() ---- < ---- --- @param lnum integer --- @return integer function vim.fn.cindent(lnum) end @@ -1057,10 +903,6 @@ function vim.fn.cindent(lnum) end --- If {win} is specified, use the window with this number or --- window ID instead of the current window. --- ---- Can also be used as a |method|: >vim ---- GetWin()->clearmatches() ---- < ---- --- @param win? any function vim.fn.clearmatches(win) end @@ -1101,10 +943,6 @@ function vim.fn.clearmatches(win) end --- moved, this can be used to obtain the column in Insert mode: >vim --- imap <F2> <Cmd>echo col(".").."\n"<CR> --- ---- <Can also be used as a |method|: >vim ---- GetPos()->col() ---- < ---- --- @param expr any --- @param winid? integer --- @return integer @@ -1139,11 +977,6 @@ function vim.fn.col(expr, winid) end --- <This isn't very useful, but it shows how it works. Note that --- an empty string is returned to avoid a zero being inserted. --- ---- Can also be used as a |method|, the base is passed as the ---- second argument: >vim ---- GetMatches()->complete(col('.')) ---- < ---- --- @param startcol any --- @param matches any function vim.fn.complete(startcol, matches) end @@ -1156,10 +989,6 @@ function vim.fn.complete(startcol, matches) end --- See |complete-functions| for an explanation of {expr}. It is --- the same as one item in the list that 'omnifunc' would return. --- ---- Can also be used as a |method|: >vim ---- GetMoreMatches()->complete_add() ---- < ---- --- @param expr any --- @return 0|1|2 function vim.fn.complete_add(expr) end @@ -1231,10 +1060,6 @@ function vim.fn.complete_check() end --- " Get only 'mode' and 'pum_visible' --- call complete_info(['mode', 'pum_visible']) --- ---- <Can also be used as a |method|: >vim ---- GetItems()->complete_info() ---- < ---- --- @param what? any --- @return table function vim.fn.complete_info(what) end @@ -1290,10 +1115,6 @@ function vim.fn.complete_info(what) end --- don't fit, a vertical layout is used anyway. For some systems --- the horizontal layout is always used. --- ---- Can also be used as a |method|in: >vim ---- BuildMessage()->confirm("&Yes\n&No") ---- < ---- --- @param msg any --- @param choices? any --- @param default? any @@ -1309,9 +1130,6 @@ function vim.fn.confirm(msg, choices, default, type) end --- changing an item changes the contents of both |Lists|. --- A |Dictionary| is copied in a similar way as a |List|. --- Also see |deepcopy()|. ---- Can also be used as a |method|: >vim ---- mylist->copy() ---- < --- --- @param expr any --- @return any @@ -1326,10 +1144,6 @@ function vim.fn.copy(expr) end --- echo cos(-4.01) --- < -0.646043 --- ---- Can also be used as a |method|: >vim ---- Compute()->cos() ---- < ---- --- @param expr any --- @return number function vim.fn.cos(expr) end @@ -1344,10 +1158,6 @@ function vim.fn.cos(expr) end --- echo cosh(-0.5) --- < -1.127626 --- ---- Can also be used as a |method|: >vim ---- Compute()->cosh() ---- < ---- --- @param expr any --- @return number function vim.fn.cosh(expr) end @@ -1364,10 +1174,6 @@ function vim.fn.cosh(expr) end --- occurrences of {expr} is returned. Zero is returned when --- {expr} is an empty string. --- ---- Can also be used as a |method|: >vim ---- mylist->count(val) ---- < ---- --- @param comp any --- @param expr any --- @param ic? any @@ -1451,10 +1257,6 @@ function vim.fn.cursor(lnum, col, off) end --- position within a <Tab> or after the last character. --- Returns 0 when the position could be set, -1 otherwise. --- ---- Can also be used as a |method|: >vim ---- GetCursorPos()->cursor() ---- < ---- --- @param list any --- @return any function vim.fn.cursor(list) end @@ -1467,10 +1269,6 @@ function vim.fn.cursor(list) end --- Returns |TRUE| if successfully interrupted the program. --- Otherwise returns |FALSE|. --- ---- Can also be used as a |method|: >vim ---- GetPid()->debugbreak() ---- < ---- --- @param pid any --- @return any function vim.fn.debugbreak(pid) end @@ -1494,10 +1292,6 @@ function vim.fn.debugbreak(pid) end --- {noref} set to 1 will fail. --- Also see |copy()|. --- ---- Can also be used as a |method|: >vim ---- GetObject()->deepcopy() ---- < ---- --- @param expr any --- @param noref? any --- @return any @@ -1521,10 +1315,6 @@ function vim.fn.deepcopy(expr, noref) end --- operation was successful and -1/true when the deletion failed --- or partly failed. --- ---- Can also be used as a |method|: >vim ---- GetName()->delete() ---- < ---- --- @param fname integer --- @param flags? string --- @return integer @@ -1543,10 +1333,6 @@ function vim.fn.delete(fname, flags) end --- when using |line()| this refers to the current buffer. Use "$" --- to refer to the last line in buffer {buf}. --- ---- Can also be used as a |method|: >vim ---- GetBuffer()->deletebufline(1) ---- < ---- --- @param buf any --- @param first any --- @param last? any @@ -1630,10 +1416,6 @@ function vim.fn.did_filetype() end --- line, "'m" mark m, etc. --- Returns 0 if the current window is not in diff mode. --- ---- Can also be used as a |method|: >vim ---- GetLnum()->diff_filler() ---- < ---- --- @param lnum integer --- @return any function vim.fn.diff_filler(lnum) end @@ -1648,10 +1430,6 @@ function vim.fn.diff_filler(lnum) end --- The highlight ID can be used with |synIDattr()| to obtain --- syntax information about the highlighting. --- ---- Can also be used as a |method|: >vim ---- GetLnum()->diff_hlID(col) ---- < ---- --- @param lnum integer --- @param col integer --- @return any @@ -1672,9 +1450,6 @@ function vim.fn.diff_hlID(lnum, col) end --- call digraph_set('aa', 'あ') --- echo digraph_get('aa') " Returns 'あ' --- < ---- Can also be used as a |method|: >vim ---- GetChars()->digraph_get() ---- < --- --- @param chars any --- @return any @@ -1693,9 +1468,6 @@ function vim.fn.digraph_get(chars) end --- " Get all the digraphs, including default digraphs --- echo digraph_getlist(1) --- < ---- Can also be used as a |method|: >vim ---- GetNumber()->digraph_getlist() ---- < --- --- @param listall? any --- @return any @@ -1756,10 +1528,6 @@ function vim.fn.digraph_setlist(digraphlist) end --- - |v:false| and |v:null| are empty, |v:true| is not. --- - A |Blob| is empty when its length is zero. --- ---- Can also be used as a |method|: >vim ---- mylist->empty() ---- < ---- --- @param expr any --- @return any function vim.fn.empty(expr) end @@ -1782,10 +1550,6 @@ function vim.fn.environ() end --- c:\\program\ files\\vim --- <Also see |shellescape()| and |fnameescape()|. --- ---- Can also be used as a |method|: >vim ---- GetText()->escape(' \') ---- < ---- --- @param string string --- @param chars any --- @return any @@ -1797,10 +1561,6 @@ function vim.fn.escape(string, chars) end --- of them. Also works for |Funcref|s that refer to existing --- functions. --- ---- Can also be used as a |method|: >vim ---- argv->join()->eval() ---- < ---- --- @param string string --- @return any function vim.fn.eval(string) end @@ -1835,10 +1595,6 @@ function vim.fn.eventhandler() end --- -1 not implemented on this system --- |exepath()| can be used to get the full path of an executable. --- ---- Can also be used as a |method|: >vim ---- GetCommand()->executable() ---- < ---- --- @param expr any --- @return any function vim.fn.executable(expr) end @@ -1870,10 +1626,6 @@ function vim.fn.executable(expr) end --- To execute a command in another window than the current one --- use `win_execute()`. --- ---- Can also be used as a |method|: >vim ---- GetCommand()->execute() ---- < ---- --- @param command any --- @param silent? boolean --- @return any @@ -1884,10 +1636,6 @@ function vim.fn.execute(command, silent) end --- Returns empty string otherwise. --- If {expr} starts with "./" the |current-directory| is used. --- ---- Can also be used as a |method|: >vim ---- GetCommand()->exepath() ---- < ---- --- @param expr any --- @return any function vim.fn.exepath(expr) end @@ -1979,10 +1727,6 @@ function vim.fn.exepath(expr) end --- <This doesn't check for existence of the "bufcount" variable, --- but gets the value of "bufcount", and checks if that exists. --- ---- Can also be used as a |method|: >vim ---- Varname()->exists() ---- < ---- --- @param expr any --- @return 0|1 function vim.fn.exists(expr) end @@ -1997,10 +1741,6 @@ function vim.fn.exists(expr) end --- echo exp(-1) --- < 0.367879 --- ---- Can also be used as a |method|: >vim ---- Compute()->exp() ---- < ---- --- @param expr any --- @return any function vim.fn.exp(expr) end @@ -2095,10 +1835,6 @@ function vim.fn.exp(expr) end --- See |glob()| for finding existing files. See |system()| for --- getting the raw output of an external command. --- ---- Can also be used as a |method|: >vim ---- Getpattern()->expand() ---- < ---- --- @param string string --- @param nosuf? boolean --- @param list? any @@ -2127,9 +1863,6 @@ function vim.fn.expand(string, nosuf, list) end --- < >vim --- echo expandcmd('make %<.o', {'errmsg': v:true}) --- < ---- Can also be used as a |method|: >vim ---- GetCommand()->expandcmd() ---- < --- --- @param string string --- @param options? table @@ -2171,10 +1904,6 @@ function vim.fn.expandcmd(string, options) end --- fails. --- Returns {expr1}. Returns 0 on error. --- ---- Can also be used as a |method|: >vim ---- mylist->extend(otherlist) ---- < ---- --- @param expr1 any --- @param expr2 any --- @param expr3? any @@ -2235,10 +1964,6 @@ function vim.fn.extendnew(expr1, expr2, expr3) end --- --- Return value is always 0. --- ---- Can also be used as a |method|: >vim ---- GetInput()->feedkeys() ---- < ---- --- @param string string --- @param mode? string --- @return any @@ -2267,10 +1992,6 @@ function vim.fn.file_readable(file) end --- 1 --- < --- ---- Can also be used as a |method|: >vim ---- GetName()->filereadable() ---- < ---- --- @param file string --- @return 0|1 function vim.fn.filereadable(file) end @@ -2280,10 +2001,6 @@ function vim.fn.filereadable(file) end --- exist, or is not writable, the result is 0. If {file} is a --- directory, and we can write to it, the result is 2. --- ---- Can also be used as a |method|: >vim ---- GetName()->filewritable() ---- < ---- --- @param file string --- @return 0|1 function vim.fn.filewritable(file) end @@ -2337,10 +2054,6 @@ function vim.fn.filewritable(file) end --- {expr2} is a Funcref errors inside a function are ignored, --- unless it was defined with the "abort" flag. --- ---- Can also be used as a |method|: >vim ---- mylist->filter(expr2) ---- < ---- --- @param expr1 any --- @param expr2 any --- @return any @@ -2363,10 +2076,6 @@ function vim.fn.filter(expr1, expr2) end --- --- This is quite similar to the ex-command `:find`. --- ---- Can also be used as a |method|: >vim ---- GetName()->finddir() ---- < ---- --- @param name string --- @param path? string --- @param count? any @@ -2380,10 +2089,6 @@ function vim.fn.finddir(name, path, count) end --- <Searches from the directory of the current file upwards until --- it finds the file "tags.vim". --- ---- Can also be used as a |method|: >vim ---- GetName()->findfile() ---- < ---- --- @param name string --- @param path? string --- @param count? any @@ -2408,10 +2113,6 @@ function vim.fn.findfile(name, path, count) end --- echo flatten([1, [2, [3, 4]], 5], 1) --- < [1, 2, [3, 4], 5] --- ---- Can also be used as a |method|: >vim ---- mylist->flatten() ---- < ---- --- @param list any --- @param maxdepth? any --- @return any[]|0 @@ -2445,10 +2146,6 @@ function vim.fn.flattennew(list, maxdepth) end --- echo float2nr(1.0e-100) --- < 0 --- ---- Can also be used as a |method|: >vim ---- Compute()->float2nr() ---- < ---- --- @param expr any --- @return any function vim.fn.float2nr(expr) end @@ -2465,10 +2162,6 @@ function vim.fn.float2nr(expr) end --- echo floor(4.0) --- < 4.0 --- ---- Can also be used as a |method|: >vim ---- Compute()->floor() ---- < ---- --- @param expr any --- @return any function vim.fn.floor(expr) end @@ -2488,10 +2181,6 @@ function vim.fn.floor(expr) end --- echo fmod(-12.33, 1.22) --- < -0.13 --- ---- Can also be used as a |method|: >vim ---- Compute()->fmod(1.22) ---- < ---- --- @param expr1 any --- @param expr2 any --- @return any @@ -2512,9 +2201,6 @@ function vim.fn.fmod(expr1, expr2) end --- <results in executing: >vim --- edit \+some\ str\%nge\|name --- < ---- Can also be used as a |method|: >vim ---- GetName()->fnameescape() ---- < --- --- @param string string --- @return string @@ -2536,10 +2222,6 @@ function vim.fn.fnameescape(string) end --- Note: Environment variables don't work in {fname}, use --- |expand()| first then. --- ---- Can also be used as a |method|: >vim ---- GetName()->fnamemodify(':p:h') ---- < ---- --- @param fname integer --- @param mods string --- @return string @@ -2551,10 +2233,6 @@ function vim.fn.fnamemodify(fname, mods) end --- {lnum} is used like with |getline()|. Thus "." is the current --- line, "'m" mark m, etc. --- ---- Can also be used as a |method|: >vim ---- GetLnum()->foldclosed() ---- < ---- --- @param lnum integer --- @return integer function vim.fn.foldclosed(lnum) end @@ -2565,10 +2243,6 @@ function vim.fn.foldclosed(lnum) end --- {lnum} is used like with |getline()|. Thus "." is the current --- line, "'m" mark m, etc. --- ---- Can also be used as a |method|: >vim ---- GetLnum()->foldclosedend() ---- < ---- --- @param lnum integer --- @return integer function vim.fn.foldclosedend(lnum) end @@ -2584,10 +2258,6 @@ function vim.fn.foldclosedend(lnum) end --- {lnum} is used like with |getline()|. Thus "." is the current --- line, "'m" mark m, etc. --- ---- Can also be used as a |method|: >vim ---- GetLnum()->foldlevel() ---- < ---- --- @param lnum integer --- @return integer function vim.fn.foldlevel(lnum) end @@ -2619,10 +2289,6 @@ function vim.fn.foldtext() end --- line, "'m" mark m, etc. --- Useful when exporting folded text, e.g., to HTML. --- ---- Can also be used as a |method|: >vim ---- GetLnum()->foldtextresult() ---- < ---- --- @param lnum integer --- @return string function vim.fn.foldtextresult(lnum) end @@ -2638,10 +2304,6 @@ function vim.fn.foldtextresult(lnum) end --- For example `fullcommand('s')`, `fullcommand('sub')`, --- `fullcommand(':%substitute')` all return "substitute". --- ---- Can also be used as a |method|: >vim ---- GetName()->fullcommand() ---- < ---- --- @param name string --- @return string function vim.fn.fullcommand(name) end @@ -2657,10 +2319,6 @@ function vim.fn.fullcommand(name) end --- instead). {name} cannot be a builtin function. --- Returns 0 on error. --- ---- Can also be used as a |method|: >vim ---- GetFuncname()->funcref([arg]) ---- < ---- --- @param name string --- @param arglist? any --- @param dict? any @@ -2748,10 +2406,6 @@ function vim.fn.funcref(name, arglist, dict) end --- < --- Returns 0 on error. --- ---- Can also be used as a |method|: >vim ---- GetFuncname()->function([arg]) ---- < ---- --- @param name string --- @param arglist? any --- @param dict? any @@ -2784,9 +2438,6 @@ function vim.fn.garbagecollect(atexit) end --- 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|: >vim ---- mylist->get(idx) ---- < --- --- @param list any[] --- @param idx integer @@ -2898,9 +2549,6 @@ function vim.fn.getbufinfo(buf) end --- To get buffer-local options use: >vim --- getbufvar({bufnr}, '&option_name') --- < ---- Can also be used as a |method|: >vim ---- GetBufnr()->getbufinfo() ---- < --- --- @param dict? table<string,any> --- @return any @@ -2930,10 +2578,6 @@ function vim.fn.getbufinfo(dict) end --- Example: >vim --- let lines = getbufline(bufnr("myfile"), 1, "$") --- ---- <Can also be used as a |method|: >vim ---- GetBufnr()->getbufline(lnum) ---- < ---- --- @param buf any --- @param lnum integer --- @param end_? integer @@ -2968,10 +2612,6 @@ function vim.fn.getbufoneline(buf, lnum) end --- let bufmodified = getbufvar(1, "&mod") --- echo "todo myvar = " .. getbufvar("todo", "myvar") --- ---- <Can also be used as a |method|: >vim ---- GetBufnr()->getbufvar(varname) ---- < ---- --- @param buf any --- @param varname string --- @param def? any @@ -3001,10 +2641,6 @@ function vim.fn.getcellwidths() end --- position refers to the position in the list. For other --- buffers, it is set to the length of the list. --- ---- Can also be used as a |method|: >vim ---- GetBufnr()->getchangelist() ---- < ---- --- @param buf? integer|string --- @return table[] function vim.fn.getchangelist(buf) end @@ -3106,9 +2742,6 @@ function vim.fn.getcharmod() end --- getcharpos('.') returns [0, 5, 3, 0] --- getpos('.') returns [0, 5, 7, 0] --- < ---- Can also be used as a |method|: >vim ---- GetMark()->getcharpos() ---- < --- --- @param expr any --- @return integer[] @@ -3286,10 +2919,6 @@ function vim.fn.getcmdwintype() end --- If there are no matches, an empty list is returned. An --- invalid value for {type} produces an error. --- ---- Can also be used as a |method|: >vim ---- GetPattern()->getcompletion('color') ---- < ---- --- @param pat any --- @param type any --- @param filtered? any @@ -3320,10 +2949,6 @@ function vim.fn.getcompletion(pat, type, filtered) end --- <Note that this only works within the window. See --- |winrestview()| for restoring more state. --- ---- Can also be used as a |method|: >vim ---- GetWinid()->getcurpos() ---- < ---- --- @param winid? integer --- @return any function vim.fn.getcurpos(winid) end @@ -3336,9 +2961,6 @@ function vim.fn.getcurpos(winid) end --- getcursorcharpos() " returns [0, 3, 2, 0, 3] --- getcurpos() " returns [0, 3, 4, 0, 3] --- < ---- Can also be used as a |method|: >vim ---- GetWinid()->getcursorcharpos() ---- < --- --- @param winid? integer --- @return any @@ -3359,10 +2981,6 @@ function vim.fn.getcursorcharpos(winid) end --- directory is returned. --- Throw error if the arguments are invalid. |E5000| |E5001| |E5002| --- ---- Can also be used as a |method|: >vim ---- GetWinnr()->getcwd() ---- < ---- --- @param winnr? integer --- @param tabnr? integer --- @return string @@ -3376,10 +2994,6 @@ function vim.fn.getcwd(winnr, tabnr) end --- is different from a variable set to an empty string. --- See also |expr-env|. --- ---- Can also be used as a |method|: >vim ---- GetVarname()->getenv() ---- < ---- --- @param name string --- @return string function vim.fn.getenv(name) end @@ -3413,9 +3027,6 @@ function vim.fn.getfontname(name) end --- <This will hopefully (from a security point of view) display --- the string "rw-r--r--" or even "rw-------". --- ---- Can also be used as a |method|: >vim ---- GetFilename()->getfperm() ---- < --- For setting permissions use |setfperm()|. --- --- @param fname integer @@ -3429,10 +3040,6 @@ function vim.fn.getfperm(fname) end |