From d1c2449cb35ff29228274c494086c29a5145e152 Mon Sep 17 00:00:00 2001 From: rekado Date: Sun, 4 Dec 2016 22:35:38 +0100 Subject: Move smex configuration to init.org. --- init.org | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'init.org') diff --git a/init.org b/init.org index 40119a1..d02be48 100644 --- a/init.org +++ b/init.org @@ -528,7 +528,7 @@ The default prompt face makes it hard to see the prompt. (global-set-key (kbd "C-c m") 'magit-status) #+END_SRC -* Ido +* Smex and Ido :PROPERTIES: :header-args: :noweb-ref ido :END: @@ -560,10 +560,27 @@ The default prompt face makes it hard to see the prompt. (setq ido-use-filename-at-point 'guess) #+END_SRC +Smex is a very nice replacement for the builtin =M-x= feature. It gives me fuzzy matching and lists recently and most frequently used commands first. + +#+BEGIN_SRC elisp +(require 'smex) +(smex-initialize) +#+END_SRC + +Here are some key bindings to use Smex features. + +#+BEGIN_SRC elisp :noweb-ref smex-keys +(global-set-key (kbd "M-x") 'smex) +(global-set-key (kbd "M-X") 'smex-major-mode-commands) +(global-set-key (kbd "") 'smex) +(global-set-key (kbd "S-") 'smex-major-mode-commands) +#+END_SRC + #+BEGIN_SRC elisp :noweb-ref ido-lazy (with-eval-after-load "ido" <> ) +<> #+END_SRC * Completion @@ -938,7 +955,6 @@ This is even more stuff to be done after initialising packages. I still need to (load "email.el") (setq gnus-select-method '(nntp "news.gmane.org")) (load "init-eshell.el") -(load "init-smex.el") (load "init-modeline.el") (load "init-my-stuff.el") (load "init-paredit.el") -- cgit v1.2.3