Remapping keys in isearch is nothing special, however isearch is not using the minibuffer, but the echo area for displaying its state. This means that trying to use a conventional editing command like delete-word
will not have the intended effect (deleting a word in the minibuffer), but rather edit text in the buffer you started the search from.
To solve this, you must write your own function in the style of what's been bound to C-w
before, manipulating isearch state. Judging by the sources of isearch-delete-char
, you're working with a sequence of isearch commands (one for each char) and can pop these to undo what has been typed. I'd consider reporting a bug to request this feature to be implemented as it's not obvious how you'd do it yourself.
C-w
to delete the word under cursor. Please go into more detail.F1 k C-w
in appropriate context to see which keymap you should modify.evil-search-forward
, in addition to messing up my minibuffer in a weird way, the buffer also has its word deleted Also it appears thatisearch-yank-word-or-char
is originally bound to this function.