summaryrefslogtreecommitdiff
path: root/init.org
diff options
context:
space:
mode:
Diffstat (limited to 'init.org')
-rw-r--r--init.org20
1 files changed, 18 insertions, 2 deletions
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 "<menu>") 'smex)
+(global-set-key (kbd "S-<menu>") 'smex-major-mode-commands)
+#+END_SRC
+
#+BEGIN_SRC elisp :noweb-ref ido-lazy
(with-eval-after-load "ido"
<<ido>>
)
+<<smex-keys>>
#+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")