Commit 486e123e8eae

Vincent Demeester <vincent+git@demeester.fr>
2014-08-10 00:02:00
Search put the cursor at the start of the search
1 parent af43a02
Changed files (1)
.emacs.d
.emacs.d/emacs.org
@@ -453,6 +453,17 @@
        (require-package 'dired+)
      #+END_SRC
 
+**** DONE Search
+
+Make isearch-forward put the cursor at the start of the search, not the end, so that isearch can be used for navigation. See also http://www.emacswiki.org/emacs/IsearchOtherEnd.
+
+
+#+BEGIN_SRC emacs-lisp
+  (defun my-isearch-goto-match-beginning ()
+    (when (and isearch-forward (not isearch-mode-end-hook-quit)) (goto-char isearch-other-end)))
+  (add-hook 'isearch-mode-end-hook 'my-isearch-goto-match-beginning)
+#+END_SRC
+
 
 **** TODO Evil
 ** TODO Modes