summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.org20
-rw-r--r--lisp/init-smex.el6
2 files changed, 18 insertions, 8 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")
diff --git a/lisp/init-smex.el b/lisp/init-smex.el
deleted file mode 100644
index 1dfeef4..0000000
--- a/lisp/init-smex.el
+++ /dev/null
@@ -1,6 +0,0 @@
-(require 'smex)
-(smex-initialize)
-(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)