Add dired evil search next/previous key bindings

The search next/previous commands are different
because of the `evil-search-module' values:
vim    = evil-search
hybrid = isearch

- 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=
This commit is contained in:
duianto 2019-11-12 12:42:50 +01:00 committed by Maximilian Wolff
parent 2880d44356
commit 3a51e00a40
No known key found for this signature in database
GPG Key ID: 2DD07025BFDBD89A
2 changed files with 17 additions and 1 deletions

View File

@ -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):

View File

@ -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