-
Notifications
You must be signed in to change notification settings - Fork 0
configuration
require("gui-keymap").setup({
undo_redo = true,
clipboard = {
copy = true,
paste = true,
cut = true,
},
select_all = true,
delete_selection = true,
shift_selection = true,
word_delete = true,
save = true,
quit = true,
home_end = true,
yanky_integration = true,
hint_enabled = true,
hint_repeat = 3,
hint_persist = true,
which_key_integration = true,
enforce_on_startup = true,
force_priority = true,
show_welcome = true,
preserve_mode = true,
})If you pass no options, these defaults are used automatically.
Enables Ctrl+Z and Ctrl+Y mappings in normal and insert mode.
Enables GUI-style copy mappings:
- visual
Ctrl+C - normal
Ctrl+C
Enables GUI-style paste mappings:
- normal
Ctrl+V - insert
Ctrl+V
Enables GUI-style cut mapping in visual mode with Ctrl+X.
Enables Ctrl+A select-all behavior.
Enables visual-mode deletion using:
BackspaceDelete
These use the black-hole register to avoid overwriting clipboard content.
Enables GUI-style selection growth using Shift+Arrow keys in normal, visual, and insert mode.
This feature is terminal-sensitive. Some terminals emit fallback keycodes such
as <kL> or <kR> instead of literal Shift+Arrow sequences.
Enables:
Ctrl+BackspaceCtrl+Delete
Mapped to GUI-style word deletion behavior that avoids polluting clipboard state.
Enables Ctrl+S to save the current buffer.
Modes:
- normal
- insert
- visual
Enables Ctrl+Q to save and close the current file.
Behavior:
- saves pending changes
- runs
:confirm wq
Enables Home and End mappings in normal, insert, and visual mode.
Behavior:
-
Home-> line start -
End-> line end
If yanky.nvim is installed, clipboard actions prefer Yanky-backed handlers.
If Yanky is not installed, gui-keymap falls back to Neovim register-based clipboard handling.
Turns hints on or off globally.
Controls how many times a hint can appear for a given shortcut.
-
0disables display after zero uses - positive number limits how many times a hint can show
-
-1means always show
Stores hint counters in Neovim’s state directory so the learning progress does not reset every time Neovim restarts.
If which-key.nvim is available, active mappings are registered with
descriptions.
Re-applies mappings during startup to handle lazy-loading races from plugin managers and distributions.
When enabled, gui-keymap can replace conflicting default/editor mappings.
When disabled, conflicting mappings are skipped and reported in diagnostics.
Controls the welcome notification shown after first install or after plugin version changes.
For compatible mappings, returns the user to their original mode after the mapped action finishes.
require("gui-keymap").setup({
show_welcome = true,
})require("gui-keymap").setup({
shift_selection = false,
force_priority = false,
hint_enabled = false,
})