Permalink
Branch: master
Find file Copy path
73 lines (58 sloc) 2.54 KB
;;; prelude-helm-everywhere.el --- Enable Helm everywhere
;;
;; Copyright © 2014-2018 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)
(prelude-require-packages '(helm-descbinds helm-ag))
(require 'helm-eshell)
(global-set-key (kbd "M-x") 'helm-M-x)
(global-set-key (kbd "C-x C-m") '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-b") 'helm-buffers-list)
(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)
(define-key isearch-mode-map (kbd "C-o") 'helm-occur-from-isearch)
;; 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)
;; enable Helm version of Projectile with replacment commands
(helm-projectile-on)
(provide 'prelude-helm-everywhere)
;; prelude-helm-everywhere.el ends here.