@@ -2561,6 +2561,8 @@ finddir({name} [, {path} [, {count}]])
25612561findfile({name} [, {path} [, {count}]])
25622562 String find file {name} in {path}
25632563flatten({list} [, {maxdepth}]) List flatten {list} up to {maxdepth} levels
2564+ flattennew({list} [, {maxdepth}])
2565+ List flatten a copy of {list}
25642566float2nr({expr}) Number convert Float {expr} to a Number
25652567floor({expr}) Float round {expr} down
25662568fmod({expr1}, {expr2}) Float remainder of {expr1} / {expr2}
@@ -2572,6 +2574,7 @@ foldlevel({lnum}) Number fold level at {lnum}
25722574foldtext() String line displayed for closed fold
25732575foldtextresult({lnum}) String text for closed fold at {lnum}
25742576foreground() Number bring the Vim window to the foreground
2577+ fullcommand({name}) String get full command from {name}
25752578funcref({name} [, {arglist}] [, {dict}])
25762579 Funcref reference to function {name}
25772580function({name} [, {arglist}] [, {dict}])
@@ -4724,8 +4727,10 @@ flatten({list} [, {maxdepth}]) *flatten()*
47244727 Flatten {list} up to {maxdepth} levels. Without {maxdepth}
47254728 the result is a |List| without nesting, as if {maxdepth} is
47264729 a very large number.
4727- The {list} is changed in place, make a copy first if you do
4730+ The {list} is changed in place, use |flattennew()| if you do
47284731 not want that.
4732+ In Vim9 script flatten() cannot be used, you must always use
4733+ |flattennew()|.
47294734 *E900*
47304735 {maxdepth} means how deep in nested lists changes are made.
47314736 {list} is not modified when {maxdepth} is 0.
@@ -4739,6 +4744,10 @@ flatten({list} [, {maxdepth}]) *flatten()*
47394744 :echo flatten([1, [2, [3, 4]], 5], 1)
47404745< [1, 2, [3, 4], 5]
47414746
4747+ flattennew({list} [, {maxdepth}]) *flattennew()*
4748+ Like |flatten()| but first make a copy of {list}.
4749+
4750+
47424751float2nr({expr}) *float2nr()*
47434752 Convert {expr} to a Number by omitting the part after the
47444753 decimal point.
@@ -4906,6 +4915,21 @@ foreground() Move the Vim window to the foreground. Useful when sent from
49064915 {only in the Win32, Athena, Motif and GTK GUI versions and the
49074916 Win32 console version}
49084917
4918+ fullcommand({name}) *fullcommand()*
4919+ Get the full command name from a short abbreviated command
4920+ name; see |20.2| for details on command abbreviations.
4921+
4922+ {name} may start with a `:` and can include a [range], these
4923+ are skipped and not returned.
4924+ Returns an empty string if a command doesn't exist or if it's
4925+ ambiguous (for user-defined functions).
4926+
4927+ For example `fullcommand('s')`, `fullcommand('sub')`,
4928+ `fullcommand(':%substitute')` all return "substitute".
4929+
4930+ Can also be used as a |method|: >
4931+ GetName()->fullcommand()
4932+ <
49094933 *funcref()*
49104934funcref({name} [, {arglist}] [, {dict}])
49114935 Just like |function()|, but the returned Funcref will lookup
0 commit comments