Skip to content
Browse files

Add SMEX - Smart M-X

 - It's basically ido for M-x which is pretty nice.
  • Loading branch information...
1 parent 9fa15ce commit 8f833e19dab86aa24dabb95e77cbfcca99cfdbbd @magnars committed
Showing with 14 additions and 0 deletions.
  1. +3 −0 .gitmodules
  2. +5 −0 init.el
  3. +5 −0 key-bindings.el
  4. +1 −0 site-lisp/smex
View
3 .gitmodules
@@ -79,3 +79,6 @@
[submodule "site-lisp/wgrep"]
path = site-lisp/wgrep
url = https://github.com/magnars/Emacs-wgrep
+[submodule "site-lisp/smex"]
+ path = site-lisp/smex
+ url = https://github.com/nonsequitur/smex.git
View
5 init.el
@@ -78,6 +78,11 @@
;; Add JSP expansions to html-mode
(eval-after-load "sgml-mode" '(require 'jsp-expansions))
+
+;; Smart M-x is smart
+(require 'smex)
+(smex-initialize)
+
;; Vimgolf
(load (expand-file-name "vimgolf/emacs/vimgolf.el" site-lisp-dir))
View
5 key-bindings.el
@@ -6,6 +6,11 @@
;; Completion that uses many different methods to find options.
(global-set-key (kbd "C-.") 'hippie-expand)
+;; Smart M-x
+(global-set-key (kbd "M-x") 'smex)
+(global-set-key (kbd "M-X") 'smex-major-mode-commands)
+(global-set-key (kbd "C-c C-c M-x") 'execute-extended-command)
+
;; Expand region (increases selected region by semantic units)
(global-set-key (if is-mac (kbd "C-@") (kbd "C-'")) 'er/expand-region)
1 site-lisp/smex
@@ -0,0 +1 @@
+Subproject commit 8677cde83966c330bcf912752fcfb78e7545606b

0 comments on commit 8f833e1

Please sign in to comment.
Something went wrong with that request. Please try again.