Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

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

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

Restore a mapping from a dictionary returned by |maparg()|. {mode} and {abbr} should be the same as for the call to |maparg()|. {mode} is used to define the mode in which the mapping is set, not the "mode" entry in {dict}. Example for saving and restoring a mapping: let save_map = maparg('K', 'n', 0, 1) nnoremap K somethingelse ... call mapset('n', 0, save_map) Note that if you are going to replace a map in several modes, e.g. with :map!, you need to save the mapping for all of them, since they can differ.

Parameters

denops: Denops
mode: unknown
abbr: unknown
dict: unknown

Returns

Promise<unknown>