5 ms·
Well, there are lots of customizations doable (I’m still rocking my .emacs from the 1990’s going through several platforms, Linux→MacOS→Linux, refined over the
by AlbertoGP 7y ago
Well, there are lots of customizations doable (I’m still rocking my .emacs from the 1990’s going through several platforms, Linux→MacOS→Linux, refined over the years with custom functions etc.) but to name a single example:
my keyboard does have a Find key, and I tried mapping isearch-forward to it instead of the default CTRL+S.
That’s trivial, but then, you know how you can press CTRL+S again to go to the next result? Well, that key combo is hardcoded in LISP.
So yes, you technically can remap isearch-forward, but in a useless way.
- henry_flower 7y ago> that key combo is hardcoded in LISP isearch-forward turns on a minor mode that has it's own keymap a snippet from isearch.el: (defvar isearch-mode-map ... ;; Several non-printing chars change the searching behavior. (define-key map "\C-s" 'isearch-repeat-forward) (define-key map "\C-r" 'isearch-repeat-backward) hence to redefine C-s, to, say F12: (global-set-key [f12] 'isearch-forward) (define-key isearch-mode-map [f12] 'isearch-repeat-forward) & so on I don't see what is the problem here
- AlbertoGP 7y agoI see, thanks for the correction.
- omaranto 7y agoWhat HNer henry_flower neglected to state explicitly in his helpful comment is that it is false that pressing C-s to go to the next result is hardcoded in some Emacs Lisp function. I just wanted to say that in case non-Emacsers don't know it's implied by what Henry did say. (What he said is much better than just "that's not true!", he also tells you how to change the C-s key that goes to the next match.)
- AlbertoGP 7y agoI realize now that I misused the term “hardcoded”, thanks.