import { read } from "https://deno.land/x/denops_std@v6.1.0/mapping/mod.ts";
Read a mapping and return a Mapping
instance.
import type { Denops } from "https://deno.land/x/denops_std@v6.1.0/mod.ts";
import * as mapping from "https://deno.land/x/denops_std@v6.1.0/mapping/mod.ts";
export async function main(denops: Denops): Promise<void> {
await denops.cmd(`map <Plug>(test-denops-std) Hello`);
console.log(await mapping.read(denops, "<Plug>(test-denops-std)"));
// {
// mode: "",
// lhs: "<Plug>(test-denops-std)",
// rhs: "Hello",
// // ...
// }
}
Note that prior to Vim 8.2.0491 or Neovim 0.5.0, script
is
not detectable by maparg
function internally used in this
function.