Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/denops_std/function/vim/mod.ts>remote_send

๐Ÿ“š Standard module for denops.vim
Go to Latest
function remote_send
import { remote_send } from "https://deno.land/x/denops_std@v6.3.0/function/vim/mod.ts";

Send the {string} to {server}. The {server} argument is a string, also see {server}.

The string is sent as input keys and the function returns immediately. At the Vim server the keys are not mapped :map.

If {idvar} is present, it is taken as the name of a variable and a {serverid} for later use with remote_read() is stored there.

See also clientserver RemoteReply. This function is not available in the sandbox. only available when compiled with the +clientserver feature

Note: Any errors will be reported in the server and may mess up the display. Examples:

:echo remote_send("gvim", ":DropAndReply " .. file, "serverid") ..
 \ remote_read(serverid)

:autocmd NONE RemoteReply *
 \ echo remote_read(expand("<amatch>"))
:echo remote_send("gvim", ":sleep 10 | echo " ..
 \ 'server2client(expand("<client>"), "HELLO")<CR>')

Can also be used as a method:

ServerName()->remote_send(keys)

Parameters

denops: Denops
server: unknown
string: unknown
optional
idvar: unknown

Returns

Promise<string>