Closed haolian9 closed 1 year ago
i dont know much about cpp, but i think i found the code that controls how the input keys being handled: https://github.com/Genivia/ugrep/blob/a779c64a1453c227c7b2cdcb2c9f0d1118f38a7e/src/query.cpp#L932. the keys are hard coded, so it's not too easy to support vi mode. and yeah i can certainly change this part of code by my needs.
Hi, i got intrigued by the
--query
mode. As a neovim guy myself, i had dreamed about this feature while using grep, git grep. Though using emacs fasion keymaps (especially for<enter>
to move selection down one line,^q
to quit) in a neovim floating terminal window goes against my muscle memory. I have read through the readme and GH issues but found no mentions about this, and no way to change the default keymaps; From what i obversed in the interactive mode, it has two modes: insert and select. I believe the vi-mode fits it naturally.So do you think it's a good idea to get vi-mode into ugrep? just like bash's
set -o vi
.i dont have a comprehensive keymaps for the vi-mode, but here are what i used to use: