aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2018-07-16 20:50:52 -0500
committerJesús <heckyel@hyperbola.info>2018-07-16 20:50:52 -0500
commit107194da7176797ae86d2d988bbfcba8dcc977ec (patch)
treeb3e8d238e1464bec1c626a1cbfe15cd398051b21
parent15ea85ee14a5c40a8ed40d66fe591fe528a8719d (diff)
downloademacs-base-107194da7176797ae86d2d988bbfcba8dcc977ec.tar.lz
emacs-base-107194da7176797ae86d2d988bbfcba8dcc977ec.tar.xz
emacs-base-107194da7176797ae86d2d988bbfcba8dcc977ec.zip
add support init-modeline
-rw-r--r--custom.el5
-rw-r--r--init.el1
-rw-r--r--lisp/init-modeline.el46
3 files changed, 52 insertions, 0 deletions
diff --git a/custom.el b/custom.el
index faae662..0155901 100644
--- a/custom.el
+++ b/custom.el
@@ -3,6 +3,11 @@
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
+ '(anzu-deactivate-region t)
+ '(anzu-input-idle-delay 0.1)
+ '(anzu-replace-threshold 1000)
+ '(anzu-replace-to-string-separator " => ")
+ '(anzu-search-threshold 1000)
'(package-selected-packages (quote (nlinum sublime-themes fullframe))))
(custom-set-faces
;; custom-set-faces was added by Custom.
diff --git a/init.el b/init.el
index 2285627..d91ea33 100644
--- a/init.el
+++ b/init.el
@@ -32,6 +32,7 @@
(require 'init-nlinum)
(require 'init-gui)
(require 'init-editing-utils)
+(require 'init-modeline)
;;
;; Languages
diff --git a/lisp/init-modeline.el b/lisp/init-modeline.el
new file mode 100644
index 0000000..b0db030
--- /dev/null
+++ b/lisp/init-modeline.el
@@ -0,0 +1,46 @@
+;;----------------------------------------------------------------------------
+;; Modeline configuration
+;;----------------------------------------------------------------------------
+
+(require-package 'smart-mode-line)
+(require-package 'smart-mode-line-powerline-theme)
+(require-package 'sml-modeline)
+;; Show number of occurrences when searching
+(require-package 'anzu)
+
+(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)
+(add-to-list 'sml/replacer-regexp-list '("^~/Proyectos/git/" ":Git:") t)
+(add-to-list 'sml/replacer-regexp-list '("^~/www/" ":www:") t)
+
+(sml-modeline-mode t)
+
+(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)
+
+(myemacs/elapsed-time)
+(provide 'init-modeline)