Skip to main content
Module

x/denops_std/helper/mod.ts>echoerr

📚 Standard module for denops.vim
Go to Latest
function echoerr
import { echoerr } from "https://deno.land/x/denops_std@v4.3.3/helper/mod.ts";

Echo message as an error message.

Note that this function just use ErrorMsg highlight and is not equivalent to echoerr command in Vim/Neovim.

import { Denops } from "../mod.ts";
import { echoerr } from "../helper/mod.ts";

export async function main(denops: Denops): Promise<void> {
  await echoerr(denops, "This is error message");
}
WARNING

In order to make the behavior of Vim and Neovim consistent, timer_start() is used internally not only in Vim but also in Neovim. Note that this means that you cannot control the message by prepending silent when calling it from the Vim script. If you want to control the message, use the setSilent function to change the silent state to 'silent!' in advance, or use the ensureSilent function to fix the silent state to 'silent!' during execution of any function.

Parameters

denops: Denops
message: string

Returns

Promise<void>