emacs-prelude/modules/prelude-helm-everywhere.el
Tu, Do 72d0e6f159 Enable prelude-global-helm-global-mode by default
Since Helm is another option to Ido, users who want to use it fully
should benefit from the default Prelude setup. If some users don't like,
they can always disable global Helm mode according to the instructions
in the homepage. User can enable Helm everywhere with
prelude-helm-everywhere.

This change also enables Helm version of command history in shell and
eshell. It also adds minibuffer history without overrides any key
binding in minibuffer-local-map.
2014-09-02 13:30:18 +07:00

65 lines
2.2 KiB
EmacsLisp

;;; prelude-helm-everywhere.el --- Enable Helm everywhere
;;
;; Copyright © 2014 Tu, Do Hoang
;;
;; Author: Tu, Do Hoang (tuhdo1710@gmail.com)
;; URL: https://github.com/bbatsov/prelude
;; Version: 1.0.0
;; Keywords: convenience
;; This file is not part of GNU Emacs.
;;; Commentary:
;; Enable Helm everywhere with global key bindings to replace common
;; global bindings and `helm-mode' is activated to replace `completing-read'
;; with `helm-completing-read-default', so users can use Helm with every prompt.
;;; License:
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;; as published by the Free Software Foundation; either version 3
;; of the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;;; Code:
(require 'prelude-helm)
(require 'helm-descbinds)
(global-set-key (kbd "M-x") 'helm-M-x)
(global-set-key (kbd "M-y") 'helm-show-kill-ring)
(global-set-key (kbd "C-x b") 'helm-mini)
(global-set-key (kbd "C-x C-f") 'helm-find-files)
(global-set-key (kbd "C-h f") 'helm-apropos)
(global-set-key (kbd "C-h r") 'helm-info-emacs)
(global-set-key (kbd "C-h C-l") 'helm-locate-library)
(define-key prelude-mode-map (kbd "C-c f") 'helm-recentf)
(define-key minibuffer-local-map (kbd "C-c C-l") 'helm-minibuffer-history)
;; shell history.
(define-key shell-mode-map (kbd "C-c C-l") 'helm-comint-input-ring)
;; use helm to list eshell history
(add-hook 'eshell-mode-hook
#'(lambda ()
(substitute-key-definition 'eshell-list-history 'helm-eshell-history eshell-mode-map)))
(substitute-key-definition 'find-tag 'helm-etags-select global-map)
(setq projectile-completion-system 'helm)
(helm-descbinds-mode)
(helm-mode 1)
(provide 'prelude-helm-everywhere)
;; prelude-helm-everywhere.el ends here.