]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
Thanks to Xah Lee for some extra isearch keys
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Thu, 23 Jun 2016 07:55:51 +0000 (09:55 +0200)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Thu, 23 Jun 2016 07:55:51 +0000 (09:55 +0200)
- origin http://ergoemacs.org/emacs/emacs_isearch_by_arrow_keys.html

bba.org

diff --git a/bba.org b/bba.org
index 4a7118c9542d11bb58b06dbff2f4a2bcb250dc20..d1eceb73ac5c878bdaf16ef14cacaa973a009af3 100644 (file)
--- a/bba.org
+++ b/bba.org
@@ -2445,6 +2445,21 @@ we use that as default:
   (global-set-key (kbd "C-M-r") 'isearch-backward)
 #+END_SRC
 
+Thanks to [[http://ergoemacs.org/emacs/emacs_isearch_by_arrow_keys.html][Xah Lee]] for this:
+
+Here's very convenient keys for isearch.
+
+#+BEGIN_SRC emacs-lisp
+    (define-key isearch-mode-map (kbd "<up>") 'isearch-ring-retreat )
+    (define-key isearch-mode-map (kbd "<down>") 'isearch-ring-advance )
+
+    (define-key isearch-mode-map (kbd "<left>") 'isearch-repeat-backward)
+    (define-key isearch-mode-map (kbd "<right>") 'isearch-repeat-forward)
+
+    (define-key minibuffer-local-isearch-map (kbd "<left>") 'isearch-reverse-exit-minibuffer)
+    (define-key minibuffer-local-isearch-map (kbd "<right>") 'isearch-forward-exit-minibuffer)
+#+END_SRC
+
 * By indentation
 
 Borrowed from [[https://github.com/Wilfred/.emacs.d][github]]: