Emacs - modify the default face of search highlight
authorPeng Li <seudut@gmail.com>
Mon, 11 Sep 2017 23:51:32 +0000 (07:51 +0800)
committerPeng Li <seudut@gmail.com>
Tue, 12 Sep 2017 00:13:25 +0000 (08:13 +0800)
emacs.d/config.org
emacs.d/emacs-evil.org

index df20cde..e25b01e 100644 (file)
@@ -358,6 +358,11 @@ improve color for org-mode
 
 #+END_SRC
 
+search text theme
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+  (set-face-attribute 'lazy-highlight nil :background "yellow" :foreground "black" :weight 'bold)
+#+END_SRC
+
 ** Rainbow-delimiter
 
 #+BEGIN_SRC emacs-lisp :tangle yes :results silent
index 727c9ea..86597e5 100644 (file)
@@ -72,6 +72,16 @@ https://www.emacswiki.org/emacs/Evil.
     (define-key evil-normal-state-map (kbd "C-;") 'previous-multiframe-window)
     (evil-define-key 'emacs eshell-mode-map (kbd "C-;") 'previous-multiframe-window))
 #+END_SRC
+
+** face attribute
+Let the search highlight persistent, https://stackoverflow.com/questions/25768036/emacs-evil-non-incremental-search-and-persistent-highlighting/34252236
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+  (evil-select-search-module 'evil-search-module 'evil-search)
+
+  (with-eval-after-load "evil"
+    (define-key evil-normal-state-map "\\" nil)
+    (define-key evil-normal-state-map "\\\\" #'evil-ex-nohighlight))
+#+END_SRC
 * Evil-escape
 [[https://github.com/syl20bnr/evil-escape][evil-escape]], escape from anything with customizable key sequence.
 #+BEGIN_SRC emacs-lisp :tangle yes :results silent