Module keymaps

Module keymaps 

Source
Expand description

Core (non‑plugin) keymaps. Keymap helpers and expr RHS generators.

Provides keymaps.dict() offering bulk keymap setup (set_all) plus smart editing helpers. Core mappings target Normal / Visual / Operator modes; failures in individual definitions are logged without aborting subsequent mappings.

Constants§

NORMAL_ESC
RHS used for the normal-mode <Esc> mapping (clear search + empty echo).
NVOP_MODE 🔒
NV_MODE 🔒

Functions§

apply_on_current_line_or_unwrap 🔒
Apply a closure to the current line or fall back to default.
default_opts
Build the default [SetKeymapOpts]: silent + non-recursive.
dict
[Dictionary] of keymap helpers and expr RHS generators.
set
Set a keymap for each provided [Mode].
set_all 🔒
Sets the core (non‑plugin) keymaps ported from the Lua M.setup function.
smart_dd_no_yank_empty_line 🔒
Return the RHS for a smart dd mapping that skips yanking blank lines.
smart_ident_on_blank_line 🔒
Return the RHS for a smart normal-mode i mapping.
visual_esc 🔒
Return the RHS for a visual-mode <Esc> expr mapping that reselects the visual range (direction aware) and then applies NORMAL_ESC.