Skip to content
benja2998Public

Latest commit

 

History

30 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

eel.nvim

demo

eel (extensible emacs layer) is a plugin for Neovim that changes Neovim to use Emacs keybinds. This plugin does not aim to provide every single Emacs functionality.

Installation

Use vim.pack:

vim.pack.add({
    'https://github.com/benja2998/eel.nvim',
})

Extending eel

eel provides an API to extend it with more functionality.

You can bind a key with the eel.add_key and the eel.add_CX_key functions. The former will add a key prefixed by C-c, and the latter will add a key prefixed by C-x.

Example configuration

vim.o.expandtab = true
vim.o.shiftwidth = 4
vim.o.tabstop = 4
vim.o.number = true

vim.pack.add({
    'https://github.com/benja2998/eel.nvim',
    'https://github.com/nvim-lualine/lualine.nvim',
    'https://github.com/folke/tokyonight.nvim',
})

vim.cmd[[colorscheme tokyonight]]

require('lualine').setup()

local eel = require("eel")
eel.add_CX_key("d", "<CMD>Lex<CR>") -- C-x d
eel.add_key("u", "<C-o><C-r>") -- C-c u

Note for using with netrw

Netrw doesn't like eel forcing it into insert mode. You should prefix netrw commands (enter, %, etc) with Escape.