Skip to main content
Module

x/denops_std/helper/mod.ts>echo

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

Echo message as like echo on Vim script.

Vim (not Neovim) won't show message posted from a channel command and Vim won't pause multiline message posted from timer. This function applied some workaround to show message posted from a channel command, and pause if the message is multiline.

Note that it does nothing and return immediately when denops is running as 'test' mode to avoid unwilling test failures.

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' or 'silent!' in advance, or use the ensureSilent function to fix the silent state to 'silent' or 'silent!' during execution of any function.

Parameters

denops: Denops
message: string

Returns

Promise<void>