diff --git a/CHANGELOG.develop b/CHANGELOG.develop index 48bfe919a..e278c43f1 100644 --- a/CHANGELOG.develop +++ b/CHANGELOG.develop @@ -859,6 +859,13 @@ Other: - ~down~ =evil-next-visual-line= - Added ~a~ for =ace-window= to window manipulation transient state (thanks to fleimgruber) + - Added =dired= evil search next/prev key bindings (thanks to duianto): + - With the =vim= editing style in =normal= state: + - ~n~ =evil-ex-search-next= + - ~N~ =evil-ex-search-previous= + - With the =hybrid= editing style in =normal= state: + - ~n~ =evil-search-next= + - ~N~ =evil-search-previous= - Improvements: - Rewrote window layout functions for ~SPC w 1~, ~SPC w 2~, ~SPC w 3~, and ~SPC w 4~ (thanks to Codruț Constantin Gușoi): diff --git a/layers/+spacemacs/spacemacs-defaults/packages.el b/layers/+spacemacs/spacemacs-defaults/packages.el index 95b2e57e2..efa8961c6 100644 --- a/layers/+spacemacs/spacemacs-defaults/packages.el +++ b/layers/+spacemacs/spacemacs-defaults/packages.el @@ -75,7 +75,16 @@ "ad" 'spacemacs/dired "fj" 'dired-jump "jd" 'dired-jump - "jD" 'dired-jump-other-window)) + "jD" 'dired-jump-other-window) + ;; The search next/previous commands are different + ;; because of the `evil-search-module' values: + ;; vim = evil-search, hybrid = isearch + (when (eq 'vim dotspacemacs-editing-style) + (evil-define-key 'normal dired-mode-map (kbd "n") 'evil-ex-search-next) + (evil-define-key 'normal dired-mode-map (kbd "N") 'evil-ex-search-previous)) + (when (eq 'hybrid dotspacemacs-editing-style) + (evil-define-key 'normal dired-mode-map (kbd "n") 'evil-search-next) + (evil-define-key 'normal dired-mode-map (kbd "N") 'evil-search-previous))) (defun spacemacs-defaults/init-dired-x () (use-package dired-x