Feature Request: Support for different modes for vim bindings
guruor opened this issue · 3 comments
Being a vim user I was using rest.nvim, it covers my day to day usage except for few cases like file upload. So was always looking for a lightweight alternative of Postman. Thank you so much for a lightweight client.
I tried using the vim bindings provided in the repo, it unfortunately didn't work as expected, it usually causes conflicts when editing values. For example the default binding used to display help is H
, Now when editing the URL, if I were to type variable name HOST
, I am not able to do so because the moment I type H
it opens up the help menu.
Screen.Recording.2024-05-13.at.9.04.23.AM.mov
As a workaround I can remap the help binding but that would cause conflict with some other key which I will need to remap.
So I am suggesting to implement vim modes like NORMAL
and INSERT
, where in INSERT
mode no keys will trigger the binding action and ESC key can change the mode back to NORMAL.
Similar implementation can be found in this terminal file manager yazi
Sample clip from their demo:
Screen.Recording.2024-05-12.at.5.52.52.PM.mp4
OR
We can add an option to open the content in preferred editor using $EDITOR where user can edit the content and edited content can be conveyed back to ATAC, this will provide more flexibility and user can utilise the syntax highlighting of the editor as well.
After testing for a while I could see that for body textarea
we have vim emulation available, but it is not available for input boxes.
I could find the input component in yazi source: yazi-core/src/input
We can utilise this components.
Hello @G0V1NDS
thanks for your issue and your investment on the project
The big problem with the text area is that it remains unmaintained and is plainfull to use. Concerning the main issue you are talking about, I personnally think that it would a great thing the improve the vim config file. Since it works great with most use case.
If you have any more ideas, tell me
Have a great day
Have you considered maybe using a vim library, or communicating with nvim?
Something like this which is a vim fork, to be ran as a backend
https://github.com/onivim/libvim
Or a rpc client, that uses the nvim api
https://github.com/KillTheMule/nvim-rs
Implementing a vim emulation for every software we want to add vim motions to doesn't seem very practical, and there seem to be good alternatives out there.