2014-08-31 23:09:10 +03:00
|
|
|
;;; prelude-helm-everywhere.el --- Enable Helm everywhere
|
|
|
|
;;
|
2016-01-31 08:44:18 +02:00
|
|
|
;; Copyright © 2014-2016 Tu, Do Hoang
|
2014-08-31 23:09:10 +03:00
|
|
|
;;
|
|
|
|
;; 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)
|
2014-12-16 07:19:48 +02:00
|
|
|
(prelude-require-packages '(helm-descbinds helm-ag))
|
2014-09-04 06:07:07 +03:00
|
|
|
(require 'helm-eshell)
|
2014-08-31 23:09:10 +03:00
|
|
|
|
|
|
|
(global-set-key (kbd "M-x") 'helm-M-x)
|
2014-10-12 01:49:40 +03:00
|
|
|
(global-set-key (kbd "C-x C-m") 'helm-M-x)
|
2014-08-31 23:09:10 +03:00
|
|
|
(global-set-key (kbd "M-y") 'helm-show-kill-ring)
|
|
|
|
(global-set-key (kbd "C-x b") 'helm-mini)
|
2014-11-04 21:34:56 +02:00
|
|
|
(global-set-key (kbd "C-x C-b") 'helm-buffers-list)
|
2014-08-31 23:09:10 +03:00
|
|
|
(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)
|
|
|
|
|
2016-09-25 07:58:47 +03:00
|
|
|
(define-key isearch-mode-map (kbd "C-o") 'helm-occur-from-isearch)
|
|
|
|
|
2014-08-31 23:09:10 +03:00
|
|
|
;; 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)
|
|
|
|
|
2014-10-08 18:39:20 +03:00
|
|
|
;; enable Helm version of Projectile with replacment commands
|
|
|
|
(helm-projectile-on)
|
|
|
|
|
2014-08-31 23:09:10 +03:00
|
|
|
(provide 'prelude-helm-everywhere)
|
|
|
|
;; prelude-helm-everywhere.el ends here.
|