diff --git a/modules/prelude-ivy.el b/modules/prelude-ivy.el new file mode 100644 index 0000000..8924659 --- /dev/null +++ b/modules/prelude-ivy.el @@ -0,0 +1,74 @@ +;;; prelude-ivy.el --- Ivy setup +;; +;; Copyright © 2011-2017 Bozhidar Batsov +;; +;; Author: Bozhidar Batsov +;; URL: https://github.com/bbatsov/prelude +;; Version: 1.0.0 +;; Keywords: convenience + +;; This file is not part of GNU Emacs. + +;;; Commentary: + +;; Ivy-related config. + +;;; 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 '(ivy swiper counsel)) + +;; ivy is a powerful alternative to the popular ido-mode + +(require 'ivy) + +(ivy-mode 1) +(setq ivy-use-virtual-buffers t) +(setq enable-recursive-minibuffers t) +(global-set-key (kbd "C-c C-r") 'ivy-resume) +(global-set-key (kbd "") 'ivy-resume) + +(setq projectile-completion-system 'ivy) + +;; swiper provides enhanced buffer search + +(require 'swiper) + +(global-set-key "\C-s" 'swiper) + + +;; counsel supercharges a lot of commands with some ivy magic + +(require 'counsel) + +(global-set-key (kbd "M-x") 'counsel-M-x) +(global-set-key (kbd "C-x C-f") 'counsel-find-file) +(global-set-key (kbd " f") 'counsel-describe-function) +(global-set-key (kbd " v") 'counsel-describe-variable) +(global-set-key (kbd " l") 'counsel-find-library) +(global-set-key (kbd " i") 'counsel-info-lookup-symbol) +(global-set-key (kbd " u") 'counsel-unicode-char) +(global-set-key (kbd "C-c g") 'counsel-git) +(global-set-key (kbd "C-c j") 'counsel-git-grep) +(global-set-key (kbd "C-c k") 'counsel-ag) +(global-set-key (kbd "C-x l") 'counsel-locate) +(define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history) + + +(provide 'prelude-ivy) +;;; prelude-ivy.el ends here diff --git a/sample/prelude-modules.el b/sample/prelude-modules.el index c4a340b..08cbe9c 100644 --- a/sample/prelude-modules.el +++ b/sample/prelude-modules.el @@ -2,7 +2,8 @@ ;; Emacs IRC client (require 'prelude-erc) -(require 'prelude-ido) ;; Super charges Emacs completion for C-x C-f and more +;; (require 'prelude-ido) ;; Super charges Emacs completion for C-x C-f and more +(require 'prelude-ivy) ;; A mighty modern alternative to ido ;; (require 'prelude-helm) ;; Interface for narrowing and search ;; (require 'prelude-helm-everywhere) ;; Enable Helm everywhere (require 'prelude-company)