Skip to content

Cassin01/emacs-key-source.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

emacs-key-source.txt

Key sources for some Emacs-keybindings

Modules

  • inc-search: A incremental search [spacemacs ctrl-s]
  • goto-line: goto line [emacs ctrl-u]
  • relative-jump: repleat a allow movement N times. [emacs ctrl-g]
  • kill-line2end: kill line to end [emacs ctrl-k]
  • kill-line2begging: kill line to begging [emacs esc-k]

Install

packer.nvim

use {
  'emacs-key-source.nvim'
  requires = { 'ms-jpq/lua-async-await' }
}

Example

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

Features

inc-search()

  • Supports smartcase and ignorecase
  • You can replace matched strings by <ctrl-5>

case

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published