Emacs config utilizing prelude as a base
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.5 KiB

  1. ;;; prelude-helm-everywhere.el --- Enable Helm everywhere
  2. ;;
  3. ;; Copyright © 2014-2021 Tu, Do Hoang
  4. ;;
  5. ;; Author: Tu, Do Hoang (tuhdo1710@gmail.com)
  6. ;; URL: https://github.com/bbatsov/prelude
  7. ;; This file is not part of GNU Emacs.
  8. ;;; Commentary:
  9. ;; Enable Helm everywhere with global key bindings to replace common
  10. ;; global bindings and `helm-mode' is activated to replace `completing-read'
  11. ;; with `helm-completing-read-default', so users can use Helm with every prompt.
  12. ;;; License:
  13. ;; This program is free software; you can redistribute it and/or
  14. ;; modify it under the terms of the GNU General Public License
  15. ;; as published by the Free Software Foundation; either version 3
  16. ;; of the License, or (at your option) any later version.
  17. ;;
  18. ;; This program is distributed in the hope that it will be useful,
  19. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. ;; GNU General Public License for more details.
  22. ;;
  23. ;; You should have received a copy of the GNU General Public License
  24. ;; along with GNU Emacs; see the file COPYING. If not, write to the
  25. ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  26. ;; Boston, MA 02110-1301, USA.
  27. ;;; Code:
  28. (require 'prelude-helm)
  29. (prelude-require-packages '(helm-descbinds helm-ag))
  30. (require 'helm-eshell)
  31. (global-set-key (kbd "M-x") 'helm-M-x)
  32. (global-set-key (kbd "C-x C-m") 'helm-M-x)
  33. (global-set-key (kbd "M-y") 'helm-show-kill-ring)
  34. (global-set-key (kbd "C-x b") 'helm-mini)
  35. (global-set-key (kbd "C-x C-b") 'helm-buffers-list)
  36. (global-set-key (kbd "C-x C-f") 'helm-find-files)
  37. (global-set-key (kbd "C-h f") 'helm-apropos)
  38. (global-set-key (kbd "C-h r") 'helm-info-emacs)
  39. (global-set-key (kbd "C-h C-l") 'helm-locate-library)
  40. (define-key prelude-mode-map (kbd "C-c f") 'helm-recentf)
  41. (define-key minibuffer-local-map (kbd "C-c C-l") 'helm-minibuffer-history)
  42. (define-key isearch-mode-map (kbd "C-o") 'helm-occur-from-isearch)
  43. ;; shell history.
  44. (define-key shell-mode-map (kbd "C-c C-l") 'helm-comint-input-ring)
  45. ;; use helm to list eshell history
  46. (add-hook 'eshell-mode-hook
  47. #'(lambda ()
  48. (substitute-key-definition 'eshell-list-history 'helm-eshell-history eshell-mode-map)))
  49. (substitute-key-definition 'find-tag 'helm-etags-select global-map)
  50. (helm-descbinds-mode)
  51. (helm-mode 1)
  52. ;; enable Helm version of Projectile with replacment commands
  53. (helm-projectile-on)
  54. (provide 'prelude-helm-everywhere)
  55. ;; prelude-helm-everywhere.el ends here.