From 69265d725c9bbe770bce5256900cb7bb7c289e4f Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Thu, 5 Oct 2017 13:18:35 +0100 Subject: [PATCH] Add anzu package --- core/siren-modules.el | 1 + custom.el | 2 +- modules/siren-aliases.el | 3 +-- modules/siren-anzu.el | 28 ++++++++++++++++++++++++++++ 4 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 modules/siren-anzu.el diff --git a/core/siren-modules.el b/core/siren-modules.el index ecdf814..6103218 100644 --- a/core/siren-modules.el +++ b/core/siren-modules.el @@ -11,6 +11,7 @@ ;; Modules (require 'siren-aliases) +(require 'siren-anzu) (require 'siren-avy) (require 'siren-browse-kill-ring) (require 'siren-company) diff --git a/custom.el b/custom.el index 150a363..9d3eb4d 100644 --- a/custom.el +++ b/custom.el @@ -7,7 +7,7 @@ '(magit-commit-arguments (quote ("-S"))) '(package-selected-packages (quote - (flycheck-package flycheck-gometalinter go-projectile gotest go-rename go-guru go-eldoc company-go ace-window phi-search magit-gh-pulls twilight-bright-theme twilight-anti-bright-theme yaml-mode thrift scss-mode sass-mode yari ruby-tools ruby-refactor rspec-mode inf-ruby php-mode plantuml-mode markdown-mode lua-mode web-mode json-mode eslintd-fix go-mode gitignore-mode gitconfig-mode dockerfile-mode feature-mode highlight-symbol highlight-indent-guides highlight-indentation flycheck coffee-mode ecb zoom-window yasnippet buffer-move toggle-quotes smart-shift expand-region move-dup string-inflection rainbow-mode package-lint smartparens multiple-cursors magit linum-relative smex ido-vertical-mode ido-completing-read+ helm-swoop helm-projectile helm-open-github helm-gtags helm-describe-modes helm-descbinds helm-ag helm haml-mode imenu-anywhere github-browse-file git-timemachine full-ack hideshowvis evil editorconfig dumb-jump direx dired+ diff-hl fill-column-indicator company browse-kill-ring avy use-package smart-mode-line exec-path-from-shell diminish dash))) + (anzu flycheck-package flycheck-gometalinter go-projectile gotest go-rename go-guru go-eldoc company-go ace-window phi-search magit-gh-pulls twilight-bright-theme twilight-anti-bright-theme yaml-mode thrift scss-mode sass-mode yari ruby-tools ruby-refactor rspec-mode inf-ruby php-mode plantuml-mode markdown-mode lua-mode web-mode json-mode eslintd-fix go-mode gitignore-mode gitconfig-mode dockerfile-mode feature-mode highlight-symbol highlight-indent-guides highlight-indentation flycheck coffee-mode ecb zoom-window yasnippet buffer-move toggle-quotes smart-shift expand-region move-dup string-inflection rainbow-mode package-lint smartparens multiple-cursors magit linum-relative smex ido-vertical-mode ido-completing-read+ helm-swoop helm-projectile helm-open-github helm-gtags helm-describe-modes helm-descbinds helm-ag helm haml-mode imenu-anywhere github-browse-file git-timemachine full-ack hideshowvis evil editorconfig dumb-jump direx dired+ diff-hl fill-column-indicator company browse-kill-ring avy use-package smart-mode-line exec-path-from-shell diminish dash))) '(plantuml-jar-path "/usr/local/Cellar/plantuml/8048/plantuml.8048.jar") '(siren-rubocop-autocorrect-on-save nil)) (custom-set-faces diff --git a/modules/siren-aliases.el b/modules/siren-aliases.el index 45ffe88..2b385f6 100644 --- a/modules/siren-aliases.el +++ b/modules/siren-aliases.el @@ -2,13 +2,12 @@ ;;; Commentary: -;; Common aliases I use all the time. +;; Common aliases for built-in commands. ;;; Code: ;; Text Manipulation (defalias 'rs 'replace-string) -(defalias 'qr 'query-replace-regexp) (defalias 'al 'align-regexp) (defalias 'sl 'sort-lines) (defalias 'rr 'reverse-region) diff --git a/modules/siren-anzu.el b/modules/siren-anzu.el new file mode 100644 index 0000000..dc17b1d --- /dev/null +++ b/modules/siren-anzu.el @@ -0,0 +1,28 @@ +;;; siren-anzu.el --- jimeh's Emacs Siren: anzu configuration. + +;;; Commentary: + +;; Basic configuration for anzu. + +;;; Code: + +(use-package anzu + :config + (global-anzu-mode +1) + + (set-face-attribute 'anzu-mode-line nil + :foreground "yellow" :weight 'bold) + + (setq anzu-mode-lighter "" + anzu-deactivate-region t + anzu-search-threshold 1000 + anzu-replace-threshold 50 + anzu-replace-to-string-separator " => ") + + (global-set-key [remap query-replace] 'anzu-query-replace) + (global-set-key (kbd "C-x C-r") 'anzu-query-replace) + (global-set-key [remap query-replace-regexp] 'anzu-query-replace-regexp) + (global-set-key (kbd "C-c C-r") 'anzu-query-replace-regexp)) + +(provide 'siren-anzu) +;;; siren-anzu.el ends here