From ced8ae8c8845b3bbcc7b582800c7186072a6c089 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Thu, 5 Mar 2020 22:07:22 +0000 Subject: [PATCH] chore(editor): Tweak amx, helm, undo-tree and flyspell keybinds --- modules/editor/siren-amx.el | 2 -- modules/editor/siren-undo-tree.el | 19 ++++++++++++------- modules/navigation/siren-helm.el | 9 ++++++--- modules/spelling/siren-flyspell.el | 9 +++++++-- 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/modules/editor/siren-amx.el b/modules/editor/siren-amx.el index 71e2677..cd7e74c 100644 --- a/modules/editor/siren-amx.el +++ b/modules/editor/siren-amx.el @@ -12,8 +12,6 @@ :bind ("M-x" . amx) ("C-x C-m" . amx) - ("C-c C-m" . amx) - ("C-c C-c M-x" . execute-extended-command) :custom (amx-backend 'ivy) diff --git a/modules/editor/siren-undo-tree.el b/modules/editor/siren-undo-tree.el index adeb8db..f6e4768 100644 --- a/modules/editor/siren-undo-tree.el +++ b/modules/editor/siren-undo-tree.el @@ -11,20 +11,25 @@ (emacs-startup . global-undo-tree-mode) :bind - ("C-x u" . undo-tree-visualize) - ("M--" . undo-tree-undo) - ("M-_" . undo-tree-redo) - ("s-z" . undo-tree-undo) - ("s-Z" . undo-tree-redo) + (:map undo-tree-map + ("C-x u" . undo-tree-visualize) + ("M--" . undo-tree-undo) + ("M-_" . undo-tree-redo) + ("s-z" . undo-tree-undo) + ("s-Z" . undo-tree-redo)) :diminish undo-tree-mode :custom - ;; autosave the undo-tree history (undo-tree-history-directory-alist `((".*" . ,(expand-file-name "undo-tree-history" siren-cache-dir)))) - (undo-tree-auto-save-history nil)) + (undo-tree-auto-save-history nil) ;; use undohist package instead + + :config + ;; Unbind keys that I don't use. + (unbind-key "C-/" undo-tree-map) + (unbind-key "C-?" undo-tree-map)) (provide 'siren-undo-tree) ;;; siren-undo-tree.el ends here diff --git a/modules/navigation/siren-helm.el b/modules/navigation/siren-helm.el index 00a97d1..d25f22c 100644 --- a/modules/navigation/siren-helm.el +++ b/modules/navigation/siren-helm.el @@ -29,16 +29,19 @@ ("C-x C-f" . helm-find-files) ("C-c f f" . helm-for-files) ("C-c f r" . helm-recentf) + ("C-c C-m" . helm-M-x) :custom (helm-M-x-always-save-history t) (helm-M-x-fuzzy-match t) - (helm-autoresize-max-height 30) - (helm-autoresize-min-height 30) - (helm-autoresize-mode t) + (helm-always-two-windows t) + (helm-autoresize-max-height 48) + (helm-autoresize-min-height 10) + (helm-autoresize-mode nil) (helm-buffer-max-length 64) (helm-case-fold-search 'smart) (helm-command-prefix-key "C-c h") + (helm-display-header-line t) (helm-echo-input-in-header-line t) (helm-ff-file-name-history-use-recentf t) (helm-ff-search-library-in-sexp t) diff --git a/modules/spelling/siren-flyspell.el b/modules/spelling/siren-flyspell.el index fa7d9f1..7afc17f 100644 --- a/modules/spelling/siren-flyspell.el +++ b/modules/spelling/siren-flyspell.el @@ -6,12 +6,12 @@ ;;; Code: +(require 'siren-ivy) + (use-package flyspell :straight (:type built-in) :demand :diminish flyspell-mode - :bind - ("s-." . flyspell-correct-word-before-point) :hook (prog-mode . flyspell-prog-mode) @@ -27,5 +27,10 @@ ;; Unbind keys used by siren-resize-window module. (unbind-key "C-;" flyspell-mode-map)) +(use-package flyspell-correct-ivy + :bind ("C-/" . flyspell-correct-wrapper) + :custom + (flyspell-correct-interface #'flyspell-correct-ivy)) + (provide 'siren-flyspell) ;;; siren-flyspell.el ends here