Home

Awesome

clean.nvim

Plugin for cleaning up the default key mappings and plugins in Neovim leaving only the bare essentials to build upon.

It provides only 2 functions:

Motivation

Neovim is a powerful text editor with a lot of functionality - the index consists of several hundred of commands. This plugin narrows it down to a few dozen most used commands, which may be beneficial for the following reasons:

Installation

Load 'clean.nvim' as any other Neovim plugin using your favourite package manager.

The plugin provides only 2 functions, which can called together towards the start of your init file (in order not to overwrite any previous keymaps or global options):

require('clean').clean_keymap()
require('clean').clean_plugins()

In order to re-enable a command either delete the keymap or map it to something else (including itself) explicitly:

vim.keymap.del('', 'f')
vim.keymap.set('', 't', 't')

Note, that re-enabling multi-key commands may require re-enabling their prefixes as well, i.e., to use zz you should have:

vim.keymap.del('n', 'z')
vim.keymap.del('n', 'zz')

In order to re-enable a plugin simply reset the corresponding variable to nil afterwards, for example,

vim.g.editorconfig = nil