Extract Helm support into a separate module
This commit is contained in:
parent
a509b0a174
commit
523a4851a6
6 changed files with 61 additions and 17 deletions
|
@ -293,7 +293,7 @@ Keybinding | Description
|
||||||
<kbd>C-c r</kbd> | Rename the currently visited file and buffer.
|
<kbd>C-c r</kbd> | Rename the currently visited file and buffer.
|
||||||
<kbd>C-c t</kbd> | Open a terminal emulator (`ansi-term`).
|
<kbd>C-c t</kbd> | Open a terminal emulator (`ansi-term`).
|
||||||
<kbd>C-c k</kbd> | Kill all open buffers except the one you're currently in.
|
<kbd>C-c k</kbd> | Kill all open buffers except the one you're currently in.
|
||||||
<kbd>C-c h</kbd> | Open Helm (a useful means of navigating your buffers and project files).
|
<kbd>C-c h</kbd> | Open Helm (available if you've enabled the `prelude-helm` module).
|
||||||
<kbd>C-c +</kbd> | Increment integer at point.
|
<kbd>C-c +</kbd> | Increment integer at point.
|
||||||
<kbd>C-c -</kbd> | Decrement integer at point.
|
<kbd>C-c -</kbd> | Decrement integer at point.
|
||||||
<kbd>Super-r</kbd> | Recent files
|
<kbd>Super-r</kbd> | Recent files
|
||||||
|
|
|
@ -405,7 +405,6 @@ Doesn't mess with special buffers."
|
||||||
"Press <jj> quickly to jump to the beginning of a visible word."
|
"Press <jj> quickly to jump to the beginning of a visible word."
|
||||||
"Press <jk> quickly to jump to a visible character."
|
"Press <jk> quickly to jump to a visible character."
|
||||||
"Press <jl> quickly to jump to a visible line."
|
"Press <jl> quickly to jump to a visible line."
|
||||||
"Press <C-c h> to navigate a project in Helm."
|
|
||||||
"Press <C-c g> to search in Google."
|
"Press <C-c g> to search in Google."
|
||||||
"Press <C-c G> to search in GitHub."
|
"Press <C-c G> to search in GitHub."
|
||||||
"Press <C-c y> to search in YouTube."
|
"Press <C-c y> to search in YouTube."
|
||||||
|
|
|
@ -294,20 +294,6 @@ The body of the advice is in BODY."
|
||||||
(diminish 'anzu-mode)
|
(diminish 'anzu-mode)
|
||||||
(global-anzu-mode)
|
(global-anzu-mode)
|
||||||
|
|
||||||
(require 'helm-misc)
|
|
||||||
(require 'helm-projectile)
|
|
||||||
|
|
||||||
(defun helm-prelude ()
|
|
||||||
"Preconfigured `helm'."
|
|
||||||
(interactive)
|
|
||||||
(condition-case nil
|
|
||||||
(if (projectile-project-root)
|
|
||||||
(helm-projectile)
|
|
||||||
;; otherwise fallback to helm-mini
|
|
||||||
(helm-mini))
|
|
||||||
;; fall back to helm mini if an error occurs (usually in projectile-project-root)
|
|
||||||
(error (helm-mini))))
|
|
||||||
|
|
||||||
;; shorter aliases for ack-and-a-half commands
|
;; shorter aliases for ack-and-a-half commands
|
||||||
(defalias 'ack 'ack-and-a-half)
|
(defalias 'ack 'ack-and-a-half)
|
||||||
(defalias 'ack-same 'ack-and-a-half-same)
|
(defalias 'ack-same 'ack-and-a-half-same)
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
'(ace-jump-mode ack-and-a-half anzu dash diminish elisp-slime-nav
|
'(ace-jump-mode ack-and-a-half anzu dash diminish elisp-slime-nav
|
||||||
epl expand-region flx-ido flycheck gist
|
epl expand-region flx-ido flycheck gist
|
||||||
gitconfig-mode gitignore-mode grizzl
|
gitconfig-mode gitignore-mode grizzl
|
||||||
guru-mode helm helm-projectile ido-ubiquitous
|
guru-mode projectile ido-ubiquitous
|
||||||
key-chord magit move-text rainbow-mode
|
key-chord magit move-text rainbow-mode
|
||||||
smartparens smex undo-tree
|
smartparens smex undo-tree
|
||||||
volatile-highlights zenburn-theme)
|
volatile-highlights zenburn-theme)
|
||||||
|
|
58
modules/prelude-helm.el
Normal file
58
modules/prelude-helm.el
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
;;; prelude-helm.el --- Helm setup
|
||||||
|
;;
|
||||||
|
;; Copyright © 2011-2013 Bozhidar Batsov
|
||||||
|
;;
|
||||||
|
;; 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:
|
||||||
|
|
||||||
|
;; Some config for Helm.
|
||||||
|
|
||||||
|
;;; 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:
|
||||||
|
|
||||||
|
(prelude-require-packages '(helm helm-projectile))
|
||||||
|
|
||||||
|
(require 'helm-misc)
|
||||||
|
(require 'helm-projectile)
|
||||||
|
|
||||||
|
(defun helm-prelude ()
|
||||||
|
"Preconfigured `helm'."
|
||||||
|
(interactive)
|
||||||
|
(condition-case nil
|
||||||
|
(if (projectile-project-root)
|
||||||
|
(helm-projectile)
|
||||||
|
;; otherwise fallback to `helm-mini'
|
||||||
|
(helm-mini))
|
||||||
|
;; fall back to helm mini if an error occurs (usually in `projectile-project-root')
|
||||||
|
(error (helm-mini))))
|
||||||
|
|
||||||
|
(eval-after-load 'prelude-mode
|
||||||
|
'(define-key prelude-mode-map (kbd "C-c h") 'helm-prelude))
|
||||||
|
|
||||||
|
(push "Press <C-c h> to navigate a project in Helm." prelude-tips)
|
||||||
|
|
||||||
|
(provide 'prelude-helm)
|
||||||
|
|
||||||
|
;;; prelude-helm.el ends here
|
|
@ -9,6 +9,7 @@
|
||||||
(require 'prelude-erc)
|
(require 'prelude-erc)
|
||||||
;; (require 'prelude-erlang)
|
;; (require 'prelude-erlang)
|
||||||
;; (require 'prelude-haskell)
|
;; (require 'prelude-haskell)
|
||||||
|
;; (require 'prelude-helm)
|
||||||
(require 'prelude-js)
|
(require 'prelude-js)
|
||||||
;; (require 'prelude-latex)
|
;; (require 'prelude-latex)
|
||||||
(require 'prelude-lisp)
|
(require 'prelude-lisp)
|
||||||
|
|
Loading…
Add table
Reference in a new issue