Alexander Berntsen <[email protected]> writes:
I guess, you actually want to make ‘C-h’ equal to ‘DEL’ and ‘C-j’ to ‘RET’ *everywhere*, not just in isearch (there is no any evil-mode’s search, as far I know), helm, etc. Nothing is easier:
(define-key key-translation-map (kbd "C-h") (kbd "DEL")) (define-key key-translation-map (kbd "C-j") (kbd "RET"))
I would not reject ‘C-j’ though, it is useful sometimes to have two returns: a ‘smart’ one and a ‘dumb’ one.
I don't want DEL, I want backspace.
Do you have ‘<backspace>’ that is bound somewhere else than ‘DEL’? (See ‘<f1> k <backspace>’.)
So I changed it to (global-set-key (kbd "C-h") (kbd "<backspace>")) instead of delete-backwards-char. But it still doesn't work when searching.
Is there is any reason why you believe that this should work? I did not suggest you to do anything like this.
I confused what kbd "DEL" did with what the DEL key does. Using kbd "DEL" achieves the same as kbd "<backspace", as far as I can tell.
'/ab^J' will bring up search, and add 'ab' followed by literally the characters '^' and 'J'.
No, it’s followed by literally the character ‘^J’ (this is one character — ‘linefeed’ aka ‘\n’ is C notation).
Sorry, I meant visually. It is indeed literally the character '^J'.
In the end though, your suggestion unfortunately doesn't solve anything.
Sorry, I’ve missed *when* did you try this suggestion (to use ‘key-translation-map’). I’ve re-read our conversation (restored in quotes above) — and all you said is that you had merely ingored it and tried something else with ‘global-map’ (‘global-set-key’).