diff --git a/.emacs b/.emacs index 41a6ecd..532fad1 100644 --- a/.emacs +++ b/.emacs @@ -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$")