Heavily redesign keybinding design

+ SPC and SPC m as leader/localleader (spacemacs-ey)
+ Move all custom keybindings to private +bindings.el file
+ Redesign+rearrange keybindings
This commit is contained in:
Henrik Lissner 2017-05-27 14:49:06 +02:00
parent 717d0ec06f
commit fbe782df22
13 changed files with 425 additions and 357 deletions

View file

@ -28,45 +28,6 @@
(delete 'yas-installed-snippets-dir yas-snippet-dirs))))
;; Repeat all sorts of motion and searches with SPC & C-SPC
(defmacro +my!repeat-with-spc (command next-func prev-func)
"Repeat motions with SPC/S-SPC"
(let ((fn-sym (intern (format "+evil*repeat-%s" command))))
`(progn
(defun ,fn-sym (&rest _)
(define-key evil-motion-state-map (kbd "SPC") ',next-func)
(define-key evil-motion-state-map (kbd "S-SPC") ',prev-func))
(advice-add #',command :before #',fn-sym))))
(after! evil
;; n/N
(+my!repeat-with-spc evil-ex-search-next evil-ex-search-next evil-ex-search-previous)
(+my!repeat-with-spc evil-ex-search-previous evil-ex-search-next evil-ex-search-previous)
(+my!repeat-with-spc evil-ex-search-forward evil-ex-search-next evil-ex-search-previous)
(+my!repeat-with-spc evil-ex-search-backward evil-ex-search-next evil-ex-search-previous)
;; f/F/t/T/s/S
(after! evil-snipe
(setq evil-snipe-repeat-keys nil
evil-snipe-override-evil-repeat-keys nil) ; causes problems with remapped ;
(+my!repeat-with-spc evil-snipe-f evil-snipe-repeat evil-snipe-repeat-reverse)
(+my!repeat-with-spc evil-snipe-F evil-snipe-repeat evil-snipe-repeat-reverse)
(+my!repeat-with-spc evil-snipe-t evil-snipe-repeat evil-snipe-repeat-reverse)
(+my!repeat-with-spc evil-snipe-T evil-snipe-repeat evil-snipe-repeat-reverse)
(+my!repeat-with-spc evil-snipe-s evil-snipe-repeat evil-snipe-repeat-reverse)
(+my!repeat-with-spc evil-snipe-S evil-snipe-repeat evil-snipe-repeat-reverse)
(+my!repeat-with-spc evil-snipe-x evil-snipe-repeat evil-snipe-repeat-reverse)
(+my!repeat-with-spc evil-snipe-X evil-snipe-repeat evil-snipe-repeat-reverse))
;; */#
(after! evil-visualstar
(+my!repeat-with-spc evil-visualstar/begin-search-forward
evil-ex-search-next evil-ex-search-previous)
(+my!repeat-with-spc evil-visualstar/begin-search-backward
evil-ex-search-previous evil-ex-search-next)))
(after! mu4e
(setq-default
smtpmail-stream-type 'starttls