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 /src/nvim/eval.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 'src/nvim/eval.lua')
| -rw-r--r-- | src/nvim/eval.lua | 991 |
1 files changed, 2 insertions, 989 deletions
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 37b2fcdaea..8feb81df41 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -50,9 +50,6 @@ M.funcs = { echo abs(-4) < 4 - Can also be used as a |method|: >vim - Compute()->abs() - < ]=], name = 'abs', params = { { 'expr', 'any' } }, @@ -75,9 +72,6 @@ M.funcs = { echo acos(-0.5) < 2.094395 - Can also be used as a |method|: >vim - Compute()->acos() - < ]=], float_func = 'acos', name = 'acos', @@ -99,9 +93,6 @@ M.funcs = { 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) - < ]=], name = 'add', params = { { 'object', 'any' }, { 'expr', 'any' } }, @@ -117,8 +108,6 @@ M.funcs = { 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) < ]=], name = 'and', @@ -155,10 +144,8 @@ M.funcs = { 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) < + ]=], name = 'append', params = { { 'lnum', 'integer' }, { 'text', 'any' } }, @@ -187,9 +174,7 @@ M.funcs = { 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) - < + ]=], name = 'appendbufline', params = { { 'buf', 'any' }, { 'lnum', 'integer' }, { 'text', 'string' } }, @@ -284,9 +269,6 @@ M.funcs = { echo asin(-0.5) < -0.523599 - Can also be used as a |method|: >vim - Compute()->asin() - < ]=], float_func = 'asin', name = 'asin', @@ -303,9 +285,6 @@ M.funcs = { Also see |assert_fails()|, |assert_nobeep()| and |assert-return|. - Can also be used as a |method|: >vim - GetCmd()->assert_beeps() - < ]=], name = 'assert_beeps', params = { { 'cmd', 'any' } }, @@ -331,9 +310,6 @@ M.funcs = { <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]) - < ]=], name = 'assert_equal', params = { { 'expected', 'any' }, { 'actual', 'any' }, { 'msg', 'any' } }, @@ -350,9 +326,6 @@ M.funcs = { 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') - < ]=], name = 'assert_equalfile', params = {}, @@ -417,9 +390,6 @@ M.funcs = { 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:') - < ]=], name = 'assert_fails', params = { @@ -445,9 +415,6 @@ M.funcs = { 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() - < ]=], name = 'assert_false', params = { { 'actual', 'any' }, { 'msg', 'any' } }, @@ -492,9 +459,6 @@ M.funcs = { <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.*') - < ]=], name = 'assert_match', params = { { 'pattern', 'any' }, { 'actual', 'any' }, { 'msg', 'any' } }, @@ -509,9 +473,6 @@ M.funcs = { produces a beep or visual bell. Also see |assert_beeps()|. - Can also be used as a |method|: >vim - GetCmd()->assert_nobeep() - < ]=], name = 'assert_nobeep', params = { { 'cmd', 'any' } }, @@ -526,9 +487,6 @@ M.funcs = { |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]) - < ]=], name = 'assert_notequal', params = { { 'expected', 'any' }, { 'actual', 'any' }, { 'msg', 'any' } }, @@ -543,9 +501,6 @@ M.funcs = { |v:errors| when {pattern} matches {actual}. Also see |assert-return|. - Can also be used as a |method|: >vim - getFile()->assert_notmatch('bar.*') - < ]=], name = 'assert_notmatch', params = { { 'pattern', 'any' }, { 'actual', 'any' }, { 'msg', 'any' } }, @@ -559,9 +514,6 @@ M.funcs = { Report a test failure directly, using String {msg}. Always returns one. - Can also be used as a |method|: >vim - GetMessage()->assert_report() - < ]=], name = 'assert_report', params = { { 'msg', 'any' } }, @@ -579,9 +531,6 @@ M.funcs = { 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() - < ]=], name = 'assert_true', params = { { 'actual', 'any' }, { 'msg', 'any' } }, @@ -602,9 +551,6 @@ M.funcs = { echo atan(-4.01) < -1.326405 - Can also be used as a |method|: >vim - Compute()->atan() - < ]=], float_func = 'atan', name = 'atan', @@ -627,9 +573,6 @@ M.funcs = { echo atan2(1, -1) < 2.356194 - Can also be used as a |method|: >vim - Compute()->atan2(1) - < ]=], name = 'atan2', params = { { 'expr1', 'any' }, { 'expr2', 'any' } }, @@ -647,9 +590,6 @@ M.funcs = { <Returns an empty List on error. |list2blob()| does the opposite. - Can also be used as a |method|: >vim - GetBlob()->blob2list() - < ]=], name = 'blob2list', params = { { 'blob', 'any' } }, @@ -709,9 +649,6 @@ M.funcs = { 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() - < ]=], name = 'bufadd', params = { { 'name', 'string' } }, @@ -743,9 +680,6 @@ M.funcs = { 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() - < ]=], name = 'bufexists', params = { { 'buf', 'any' } }, @@ -799,9 +733,6 @@ M.funcs = { {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() - < ]=], name = 'buflisted', params = { { 'buf', 'any' } }, @@ -821,9 +752,6 @@ M.funcs = { 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() - < ]=], name = 'bufload', params = { { 'buf', 'any' } }, @@ -838,9 +766,6 @@ M.funcs = { {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() - < ]=], name = 'bufloaded', params = { { 'buf', 'any' } }, @@ -871,11 +796,6 @@ M.funcs = { 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 @@ -906,9 +826,6 @@ M.funcs = { 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() - < ]=], name = 'bufnr', params = { { 'buf', 'any' }, { 'create', 'any' } }, @@ -929,9 +846,6 @@ M.funcs = { Only deals with the current tab page. See |win_findbuf()| for finding more. - Can also be used as a |method|: >vim - FindBuffer()->bufwinid() - < ]=], name = 'bufwinid', params = { { 'buf', 'any' } }, @@ -952,9 +866,6 @@ M.funcs = { <The number can be used with |CTRL-W_w| and ":wincmd w" |:wincmd|. - Can also be used as a |method|: >vim - FindBuffer()->bufwinnr() - < ]=], name = 'bufwinnr', params = { { 'buf', 'any' } }, @@ -974,9 +885,6 @@ M.funcs = { Returns -1 if the {byte} value is invalid. - Can also be used as a |method|: >vim - GetOffset()->byte2line() - < ]=], name = 'byte2line', params = { { 'byte', 'any' } }, @@ -1021,9 +929,6 @@ M.funcs = { 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) - < ]=], fast = true, name = 'byteidx', @@ -1045,9 +950,6 @@ M.funcs = { 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) - < ]=], fast = true, name = 'byteidxcomp', @@ -1067,9 +969,6 @@ M.funcs = { {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) - < ]=], name = 'call', params = { { 'func', 'any' }, { 'arglist', 'any' }, { 'dict', 'any' } }, @@ -1094,9 +993,6 @@ M.funcs = { Returns 0.0 if {expr} is not a |Float| or a |Number|. - Can also be used as a |method|: >vim - Compute()->ceil() - < ]=], float_func = 'ceil', name = 'ceil', @@ -1179,9 +1075,6 @@ M.funcs = { Returns 0 if {string} is not a |String|. - Can also be used as a |method|: >vim - GetChar()->char2nr() - < ]=], fast = true, name = 'char2nr', @@ -1220,9 +1113,6 @@ M.funcs = { echo charcol('.') " returns 3 echo col('.') " returns 7 - <Can also be used as a |method|: >vim - GetPos()->col() - < ]=], name = 'charcol', params = { { 'expr', 'any' }, { 'winid', 'integer' } }, @@ -1265,9 +1155,6 @@ M.funcs = { 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) - < ]=], name = 'charidx', params = { @@ -1304,9 +1191,6 @@ M.funcs = { call chdir(save_dir) endif - <Can also be used as a |method|: >vim - GetDir()->chdir() - < ]=], name = 'chdir', params = { { 'dir', 'string' } }, @@ -1324,9 +1208,6 @@ M.funcs = { When {lnum} is invalid -1 is returned. See |C-indenting|. - Can also be used as a |method|: >vim - GetLnum()->cindent() - < ]=], name = 'cindent', params = { { 'lnum', 'integer' } }, @@ -1342,9 +1223,6 @@ M.funcs = { 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() - < ]=], name = 'clearmatches', params = { { 'win', 'any' } }, @@ -1392,9 +1270,6 @@ M.funcs = { 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() - < ]=], name = 'col', params = { { 'expr', 'any' }, { 'winid', 'integer' } }, @@ -1434,10 +1309,6 @@ M.funcs = { <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('.')) - < ]=], name = 'complete', params = { { 'startcol', 'any' }, { 'matches', 'any' } }, @@ -1457,9 +1328,6 @@ M.funcs = { 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() - < ]=], name = 'complete_add', params = { { 'expr', 'any' } }, @@ -1541,9 +1409,6 @@ M.funcs = { " Get only 'mode' and 'pum_visible' call complete_info(['mode', 'pum_visible']) - <Can also be used as a |method|: >vim - GetItems()->complete_info() - < ]=], name = 'complete_info', params = { { 'what', 'any' } }, @@ -1605,9 +1470,6 @@ M.funcs = { 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") - < ]=], name = 'confirm', params = { { 'msg', 'any' }, { 'choices', 'any' }, { 'default', 'any' }, { 'type', 'any' } }, @@ -1626,9 +1488,6 @@ M.funcs = { 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() - < ]=], name = 'copy', params = { { 'expr', 'any' } }, @@ -1648,9 +1507,6 @@ M.funcs = { echo cos(-4.01) < -0.646043 - Can also be used as a |method|: >vim - Compute()->cos() - < ]=], float_func = 'cos', name = 'cos', @@ -1672,9 +1528,6 @@ M.funcs = { echo cosh(-0.5) < -1.127626 - Can also be used as a |method|: >vim - Compute()->cosh() - < ]=], float_func = 'cosh', name = 'cosh', @@ -1698,9 +1551,6 @@ M.funcs = { 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) - < ]=], name = 'count', params = { { 'comp', 'any' }, { 'expr', 'any' }, { 'ic', 'any' }, { 'start', 'any' } }, @@ -1803,9 +1653,6 @@ M.funcs = { 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() - < ]=], name = 'cursor', params = { { 'list', 'any' } }, @@ -1823,9 +1670,6 @@ M.funcs = { Returns |TRUE| if successfully interrupted the program. Otherwise returns |FALSE|. - Can also be used as a |method|: >vim - GetPid()->debugbreak() - < ]=], name = 'debugbreak', params = { { 'pid', 'any' } }, @@ -1855,9 +1699,6 @@ M.funcs = { {noref} set to 1 will fail. Also see |copy()|. - Can also be used as a |method|: >vim - GetObject()->deepcopy() - < ]=], name = 'deepcopy', params = { { 'expr', 'any' }, { 'noref', 'any' } }, @@ -1885,9 +1726,6 @@ M.funcs = { operation was successful and -1/true when the deletion failed or partly failed. - Can also be used as a |method|: >vim - GetName()->delete() - < ]=], name = 'delete', params = { { 'fname', 'integer' }, { 'flags', 'string' } }, @@ -1911,9 +1749,6 @@ M.funcs = { 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) - < ]=], name = 'deletebufline', params = { { 'buf', 'any' }, { 'first', 'any' }, { 'last', 'any' } }, @@ -2006,9 +1841,6 @@ M.funcs = { 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() - < ]=], name = 'diff_filler', params = { { 'lnum', 'integer' } }, @@ -2028,9 +1860,6 @@ M.funcs = { 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) - < ]=], name = 'diff_hlID', params = { { 'lnum', 'integer' }, { 'col', 'integer' } }, @@ -2056,9 +1885,6 @@ M.funcs = { call digraph_set('aa', 'あ') echo digraph_get('aa') " Returns 'あ' < - Can also be used as a |method|: >vim - GetChars()->digraph_get() - < ]=], name = 'digraph_get', params = { { 'chars', 'any' } }, @@ -2081,9 +1907,6 @@ M.funcs = { " Get all the digraphs, including default digraphs echo digraph_getlist(1) < - Can also be used as a |method|: >vim - GetNumber()->digraph_getlist() - < ]=], name = 'digraph_getlist', params = { { 'listall', 'any' } }, @@ -2155,9 +1978,6 @@ M.funcs = { - |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() - < ]=], name = 'empty', params = { { 'expr', 'any' } }, @@ -2189,9 +2009,6 @@ M.funcs = { c:\\program\ files\\vim <Also see |shellescape()| and |fnameescape()|. - Can also be used as a |method|: >vim - GetText()->escape(' \') - < ]=], fast = true, name = 'escape', @@ -2208,9 +2025,6 @@ M.funcs = { of them. Also works for |Funcref|s that refer to existing functions. - Can also be used as a |method|: >vim - argv->join()->eval() - < ]=], name = 'eval', params = { { 'string', 'string' } }, @@ -2253,9 +2067,6 @@ M.funcs = { -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() - < ]=], fast = true, name = 'executable', @@ -2293,9 +2104,6 @@ M.funcs = { To execute a command in another window than the current one use `win_execute()`. - Can also be used as a |method|: >vim - GetCommand()->execute() - < ]=], name = 'execute', params = { { 'command', 'any' }, { 'silent', 'boolean' } }, @@ -2310,9 +2118,6 @@ M.funcs = { Returns empty string otherwise. If {expr} starts with "./" the |current-directory| is used. - Can also be used as a |method|: >vim - GetCommand()->exepath() - < ]=], name = 'exepath', params = { { 'expr', 'any' } }, @@ -2409,9 +2214,6 @@ M.funcs = { <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() - < ]=], name = 'exists', params = { { 'expr', 'any' } }, @@ -2432,9 +2234,6 @@ M.funcs = { echo exp(-1) < 0.367879 - Can also be used as a |method|: >vim - Compute()->exp() - < ]=], float_func = 'exp', name = 'exp', @@ -2535,9 +2334,6 @@ M.funcs = { 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() - < ]=], name = 'expand', params = { { 'string', 'string' }, { 'nosuf', 'boolean' }, { 'list', 'any' } }, @@ -2570,9 +2366,6 @@ M.funcs = { < >vim echo expandcmd('make %<.o', {'errmsg': v:true}) < - Can also be used as a |method|: >vim - GetCommand()->expandcmd() - < ]=], name = 'expandcmd', params = { { 'string', 'string' }, { 'options', 'table' } }, @@ -2617,9 +2410,6 @@ M.funcs = { fails. Returns {expr1}. Returns 0 on error. - Can also be used as a |method|: >vim - mylist->extend(otherlist) - < ]=], name = 'extend', params = { { 'expr1', 'any' }, { 'expr2', 'any' }, { 'expr3', 'any' } }, @@ -2685,9 +2475,6 @@ M.funcs = { Return value is always 0. - Can also be used as a |method|: >vim - GetInput()->feedkeys() - < ]=], name = 'feedkeys', params = { { 'string', 'string' }, { 'mode', 'string' } }, @@ -2725,9 +2512,6 @@ M.funcs = { 1 < - Can also be used as a |method|: >vim - GetName()->filereadable() - < ]=], fast = true, name = 'filereadable', @@ -2744,9 +2528,6 @@ M.funcs = { 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() - < ]=], fast = true, name = 'filewritable', @@ -2807,9 +2588,6 @@ M.funcs = { {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) - < ]=], name = 'filter', params = { { 'expr1', 'any' }, { 'expr2', 'any' } }, @@ -2836,9 +2614,6 @@ M.funcs = { This is quite similar to the ex-command `:find`. - Can also be used as a |method|: >vim - GetName()->finddir() - < ]=], name = 'finddir', params = { { 'name', 'string' }, { 'path', 'string' }, { 'count', 'any' } }, @@ -2855,9 +2630,6 @@ M.funcs = { <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() - < ]=], name = 'findfile', params = { { 'name', 'string' }, { 'path', 'string' }, { 'count', 'any' } }, @@ -2885,9 +2657,6 @@ M.funcs = { echo flatten([1, [2, [3, 4]], 5], 1) < [1, 2, [3, 4], 5] - Can also be used as a |method|: >vim - mylist->flatten() - < ]=], name = 'flatten', params = { { 'list', 'any' }, { 'maxdepth', 'any' } }, @@ -2930,9 +2699,6 @@ M.funcs = { echo float2nr(1.0e-100) < 0 - Can also be used as a |method|: >vim - Compute()->float2nr() - < ]=], name = 'float2nr', params = { { 'expr', 'any' } }, @@ -2954,9 +2720,6 @@ M.funcs = { echo floor(4.0) < 4.0 - Can also be used as a |method|: >vim - Compute()->floor() - < ]=], float_func = 'floor', name = 'floor', @@ -2982,9 +2745,6 @@ M.funcs = { echo fmod(-12.33, 1.22) < -0.13 - Can also be used as a |method|: >vim - Compute()->fmod(1.22) - < ]=], name = 'fmod', params = { { 'expr1', 'any' }, { 'expr2', 'any' } }, @@ -3009,9 +2769,6 @@ M.funcs = { <results in executing: >vim edit \+some\ str\%nge\|name < - Can also be used as a |method|: >vim - GetName()->fnameescape() - < ]=], fast = true, name = 'fnameescape', @@ -3039,9 +2796,6 @@ M.funcs = { Note: Environment variables don't work in {fname}, use |expand()| first then. - Can also be used as a |method|: >vim - GetName()->fnamemodify(':p:h') - < ]=], fast = true, name = 'fnamemodify', @@ -3059,9 +2813,6 @@ M.funcs = { {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() - < ]=], name = 'foldclosed', params = { { 'lnum', 'integer' } }, @@ -3078,9 +2829,6 @@ M.funcs = { {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() - < ]=], name = 'foldclosedend', params = { { 'lnum', 'integer' } }, @@ -3102,9 +2850,6 @@ M.funcs = { {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() - < ]=], name = 'foldlevel', params = { { 'lnum', 'integer' } }, @@ -3146,9 +2891,6 @@ M.funcs = { line, "'m" mark m, etc. Useful when exporting folded text, e.g., to HTML. - Can also be used as a |method|: >vim - GetLnum()->foldtextresult() - < ]=], name = 'foldtextresult', params = { { 'lnum', 'integer' } }, @@ -3173,9 +2915,6 @@ M.funcs = { For example `fullcommand('s')`, `fullcommand('sub')`, `fullcommand(':%substitute')` all return "substitute". - Can also be used as a |method|: >vim - GetName()->fullcommand() - < ]=], name = 'fullcommand', params = { { 'name', 'string' } }, @@ -3197,9 +2936,6 @@ M.funcs = { instead). {name} cannot be a builtin function. Returns 0 on error. - Can also be used as a |method|: >vim - GetFuncname()->funcref([arg]) - < ]=], name = 'funcref', params = { { 'name', 'string' }, { 'arglist', 'any' }, { 'dict', 'any' } }, @@ -3290,9 +3026,6 @@ M.funcs = { < Returns 0 on error. - Can also be used as a |method|: >vim - GetFuncname()->function([arg]) - < ]=], name = 'function', params = { { 'name', 'string' }, { 'arglist', 'any' }, { 'dict', 'any' } }, @@ -3332,9 +3065,6 @@ M.funcs = { 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) - < ]=], name = 'get', params = { { 'list', 'any[]' }, { 'idx', 'integer' }, { 'default', 'any' } }, @@ -3459,9 +3189,6 @@ M.funcs = { To get buffer-local options use: >vim getbufvar({bufnr}, '&option_name') < - Can also be used as a |method|: >vim - GetBufnr()->getbufinfo() - < ]=], name = 'getbufinfo', params = { { 'dict', 'table<string,any>' } }, @@ -3495,9 +3222,6 @@ M.funcs = { Example: >vim let lines = getbufline(bufnr("myfile"), 1, "$") - <Can also be used as a |method|: >vim - GetBufnr()->getbufline(lnum) - < ]=], name = 'getbufline', params = { { 'buf', 'any' }, { 'lnum', 'integer' }, { 'end', 'integer' } }, @@ -3538,9 +3262,6 @@ M.funcs = { let bufmodified = getbufvar(1, "&mod") echo "todo myvar = " .. getbufvar("todo", "myvar") - <Can also be used as a |method|: >vim - GetBufnr()->getbufvar(varname) - < ]=], name = 'getbufvar', params = { { 'buf', 'any' }, { 'varname', 'string' }, { 'def', 'any' } }, @@ -3576,9 +3297,6 @@ M.funcs = { 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() - < ]=], name = 'getchangelist', params = { { 'buf', 'integer|string' } }, @@ -3695,9 +3413,6 @@ M.funcs = { getcharpos('.') returns [0, 5, 3, 0] getpos('.') returns [0, 5, 7, 0] < - Can also be used as a |method|: >vim - GetMark()->getcharpos() - < ]=], name = 'getcharpos', params = { { 'expr', 'any' } }, @@ -3912,9 +3627,6 @@ M.funcs = { 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') - < ]=], name = 'getcompletion', params = { { 'pat', 'any' }, { 'type', 'any' }, { 'filtered', 'any' } }, @@ -3949,9 +3661,6 @@ M.funcs = { <Note that this only works within the window. See |winrestview()| for restoring more state. - Can also be used as a |method|: >vim - GetWinid()->getcurpos() - < ]=], name = 'getcurpos', params = { { 'winid', 'integer' } }, @@ -3969,9 +3678,6 @@ M.funcs = { getcursorcharpos() " returns [0, 3, 2, 0, 3] getcurpos() " returns [0, 3, 4, 0, 3] < - Can also be used as a |method|: >vim - GetWinid()->getcursorcharpos() - < ]=], name = 'getcursorcharpos', params = { { 'winid', 'integer' } }, @@ -3996,9 +3702,6 @@ M.funcs = { directory is returned. Throw error if the arguments are invalid. |E5000| |E5001| |E5002| - Can also be used as a |method|: >vim - GetWinnr()->getcwd() - < ]=], name = 'getcwd', params = { { 'winnr', 'integer' }, { 'tabnr', 'integer' } }, @@ -4017,9 +3720,6 @@ M.funcs = { is different from a variable set to an empty string. See also |expr-env|. - Can also be used as a |method|: >vim - GetVarname()->getenv() - < ]=], name = 'getenv', params = { { 'name', 'string' } }, @@ -4063,9 +3763,6 @@ M.funcs = { <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()|. ]=], fast = true, @@ -4085,9 +3782,6 @@ M.funcs = { If the size of {fname} is too big to fit in a Number then -2 is returned. - Can also be used as a |method|: >vim - GetFilename()->getfsize() - < ]=], fast = true, name = 'getfsize', @@ -4105,9 +3799,6 @@ M.funcs = { |localtime()| and |strftime()|. If the file {fname} can't be found -1 is returned. - Can also be used as a |method|: >vim - GetFilename()->getftime() - < ]=], fast = true, name = 'getftime', @@ -4138,9 +3829,6 @@ M.funcs = { systems that support it. On some systems only "dir" and "file" are returned. - Can also be used as a |method|: >vim - GetFilename()->getftype() - < ]=], fast = true, name = 'getftype', @@ -4171,9 +3859,6 @@ M.funcs = { filename filename if available lnum line number - Can also be used as a |method|: >vim - GetWinnr()->getjumplist() - < ]=], name = 'getjumplist', params = { { 'winnr', 'integer' }, { 'tabnr', 'integer' } }, @@ -4204,9 +3889,6 @@ M.funcs = { let end = search("^$") - 1 let lines = getline(start, end) - <Can also be used as a |method|: >vim - ComputeLnum()->getline() - <To get lines from another buffer see |getbufline()| and |getbufoneline()| ]=], @@ -4275,9 +3957,6 @@ M.funcs = { Refer to |getpos()| for getting information about a specific mark. - Can also be used as a |method|: >vim - GetBufnr()->getmarklist() - < ]=], name = 'getmarklist', params = { { 'buf', 'any' } }, @@ -4398,9 +4077,6 @@ M.funcs = { call setpos("'a", save_a_mark) <Also see |getcharpos()|, |getcurpos()| and |setpos()|. |