diff --git a/layers/+chat/erc/packages.el b/layers/+chat/erc/packages.el index 637ff8299e5f..4c7cca0c46ce 100644 --- a/layers/+chat/erc/packages.el +++ b/layers/+chat/erc/packages.el @@ -52,6 +52,7 @@ "aiE" 'erc-tls "aii" 'erc-track-switch-buffer "aiD" 'erc/default-servers) + (spacemacs/declare-prefix "ai" "irc") ;; utf-8 always and forever (setq erc-server-coding-system '(utf-8 . utf-8))) :config diff --git a/layers/+chat/rcirc/packages.el b/layers/+chat/rcirc/packages.el index dda1990dc008..d8b0f0700b94 100644 --- a/layers/+chat/rcirc/packages.el +++ b/layers/+chat/rcirc/packages.el @@ -65,6 +65,7 @@ rcirc-track-minor-mode)) (spacemacs/set-leader-keys "air" 'spacemacs/rcirc) + (spacemacs/declare-prefix "ai" "irc") (evil-set-initial-state 'rcirc-mode 'insert)) (setq rcirc-fill-column 80 rcirc-buffer-maximum-lines 2048 diff --git a/layers/+distributions/spacemacs-bootstrap/packages.el b/layers/+distributions/spacemacs-bootstrap/packages.el index e80c7de4f4e4..d1b7b5fceffa 100644 --- a/layers/+distributions/spacemacs-bootstrap/packages.el +++ b/layers/+distributions/spacemacs-bootstrap/packages.el @@ -338,27 +338,11 @@ ("\\(.+\\)-transient-state/\\(.+\\)" . "\\2") ("\\(.+\\)-transient-state/body" . "\\1-transient-state") ("spacemacs-layouts/non-restricted-buffer-list-\\(helm\\|ivy\\)" . "global-list-buffers") - ("spacemacs/alternate-buffer" . "last buffer") - ("spacemacs/default-pop-shell" . "open shell") - ("spacemacs/helm-project-smart-do-search" . "smart search") - ("spacemacs/helm-project-smart-do-search-region-or-symbol" . "smart search w/input") - ("spacemacs/search-project-auto" . "search project") - ("spacemacs/search-project-auto-region-or-symbol" . "search project w/input") - ("spacemacs/toggle-holy-mode" . "emacs (holy-mode)") - ("spacemacs/toggle-hybrid-mode" . "hybrid (hybrid-mode)") ("spacemacs/toggle-mode-line-\\(.+\\)" . "\\1") - ("avy-goto-line" . "avy line") - ("avy-goto-word-or-subword-1" . "avy word") - ("er/expand-region" . "expand region") ("evil-lisp-state-\\(.+\\)" . "\\1") - ("helm-apropos" . "apropos") - ("helm-descbinds" . "show keybindings") ("helm-mini\\|ivy-switch-buffer" . "list-buffers") ("lazy-helm/\\(.+\\)" . "\\1") ("lazy-helm/spacemacs/\\(.+\\)" . "\\1") - ("shell-command" . "shell cmd") - ("sp-split-sexp" . "split sexp") - ("universal-argument" . "universal arg") ))) (dolist (nd new-descriptions) ;; ensure the target matches the whole string @@ -478,18 +462,9 @@ (push '(("\\(.*\\)C-c C-d C-d" . "elisp-slime-nav-describe-elisp-thing-at-point") . t) which-key-replacement-alist) - (dolist (leader-key `(,dotspacemacs-leader-key ,dotspacemacs-emacs-leader-key)) - (which-key-add-key-based-replacements - (concat leader-key " m") "major mode commands" - (concat leader-key " " dotspacemacs-emacs-command-key) "M-x")) - (which-key-add-key-based-replacements dotspacemacs-leader-key '("root" . "Spacemacs root") - dotspacemacs-emacs-leader-key '("root" . "Spacemacs root") - (concat dotspacemacs-leader-key " m") - '("major-mode-cmd" . "Major mode commands") - (concat dotspacemacs-emacs-leader-key " m") - '("major-mode-cmd" . "Major mode commands")) + dotspacemacs-emacs-leader-key '("root" . "Spacemacs root")) ;; disable special key handling for spacemacs, since it can be ;; disorienting if you don't understand it diff --git a/layers/+lang/ipython-notebook/packages.el b/layers/+lang/ipython-notebook/packages.el index 78bb1d078cd3..8f71e031bd98 100644 --- a/layers/+lang/ipython-notebook/packages.el +++ b/layers/+lang/ipython-notebook/packages.el @@ -30,6 +30,7 @@ (spacemacs/set-leader-keys "ayl" 'ein:notebooklist-login "ayo" 'ein:notebooklist-open) + (spacemacs/declare-prefix "ay" "ipython notebook") (with-eval-after-load 'ein-notebooklist (evilified-state-evilify-map ein:notebooklist-mode-map :mode ein:notebooklist-mode diff --git a/layers/+source-control/git/packages.el b/layers/+source-control/git/packages.el index 2c782a25ef01..6fc4434af71f 100644 --- a/layers/+source-control/git/packages.el +++ b/layers/+source-control/git/packages.el @@ -151,7 +151,6 @@ (when (eq window-system 'w32) (setenv "GIT_ASKPASS" "git-gui--askpass")) ;; key bindings - (spacemacs/declare-prefix "gd" "diff") (spacemacs/declare-prefix "gf" "file") (spacemacs/set-leader-keys "gb" 'spacemacs/git-blame-micro-state diff --git a/layers/+spacemacs/spacemacs-defaults/keybindings.el b/layers/+spacemacs/spacemacs-defaults/keybindings.el index 0ac0e989c727..9f473fb997ee 100644 --- a/layers/+spacemacs/spacemacs-defaults/keybindings.el +++ b/layers/+spacemacs/spacemacs-defaults/keybindings.el @@ -14,11 +14,14 @@ ;; --------------------------------------------------------------------------- ;; We define prefix commands only for the sake of which-key -(setq spacemacs/key-binding-prefixes '(("a" "applications") +(setq spacemacs/key-binding-prefixes '(("SPC" "M-x") + ("TAB" "last buffer") + ("!" "shell cmd") + ("*" "search project w/input") + ("/" "search project") + ("?" "show keybindings") + ("a" "applications") ("A" "other applications") - ("ai" "irc") - ("as" "shells") - ("ay" "ipython notebook") ("b" "buffers") ("bN" "new empty buffer") ("c" "compile/comments") @@ -36,32 +39,40 @@ ("hP" "profiler") ("i" "insertion") ("j" "jump/join/split") + ("jj" "avy timer") + ("jl" "avy line") + ("js" "split sexp") + ("jw" "avy word") ("k" "lisp") ("kd" "delete") ("kD" "delete-backward") ("k`" "hybrid") + ("m" "major mode commands") ("n" "narrow/numbers") ("N" "navigation") ("p" "projects") - ("p$" "projects/shell") ("q" "quit") ("r" "registers/rings/resume") - ("Re" "elisp") - ("Rp" "pcre") ("s" "search/symbol") ("sa" "ag") ("sg" "grep") ("sk" "ack") + ("sp" "search project") + ("sP" "search project w/input") ("sr" "ripgrep") ("st" "pt") ("sw" "web") ("t" "toggles") ("tC" "colors") ("tE" "editing-styles") + ("tEe" "emacs (holy-mode)") + ("tEh" "hybrid (hybrid-mode)") ("th" "highlight") ("tm" "modeline") ("T" "UI toggles/themes") ("C-t" "other toggles") + ("u" "universal arg") + ("v" "expand region") ("w" "windows") ("wc" "centered") ("wp" "popup") @@ -71,7 +82,6 @@ ("xg" "google-translate") ("xj" "justification") ("xl" "lines") - ("xm" "move") ("xt" "transpose") ("xw" "words") ("z" "zoom"))) diff --git a/layers/+spacemacs/spacemacs-layouts/packages.el b/layers/+spacemacs/spacemacs-layouts/packages.el index 19e9b85dd2ee..5f17baaeb660 100644 --- a/layers/+spacemacs/spacemacs-layouts/packages.el +++ b/layers/+spacemacs/spacemacs-layouts/packages.el @@ -221,7 +221,6 @@ (setq spacemacs--last-selected-layout persp-last-persp-name)) (add-hook 'persp-mode-hook 'spacemacs//layout-autosave) (advice-add 'persp-load-state-from-file :before 'spacemacs//layout-wait-for-modeline) - (spacemacs/declare-prefix "b" "persp-buffers") ;; Override SPC TAB to only change buffers in perspective (spacemacs/set-leader-keys "ba" 'persp-add-buffer diff --git a/layers/+tools/shell/packages.el b/layers/+tools/shell/packages.el index f320ea6f0d32..dc183808761d 100644 --- a/layers/+tools/shell/packages.el +++ b/layers/+tools/shell/packages.el @@ -175,7 +175,8 @@ (defun shell/post-init-projectile () (spacemacs/set-leader-keys "p'" 'spacemacs/projectile-shell-pop - "p$t" 'projectile-multi-term-in-root)) + "p$t" 'projectile-multi-term-in-root) + (spacemacs/declare-prefix "p$" "projects/shell")) (defun shell/init-shell () (spacemacs/register-repl 'shell 'shell) @@ -227,7 +228,9 @@ "asi" 'spacemacs/shell-pop-inferior-shell "asm" 'spacemacs/shell-pop-multiterm "ast" 'spacemacs/shell-pop-ansi-term - "asT" 'spacemacs/shell-pop-term)))) + "asT" 'spacemacs/shell-pop-term) + (spacemacs/declare-prefix "'" "open shell") + (spacemacs/declare-prefix "as" "shells")))) (defun shell/init-term () (spacemacs/register-repl 'term 'term)