import { Client } from "https://deno.land/x/vim_channel_command@v3.1.1/client.ts";
Client is a wrapper of Session to send commands and messages.
Examples
Example 1
Example 1
import { channel } from "https://deno.land/x/streamtools@v0.5.0/mod.ts";
import { Session, Client } from "./mod.ts";
const input = channel<Uint8Array>();
const output = channel<Uint8Array>();
const session = new Session(input.reader, output.writer);
session.start();
// Create a client
const client = new Client(session);
// Send a ex command
client.ex("echo 'Hello, world!'");
// Send a call command and wait for the result.
console.log(await client.call("abs", -1)); // 1