Skip to content

A rough demo that only shows the idea (A Lua module Implementing neovim key mapping through chain calls)

License

Notifications You must be signed in to change notification settings

NisonChrist/keymapchain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

keymapchain

Ask DeepWiki

A Lua module Implementing neovim key mapping through chain calls.

whenInMode(vimMode) -> map(key) -> to(keyOrCommand)

Usage

-- Import keymapchain module
local keymap = require('keymapchain')
-- Use chain calls to map keys
keymap.whenInMode('INSERT').map('jk').to('<Esc>') -- Exit insert mode to normal mode
-- Import keymapchain module
local keymap = require('keymapchain')
-- Use chain calls to map keys
keymap.whenInMode('NORMAL').map('<leader>sv').to('<C-w>v') -- Horizontal split window
keymap.whenInMode('NORMAL').map('<leader>sh').to('<C-w>s') -- Vertical split window

Features

  • Highly Readable: Chain calls make key mappings easy to read and understand.
  • Chain Mapping: Easily map multiple keys in sequence.
  • Mode-Specific Mapping: Map keys based on the current mode (NORMAL, INSERT, etc.).
  • Customizable: Customize key mappings to suit your workflow.

About

A rough demo that only shows the idea (A Lua module Implementing neovim key mapping through chain calls)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages