Skip to content

Make the cursor move like Emacs in the command line of Neovim

Notifications You must be signed in to change notification settings

delphinus/emcl.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

emcl.nvim

Yet another plugin to use Emacs shortcut in Neovim's command line.

What's this?

This is a port of vim-emacscommandline written in Lua for Neovim. Pros/Cons for the original are below.

Pros
  • emcl.nvim has tests for all funcs.
  • emcl.nvim is written in Lua, so it is more readable and extensible than Vimscript.
Cons
  • emcl.nvim does not work on Vim ;( This is for Neovim only.

Installation

git clone https://github.com/delphinus/emcl.nvim \
  ~/.local/share/nvim/site/pack/foo/start/emcl.nvim

And in your init.lua……

require("emcl").setup {}
use {
  "delphinus/emcl.nvim",
  config = function()
    require("emcl").setup {}
  end,
}

Mappings

You can change these mappings below or use some ones only. See doc for the detail or options (type :h emcl in Neovim).

Feature Default mapping
ForwardChar <C-f>
BackwardChar <C-b>
BeginningOfLine <C-a>
EndOfLine <C-e>
OlderMatchingCommandLine <C-p>
NewerMatchingCommandLine <C-n>
FirstLineInHistory <M-<>
LastLineInHistory <M->>
SearchCommandLine <C-r>
AbortCommand <C-g>
ForwardWord <M-f>
BackwardWord <M-b>
DeleteChar <Del>, <C-d>
BackwardDeleteChar <BS>, <C-h>
KillWord <M-d>
DeleteBackwardsToWhiteSpace <C-w>
BackwardKillWord <M-BS>
TransposeChar <C-t>
TransposeWord <M-t>
Yank <C-y>
Undo <C-_>, <C-x><C-y>
YankLastArg <M-.>, <M-_>
ToggleExternalCommand <C-z>

Todo

  • Tests for TransposeWord
    • TransposeWord may have bugs.

About

Make the cursor move like Emacs in the command line of Neovim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published