forked from aniani/vim
patch 8.2.2468: not easy to get the full command name from a shortened one
Problem: Not easy to get the full command name from a shortened one. Solution: Add fullcommand(). (Martin Tournoij, closes #7777)
This commit is contained in:
@@ -2562,6 +2562,7 @@ foldlevel({lnum}) Number fold level at {lnum}
|
||||
foldtext() String line displayed for closed fold
|
||||
foldtextresult({lnum}) String text for closed fold at {lnum}
|
||||
foreground() Number bring the Vim window to the foreground
|
||||
fullcommand({name}) String get full command from {name}
|
||||
funcref({name} [, {arglist}] [, {dict}])
|
||||
Funcref reference to function {name}
|
||||
function({name} [, {arglist}] [, {dict}])
|
||||
@@ -4902,6 +4903,21 @@ foreground() Move the Vim window to the foreground. Useful when sent from
|
||||
{only in the Win32, Athena, Motif and GTK GUI versions and the
|
||||
Win32 console version}
|
||||
|
||||
fullcommand({name}) *fullcommand()*
|
||||
Get the full command name from a short abbreviated command
|
||||
name; see |20.2| for details on command abbreviations.
|
||||
|
||||
{name} may start with a `:` and can include a [range], these
|
||||
are skipped and not returned.
|
||||
Returns an empty string if a command doesn't exist or if it's
|
||||
ambiguous (for user-defined functions).
|
||||
|
||||
For example `fullcommand('s')`, `fullcommand('sub')`,
|
||||
`fullcommand(':%substitute')` all return "substitute".
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetName()->fullcommand()
|
||||
<
|
||||
*funcref()*
|
||||
funcref({name} [, {arglist}] [, {dict}])
|
||||
Just like |function()|, but the returned Funcref will lookup
|
||||
|
||||
@@ -883,6 +883,7 @@ Command line: *command-line-functions*
|
||||
getcmdtype() return the current command-line type
|
||||
getcmdwintype() return the current command-line window type
|
||||
getcompletion() list of command-line completion matches
|
||||
fullcommand() get full command name
|
||||
|
||||
Quickfix and location lists: *quickfix-functions*
|
||||
getqflist() list of quickfix errors
|
||||
|
||||
Reference in New Issue
Block a user