Unimpaired.nvim
LUA port of tpope's famous vim-unimpaired plugin
Install / Use
/learn @tummetott/Unimpaired.nvimREADME
unimpaired.nvim
:pencil: Description:
This is a LUA port of tpopes famous vim-unimpaired plugin. unimpaired.nvim aims to replicate the exact behaviour of vim-unimpaired, with some exceptions (see caveats).
unimpaired.nvim is a collection of useful keymaps which follow a pattern: They
come in complementary pairs which mostly fall into four categories:
- There are mappings which are simply short normal mode aliases for commonly used ex commands.
]qis:cnext.[qis:cprevious.]ais:next.[bis:bprevious. See the default configuration for the full set of 20 mappings - There are linewise mappings.
[<Space>and]<Space>add newlines before and after the cursor line.[eand]eexchange the current line with the one above or below it. - There are mappings for toggling options.
[os,]os, andyosperform:set spell,:set nospell, and:set invspell, respectively. There's alsol(list),n(number),w(wrap),x(cursorline cursorcolumn), and several others - And in the miscellaneous category, there's
[fand]fto go to the next/previous file in the directory, and[nand]nto jump between SCM conflict markers (the latter is not implemented yet)
✨ Features
- 🔥 Keymaps can be changed
- ❌ You can disable keymaps you don't need
- 🔁 All mappings are dot repeatable without additional plugin
- 📝 Mappings have proper keymap descriptions (used by e.g. which-key)
- 🔢 Many mappings can be prefixed with [count]
- 👯 Default behaviour mimics the original vim-unimpaired plugin
- 💨 Written in LUA instead of vim script
⚡️ Requirements
- Neovim >= 0.5.0
📦 Installation
Install the plugin with your favourite package manager.
Example using lazy:
{
'tummetott/unimpaired.nvim',
event = 'VeryLazy',
opts = {
-- add options here if you wish to override the default settings
},
}
⚙️ Configuration
The setup() function takes a dictionary with user configurations. If you don't
want to customize the default behaviour, you don't need to put anything in
there. The default behaviour mimics the functionality off vim-unimpaired.
Customizing keymaps works as following:
require('unimpaired').setup {
keymaps = {
-- To overwrite the mapping, keymap description and dot-repetition for
-- ':bnext', write
bnext = {
mapping = '<leader>n',
description = 'Go to [count] next buffer',
dot_repeat = true,
},
-- To disable dot repetition for ':bprevious', write
bprevious = {
mapping = '<leader>p',
description = 'Go to [count] previous buffer',
dot_repeat = false,
},
-- If you just want to change the keymap for ':bfirst' and don't care
-- about desciption and dot-repetition, write the shorthand
bfirst = '<leader>N',
-- To disable the kemap ':blast' completely, set it to false
blast = false,
}
-- Disable the default mappings if you prefer to define your own mappings
default_keymaps = false,
}
Default Configuration
To see all keys of the keymaps table, have a look at the default setup options of unimpaired.nvim:
Caveats:
This plugin is work in progress. You may experience bugs and changes of the API.
Functionalities which are not supported yet:
- Paste after linewise, increasing indent
- Paste before linewise, increasing indent
- Paste after linewise, decreasing indent
- Paste before linewise, decreasing indent
- Paste after linewise, reindenting
- Paste before linewise, reindenting
- XML encode
- XML decode
- URL encode
- URL decode
- C String encode
- C String decode
✅ Todos:
- Write helpfile
- Implement missing functionalities
PRs are welcome! x Tummetott
<!-- MARKDOWN LINKS & IMAGES -->Related Skills
node-connect
353.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
353.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
353.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
