Allow to start :History with the cmdline content
- Dominant language
- Vim Script
- Stars
- 10.3k
- Forks
- 608
- Avg merge
- 5d 8h
- Merged PRs (30d)
- 2
Description
- Category
- [x] Question
- [ ] Bug
- [x] Suggestion
- OS
- [ ] Linux
- [x] Mac OS X
- [ ] Windows
- [ ] Etc.
- Vim
- [ ] Vim
- [x] Neovim
***
My goal is to mimic fzf behaviour when searching the Zsh history with ``, the behaviour I expect in vim is:
- Enter the `:` or the `/` command line modes
- Execute the corresponding `:History:` or `:History/` commands with the `` mapping
- Pass the command line content to the fzf `query` parameter, so that I don't have to type twice I already started the command
I came up with the following solution, but I find it very shaky and I believe there would be a cleaner way to do it. Plus it pollutes the history, doesn't support `"` in the commands and only works for `:`.
```vim
cnoremap call fzf#vim#command_history({ 'options': '--query=""' })
```
The issue is that in order to execute a function from the command line you have to alter it. So I hardly see how it's doable. Any idea?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.