Closed cpitclaudel closed 9 years ago
Ooh, I think that's a good idea. It's the same number of keystrokes if you want to use the symbol at point, but slightly fewer if you want a different input. It does increase the number of keystrokes if you want to search for a slight variant on the symbol at point, but I think that's much rarer.
Yup, I think wanting to change the input is less common, and it's just one more keystroke (M-n
or downn arrow)
This is brilliant :) Thanks!
The suggestions that ag.el gives (
ag/dwim-at-point
) are pretty good, but I find it slightly inconvenient that it pre-fills the minibuffer, forcing one to remove that text before typing their own search should the symbol at point not be what you want to search for.The default
rgrep
does this in a nicer way; it tells you what the default will be if you pressRET
right away, but if you want something else you don't have to empty the minibuffer first.I locally edited the source to use
(grep-read-regexp)
for myself, and I find it to work very nicely.