Skip to main content
Module

x/denops_std/function/nvim/mod.ts>nvim_chan_send

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

Send data to channel id. For a job, it writes it to the stdin of the process. For the stdio channel channel-stdio, it writes to Nvim's stdout. For an internal terminal instance (nvim_open_term()) it writes directly to terminal output. See channel-bytes for more information.

This function writes raw data, not RPC messages. If the channel was created with rpc=true then the channel expects RPC messages, use vim.rpcnotify() and vim.rpcrequest() instead.

Attributes: RPC only Lua vim.api only

Parameters:

  • {chan} id of the channel
  • {data} data to write. 8-bit clean: can contain NUL bytes.

Parameters

denops: Denops
chan: unknown
data: unknown

Returns

Promise<unknown>