blob: d0f5babe448bf622883497d59852c8a6cfd6ba16 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
;;; init-modeline.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;----------------------------------------------------------------------------
;; Modeline configuration
;;----------------------------------------------------------------------------
(use-package smart-mode-line
:pin "MELPA")
(use-package smart-mode-line-powerline-theme
:pin "MELPA")
(use-package sml-modeline
:pin "MELPA"
:config
;; Show number of occurrences when searching
(setq sml/theme 'powerline)
(setq sml/no-confirm-load-theme t)
(setq sml/shorten-modes t)
;; Show EOL mode
(setq sml/show-eol t)
;; Show remote buffers
(setq sml/show-remote t)
(sml/setup)
(sml-modeline-mode t))
(use-package anzu
:config
(custom-set-variables
'(anzu-search-threshold 1000)
'(anzu-replace-threshold 1000)
'(anzu-deactivate-region t)
'(anzu-input-idle-delay 0.1)
'(anzu-replace-to-string-separator " => "))
(global-anzu-mode +1)
(set-face-attribute 'anzu-mode-line nil
:foreground "yellow" :weight 'bold)
(define-key isearch-mode-map [remap isearch-query-replace] #'anzu-isearch-query-replace)
(define-key isearch-mode-map [remap isearch-query-replace-regexp] #'anzu-isearch-query-replace-regexp)
;;----------------------------------------------------------------------------
;; Keyboard shortcuts in Anzu Mode
;;----------------------------------------------------------------------------
(global-set-key (kbd "M-%") 'anzu-query-replace)
(global-set-key (kbd "s-<SPC>") 'anzu-query-replace))
(provide 'init-modeline)
;; End:
;;; init-modeline.el ends here
|