Open gregory-nisbet opened 8 years ago
I know this is old but thought to share my snippet.
(use-package evil-leader ; ----------------------------------- Set your VIM leader key
:config
(global-evil-leader-mode)
(evil-leader/set-leader "<SPC>") ; ------------------------- Spacebar as leader key
(evil-leader/set-key
"cff" 'counsel-find-file ; ------------------------------- Default file search
"cfz" 'counsel-fzf ; ------------------------------------- Recursive search by file name with fuzzy matching
"crg" 'counsel-rg ; -------------------------------------- Recursive search by string content with ripgrep
"csb" 'counsel-switch-buffer ; --------------------------- List buffers with counsel
"cdf" 'counsel-describe-function ; ----------------------- Describe functions with counsel
"cdv" 'counsel-describe-variable ; ----------------------- Describe variables with counsel
"kb" 'kill-buffer ; -------------------------------------- Default kill buffer
"i" 'swiper ; -------------------------------------------- Isearch current buffer with swiper
"zsh" 'shell ; ------------------------------------------- Default open shell buffer
"sb" 'save-buffer ; -------------------------------------- Default save current buffer
"mx" 'counsel-M-x ; -------------------------------------- Easier access to M-x
))
Using the below configuration file (and the latest version of evil-mode and evil-leader as a submodule in my
.emacs/modules
directory), I am able to reproduce a bug where<leader> b
is defined, but<leader> <SPC>
is not. The same weirdness occurs with a leader key of ",".Here is the section of the output of
C-h b
related to evil-leader bindings.Note: as a workaround, modifying the default map directly fixes the problem.
Ah! okay. It turns out you have to do