vim-clap: Show history when input is empty
Describe the solution you’d like
When doing :Clap files or :Clap grep, many times I find myself wanna do the same search as the one I already did to select a different result, for that I need to type the whole input again. It could be cool if Clap could show a list of 10 previous searches when the input is empty, and we could just select it from the list.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 9
- Comments: 22 (18 by maintainers)
Commits related to this issue
- Merge pull request #235 from perun-network/milestone1 Perun Channels: Milestone 1 — committed to liuchengxu/vim-clap by Noc2 3 years ago
- Introduce `input_history` provider Close #235 — committed to liuchengxu/vim-clap by liuchengxu 2 years ago
- Impl input history Close #235 — committed to liuchengxu/vim-clap by liuchengxu a year ago
- Impl input history Close #235 — committed to liuchengxu/vim-clap by liuchengxu a year ago
- Impl input history Close #235 — committed to liuchengxu/vim-clap by liuchengxu a year ago
- Impl input history Close #235 — committed to liuchengxu/vim-clap by liuchengxu a year ago
- Impl input history Close #235 — committed to liuchengxu/vim-clap by liuchengxu a year ago
- Impl input history Close #235 — committed to liuchengxu/vim-clap by liuchengxu a year ago
- Implement `<C-N>`/`<C-P` for cycling the input history (#903) * Make context part of Session * Rename ProviderContext to Context * Nits * Impl input history Close #235 * Update docs ... — committed to liuchengxu/vim-clap by liuchengxu a year ago
My original plan is to use
<C-N>/<C-P>for navigating the input history, that could make people type the same search easier.That’s great news @liuchengxu. Will try out that branch today 💪
Sorry for taking so long on this issue, for the simplicity, a new provider can be added for such a purpose. Could you try this branch https://github.com/liuchengxu/vim-clap/tree/input-history-provider? @arashm @svermeulen @mtuzinskiy It’s not complete, but we’re starting somewhere anyway. Now you can invoke
:Clap input_historyto show the last 20 queries, and rerun the last normal(anyone but notinput_historyandprovidersprovider) provider with that query. The future work could be make a decision if we want to show this history whenever the input is empty for any providers or just theinput_historyprovider.Still unimplemented, not a priority for me. PR welcome.