Key sources for some Emacs-keybindings
inc-search
: A incremental search [spacemacsctrl-s
]goto-line
: goto line [emacsctrl-u
]relative-jump
: repleat a allow movement N times. [emacsctrl-g
]kill-line2end
: kill line to end [emacsctrl-k
]kill-line2begging
: kill line to begging [emacsesc-k
]
use {
'emacs-key-source.nvim'
requires = { 'ms-jpq/lua-async-await' }
}
local emacs_key_source = require("emacs-key-source")
for k, v in pairs({["<c-s>"] = "inc-search",
["<c-g>"] = "goto-line",
["<c-u>"] = "relative-jump",
["<c-k>"] = "kill-line2end",
["<m-k>"] = "kill-line2begging"}) do
vim.api.nvim_set_keymap("i", k, "", {callback = emacs_key_source[v], noremap = true, silent = true, desc = v})
vim.api.nvim_set_keymap("n", k, "", {callback = emacs_key_source[v], noremap = true, silent = true, desc = v})
end
- Supports
smartcase
andignorecase
- You can replace matched strings by
<ctrl-5>