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

Most upvoted comments

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_history to show the last 20 queries, and rerun the last normal(anyone but not input_history and providers provider) 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 the input_history provider.

Still unimplemented, not a priority for me. PR welcome.