https://github.com/mityu/vim-cmdhistory
Command-line history selector plugin for Vim9.
https://github.com/mityu/vim-cmdhistory
vim9
Last synced: about 1 month ago
JSON representation
Command-line history selector plugin for Vim9.
- Host: GitHub
- URL: https://github.com/mityu/vim-cmdhistory
- Owner: mityu
- License: mit
- Created: 2023-11-25T21:14:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-10-05T04:00:44.000Z (5 months ago)
- Last Synced: 2025-10-05T05:38:47.100Z (5 months ago)
- Topics: vim9
- Language: Vim Script
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cmdhistory.vim
This is a Vim plugin to select command-line history on command-line and command-line window.
## Requirements
- Vim 9.0 or later.
- Neovim v0.11.0 or later.
## Example configuration
In your .vimrc:
```vim
cnoremap call cmdhistory#select()
augroup setup-cmdhistory-plugin-for-cmdwin
autocmd!
autocmd CmdWinEnter * nnoremap / call cmdhistory#select()
autocmd User cmdhistory-initialize call s:setup_cmdhistory()
augroup END
function s:setup_cmdhistory()
" Set plugin default mappings.
call cmdhistory#set_default_mappings()
" Accept the present item with key.
call cmdhistory#map_action('', ['accept'])
endfunction
```