mawww / kakoune

mawww's experiment for a better code editor
http://kakoune.org
The Unlicense
9.88k stars 713 forks source link

Discussion: Make grep use the search register as the default search pattern #3344

Open alexherbo2 opened 4 years ago

alexherbo2 commented 4 years ago

How about make grep use the search register as the default search pattern, instead of the main selection content?

andreyorst commented 4 years ago

At first I've thought that you mean, that we should populate search register with pattern that was used for grep command, so one could easily jump in grep buffer between matches. I often search over the grep buffer, so it seems like usable feature. But I've never actually grepped something that I was trying to search in the file. Is it a common practice among other users?

danr commented 4 years ago

I never do that. Also the regex syntaxes for grep and kakoune differ. Hence I'm against changing away from the main selection content.

krobelus commented 4 years ago

I often run grep with the search register, usually after using *. Of course that only works with an egrep-like tool that supports \b.