RishabhRD / nvim-cheat.sh

cheat.sh integration for neovim in elegant way
152 stars 8 forks source link

support search history? #6

Open v6cc opened 3 years ago

v6cc commented 3 years ago

hope support use <c-n> <c-p> in insert mode to get history search

RishabhRD commented 3 years ago

Not sure about it. It means the plugin has to maintain an array of old search entries. And its size would increase with every usage of the plugin. I am just thinking can we utilize some vim/neovim capability here so that we don't have to use the list. Do you have any vim/neovim feature in mind that can help us to implement this with O(1) memory usage?

v6cc commented 3 years ago

@RishabhRD May be just maintain recent 10 search history? too many seems not useful

RishabhRD commented 3 years ago

@zdmgmail maintaining 10 in search history would be a sort of hack. However, if done using a command also, like vimscript command, it would maintain history. So, we can't escape from memory usage. Hence, I thought we can maintain it ourselves to get more control.

Just update popfix and nvim-cheat.sh to get the feature. :smiley:

I have updated readme for the new mappings.

Thanks for such a valuable suggestion.