I frequently mistype "_" as "-" when doing a quick isearch-forward
.
E.g. I'm looking for snake_case
and accidentally type C-s snake-case
and get no results. Best case I notice quickly enough and don't have to delete too much of the search term, worst case I basically have to type it over again.
Is there some way to hook into isearch-forward
to change my query into a isearch-forward-regexp
like snake[-_]case
?
I need to actually search for lisp-case
often enough that simply changing "-" to "_" is going to cause more problems than it solves.
M-e
to jump to the mini-buffer to edit the search string while isearch is active. ThenC-e M-b BKSPC _
andC-s
to continue search. – Kaushal Modi Apr 01 '15 at 03:54isearch
? – Kaushal Modi Apr 01 '15 at 14:07