Skip to main content
Module

x/denops_std/function/mod.ts>fullcommand

📚 Standard module for denops.vim
Go to Latest
function fullcommand
import { fullcommand } from "https://deno.land/x/denops_std@v6.4.0/function/mod.ts";

Get the full command name from a short abbreviated command name; see 20.2 for details on command abbreviations.

The string argument {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, if it's ambiguous (for user-defined commands) or cannot be shortened this way. vim9-no-shorten

Without the {vim9} argument uses the current script version. If {vim9} is present and FALSE then legacy script rules are used. When {vim9} is present and TRUE then Vim9 rules are used, e.g. "en" is not a short form of "endif".

For example fullcommand('s'), fullcommand('sub'), fullcommand(':%substitute') all return "substitute".

Can also be used as a method:

GetName()->fullcommand()

Parameters

denops: Denops
name: unknown
optional
vim9: unknown

Returns

Promise<string>