Depreciate ido-mode in favor of helm in emacs

This includes a few new packages that are set up (to complement helm):
 * helm
 * helm-swoop
 * helm-ls-git

Signed-off-by: Collin J. Doering <rekahsoft@gmail.com>
This commit is contained in:
Collin J. Doering 2014-10-23 03:41:01 -04:00 committed by Collin J. Doering
parent 009e1dec7f
commit 9f62ab154e
1 changed files with 37 additions and 2 deletions

39
.emacs
View File

@ -164,8 +164,42 @@
(global-set-key "\C-x\C-b" 'ibuffer)
(autoload 'ibuffer "ibuffer" "List buffers." t)
;; Setup ido-mode
(ido-mode t)
;; Setup ido-mode *DEPRECIATED* in favor of helm-mode
;;(ido-mode t)
;; Use helm-mode
(require 'helm-config)
(helm-mode 1)
;; Thanks to: http://www.emacswiki.org/emacs/Yasnippet#toc7
(defun shk-yas/helm-prompt (prompt choices &optional display-fn)
"Use helm to select a snippet. Put this into `yas/prompt-functions.'"
(interactive)
(setq display-fn (or display-fn 'identity))
(if (require 'helm-config)
(let (tmpsource cands result rmap)
(setq cands (mapcar (lambda (x) (funcall display-fn x)) choices))
(setq rmap (mapcar (lambda (x) (cons (funcall display-fn x) x)) choices))
(setq tmpsource
(list
(cons 'name prompt)
(cons 'candidates cands)
'(action . (("Expand" . (lambda (selection) selection))))
))
(setq result (helm-other-buffer '(tmpsource) "*helm-select-yasnippet"))
(if (null result)
(signal 'quit "user quit!")
(cdr (assoc result rmap))))
nil))
;; Setup helm-swoop *TODO* key bindings?
;; See: https://github.com/ShingoFukuyama/helm-swoop
(require 'helm-swoop) ;; ELPA
;; Setup helm-ls-git to quickly select files from the current vc dir
(require 'helm-ls-git)
(global-set-key (kbd "C-x C-d") 'helm-browse-project)
;; Require ibuffer extentions (used for ibuffer-never-show-predicates)
(require 'ibuf-ext) ;; Built-in
@ -261,6 +295,7 @@
("messages" (or
(name . "^\\*geiser messages\\*$")
(name . "^\\*Shell Command Output\\*$")))
("helm" (name . "^\\*helm.*\\*$"))
("planner" (or
(name . "^\\*Calendar\\*$")
(name . "^diary$")