Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ddc_vim/deps.ts>fn.expandcmd

Dark deno-powered completion framework for neovim/Vim
Go to Latest
function fn.expandcmd
import { fn } from "https://deno.land/x/ddc_vim@v4.0.2/deps.ts";
const { expandcmd } = fn;

Expand special items in String {string} like what is done for an Ex command such as :edit. This expands special keywords, like with expand(), and environment variables, anywhere in {string}. "~user" and "~/path" are only expanded at the start.

The following items are supported in the {options} Dict argument: errmsg If set to TRUE, error messages are displayed if an error is encountered during expansion. By default, error messages are not displayed.

Returns the expanded string. If an error is encountered during expansion, the unmodified {string} is returned.

Example:

:echo expandcmd('make %<.o')
make /path/runtime/doc/builtin.o
:echo expandcmd('make %<.o', {'errmsg': v:true})

Can also be used as a method:

GetCommand()->expandcmd()

Parameters

denops: Denops
string: unknown
optional
options: unknown

Returns

Promise<string>