Skip to content

VimApi.map method

VimApi › map

Unofficial

Map one key sequence to another, allowing the result to be remapped further. Implements Vim's :map — mapping ; to :, which in Vim is :map ; :, is map(';', ':') here.

Signature:

map(lhs: string, rhs: string, ctx?: VimKeyMappingContext | undefined): void

Parameters:

ParameterTypeDescription
lhsstringThe key sequence to map.
rhsstringWhat it is mapped to.
ctx?VimKeyMappingContext | undefinedThe mode the mapping applies in, corresponding to :nmap, :vmap and :imap. Omitted applies it in every mode.

Returns: void