dajva / rg.el

Emacs search tool based on ripgrep
https://rgel.readthedocs.io
GNU General Public License v3.0
465 stars 38 forks source link

Add toggle word to result buffer #144

Closed rodweb closed 1 year ago

rodweb commented 1 year ago

Hello,

It would be nice to have word search toggle to match other editors.

Emacs:

image

VSCode

image

Webstorm

image
dajva commented 1 year ago

Thanks for the pr. This is already accessible in multiple ways although not as convenient with the indication in the UI.

One way is via the transient menu. Straight forward but need more key strokes: m -w g in the results buffer. Another way is your own toggle customization (as I actually have in my own config):

(rg-define-toggle "-w" "w")

So the difference to have this built in in discoverability and the UI indication. Did I get this correctly or is there something else to this that I missed?

rodweb commented 1 year ago

Thanks for the quick reply.

So the difference to have this built in in discoverability and the UI indication. Did I get this correctly or is there something else to this that I missed?

That's it. It'd be nice to have the same visual clue as the other editors (we already have regexp and case).

Another way is your own toggle customization (as I actually have in my own config):

(rg-define-toggle "-w" "w")

That solves my main problem (pressing a single key to toggle). I can live with that!

dajva commented 1 year ago

Hi, sorry for the late follow up. Been busy with other stuff. I will decline this pr simply because this is easily achievable in other ways and the indication is IMO not super important. The main reason is actually screen space where there is a risk that the items in the header doesn't fit in a window when you have a vertical split in emacs.

Thanks for your submission.