+leader map

Basically just duplicate evil-leader package, setting up SPC to be the
leader.
I am using this binding prefix for single binds that I may find useful.
This commit is contained in:
2020-08-01 18:09:06 +01:00
parent 8a2f54d123
commit 1e5c43b09e

View File

@@ -166,14 +166,25 @@
* Evil * Evil
** Evil default ** Evil default
Setup the evil package, with some basic keybinds. Setup the evil package, with some basic keybinds.
Also declare a leader-map at "SPC".
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package evil (use-package evil
:init :init
(setq evil-want-keybinding nil) (setq evil-want-keybinding nil)
:config :config
(evil-mode +1) (evil-mode +1)
(bind-key "TAB" #'evil-jump-item evil-normal-state-map) (evil-define-key 'normal global-map
(evil-define-key 'visual 'emacs-lisp-mode-map "gr" #'eval-region)) "TAB" #'evil-jump-item
"SPC" nil)
(evil-define-key 'visual 'emacs-lisp-mode-map "gr" #'eval-region)
(bind-keys
:map evil-normal-state-map
:prefix "SPC"
:prefix-map +evil/leader-map
("f" . find-file)
("s" . save-buffer)
("q" . save-buffers-kill-terminal)
("b" . switch-to-buffer)))
#+END_SRC #+END_SRC
** Evil surround ** Evil surround
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp