2013-11-03 23:37:40 +02:00
|
|
|
;;; prelude-helm.el --- Helm setup
|
|
|
|
;;
|
2014-08-30 19:56:06 +03:00
|
|
|
;; Copyright © 2011-2014 Bozhidar Batsov
|
2013-11-03 23:37:40 +02:00
|
|
|
;;
|
|
|
|
;; Author: Bozhidar Batsov <bozhidar@batsov.com>
|
|
|
|
;; URL: https://github.com/bbatsov/prelude
|
|
|
|
;; Version: 1.0.0
|
|
|
|
;; Keywords: convenience
|
|
|
|
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
2014-09-07 04:18:44 +03:00
|
|
|
;; Some configuration for Helm following this guide:
|
|
|
|
;; http://tuhdo.github.io/helm-intro.html
|
2013-11-03 23:37:40 +02:00
|
|
|
|
|
|
|
;;; 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:
|
|
|
|
|
2014-09-04 06:07:07 +03:00
|
|
|
(prelude-require-packages '(helm helm-projectile))
|
2014-08-30 10:03:31 +03:00
|
|
|
|
|
|
|
(require 'helm)
|
|
|
|
(require 'helm-grep)
|
2014-09-07 04:18:44 +03:00
|
|
|
(require 'helm-files)
|
2014-08-30 10:03:31 +03:00
|
|
|
|
2014-09-07 04:18:44 +03:00
|
|
|
;; The default "C-x c" is quite close to "C-x C-c", which quits Emacs.
|
2014-09-10 10:51:53 +03:00
|
|
|
;; Note: this must be placed before require `helm-config'. If `helm-projectile' is
|
|
|
|
;; available, it must also be set before `helm-projectile', since `helm-projectile'
|
|
|
|
;; loads `helm-config'
|
2014-09-10 10:00:59 +03:00
|
|
|
(setq helm-command-prefix-key "C-c h")
|
2014-08-30 10:03:31 +03:00
|
|
|
|
2014-09-07 04:18:44 +03:00
|
|
|
(require 'helm-config)
|
2014-09-10 10:51:53 +03:00
|
|
|
(require 'helm-projectile)
|
2014-08-30 10:03:31 +03:00
|
|
|
|
2014-09-04 17:42:05 +03:00
|
|
|
(when (executable-find "curl")
|
2014-09-07 04:18:44 +03:00
|
|
|
(setq helm-google-suggest-use-curl-p t))
|
|
|
|
|
|
|
|
;; See https://github.com/bbatsov/prelude/pull/670 for a detailed
|
|
|
|
;; discussion of these options.
|
|
|
|
(setq helm-quick-update t
|
|
|
|
helm-split-window-in-side-p t
|
|
|
|
helm-buffers-fuzzy-matching t
|
|
|
|
helm-move-to-line-cycle-in-source t
|
|
|
|
helm-ff-search-library-in-sexp t
|
|
|
|
helm-ff-file-name-history-use-recentf t)
|
|
|
|
|
2014-09-11 08:14:43 +03:00
|
|
|
;; The default "C-x c" is quite close to "C-x C-c", which quits Emacs.
|
|
|
|
;; Changed to "C-c h". Note: We must set "C-c h" globally, because we
|
|
|
|
;; cannot change `helm-command-prefix-key' once `helm-config' is loaded.
|
|
|
|
(global-set-key (kbd "C-c h") 'helm-command-prefix)
|
|
|
|
(global-unset-key (kbd "C-x c"))
|
|
|
|
|
2014-09-07 04:18:44 +03:00
|
|
|
(define-key helm-command-map (kbd "o") 'helm-occur)
|
|
|
|
(define-key helm-command-map (kbd "g") 'helm-do-grep)
|
|
|
|
(define-key helm-command-map (kbd "C-c w") 'helm-wikipedia-suggest)
|
|
|
|
(define-key helm-command-map (kbd "SPC") 'helm-all-mark-rings)
|
|
|
|
|
|
|
|
(define-key helm-grep-mode-map (kbd "RET") 'helm-grep-mode-jump-other-window)
|
|
|
|
(define-key helm-grep-mode-map (kbd "n") 'helm-grep-mode-jump-other-window-forward)
|
|
|
|
(define-key helm-grep-mode-map (kbd "p") 'helm-grep-mode-jump-other-window-backward)
|
|
|
|
|
2014-08-30 10:03:31 +03:00
|
|
|
(push "Press <C-c p h> to navigate a project in Helm." prelude-tips)
|
2013-11-03 23:37:40 +02:00
|
|
|
|
|
|
|
(provide 'prelude-helm)
|
|
|
|
|
|
|
|
;;; prelude-helm.el ends here
|