Skip to main content
Module

x/ddc_vim/deps.ts>fn.maparg

Dark deno-powered completion framework for neovim/Vim8
Go to Latest
function fn.maparg
import { fn } from "https://deno.land/x/ddc_vim@v2.3.0/deps.ts";
const { maparg } = fn;

When {dict} is omitted or zero: Return the rhs of mapping {name} in mode {mode}. The returned String has special characters translated like in the output of the ":map" command listing. When there is no mapping for {name}, an empty String is returned. When the mapping for {name} is empty, then "" is returned. The {name} can have special key names, like in the ":map" command. {mode} can be one of these strings: "n" Normal "v" Visual (including Select) "o" Operator-pending "i" Insert "c" Cmd-line "s" Select "x" Visual "l" langmap |language-mapping| "t" Terminal-Job "" Normal, Visual and Operator-pending When {mode} is omitted, the modes for "" are used. When {abbr} is there and it is |TRUE| use abbreviations instead of mappings. When {dict} is there and it is |TRUE| return a dictionary containing all the information of the mapping with the following items: "lhs" The {lhs} of the mapping as it would be typed "lhsraw" The {lhs} of the mapping as raw bytes "lhsrawalt" The {lhs} of the mapping as raw bytes, alternate form, only present when it differs from "lhsraw" "rhs" The {rhs} of the mapping as typed. "silent" 1 for a |:map-silent| mapping, else 0. "noremap" 1 if the {rhs} of the mapping is not remappable. "script" 1 if mapping was defined with . "expr" 1 for an expression mapping (|:map-|). "buffer" 1 for a buffer local mapping (|:map-local|). "mode" Modes for which the mapping is defined. In addition to the modes mentioned above, these characters will be used: " " Normal, Visual and Operator-pending "!" Insert and Commandline mode (|mapmode-ic|) "sid" The script local ID, used for mappings (||). "lnum" The line number in "sid", zero if unknown. "nowait" Do not wait for other, longer mappings. (|:map-|). The dictionary can be used to restore a mapping with |mapset()|. The mappings local to the current buffer are checked first, then the global mappings. This function can be used to map a key even when it's already mapped, and have it do the original mapping too. Sketch: exe 'nnoremap ==' . maparg('', 'n') Can also be used as a |method|: GetKey()->maparg('n')

Parameters

denops: Denops
name: unknown
optional
mode: unknown
optional
abbr: unknown
optional
dict: unknown

Returns

Promise<unknown>