mini.cmdline
Generated from the main branch of ‘mini.nvim’
Command line tweaks
See more details in Features and Documentation.
⦿ This is a part of mini.nvim library. Please use this link if you want to mention this module.
⦿ All contributions (issues, pull requests, discussions, etc.) are done inside of ‘mini.nvim’.
⦿ See whole library documentation to learn about general design principles, disable/configuration recipes, and more.
If you want to help this project grow but don’t know where to start, check out contributing guides of ‘mini.nvim’ or leave a Github star for ‘mini.nvim’ project and/or any its standalone Git repositories.
Demo
Features
Autocomplete with customizable delay. Enhances
:h cmdline-completionand manual:h 'wildchar'pressing experience. Requires Neovim>=0.11, though Neovim>=0.12 is recommended.Autocorrect words as-you-type. Only words that must come from a fixed set of candidates (like commands and options) are autocorrected by default.
Autopeek command range as-you-type. Shows a floating window with range lines along with customizable context lines.
What it doesn’t do:
Customization of command line UI. Use
:h vim._extui(on Neovim>=0.12).Customization of autocompletion candidates. They are computed via
:h cmdline-completion.
Installation
This plugin can be installed as part of ‘mini.nvim’ library (recommended) or as a standalone Git repository.
During beta-testing phase there is only one branch to install from:
main(default, recommended) will have latest development version of plugin.
Here are code snippets for some common installation methods (use only one):
With mini.deps
‘mini.nvim’ library:
Branch Code snippet Main Follow recommended ‘mini.deps’ installation Standalone plugin:
Branch Code snippet Main add(‘nvim-mini/mini.cmdline’)
With folke/lazy.nvim
‘mini.nvim’ library:
Branch Code snippet Main { 'nvim-mini/mini.nvim', version = false },Standalone plugin:
Branch Code snippet Main { 'nvim-mini/mini.cmdline', version = false },
With junegunn/vim-plug
‘mini.nvim’ library:
Branch Code snippet Main Plug 'nvim-mini/mini.nvim'Standalone plugin:
Branch Code snippet Main Plug 'nvim-mini/mini.cmdline'
Important: no need to call require('mini.cmdline').setup(), but it can be done to improve usability.
Note: if you are on Windows, there might be problems with too long file paths (like error: unable to create file <some file name>: Filename too long). Try doing one of the following:
- Enable corresponding git global config value:
git config --system core.longpaths true. Then try to reinstall. - Install plugin in other place with shorter path.
Default config
-- No need to copy this inside `setup()`. Will be used automatically.
{
-- Autocompletion: show `:h 'wildmenu'` as you type
autocomplete = {
enable = true,
-- Delay (in ms) after which to trigger completion
-- Neovim>=0.12 is recommended for positive values
delay = 0,
-- Custom rule of when to trigger completion
predicate = nil,
-- Whether to map arrow keys for more consistent wildmenu behavior
map_arrows = true,
},
-- Autocorrection: adjust non-existing words (commands, options, etc.)
autocorrect = {
enable = true,
-- Custom autocorrection rule
func = nil,
},
-- Autopeek: show command's target range in a floating window
autopeek = {
enable = true,
-- Number of lines to show above and below range lines
n_context = 1,
-- Window options
window = {
-- Floating window config
config = {},
-- Function to render statuscolumn
statuscolumn = nil,
},
},
}Similar plugins
- folke/noice.nvim
- nacro90/numb.nvim
- Built-in cmdline-autocompletion (on Neovim>=0.12):